1 2005-08-21 Steven G. Kargl <kargls@comcast.net>
3 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
5 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
7 * gfortran.h (gfc_option_t): Remove source field. Add
9 (gfc_new_file): Remove arguments in prototype.
10 (gfc_source_file): Make 'const char *'.
11 * f95-lang.c (gfc_init): Use gfc_source_file instead of
12 gfc_option.source. Call gfc_new_file without arguments.
13 * invoke.texi: Document new options '-fd-lines-as-code' and
14 '-fd-lines-as-comment'.
15 * lang.opt: Add new options. Alphabetize.
16 * options.c (gfc_init_options): Initialize gfc_source_file instead
17 of gfc_option.source. Initialize gfc_option.flag_d_lines.
18 (form_from_filename): Move here from scanner.c. Make
19 'filename' argument 'const'.
20 (gfc_post_options): Set gfc_source_file. Determine source form.
21 Warn if 'd-lines*' are used in free form.
22 * scanner.c (gfc_source_file): Constify.
23 (skip_fixed_comments): Deal with d-lines.
24 (get_file): Constify argument 'name'.
25 (load_file): Constify argument 'filename'.
26 (form_from_filename): Moved to options.c.
27 (gfc_new_file): Remove arguments. Don't initialize
28 gfc_source_file, don't determine source form.
29 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
32 2005-08-19 Steven G. Kargl <kargls@comcast.net>
35 * gfortran.h: Remove PATH_MAX definition.
36 * module.c (write_module, gfc_dump_module): Use alloca to allocate
38 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
40 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
42 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
45 2005-08-14 Asher Langton <langton2@llnl.gov>
47 * parse.c (match): Enclose macro in do...while(0) and braces.
49 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
52 * gfortran.texi: Document PRINT namelist.
54 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
57 * io.c (match_io): Add code to implement PRINT namelist.
59 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
61 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
64 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
65 Steven Bosscher <stevenb@suse.de>
68 * gfortran.h: Add is_main_program member to symbol_attribute.
69 * trans-decl: Add a gfor_fndecl_set_std tree.
70 (gfc_build_builtin_function_decls): Create it.
71 (gfc_generate_function_code): Add this call at the beginning of
73 * trans.c (gfc_generate_code): Move main_program and attr.
74 * trans.h: Add declaration for gfor_fndecl_set_std.
76 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
79 gfortran.h: Declare new function gfc_resolve_dim_arg.
80 resolve.c: New function gfc_resolve_dim_arg.
81 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
82 (gfc_resolve_any): Likewise.
83 (gfc_resolve_count): Likewise.
84 (gfc_resolve_cshift): Likewise. If the kind of shift is less
85 gfc_default_integer_kind, convert it to default integer type.
86 (gfc_resolve_eoshift): Likewise.
87 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
88 (gfc_resolve_maxval): Likewise.
89 (gfc_resolve_minloc): Likewise.
90 (gfc_resolve_minval): Likewise.
91 (gfc_resolve_product): Likewise.
92 (gfc_resolve_spread): Likewise.
93 (gfc_resolve_sum): Likewise.
95 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
97 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
98 functions for new intrinsics TTYNAM and ISATTY.
99 * intrinsic.c (add_functions, add_subroutines): Add new
101 * intrinsic.h: Add prototypes for new check and resolve
103 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
104 resolve functions for intrinsics TTYNAM and ISATTY.
105 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
106 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
108 2005-08-09 Jakub Jelinek <jakub@redhat.com>
110 * scanner.c (preprocessor_line): Don't write beyond the end of flag
113 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
116 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
117 * gfortran.h: Add enums for FLUSH.
118 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
119 comment appropriately. (gfc_match_flush): New function.
120 * match.c (gfc_match_if): Add match for flush.
121 * match.h: Add prototype.
122 * parse.c (decode_statement): Add flush to 'f' case.
123 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
124 * resolve.c (resolve_code): Add flush case.
125 * st.c (gfc_free_statement): Add flush case.
126 * trans-io.c: Add prototype for flush.
127 (gfc_build_io_library_fndecls): Build fndecl for flush.
128 (gfc_trans_flush): New function.
129 * trans-stmt.h: Add prototype.
130 * trans.c (gfc_trans_code): Add case for flush.
132 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
134 * primary.c (match_hollerith_constant): Fix typo.
136 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
138 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
139 invoke.texi, resolve.c, trans-array.c, trans-array.h,
140 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
141 comment/doc typos. Follow spelling conventions.
143 2005-08-06 Jakub Jelinek <jakub@redhat.com>
147 * primary.c (match_varspec): If equiv_flag, don't look at sym's
148 attributes, call gfc_match_array_ref up to twice and don't do any
149 substring or component processing.
150 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
151 REF_SUBSTRING or nothing if needed. Check that substrings
152 don't have zero length.
154 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
156 * trans-expr.c (gfc_build_builtin_function_decls): Mark
157 stop_numeric and stop_string as non-returning.
159 2005-08-04 Paul Brook <paul@codesourcery.com>
161 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
162 (gfc_conv_expr_lhs): Fix assertion.
163 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
165 2005-08-02 David Edelsohn <edelsohn@gnu.org>
168 * expr.c (simplify_parameter_variable): Do not copy the subobject
169 references if the expression value is a constant.
171 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
173 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
175 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
176 fix description of ceiling in index.
178 2005-07-31 Steven Bosscher <stevenb@suse.de>
180 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
181 malloc functions the 'malloc' attribute. Give runtime_error the
182 'noreturn' attribute.
184 2005-07-31 Steven Bosscher <stevenb@suse.de>
186 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
187 of the assigned goto variable.
189 2005-07-29 Steven Bosscher <stevenb@suse.de>
191 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
193 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
195 * fortran/f95-lang.c (language_function): Remove
196 named_labels, shadowed_labels, returns_value, returns_abnormally,
197 warn_about_return_type, and extern_inline fields.
198 (named_labels): Remove variable.
199 (gfc_init_decl_processing): Remove setting of named_labels.
201 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
204 * resolve.c (resolve_operator): Improve diagnostic for comparison
205 of logicals with invalid operator.
207 2005-07-25 Jakub Jelinek <jakub@redhat.com>
210 * data.c (gfc_assign_data_value_range): Call
211 create_character_initializer if last_ts is a character type.
213 2005-07-22 Manfred Hollstein <mh@suse.com>
215 * match.c (gfc_match_symbol): Fix uninitialised warnings.
216 * matchexp.c (gfc_match_expr): Likewise.
218 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
220 Make CONSTRUCTOR use VEC to store initializers.
221 * trans-array.c (gfc_build_null_descriptor,
222 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
223 Update to cope with VEC in CONSTRUCTOR_ELTS.
224 * trans-common.c (create_common): Likewise.
225 * trans-expr.c (gfc_conv_structure): Likewise.
226 * trans-stmt.c (gfc_trans_character_select): Use
227 build_constructor_from_list instead of build_constructor.
229 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
232 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
233 is matched against interfaces in parent namespaces. If there
234 the symtree is set to point to the interface.
236 2005-07-16 David Edelsohn <edelsohn@gnu.org>
239 * decl.c (do_parm): Adjust character initializer to character length
240 of symbol before assigning.
242 2005-07-14 Steve Ellcey <sje@cup.hp.com>
244 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
246 2005-07-14 Jakub Jelinek <jakub@redhat.com>
248 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
249 (gfc_error_buf): Add allocated and index fields. Change message
250 field from array to a pointer.
251 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
252 (cur_error_buffer): New variable.
253 (error_char): Use cur_error_buffer->{message,index} instead of
254 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
256 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
257 cur_error_buffer and its index rather than {warning,error}_ptr
258 and use_warning_buffer.
259 (gfc_warning_check, gfc_error_check): Don't print anything if
261 (gfc_push_error): Allocate saved message with xstrdup.
262 (gfc_pop_error): Free saved message with gfc_free.
263 (gfc_free_error): New function.
264 * primary.c (match_complex_constant): Call gfc_free_error if
265 gfc_pop_error will not be called.
266 * match.c (gfc_match_st_function): Likewise.
269 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
270 file. Fix file left but not entered warning.
272 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
273 Steven G. Kargl <kargls@comcast.net>
275 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
276 for the array and attach to namespace list for automatic deallocation.
278 2005-07-13 Andreas Schwab <schwab@suse.de>
280 * Make-lang.in (fortran/dependency.o): Depend on
281 $(GFORTRAN_TRANS_DEPS).
283 2005-07-11 Jakub Jelinek <jakub@redhat.com>
285 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
287 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
288 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
289 Don't clear maskindexes here.
291 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
293 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
296 2005-07-08 Jakub Jelinek <jakub@redhat.com>
298 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
301 2005-07-07 Jakub Jelinek <jakub@redhat.com>
303 * scanner.c (load_line): Add pbuflen argument, don't make
304 buflen static. If maxlen == 0 or preprocessor_flag,
305 don't truncate at buflen, but at maxlen. In xrealloc add
306 1 byte at the end for the terminating '\0'. Don't fill
307 with spaces up to buflen, but gfc_option.fixed_line_length.
308 (load_file): Adjust load_line caller. Add line_len variable.
310 * scanner.c (preprocessor_line): Only set current_file->line when errors
311 have not been encountered. Warn and don't crash if a file leave
312 preprocessor line has no corresponding entering line. Formatting.
314 2005-07-07 Steven Bosscher <stevenb@suse.de>
316 * primary.c (match_hollerith_constant): Use int, not unsigned int,
317 for the hollerith length. Fix indentation.
319 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
324 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
325 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
327 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
328 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
329 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
331 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
332 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
333 (gfc_check_assign): Enable conversion from Hollerith to other.
334 * gfortran.h (bt): Add BT_HOLLERITH.
335 (gfc_expr): Add from_H flag.
336 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
337 (add_conversions): Add conversions from Hollerith constant to other.
338 (do_simplify): Don't simplify if Hollerith constant arguments exist.
339 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
340 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
341 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
342 * primary.c (match_hollerith_constant): New function.
343 (gfc_match_literal_constant): Add match Hollerith before Integer.
344 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
346 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
347 convert Hollerith constant to tree.
348 * trans-io.c (gfc_convert_array_to_string): Get array's address and
349 length to set string expr.
350 (set_string): Deal with array assigned Hollerith constant and character
352 * gfortran.texi: Document Hollerith constants as extention support.
354 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
357 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
359 2005-07-07 Jakub Jelinek <jakub@redhat.com>
361 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
364 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
366 * gfortran.texi, intrinsic.texi: Fix typos.
367 * symbol.c: Fix a comment typo.
369 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
371 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
372 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
373 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
374 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
377 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
380 * io.c (match_dt_element): Do not allow END tag in PRINT or
383 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
385 * lang.opt: Remove "." from end of help texts.
387 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
389 * gfortran.texi: Fix typos and grammar.
390 * invoke.texi: Fix typos and grammar.
391 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
392 exit. Fixed alignment of text for dtime syntax. Fixed a few line
395 2005-06-25 Jakub Jelinek <jakub@redhat.com>
397 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
398 type than boolean_type_node.
400 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
402 * all files: Update FSF address in copyright headers.
404 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
407 * gfortran.h: Add symbols for new intrinsic functions.
408 * intrinsic.c: Add new functions acosh, asinh, and atanh.
409 * intrinsic.h: Add prototypes for the new functions.
410 * iresolve.c (gfc_resolve_acosh): New function.
411 (gfc_resolve_asinh): New function.
412 (gfc_resolve_atanh): New function.
413 * mathbuiltins.def: Add defines.
414 * simplify.c (gfc_simplify_acosh): New function.
415 (gfc_simplify_asinh): New function.
416 (gfc_simplify_atanh): New function.
418 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
420 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
422 2005-06-22 Paul Brook <paul@codesourcery.com>
425 * symbol.c (gfc_is_var_automatic): New function.
426 (save_symbol): Use it.
428 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
429 Paul Thomas <pault@gcc.gnu.org>
433 * module.c (mio_namelist): New function. Correct to set
434 namelist_tail and to give error on renaming namelist by use
436 (mio_symbol): Call mio_namelist.
438 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
440 * gfortran.h: Add flag_backslash compile-time option.
441 * lang.opt: Add support for -fbackslash option.
442 * options.c: Likewise.
443 * primary.c: Implement behavior for -fno-backslash.
444 * invoke.texi: Add doc for -fbackslash option.
445 * gfortran.texi: Remove mention of -fno-backslash as a
448 2005-06-20 Steven G. Kargl <kargls@comcast.net>
452 * match.c (gfc_match_label): Detect duplicate labels.
455 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
457 * intrinsic.c (check_intrinsic_standard): Fix spelling error
458 in a warning message.
460 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
461 Steven G. Kargl <kargls@comast.net>
464 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
465 for an array; check that sym->as is NULL.
468 2005-06-18 Steven G. Kargl <kargls@comcast.net>
470 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
471 functions whose simplification routine return FAILURE.
473 2005-06-13 Geoffrey Keating <geoffk@apple.com>
475 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
476 (rule for installing f95.1 manpage): Does depend on installdirs.
478 2005-06-13 Jakub Jelinek <jakub@redhat.com>
481 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
482 in the innermost loop.
484 * trans-expr.c (gfc_conv_function_call): Return int instead of
485 void. Use a local variable for has_alternate_specifier and
486 return it. Avoid modification of function type's return value
487 in place, since it may be shared.
488 * trans.h (has_alternate_specifier): Remove.
489 (gfc_conv_function_call): Change return type.
490 * trans-stmt.c (has_alternate_specifier): Remove.
491 (gfc_trans_call): Add a local has_alternate_specifier variable,
492 set it from gfc_conv_function_call return value.
494 2005-06-12 Richard Henderson <rth@redhat.com>
496 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
497 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
498 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
499 (gfc_trans_allocate_array_storage): Use them.
500 (gfc_array_allocate, gfc_array_deallocate): Likewise.
501 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
502 (gfc_trans_deferred_array): Likewise.
503 * trans-expr.c (gfc_conv_function_call): Likewise.
504 (gfc_trans_subcomponent_assign): Likewise.
505 (gfc_trans_pointer_assignment): Likewise.
506 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
507 * trans-types.c (gfc_array_descriptor_base): New.
508 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
509 (gfc_get_array_descriptor_base): Break out from ...
510 (gfc_get_array_type_bounds): ... here. Create type variants.
511 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
512 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
514 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
516 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
517 calling conventions. Look at sym instead of sym->result.
518 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
519 Remove condition which is always false with workaround removed.
520 (gfc_return_by_reference): Always look at sym, never at sym->result.
522 2005-06-11 Steven G. Kargl <kargls@comcast.net>
526 * trans-array.c (gfc_array_deallocate): pstat is new argument
527 (gfc_array_allocate): update gfc_array_deallocate() call.
528 (gfc_trans_deferred_array): ditto.
529 * trans-array.h: update gfc_array_deallocate() prototype.
530 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
531 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
533 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
535 * intrinsic.texi: Add documentation for dcmplx, digits,
536 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
538 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
541 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
542 Generate correct exit condition in case of negative steps in
545 * invoke.texi: Fix description of flags required for compatibility
548 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
549 Erik Schnetter <schnetter@aei.mpg.de>
552 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
553 remove FIXME comment.
555 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
557 * match.c (match_forall_iterator): Don't immediately give error if '='
558 is not followed by an expression.
560 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
561 Erik Edelmann <erik.edelmann@iki.fi>
563 * array.c (gfc_match_array_constructor): Disallow empty array
566 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
568 * fortran/intrinsic.texi: Add documentation for
569 command_argument_count, conjg, dconjg, count,
570 cpu_time, cshift, date_and_time, dble, dfloat.
572 2005-06-01 Roger Sayle <roger@eyesopen.com>
574 * intrinsic.c (add_conv): No longer take a "simplify" argument as
575 its always gfc_convert_constant, instead take a "standard" argument.
576 (add_conversions): Change all existing calls of add_conv to pass
577 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
578 extensions support integer-logical and logical-integer conversions.
579 (gfc_convert_type_warn): Warn about use the use of these conversions
580 as a extension when appropriate, i.e. with -pedantic.
581 * simplify.c (gfc_convert_constant): Add support for integer to
582 logical and logical to integer conversions, using gfc_int2log and
584 * arith.c (gfc_log2int, gfc_int2log): New functions.
585 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
586 * gfortran.texi: Document this new GNU extension.
588 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
590 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
591 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
592 Correct comments and replace convert of integer_one_node with
595 2005-06-01 Jakub Jelinek <jakub@redhat.com>
598 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
599 to avoid giving error multiple times.
600 (resolve_entries): Don't error about BT_UNKNOWN here.
601 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
602 (resolve_fntype): New function.
603 (gfc_resolve): Call resolve_fntype.
605 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
608 * fortran/io.c (resolve_tag): Fix error message.
610 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
612 * fortran/trans-decl.c: Don't include errors.h.
613 * fortran/Make-lang.in: Updates dependencies.
615 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
620 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
621 string length from the expression typespec character length value
622 and set temp_ss->stringlength and backend_decl. Obtain the
623 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
624 Dereference the expression to obtain the character.
625 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
626 dereference of scalar character pointer structure components.
627 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
628 string length for the structure component from the component
631 2005-05-30 Roger Sayle <roger@eyesopen.com>
633 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
634 * options.c (gfc_init_options): By default, allow legacy extensions
636 (gfc_post_options): Make -pedantic warn about legacy extensions
637 even with -std=legacy.
638 (gfc_handle_option): Make -std=gnu follow the default behaviour
639 of warning about legacy extensions, but allowing them. Make the
640 new -std=legacy accept everything and warn about nothing.
641 * lang.opt (std=legacy): New F95 command line option.
642 * invoke.texi: Document both -std=f2003 and -std=legacy.
643 * gfortran.texi: Explain the two types of extensions and document
644 how they are affected by the various -std= command line options.
646 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
648 * trans-expr.c: Remove trailing ^M.
650 * trans-expr.c: Fix comment typos.
652 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
660 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
661 length to temp_ss for character pointer array assignments.
662 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
663 dereferencing of characters and character pointers.
664 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
665 length as return argument for various kinds of handling of return.
666 Return a char[]* temporary for character pointer functions and
667 dereference the temporary upon return.
669 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
670 Steven G. Kargl <kargls@comcast.net>
673 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
675 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
678 * io.c (format_item_1): Add check and extension warning for
681 2005-05-28 Steven G. Kargl <kargls@comcast.net>
683 * arith.c (gfc_arith_init_1): Fix off by one problem;
684 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
686 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
687 Steven G. Kargl <kargls@comcast.net>
689 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
692 2005-05-27 Steven G. Kargl <kargls@comcast.net>
694 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
695 like types in comparsion.
697 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
699 * data.c, parse.c, trans-array.c, trans-decl.c,
700 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
701 trans.h: Fix comment typos. Follow spelling conventions.
703 2005-05-22 Roger Sayle <roger@eyesopen.com>
705 * gfortran.texi: Document some more GNU extensions.
707 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
709 * error.c (gfc_warning): Fix typo in comment.
711 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
714 * fortran/iresolve.c (gfc_resolve_reshape): Add
715 gfc_type_letter (BT_COMPLEX) for complex to
716 to resolved function name.
718 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
720 * array.c (gfc_match_array_constructor): Support [ ... ]
721 style array constructors.
723 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
725 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
726 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
727 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
728 to correct enum type.
729 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
730 function. Add default case to switch, deal with FIX_TRUNC_EXPR
731 instead of FIX_FLOOR_EXPR.
733 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
736 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
737 build character length.
739 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
741 * trans-types.c (gfc_array_range_type): New variable.
742 (gfc_init_types): Initialize gfc_array_range_type.
743 (gfc_get_array_type_bounds): Use gfc_array_range_type.
745 2005-05-17 Jakub Jelinek <jakub@redhat.com>
748 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
749 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
750 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
752 (generate_loop_for_rhs_to_temp): Likewise.
753 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
754 It non-NULL, add it to body.
755 (allocate_temp_for_forall_nest_1): New function, split from
756 allocate_temp_for_forall_nest.
757 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
758 propagate it down to compute_overall_iter_number. Use
759 allocate_temp_for_forall_nest_1.
760 (gfc_trans_assign_need_temp): Remove COUNT2. Call
761 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
762 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
763 and generate_loop_for_temp_to_lhs.
764 (gfc_trans_pointer_assign_need_temp): Adjust calls to
765 allocate_temp_for_forall_nest.
766 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
767 stmtblock_t. Call compute_overall_iter_number just once, then
768 allocate_temp_for_forall_nest_1 twice with the same size.
769 Initialize mask indexes if nested_forall_info != NULL.
770 (gfc_trans_where_2): Initialize mask indexes before calling
771 gfc_trans_nested_forall_loop.
773 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
774 Jerry DeLisle <jvdelisle@verizon.net>
777 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
778 resolve ICE on assign of format label.
779 * trans-io.c (set_string): add fold-convert to properly
780 handle assigned format label in write.
782 2005-05-13 Paul Brook <paul@codesourcery.com>
784 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
786 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
788 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
790 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
793 * io.c (check_format): Look for literal characters inside
796 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
798 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
799 attribute from result symbol to function symbol.
800 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
801 instead of sym->result->attr.dimension.
803 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
806 * gfortran.h (gfc_option): Add flag_f2c.
807 * invoke.texi: Document '-ff2c' command line option. Adapt
808 documentation for '-fno-second-underscore' and '-fno-underscoring'.
809 * lang.opt (ff2c): New entry.
810 * options.c (gfc-init_options): Set default calling convention
811 to -fno-f2c. Mark -fsecond-underscore unset.
812 (gfc_post_options): Set -fsecond-underscore if not explicitly set
814 (handle_options): Set gfc_option.flag_f2c according to requested
816 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
817 intrinsics where necessary.
818 (gfc_trans_deferred_vars): Change todo error to assertion.
819 * trans-expr.c (gfc_conv_variable): Dereference access
820 to hidden result argument.
821 (gfc_conv_function_call): Add hidden result argument to argument
822 list if f2c calling conventions requested. Slightly restructure
823 tests. Convert result of default REAL function to requested type
824 if f2c calling conventions are used. Dereference COMPLEX result
826 * trans-types.c (gfc_sym_type): Return double for default REAL
827 function if f2c cc are used.
828 (gfc_return_by_reference): Slightly restructure logic. Return
829 COMPLEX by reference depending on calling conventions.
830 (gfc_get_function_type): Correctly make hidden result argument a
831 pass-by-reference argument for COMPLEX. Remove old code which does
832 this for derived types.
834 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
836 * match.c (gfc_match_return): Only require space after keyword when
837 it is obligatory. Only give stdwarn to after matching is successful.
838 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
840 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
842 * intrinsic.texi: Fix typos.
844 2005-05-07 Steven G. Kargl <kargls@comcast.net>
846 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
847 description to include information about scalar arguments.
849 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
851 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
852 match.h, trans-array.h: Update copyright.
854 2005-04-29 Tom Tromey <tromey@redhat.com>
856 * f95-lang.c (poplevel): Updated for change to build_block.
858 2005-04-29 Jakub Jelinek <jakub@redhat.com>
862 * trans-expr.c (gfc_conv_variable): Handle return values in functions
863 with alternate entry points.
864 * resolve.c (resolve_entries): Remove unnecessary string termination
865 after snprintf. Set result of entry master.
866 If all entries have the same type, set entry master's type
867 to that common type, otherwise set mixed_entry_master attribute.
868 * trans-types.c (gfc_get_mixed_entry_union): New function.
869 (gfc_get_function_type): Use it for mixed_entry_master functions.
870 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
871 * decl.c (gfc_match_entry): Set entry->result properly for
873 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
875 (build_entry_thunks): Handle return values in entry thunks.
876 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
877 shared between multiple contexts.
878 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
879 current_function_decl instead of sym->backend_decl. Skip over
880 entry master's entry id argument. For mixed_entry_master entries or
881 their results, return a COMPONENT_REF of the fake result.
882 (gfc_trans_deferred_vars): Don't warn about missing return value if
883 at least one entry point uses RESULT.
884 (gfc_generate_function_code): For entry master returning
885 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
886 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
887 values optional just because they are in entry master.
889 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
891 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
892 Tobias forgot this in previous commit.
894 2005-04-29 Paul Brook <paul@codesourcery.com>
896 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
899 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
901 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
902 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
903 IMPLICIT NONE, set seen_implicit_none.
904 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
906 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
908 * gfortran.h (gfc_gsymbol): Make name a const char *.
909 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
912 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
915 * resolve.c (resolve_actual_arglist): Issue an error if a statement
916 functions is used as actual argument.
918 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
921 * interface.c (compare_parameter): Ignore type for EXPR_NULL
922 only if type is BT_UNKNOWN.
924 2005-04-25 Paul Brook <paul@codesourcery.com>
925 Steven G. Kargl <kargls@comcast.net>
928 * check.c (gfc_check_ichar_iachar): New function.
929 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
930 * intrinsic.c (add_functions): Use it.
931 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
932 character expression lengths.
934 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
937 * trans-common.c (translate_common): Cast offset and
938 common_segment->offset to type int for warning message.
940 2005-04-23 DJ Delorie <dj@redhat.com>
942 * trans-decl.c: Adjust warning() callers.
944 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
946 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
947 intermediate representation. Fix typo in comment.
949 2005-04-21 Steven G. Kargl <kargls@comcast.net>
951 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
952 simplify logic; Add a gcc_assert.
954 2005-04-19 Steven G. Kargl <kargls@comcast.net>
956 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
958 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
959 Steven G. Kargl <kargls@comcast.net>
961 * invoke.texi: Update -Waliasing description
963 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
966 * resolve.c (resolve_variable): If e->symtree is not set, this
967 ought to be a FAILURE, and not a segfault.
969 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
976 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
977 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
978 declarations of old namelist functions.
979 (build_dt): Simplified call to transfer_namelist_element.
980 (nml_get_addr_expr): Generates address expression for start of
981 object data. New function.
982 (nml_full_name): Qualified name for derived type components. New
984 (transfer_namelist_element): Modified for calls to new functions
985 and improved derived type handling.
987 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
989 * scanner.c (gfc_next_char_literal): Reset truncation flag
990 for lines ending in a comment for both fixed and free form.
991 (load_line): Do not set truncated flag if only truncating
994 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
997 * gfortran.h (gfc_linebuf): Add truncated field.
998 * parse.c (next_statement): Handle warning for truncated
1000 * scanner.c (load_line): Return if line was truncated.
1001 No longer warn for truncated lines. Remove unused parameters.
1002 (load_file): Store load_line return value to linebuf.
1003 (gfc_error_recovery): Do not advance line at the end.
1005 2005-04-14 Steven G. Kargl <kargls@comcast.net>
1007 * gfortran.h (gfc_real_info): Add subnormal struct member.
1008 * arith.c (gfc_arith_init_1): Set it.
1009 (gfc_check_real_range): Use it.
1010 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1012 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
1014 * simplify.c: Fix a comment typo.
1016 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
1018 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1020 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1022 * simplify.c (gfc_simplify_nearest): Overhaul.
1024 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
1026 * interface.c: Fix a comment typo.
1028 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1030 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1033 2005-04-09 Steven G. Kargl <kargls@comcast.net>
1035 * simplify.c (gfc_simplify_anint): Use mpfr_round()
1036 (gfc_simplify_dnint): ditto.
1037 (gfc_simplify_nint): ditto.
1039 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
1042 * io.c (check_format): Allow an optional comma
1043 between descriptors.
1045 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1047 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1048 comment according to GNU coding style.
1049 (gfc_match_if): Remove gfc_ prefix in call to
1050 match_arithmetic_if.
1052 2005-04-08 Diego Novillo <dnovillo@redhat.com>
1054 * match.c (gfc_match_arithmetic_if): Declare static.
1056 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1059 * match.c (gfc_match_arithmetic_if): New function to match an
1060 arithmetic IF statement.
1061 (gfc_match_if): Use gfc_match_arithmetic_if to match an
1062 arithmetic IF statement embedded in a simple IF statement.
1064 2005-04-07 Steven G. Kargl <kargls@comcast.net>
1066 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1068 2005-04-06 Steven G. Kargl <kargls@comcast.net>
1070 * invoke.texi: Remove documentation of -std=f90
1072 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1074 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1075 non-pointer assignment.
1077 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
1082 * array.c (resolve_character_array_constructor): New function. Set
1083 constant character array's character length.
1084 (gfc_resolve_array_constructor): Use it.
1085 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1087 (gfc_set_constant_character_len): New function. Set constant character
1088 expression according the given length.
1089 * match.h (gfc_set_constant_character_len): Add prototype.
1091 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1093 * intrinsic.texi: BES?? functions are not in the f95 standard.
1095 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1097 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1099 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1101 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1102 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1104 2005-04-02 Steven G. Kargl <kargls@comcast.net>
1106 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1108 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
1110 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1111 trans.h: Fix comment typos.
1113 2005-03-29 Steven G. Kargl <kargls@comcast.net>
1115 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1116 flag_default_integer, flag_default_real
1117 * invoke.texi: Update documentation
1118 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
1119 fdefault-integer-8, and fdefault-real-8 definitions.
1120 * options.c (gfc_init_options): Set option defaults
1121 (gfc_handle_option): Handle command line options.
1122 * trans-types.c (gfc_init_kinds): Use options.
1124 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
1126 * f95-lang.c (builtin_function): Process the attrs parameter
1127 and apply the "const" attribute to the builtin if found.
1129 2005-03-27 Steven G. Kargl <kargls@comcast.net>
1131 * intrinsic.texi: Document AIMAG, AINT, ALL
1133 2005-03-26 Steven G. Kargl <kargls@comcast.net>
1135 * arith.c (check_result): Fix illogical logic.
1137 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
1139 * trans-common.c (create_common): Build RECORD_NODE for common blocks
1140 contain no equivalence objects.
1141 (add_equivalences): New argument saw_equiv.
1142 (trans_common): New local variable saw_equiv.
1143 (finish_equivalences): Add a local variable dummy, Always pass true
1144 for the 3rd parameter to create_common.
1146 2005-03-25 Steven G. Kargl <kargls@comcast.net>
1148 * intrinsic.texi: Fix "make dvi"
1150 2005-03-24 Steven G. Kargl <kargls@comcast.net>
1152 * intrinsic.texi: New file.
1153 * gfortran.texi: Include it; white space change; fix typo.
1155 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
1157 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1159 2005-03-23 Steven Bosscher <stevenb@suse.de>
1161 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1162 * trans-array.c (gfc_trans_allocate_array_storage,
1163 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1164 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1165 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1166 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1167 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1168 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1169 gfc_conv_expr_descriptor): Likewise.
1170 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1171 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1172 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1173 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1174 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1175 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1176 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1177 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1178 gfc_conv_intrinsic_merge, prepare_arg_info,
1179 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1180 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1181 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1182 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1183 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1184 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1186 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1187 * trans.c (gfc_add_modify_expr): Likewise.
1189 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1191 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1192 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1193 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1194 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1195 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1196 gfc_check_perror): new functions to check newly implemented
1198 * gfortran.h: adding symbols for new intrinsics.
1199 * intrinsic.c (add_functions): adding new intrinsics.
1200 (add_subroutines): adding new intrinsics.
1201 * intrinsic.h: prototype for all checking and resolving
1203 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1204 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1205 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1206 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1207 gfc_resolve_kill_sub, gfc_resolve_link_sub,
1208 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1209 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1210 gfc_resolve_perror): new functions to resolve intrinsics.
1211 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1214 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1216 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1217 in which the variable is declared.
1220 * resolve.c (was_declared): Also check for dummy attribute.
1222 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1224 * gfortran.h (arith): Remove ARITH_0TO0.
1225 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1226 (gfc_arith_power): Remove special casing of zero to integral
1229 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1231 * Make-lang.in (fortran-warn): Remove -Wno-error.
1232 (expr.o-warn, resolve.o-warn, simplify.o-warn,
1233 trans-common.o-warn): Specify -Wno-error.
1235 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1237 * trans-array.c (gfc_trans_static_array_pointer,
1238 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1239 comment and formatting typos.
1241 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1243 * invoke.texi: Fix typos.
1245 2005-03-15 Zack Weinberg <zack@codesourcery.com>
1247 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1249 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1251 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1252 to zero on label_tree.
1254 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
1257 * io.c (resolve_tag): Add checking on assigned label.
1258 (match_dt_format): Does not set symbol assign attribute.
1259 * match.c (gfc_match_goto):Does not set symbol assign attribute.
1260 * resolve.c (resolve_code): Add checking on assigned label.
1261 * trans-common.c (build_field): Deals with common variable assigned
1263 * trans-stmt.c (gfc_conv_label_variable): New function.
1264 (gfc_trans_label_assign): Use it.
1265 (gfc_trans_goto): Ditto.
1266 * trans-io.c (set_string): Ditto.
1267 * trans.h (gfc_conv_label_variable): Add prototype.
1269 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1272 * symbol.c (check_conflict): A dummy argument can't be a statement
1275 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
1277 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1278 the argument of the shift to the unsigned type.
1280 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1283 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1285 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1288 * resolve.c (gfc_resolve): Check if character lengths are
1289 specification expressions.
1291 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1294 * trans-array.c (gfc_stack_space_left): Remove unused variable.
1295 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1297 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1298 Remove declaration / prototype.
1299 * trans-common.c (build_equiv_decl): Give union a name. Check if
1300 it can be put on the stack.
1301 * trans-decl.c (gfc_stack_space_left): Move function here.
1302 (gfc_build_qualified_array): Fix comment typo.
1303 * trans.h (gfc_put_var_on_stack): Add prototype.
1305 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1307 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1308 * decl.c, trans.c: Don't use C++ style comments.
1309 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1310 ifsrc): Give names to enums and use ENUM_BITFIELD.
1311 (gfc_access): Remove trailing comma.
1313 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1316 * primary.c (match_complex_constant): Mangled complex constant may
1317 be an implied do-loop. Give implied do-loop matcher a chance.
1319 2005-03-05 Steven G. Kargl <kargls@comcast.net>
1322 * resolve.c (compare_shapes): New function.
1323 (resolve_operator): Use it.
1325 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1327 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1328 type for COMPLEX constants.
1330 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1333 * trans-expr.c (gfc_conv_function_call): Correctly dereference
1334 argument from a pointer function also if it has a result clause.
1336 2005-03-04 Steven G. Kargl <kargls@comcast.net>
1338 * expr.c (gfc_copy_shape_excluding): Change && to ||.
1340 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1342 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1345 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1349 * simplify.c (gfc_simplify_bound): Rename to ...
1350 (simplify_bound): ... this and overhaul.
1352 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
1354 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1355 (gfc_conv_intrinsic_function): update function calls
1357 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
1360 * trans-types.c (gfc_max_integer_kind): Declare
1361 (gfc_init_kinds): Initialize it.
1362 * gfortran.h (gfc_max_integer_kind): extern it.
1363 * primary.c (match_boz_constant): Use it; remove gfortran extension
1364 of kind suffixes on BOZ literal constants
1367 2005-02-27 Steven G. Kargl <kargls@comcast.net>
1369 * arith.c (gfc_check_real_range): Remove multiple returns
1370 (check_result): New function.
1371 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1372 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1375 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1377 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1380 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
1382 Unrevert previously reverted patch. Adding this fix:
1383 * module.c (find_true_name): Deal with NULL module.
1385 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1387 Revert yesterday's patch:
1388 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1390 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1391 ... argument. Copy string instead of pointing to it.
1393 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1395 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1396 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1398 * module.c (mio_namespace_ref, load_needed): Likewise.
1399 * parse.c (parse_interface, parse_contained): Likewise. Here the
1400 correct second argument matters.
1401 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1402 parent's implicit types if this is set.
1403 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1404 * trans-common.c (build_common_decl): Likewise.
1406 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1408 * symbol.c (gfc_set_default_type): Issue error only once, by setting
1409 and checking 'untyped' attribute.
1411 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1412 fields into new struct 'op' inside the 'value' union.
1413 * arith.c (eval_intrinsic): Adapt all users.
1414 * dependency.c (gfc_check_dependency): Likewise.
1415 * dump-parse-tree.c (gfc_show_expr): Likewise.
1416 * expr.c (gfc_get_expr): Don't clear removed fields.
1417 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1418 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1419 check_intrinsic_op): Adapt to new field names.
1420 * interface.c (gfc_extend_expr): Likewise. Also explicitly
1421 nullify 'esym' and 'isym' fields of new function call.
1422 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1423 Adapt to renamed structure fields.
1424 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1425 * module.c (mio_expr): Likewise.
1426 * resolve.c (resolve_operator): Likewise.
1427 (gfc_find_forall_index): Likewise. Only look through operands
1428 if dealing with EXPR_OP
1429 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1430 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1431 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1434 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1435 'name' a 'const char *'.
1436 (gfc_symbol): Likewise, also for 'module'.
1437 (gfc_symtree): Make 'name' a 'const char *'.
1438 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1439 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1441 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1442 initialize 'SYM->module'.
1443 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1444 pointer instead of empty string.
1445 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1446 * interface.c (gfc_compare_types): Adapt check to account for possible
1448 (compare_actual_formal): Check for NULL pointer instead of empty
1450 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1451 Add 'const' qualifier.
1452 (conv_name): Return a heap allocated string.
1453 (find_conv): Add 'const' qualifier to 'target'.
1454 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1455 (make_generic): Check for NULL pointer instead of empty string.
1456 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1457 (add_conv): No need to strcpy result from 'conv_name'.
1458 (sort_actual): Check for NULL pointer instead of empty string.
1459 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1461 * module.c (compare_true_names): Compare pointers instead of strings
1462 for 'module' member.
1463 (find_true_name): Initialize string fields with gfc_get_string.
1464 (mio_pool_string): New function.
1465 (mio_internal_string): Adapt comment.
1466 (mio_component_ref, mio_component, mio_actual_arg): Use
1467 'mio_pool_string' instead of 'mio_internal_string'.
1468 (mio_symbol_interface): Add 'const' qualifier to string arguments.
1469 Add level of indirection. Use 'mio_pool_string' instead of
1470 'mio_internal_string'.
1471 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1472 (write_common, write_symbol): Use 'mio_pool_string' instead of
1473 'mio_internal_string'.
1474 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1475 instead of empty string.
1476 (write_operator, write_generic): Pass correct type variable to
1477 'mio_symbol_interface'.
1478 (write_symtree): Use 'mio_pool_string' instead of
1479 'mio_internal_string'.
1480 * primary.c (match_keyword_arg): Adapt check to possible
1481 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
1482 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1483 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1485 (ambiguous_symbol): Check for NULL pointer instead of empty string.
1486 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1488 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1489 pointer instead of empty string.
1490 * trans-decl.c (gfc_sym_mangled_identifier,
1491 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1492 gfc_get_symbol_decl): Likewise.
1493 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1494 argument. Copy string instead of pointing to it.
1496 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
1498 * intrinsic.h, st.c: Update copyright.
1500 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1502 * symbol.c: Typos in comments.
1504 2005-02-20 Steven G. Kargl <kargls@comcast.net>
1506 * expr.c (gfc_type_convert_binary): Typo in comment.
1508 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1510 * check.c (gfc_check_selected_int_kind): New function.
1511 * intrinsic.h: Prototype it.
1512 * intrinsic.c (add_function): Use it.
1513 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1514 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1516 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1518 * check.c (gfc_check_int): improve checking of optional kind
1519 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1521 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1523 * check.c (gfc_check_achar): New function
1524 * intrinsic.h: Prototype it.
1525 * intrinsic.c (add_function): Use it.
1527 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1529 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1530 generate_loop_for_rhs_to_temp): Remove if whose condition is
1533 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1535 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1536 (gfc_use_derived): ... this function.
1538 2005-02-09 Richard Henderson <rth@redhat.com>
1540 * f95-lang.c (gfc_init_builtin_functions): Call
1541 build_common_builtin_nodes; do not define any functions handled
1544 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1546 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1548 (gfc_is_constant_expr): Check 'ref' to determine if substring
1549 reference is constant.
1550 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1551 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1553 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1555 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1557 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1558 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1559 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1560 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1561 gfc_add_procedure): Add argument.
1562 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1563 gfc_match_null, match_type_spec, match_attr_spec,
1564 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1565 Update callers to match.
1566 (gfc_match_entry) : Likewise, fix comment typo.
1567 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1568 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1569 gfc_match_derived_decl): Update callers.
1570 * interface.c (gfc_match_interface): Likewise.
1571 * match.c (gfc_match_label, gfc_add_flavor,
1572 gfc_match_call, gfc_match_common, gfc_match_block_data,
1573 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1575 * parse.c (parse_derived, parse_interface, parse_contained),
1576 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1577 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1578 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1579 use when printing error message.
1580 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1581 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1582 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1583 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1584 gfc_add_procedure): Add new 'name' argument. Pass along to
1585 check_conflict and check_used.
1586 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1587 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1588 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1589 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1590 argument in calls to any of the modified functions.
1592 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1594 * gfortran.texi: Don't give last update date.
1596 2006-01-30 Richard Henderson <rth@redhat.com>
1598 * options.c (gfc_init_options): Zero flag_errno_math.
1600 2005-01-29 Paul Brook <paul@codesourcery.com>
1603 * check.c (real_or_complex_check): New function.
1604 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1605 * intrinsic.c (add_functions): Use new check functions.
1606 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1609 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1612 * expr.c (gfc_check_assign): Check for conformance of logical operands
1614 2004-01-27 Steven Bosscher <stevenb@suse.de>
1616 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1617 TREE_USED for all labels.
1618 (gfc_trans_entry_master_switch): Use it instead of building a
1620 * trans-io.c (add_case): Likewise.
1621 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1623 2004-01-23 Paul Brook <paul@codesourcery.com>
1624 Steven G. Kargl <kargls@comcast.net>
1627 * arith.c (gfc_convert_real): Remove sign handling.
1628 * primary.c (match_digits): Allow whitespace after initial sign.
1629 (match_real_const): Handle signs here. Allow whitespace after
1630 initial sign. Remove dead code.
1631 (match_const_complex_part): Remove.
1632 (match_complex_part): Use match_{real,integer}_const.
1633 (match_complex_constant): Cross-promote integer types.
1635 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1638 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1639 transpose_c8 for complex types.
1641 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1643 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1644 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1645 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1646 Follow spelling conventions.
1648 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1651 * trans-io.c (gfc_trans_inquire): Added code to support
1654 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1656 * intrinsic.c (make_alias): Add standard argument.
1657 (add_functions): Update make_alias calls.
1659 2005-01-22 Paul Brook <paul@codesourcery.com>
1661 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1663 2005-01-22 Paul Brook <paul@codesourcery.com>
1665 * gfortran.h (gfc_check_access): Add prototype.
1666 * match.c (gfc_match_namelist): Remove TODO.
1667 * module.c (check_access): Rename ...
1668 (gfc_check_access): ... to this. Boolify. Update callers.
1669 * resolve.c (resolve_symbol): Check for private objects in public
1672 2005-01-22 Paul Brook <paul@codesourcery.com>
1674 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1675 does not have an explicit type.
1676 (gfc_match_variable): Resolve implicit derived types in all cases.
1677 Resolve contained function types from their own namespace, not the
1679 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1680 checking. Resolve from the contained namespace, not the parent.
1682 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1685 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1686 constants the correct type.
1689 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1691 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1694 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1696 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1697 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1698 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1699 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1700 trans-io.c, trans-stmt.c, trans.c: Update copyright.
1702 2005-01-17 Ira Rosen <irar@il.ibm.com>
1704 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1706 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1709 * error.c (error_char): Line-buffer errors / warnings.
1711 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1713 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1714 unsigned issue. Use build_int_cst instead of converting
1715 integer_zero_node. Remove unnecessary conversion.
1717 * trans-types.c (gfc_get_character_type_len): : Use
1718 gfc_charlen_type_node as basic type for the range field.
1720 * trans-intrinsic.c (build_fixbound_expr,
1721 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1722 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1723 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1724 of converting 'integer_zero_node' or 'integer_one_node'
1726 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1728 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1729 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1730 'build_int_cst' instead of converting 'integer_zero_node' or
1731 'integer_one_node' respectively.
1733 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1734 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1735 'gfc'-prefix from local variable, remove dead code, use correct
1736 type when inserting argument.
1738 * trans-intrinsic.c, trans-types.c: Update copyright years.
1740 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1743 * resolve.c (check_case_overlap): Typo in comment.
1744 (validate_case_label_expr): Fix up kinds of case values
1745 (resolve_select): Properly handle kind mismatches.
1747 2004-01-16 Paul Brook <paul@codesourcery.com>
1750 * trans-common.c (translate_common): Remove duplicate function call.
1751 (finish_equivalences): Preserve alignment when biasing offsets.
1753 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1755 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1756 ASCII-like character encoding.
1758 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1760 * resolve.c (compare_case): Cleanup.
1762 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1764 * resolve.c (compare_case): Give arguments correct type.
1766 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1768 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1771 2005-01-09 Paul Brook <paul@codesourcery.com>
1774 * trans-common.c (current_common, current_offset): Remove.
1775 (create_common): Add head argument.
1776 (align_segment): New function.
1777 (apply_segment_offset): New function.
1778 (translate_common): Merge code from new_segment. Handle alignment.
1779 (new_segment): Remove.
1780 (finish_equivalences): Ensure proper alignment.
1782 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1784 * trans-const.c: Don't include unused math.h.
1786 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1787 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1788 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1789 trailing whitespace.
1790 (prepare_arg_info): Fix formatting, indenting and remove trailing
1792 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1793 trailing whitespace.
1795 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1796 gfc_constant_result, gfc_range_check, gfc_arith_power,
1797 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1798 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1799 gfc_complex2complex): Fix whitespace issues.
1800 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1801 logical_array_check, array_check, scalar_check, nonoptional_check,
1802 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1803 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1804 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1805 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1806 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1807 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1808 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1809 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1810 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1811 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1812 gfc_check_lbound, gfc_check_logical, min_max_args,
1813 gfc_check_min_max_integer, gfc_check_min_max_real,
1814 gfc_check_min_max_double, gfc_check_matmul,
1815 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1816 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1817 gfc_check_range, gfc_check_real, gfc_check_repeat,
1818 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1819 gfc_check_set_exponent): Fix formatting issues.
1820 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1821 remove whitespace-only line.
1822 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1823 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1824 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1825 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1826 gfc_check_random_number, gfc_check_random_seed,
1827 gfc_check_second_sub, gfc_check_system_clock,
1828 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1829 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1830 gfc_check_unlink_sub): Fix formatting issues.
1832 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1834 * gfortran.h: Remove outdated comment. Don't include stdio.h
1837 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1839 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1840 output of 'gfortran --version'.
1842 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1844 * arith.c: Add system.h; remove string.h
1850 * check.c: Remove stdlib.h and stdarg.h
1851 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1852 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1853 * f95-lang.c: Add system.h; remove stdio.h
1854 * interface.c: Add system.h; remove stdlib.h and string.h
1855 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1856 * io.c: Remove string.h
1858 * match.c: Remove stdarg.h and string.h
1859 * misc.c: Update copyright; add system.h; remove stdlib.h,
1860 string.h, and sys/stat.h
1861 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1862 unistd.h, and time.h
1863 * option.c: Remove string.h and stdlib.h
1865 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1866 stdio.h, string.h, and strings.h
1867 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1868 * trans-array.c: Remove stdio.h and gmp.h
1869 * trans-const.c: Ditto
1870 * trans-expr.c: Ditto
1872 * trans-stmt.c: Ditto
1874 * trans-intrinsic.c: Remove stdio.h and string.h
1876 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1878 * gfortran.h (gfc_case): fix typo in comment.
1880 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1882 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1883 logical shift. Call fold. Remove 0-bit shift shortcut.
1884 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1885 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1886 result if width(arg 1) < 4 bytes. Call fold.
1889 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1890 in front of function to match the standard. Correct handling
1893 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1895 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1896 flag_unsafe_math_optimizations if we have a float type.
1898 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1900 * gfortran.texi: Fix typo.
1902 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1904 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1907 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1910 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1911 (gfc_match_nullify): Make sure that ')' is in front of the end of
1914 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1917 2004-12-14 Richard Henderson <rth@redhat.com>
1919 * gfortran.h (gfc_expr.function.name): Make const.
1920 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1921 (gfc_get_string): Update prototype.
1922 * iresolve.c: Include tree.h.
1923 (string_node, HASH_SIZE, string_head, hash): Remove.
1924 (gfc_get_string): Use vsnprintf, get_identifier.
1925 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1926 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1927 (gfc_done_1): Don't call gfc_iresolve_done_1.
1928 * module.c (mio_allocated_string): Take and return const char *,
1929 instead of modifying char**.
1930 (mio_expr): Update to match.
1931 * resolve.c (pure_function): Constify name argument.
1932 (resolve_function): Constify name.
1933 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1935 2004-12-12 Richard Henderson <rth@redhat.com>
1937 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1938 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1939 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1940 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1941 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1942 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1943 gfc_resolve_unpack: Use PREFIX.
1945 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1948 * match.c (gfc_match_common): Skip whitespace.
1950 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1953 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1954 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1955 integer kind check; Issue error for -std=f95 when needed.
1956 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1958 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1959 Promote arguments to same kind.
1961 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1962 Paul Brook <paul@codesourcery.com>
1965 * resolve.c (gfc_resolve_iterator_expr): New function.
1966 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1967 start, end and stride to correct type.
1968 (resolve_code): Pass extra argument.
1969 * array.c (resolve_array_list): Pass extra argument.
1970 * gfortran.h (gfc_resolve): Add prototype.
1971 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1972 Handle real type iterators.
1974 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1977 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1978 same kind as C's 'int'.
1979 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1981 2004-12-08 Richard Henderson <rth@redhat.com>
1983 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1984 to the output expression.
1985 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1987 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1990 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1993 * resolve.c (resolve_code): Impose correct restrictions on
1996 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1998 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1999 Paul Brook <paul@codesourcery.com>
2001 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2002 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2003 (gfc_check_stat, gfc_check_stat_sub): New functions.
2004 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2005 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2006 fstat, and stat to intrinsics symbol tables.
2007 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2008 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2009 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2010 (gfc_resolve_stat, gfc_resolve_flush): New functions.
2011 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2012 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2014 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2016 * intrinsic.c: Fix and add comments, fix function declarations
2017 (OPTIONAL,REQUIRED): New symbols
2018 (add_functions,add_subroutines): Use symbols
2019 (gmp.h): Remove unused include
2021 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2023 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2026 2004-11-24 Steven Bosscher <stevenb@suse.de>
2028 * options.c (gfc_post_options): Don't clear flag_inline_functions.
2030 2004-11-20 Steven G. Kargl <kargls@comcast.net>
2032 * check.c (gfc_check_getcwd_sub): Fix seg fault.
2034 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2035 gfc_check_unlink,gfc_check_unlink_sub): New functions
2036 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2037 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2038 exit to intrinsics symbol tables.
2039 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2040 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2041 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2042 gfc_resolve_unlink_sub): Add and sort prototypes.
2043 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2044 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2045 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2047 2004-11-16 Paul Brook <paul@codesourcery.com>
2050 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2051 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2052 * trans-types.c (gfc_get_dtype): Accept array type rather than element
2054 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2055 (gfc_get_array_type_bounds): Ditto.
2056 (gfc_get_derived_type): Recurse into derived type pointers.
2057 * trans-types.h (gfc_get_dtype): Add prototype.
2058 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2060 2004-11-15 Paul Brook <paul@codesourcery.com>
2062 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2064 2004-11-10 Paul Brook <paul@codesourcery.com>
2067 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2068 * trans-io.c (transfer_array_component): Ditto.
2070 2004-11-10 Paul Brook <paul@codesourcery.com>
2072 * invoke.texi: Fix typo.
2074 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2076 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2077 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2078 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2079 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2080 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2082 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2085 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2087 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
2089 * gfortranspec.c: Replace GNU CC with GCC.
2091 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2093 * gfortranspec.c (lang_specific_driver): Change year to 2004.
2095 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2098 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2101 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2104 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2105 module procedures as if they were module variables.
2107 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2112 * module.c (write_symbol1): Set module_name for dummy arguments.
2114 2004-11-02 Paul Brook <paul@codesourcery.com>
2116 * intrinsic.c (check_intrinsic_standard): Include error locus.
2118 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2119 locus to check_intrinsic_standard.
2121 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
2124 * gfortran.h: Change GFC_STD_* flags to more appropriate
2125 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2126 gfc_option_t): Add field for warning about use of nonstandard
2128 * intrinsic.c (add_sym): Add parameter for standard version, check
2129 this against current standard.
2130 (add_sym_0): Pass standard parameter to add_sym.
2131 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2132 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2133 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2134 (make_generic): Add parameter for standard, check this
2135 against currently selected standard.
2136 (add_functions, add_subroutines): Add parameter to tell which
2137 standard an intrinsic belongs to.
2138 (check_intrinsic_standard): New function.
2139 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2140 (gfc_intrinsic_sub_interface): Ditto.
2141 * lang.opt: Add Wnonstd-intrinsics option.
2142 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2144 (set_Wall): Add warning about nonstd intrinsics.
2145 (gfc_handle_option): Change to use new GFC_STD_* flags,
2147 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2149 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
2151 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2153 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2155 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2157 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2159 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2162 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
2164 * check.c (gfc_check_rand): Allow missing optional argument.
2165 (gfc_check_irand): Ditto.
2166 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2168 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
2170 PR fortran/13490, PR fortran/17912
2171 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2172 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2173 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2174 warning when compiling with pedantic.
2175 * gcc/fortran/arith.c: Set minimum integer values to reflect
2176 realities of two's complement signed integers. Added
2179 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
2181 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2182 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2185 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2187 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2189 (gfc_generate_function_code): Fix formatting issue.
2191 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2193 * module.c: Fix formatting issues.
2195 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2197 * module.c (mio_interface_rest): Set where member of interface
2200 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
2203 * options.c (gfc_handle_option): Add break after handing the
2206 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
2208 * arith.c: Fix formatting issues.
2210 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2213 * resolve.c (resolve_operator): Use correct operator name in message.
2215 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2217 * primary.c (match_boz_constant): Allow kind parameter suffixes.
2218 Move standard warning further to the front.
2220 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
2222 * trans-stmt.c: Fix a comment typo.
2224 2004-10-07 Paul Brook <paul@codesourcery.com>
2227 * trans-array.c (gfc_trans_deferred_array): Leave use associated
2230 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2233 * simplify.c (twos_complement): New function.
2234 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2236 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2238 2004-10-06 Paul Brook <paul@codesourcery.com>
2240 * trans-stmt.c (gfc_trans_simple_do): New function.
2241 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
2242 loop. Update comments.
2244 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2247 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2251 * intrinsic.c (add_sym_5): Remove.
2252 (add_subroutines): Add resolution function for MVBITS.
2253 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2255 * iresolve.c (gfc_resolve_mvbits): New function.
2256 (gfc_resolve_random_number): Remove empty line at end of function.
2258 * trans-const.c (gfc_build_cstring_const): New function.
2259 (gfc_init_cst): Use new function.
2260 * trans-const.h (gfc_build_cstring_const): Add prototype.
2261 * trans-io.c (set_string, set_error_locus): Use new function.
2262 * trans-stmt.c (gfc_trans_goto): Use new function.
2265 * parse.c (accept_statement): Don't treat END DO like END IF and
2267 (parse_do_block): Generate possible END DO label inside END DO
2271 * check.c (gfc_check_system_sub): New function.
2272 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2273 * intrinsic.c (add_functions): Add 'system'.
2274 (add_subroutines): Add 'system'.
2275 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2276 Move prototypes to other suborutines.
2277 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2279 (gfc_resolve_system_clock): Fix formatting of prototype.
2280 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2282 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2285 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
2287 * scanner.c (preprocessor_line): Accept preprocessor lines without
2288 file names. Check file names for closing quotes. Handle escaped
2289 quotes in file names.
2291 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2292 Paul Brook <paul@codesourcery.com>
2294 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2295 Use gfc_get_expr_charlen.
2296 * trans-expr.c (gfc_get_expr_charlen): New function.
2297 * trans.h (gfc_get_expr_charlen): Add prototype.
2299 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
2301 * trans-intrinsic.c: Fix a comment typo.
2303 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2305 * simplify.c (range_check): Remove blank line at beginning of function.
2306 (gfc_simplify_dint): Same at end of function.
2307 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2308 (gfc_simplify_bound): Fix indentation.
2309 (gfc_simplify_log10): Simplify calculation.
2310 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2312 (gfc_simplify_nearest): Same at end of function.
2313 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2315 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2316 gfc_simplify_spacing): Simplify calulations.
2318 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
2320 * trans-intrinsic.c: Fix comments on spacing and rrspacing
2321 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2323 2004-10-01 Jan Hubicka <jh@suse.cz>
2325 * f95-lang.c (gfc_expand_function): Update call of
2326 tree_rest_of_compilation.
2327 * trans-decl.c (gfc_generate_constructors): Likewise.
2329 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2331 * trans-intrinsic.c: Comment fixes.
2333 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2335 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2337 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2339 * trans-types.c (gfc_return_by_reference): Remove superfluous
2342 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2343 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2346 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2347 function to determine return type.
2349 2004-09-20 Jan Hubicka <jh@suse.cz>
2351 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2353 (gfc_generate_function_code): Likewise.
2355 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2358 * simplify.c (gfc_simplify_reshape): Set shape of return value
2361 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
2362 Zack Weinberg <zack@codesourcery.com>
2364 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2365 enumeration constants.
2367 2004-09-17 Paul Brook <paul@codesourcery.com>
2369 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2370 (gfc_linebuf_header_size): Define.
2371 * scanner.c (load_file): Use it.
2373 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2375 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2376 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2377 resolve.c, scanner.c, trans-array.c, trans-array.h,
2378 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2379 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2380 trans.h: Fix comment typos. Follow spelling conventions.
2382 2004-09-16 Victor Leikehman <lei@il.ibm.com>
2385 * trans-io.c (transfer_array_component): New function.
2386 (transfer_expr): For array fields, call transfer_array_component.
2388 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
2390 * gfortran.texi: Fix a typo.
2392 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2394 * parse.c (eof_buf): Rename eof to eof_buf.
2395 (unexpected_eof): Same.
2396 (gfc_parse_file): Same.
2398 2004-09-15 Steven G. Kargl <kargls@comcast.net>
2400 * check.c (gfc_check_getcwd_sub): New function.
2401 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2402 * intrinsic.c (add_functions): Add function definition;
2404 * intrinsic.c (add_subroutines): Add subroutine definitions.
2405 * intrinsic.h: Add prototypes.
2406 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2408 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2410 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2413 * module.c (write_symbol): Don't fill in module name here.
2414 (write_symbol0): Fill in here instead.
2416 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
2418 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2419 trans-array.c, trans-common.c, trans-expr.c,
2420 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2421 comment typos. Follow spelling conventions.
2423 2004-09-09 Paul Brook <paul@codesourcery.com>
2425 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2427 2004-09-08 Paul Brook <paul@codesourcery.com>
2429 * array.c: Don't include assert.h.
2430 * data.c: Don't include assert.h. Replace assert and abort with
2431 gcc_assert and gcc_unreachable.
2432 * dependency.c: Ditto.
2433 * f95-lang.c: Ditto.
2434 * iresolve.c: Ditto.
2436 * simplify.c: Ditto.
2438 * trans-array.c: Ditto.
2439 * trans-common.c: Ditto.
2440 * trans-const.c: Ditto.
2441 * trans-decl.c: Ditto.
2442 * trans-expr.c: Ditto.
2443 * trans-intrinsic.c: Ditto.
2444 * trans-io.c: Ditto.
2445 * trans-stmt.c: Ditto.
2446 * trans-types.c: Ditto.
2449 2004-09-07 Per Bothner <per@bothner.com>
2450 Paul Brook <paul@codesourcery.com>
2452 * error.c (show_locus): Handle mapped locations.
2453 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2454 * gfortran.h: Include input.h.
2455 (struct gfc_linebuf): Use source_location.
2456 * scanner.c (get_file): Initialize linemap.
2457 (preprocessor_line): Pass extra argument to get_file.
2458 (load_file): Ditto. Setup linemap.
2459 (gfc_new_file): Handle mapped locations.
2460 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2461 Set decl source locations.
2462 (gfc_trans_common): Set blank common block location.
2463 * trans-decl.c (gfc_set_decl_location): New function.
2464 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2465 (trans_function_start): Move call to gfc_set_backend_locus..
2466 (build_function_decl): ... to here.
2467 (build_entry_thunks): Set and restore the backend locus.
2468 (gfc_generate_constructors): Remove excess arguments to
2469 init_function_start.
2470 (gfc_generate_block_data): Add comments. Set the decl locus.
2471 * trans-io.c (set_error_locus): Handle mapped locations.
2472 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2473 (gfc_trans_code): Use SET_EXPR_LOCATION.
2474 (gfc_generate_code): Override the location of the new symbol.
2475 * trans.h (gfc_set_decl_location): Add prototype.
2477 2004-08-31 Paul Brook <paul@codesourcery.com>
2479 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2481 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2484 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2487 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2492 * resolve.c (resolve_transfer): New function.
2493 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2495 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2498 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2501 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2503 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2505 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2508 * trans-types.c (gfc_return_by_reference): Remove TODO error,
2509 add comment pointing out possible issue WRT compatibility with g77.
2511 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2513 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2514 all occurences of 'gfc_strlen_type_node' by
2515 'gfc_charlen_type_node'.
2516 * trans-types.h: Same. Also update comment accordingly.
2518 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2520 * primary.c: Update copyright boilerplate to say GCC.
2521 * f95-lang.c: Change initial comment to say gfortran.
2523 2004-08-31 Paul Brook <paul@codesourcery.com>
2525 * trans-types.h: Add comments.
2526 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2528 2004-08-30 Richard Henderson <rth@redhat.com>
2530 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2531 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2532 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2533 c_long, c_long_long.
2534 (gfc_logical_info): Add c_bool.
2535 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2536 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2537 rather than gfc_int[48]_type_node for allocate choice.
2538 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2539 local copies of some kind type nodes.
2540 (gfc_build_builtin_function_decls): Likewise.
2541 * trans-expr.c (gfc_conv_power_op): Likewise.
2542 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2543 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2544 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2545 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2546 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2547 * trans-io.c (gfc_pint4_type_node): Move into ...
2548 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2549 some kind type nodes.
2550 * trans-types.c (gfc_type_nodes): Remove.
2551 (gfc_character1_type_node, gfc_strlen_type_node): New.
2552 (gfc_integer_types, gfc_logical_types): New.
2553 (gfc_real_types, gfc_complex_types): New.
2554 (gfc_init_kinds): Fill in real mode_precision.
2555 (gfc_build_int_type, gfc_build_real_type): New.
2556 (gfc_build_complex_type, gfc_build_logical_type): New.
2557 (c_size_t_size): New.
2558 (gfc_init_types): Loop over kinds.
2559 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2560 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2561 (gfc_get_character_type_len): Likewise.
2562 (gfc_type_for_size): Loop over kinds; use a reduced set of
2563 unsigned type nodes.
2564 (gfc_type_for_mode): Loop over kinds.
2565 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2566 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2567 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2568 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2569 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2570 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2571 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2572 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2573 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2574 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2575 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2576 gfc_complex8_type_node, gfc_complex16_type_node,
2577 gfc_logical1_type_node, gfc_logical2_type_node,
2578 gfc_logical4_type_node, gfc_logical8_type_node,
2579 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2580 (gfc_character1_type_node): Turn in to a variable.
2581 (gfc_strlen_type_node): Likewise.
2583 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2585 * gfortran.h (gfc_namespace): Add new field is_block_data.
2586 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2587 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2588 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2589 * trans.h (gfc_generate_block_data): Add prototype.
2590 * trans-decl.c (gfc_generate_block_data): New function.
2592 2004-08-29 Richard Henderson <rth@redhat.com>
2594 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2595 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2596 than two HOST_WIDE_INT.
2598 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2601 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2602 var_element, top_var_list, match_data_constant, top_val_list,
2603 gfc_match_data): Move here from match.c.
2604 (match_old_style_init): New function.
2605 (variable_decl): Match old-style initialization.
2606 * expr.c (gfc_get_variable_expr): New function.
2607 * gfortran.h (gfc_get_variable_expr): Add prototype.
2608 * gfortran.texi: Start documentation for supported extensions.
2609 * match.c: Remove the functions moved to decl.c.
2610 * match.h (gfc_match_data): Move prototype to under decl.c.
2611 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2614 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2615 Paul Brook <paul@codesourcery.com>
2617 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2618 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2619 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2620 (build_builtin_fntypes): New function.
2621 (gfc_init_builtin_functions): Use it.
2622 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2623 and GFC_ISYM_ERF{,C}.
2624 (gfc_c_int_kind): Declare.
2625 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2626 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2627 gfc_resolve_g77_math1): Add prototypes.
2628 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2629 * mathbuiltins.def: Add comment. Change third argument. Use
2630 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2631 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2632 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2633 * trans-types.c (gfc_c_int_kind): Declare.
2634 (gfc_init_kinds): Set it.
2636 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2637 Paul Brook <paul@codesourcery.com>
2639 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2640 (gfc_check_f, gfc_simplify_f): Add f0.
2641 * intrinsic.c (do_check): Call f0. Flatten.
2642 (add_sym_0): Fix prototype. Set f0.
2643 (add_functions): Add getgid, getgid and getuid.
2644 (resolve_intrinsic): Remove obsolete comment.
2645 (do_simplify): Call f0.
2646 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2647 gfc_resolve_getuid): Add prototypes.
2648 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2649 gfc_resolve_getuid): New functions.
2650 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2653 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2655 * error.c (gfc_error_init_1): Remove blank line in front of
2656 function body. Add missing blank.
2657 (gfc_buffer_error, error_char, error_string): Remove blank line in
2658 front of function body.
2659 (show_locus): Add comma in comment.
2660 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2661 gfc_push_error, gfc_pop_error): Remove blank line in front of
2663 (gfc_get_errors): Typo fix in comment in front of function. Remove
2664 blank line in front of function body.
2666 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2668 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2669 variable declaration of same name.
2670 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2671 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2672 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2673 Replace all calls to gfc_default_*_kind with variable accesses.
2674 * trans-types.c: Same as above.
2675 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2676 static qualifier. Replace all occurences.
2677 (gfc_default_*_kind): Remove functions.
2679 2004-08-26 Richard Henderson <rth@redhat.com>
2681 * arith.c: Include system.h, not real system headers.
2682 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2683 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2684 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2685 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2686 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2687 gfc_index_integer_kind, gfc_default_integer_kind,
2688 gfc_default_real_kind,gfc_default_double_kind,
2689 gfc_default_character_kind, gfc_default_logical_kind,
2690 gfc_default_complex_kind, validate_integer, validate_real,
2691 validate_logical, validate_character,
2692 gfc_validate_kind): Move to trans-types.c.
2693 (gfc_set_model_kind): Use gfc_validate_kind.
2694 (gfc_set_model): Just copy the current precision to default.
2695 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2696 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2697 * gfortran.h: Update file commentary.
2698 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2699 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2700 gfc_default_double_kind_1, gfc_default_character_kind_1,
2701 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2702 (gfc_init_kinds): New.
2703 (gfc_init_types): Don't set gfc_index_integer_kind here.
2704 * trans-types.h (gfc_init_kinds): Declare.
2705 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2707 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2709 * check.c (gfc_check_atan2): New function.
2710 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2711 * intrinsic.h (gfc_check_atan2): Add prototype.
2713 2004-08-25 Richard Henderson <rth@redhat.com>
2715 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2716 false and we don't validate the kind.
2717 (gfc_check_integer_range, gfc_check_real_range): Update to match.
2718 * check.c (kind_check): Likewise.
2719 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2720 (match_char_spec, match_logical_spec): Likewise.
2721 * gfortran.h (gfc_validate_kind): Likewise.
2722 * options.c (gfc_handle_option): Likewise.
2723 * primary.c (match_integer_constant, match_real_constant,
2724 match_string_constant, match_logical_constant,
2725 match_const_complex_part): Likewise.
2726 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2727 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2728 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2729 gfc_simplify_maxexponent, gfc_simplify_minexponent,
2730 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2731 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2732 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2733 gfc_simplify_tiny): Likewise.
2734 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2735 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2736 prepare_arg_info): Likewise.
2738 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2740 * expr.c (gfc_check_assign): Add comment. Add new warning.
2741 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2742 result of pointer valued function when not in pointer assignment.
2744 2004-08-25 Paul Brook <paul@codesourcery.com>
2746 * config-lang.in: Remove dead commented line.
2747 * module.c: Replace g95 with gfortran in comment.
2749 2004-08-25 Paul Brook <paul@codesourcery.com>
2752 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2754 2004-08-25 Paul Brook <paul@codesourcery.com>
2757 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2758 string_length argument.
2759 (gfc_trans_array_ctor_element): New function.
2760 (gfc_trans_array_constructor_subarray): Use it.
2761 (gfc_trans_array_constructor_value): Ditto. Handle constant
2763 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2764 (gfc_trans_array_constructor): Use them.
2765 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2766 (gfc_conv_ss_descriptor): Remember section string length.
2767 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2768 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2769 (gfc_conv_expr_descriptor): Ditto.
2770 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2771 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2772 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2773 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2774 (gfc_conv_variable): Set string_length from section.
2775 (gfc_conv_function_call): Remove extra argument.
2776 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2777 * trans-types.c (gfc_get_character_type_len): New function.
2778 (gfc_get_character_type): Use it.
2779 (gfc_get_dtype): Return zero for internal types.
2780 * trans-types.h (gfc_get_character_type_len): Add prototype.
2781 * trans.h (struct gfc_ss): Move string_length out of union.
2783 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2785 * trans.h (build2_v, build3_v): New macros.
2787 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2789 * trans-array.c (gfc_conv_descriptor_data,
2790 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2791 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2792 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2793 gfc_trans_allocate_temp_array,
2794 gfc_trans_array_constructor_subarray,
2795 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2796 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2797 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2798 gfc_conv_array_ref, gfc_trans_preloop_setup,
2799 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2800 gfc_conv_loop_setup, gfc_array_init_size,
2801 gfc_conv_array_initializer, gfc_trans_array_bounds,
2802 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2803 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2804 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2805 of build and build_v as appropriate.
2806 * trans-common.c (create_common): Same.
2807 * trans-decl.c (gfc_trans_auto_character_variable,
2808 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2809 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2810 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2811 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2812 gfc_conv_expr_op, gfc_conv_function_call,
2813 gfc_trans_structure_assign): Same.
2814 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2815 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2816 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2817 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2818 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2819 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2820 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2821 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2822 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2823 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2824 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2825 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2826 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2827 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2828 gfc_conv_intrinsic_iargc): Same.
2829 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2830 set_flag, add_case, io_result, transfer_namelist_element,
2831 transfer_expr): Same.
2832 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2833 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2834 gfc_trans_integer_select, gfc_trans_logical_select,
2835 gfc_trans_character_select, gfc_trans_forall_loop,
2836 gfc_trans_nested_forall_loop, gfc_do_allocate,
2837 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2838 compute_inner_temp_size, compute_overall_iter_number,
2839 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2840 gfc_trans_forall_1, gfc_evaluate_where_mask,
2841 gfc_trans_where_assign, gfc_trans_allocate): Same.
2842 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2843 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2844 gfc_build_array_ref, gfc_build_function_call,
2845 gfc_trans_runtime_check): Same.
2847 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2849 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2850 build_int_cst to build_int_cst_wide in accordance to Nathan's
2853 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2855 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2856 build_int_cst calls.
2857 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2858 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2859 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2860 gfc_trans_entry_master_switch): Likewise.
2861 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2862 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2863 * trans-io.c (add_case, set_error_locus,
2864 transfer_namelist_element, transfer_expr): Likewise.
2865 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2866 gfc_trans_stop, gfc_trans_character_select): Likewise.
2867 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2868 * trans.c (gfc_trans_runtime_check): Likewise.
2870 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2872 * trans-decl.c, trans-types.c: Add and remove blank lines as
2875 2004-08-24 Richard Henderson <rth@redhat.com>
2877 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2879 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2881 * resolve.c (merge_argument_lists): Revert unintentionally
2884 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2886 * trans-decl.c (build_function_decl): Fix spelling in comment.
2887 (build_entry_thunks): Remove code with no function.
2888 (gfc_build_intrinsic_function_decls): Remove empty line.
2890 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2892 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2894 * f95-lang.c (gfc_init_decl_processing): Adjust
2895 build_common_tree_nodes call.
2897 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2899 * trans-types.c: Spelling and formatting fixes.
2901 2004-08-23 Richard Henderson <rth@redhat.com>
2903 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2904 of going through an intermediate string. Fix 32/64 int/long bug.
2906 2004-08-23 Eric Christopher <echristo@redhat.com>
2908 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2909 usage. Use build_vector_type_for_mode for vector types.
2911 2004-08-22 Richard Henderson <rth@redhat.com>
2914 * data.c (find_con_by_offset): Search ordered list; handle
2915 elements with repeat counts.
2916 (gfc_assign_data_value_range): New.
2917 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2918 (gfc_assign_data_value_range): Declare.
2919 * match.c (top_val_list): Extract repeat count into a temporary.
2920 * resolve.c (values): Make left unsigned.
2921 (next_data_value): Don't decrement left.
2922 (check_data_variable): Use gfc_assign_data_value_range.
2924 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2926 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2928 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2930 * check.c (gfc_check_reduction): Rename to ...
2931 (check_reduction): ... this. Make static. Don't check type of
2933 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2934 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2935 SUM to use new check functions.
2936 (check_specific): Change logic to call new functions.
2937 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2939 (gfc_check_reduction): Remove prototype.
2941 2004-08-20 Paul Brook <paul@codesourcery.com>
2942 Canqun Yang <canqun@nudt.edu.cn>
2945 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2946 for automatic arrays.
2947 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2949 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2953 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2954 (gfc_match_if): Order statement list alphabetically, add WHERE and
2955 FORALL, remove double PAUSE.
2956 (gfc_match_simple_where, match_forall_header,
2957 gfc_match_simple_forall): New functions.
2958 (gfc_match_forall): Use match_forall_header.
2960 2004-08-19 Paul Brook <paul@codesourcery.com>
2963 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2964 * symbol.c (gfc_clear_attr): Use memset.
2966 2004-08-19 Paul Brook <paul@codesourcery.com>
2970 * data.c (assign_substring_data_value): Remove.
2971 (create_character_intializer): New function.
2972 (gfc_assign_data_value): Track the typespec for the current
2973 subobject. Use create_character_intializer.
2975 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2978 * check.c (gfc_check_reduction): New function.
2979 (gfc_check_minval_maxval): Removed.
2980 (gfc_check_product): Removed.
2981 (gfc_check_sum): Removed.
2982 * intrinsic.h: Add/remove declarations for these.
2983 * gfortran.h: Add field f3red to union gfc_check_f.
2984 * intrinsic.c (add_sym_3red): New function.
2985 (add_functions): Register maxval, minval, product, and sum intrinsics
2986 through add_sym_3red.
2987 (check_specific): Handle f3red union field.
2988 * iresolve.c: Whitespace change.
2990 2004-08-18 Paul Brook <paul@codesourcery.com>
2992 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2994 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2997 * trans-io.c (transfer_namelist_element): New. Recursively handle
2998 derived-type variables. Pass string lengths.
2999 (build_dt): Code moved to build_namelist, with some
3000 changes and additions.
3001 (gfc_build_io_library_fndecls): Declare the fifth
3002 argument in st_set_nml_var_char -- string_length.
3004 2004-08-17 Paul Brook <paul@codesourcery.com>
3005 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3008 * decl.c (get_proc_name): Update mystery comment.
3009 (gfc_match_entry): Check for errors earlier. Add entry point to list.
3010 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3011 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
3012 (struct gfc_entry_list): Define.
3013 (gfc_get_entry_list): Define.
3014 (struct gfc_namespace): Add refs and entries.
3015 (enum gfc_exec_op): Add EXEC_ENTRY.
3016 (struct gfc_code): Add ext.entry.
3017 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3018 (mio_symbol_attribute): Don't save/reture addr->entry.
3019 (mio_namespace_ref): Refcount namespaces.
3020 * parse.c (accept_statement): Handle ST_ENTRY.
3021 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3022 (parse_contained): Fixup sibling references to entry points
3023 after parsing the procedure body.
3024 * resolve.c (resolve_contained_fntype): New function.
3025 (merge_argument_lists, resolve_entries): New functions.
3026 (resolve_contained_functions): Use them.
3027 (resolve_code): Handle EXEC_ENTRY.
3028 (gfc_resolve): Call resolve_entries.
3029 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3030 * symbol.c (gfc_get_namespace): Refcount namespaces.
3031 (gfc_free_namespace): Ditto.
3032 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3033 optional when multiple entry points are present.
3034 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3035 (gfc_get_extern_function_decl): Add assertion. Fix coment.
3036 (create_function_arglist, trans_function_start, build_entry_thunks):
3038 (gfc_build_function_decl): Rename ...
3039 (build_function_decl): ... to this.
3040 (gfc_create_function_decl): New function.
3041 (gfc_generate_contained_functions): Use it.
3042 (gfc_trans_entry_master_switch): New function.
3043 (gfc_generate_function_code): Use new functions.
3044 * trans-stmt.c (gfc_trans_entry): New function.
3045 * trans-stmt.h (gfc_trans_entry): Add prototype.
3046 * trans-types.c (gfc_get_function_type): Add entry point argument.
3047 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3048 (gfc_generate_module_code): Call gfc_create_function_decl.
3049 * trans.h (gfc_build_function_decl): Remove.
3050 (gfc_create_function_decl): Add prototype.
3052 2004-08-15 Andrew Pinski <apinski@apple.com>
3055 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3056 for cabs{,f} and copysign{,f}.
3057 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3058 (gfor_fndecl_math_cabs): Delete.
3059 (gfor_fndecl_math_sign4): Delete.
3060 (gfor_fndecl_math_sign8): Delete.
3061 (gfc_build_intrinsic_function_decls): Remove the
3062 initializing of cabs{,f} and copysign{,f} functions.
3063 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3064 instead of the functions definitions.
3065 (gfc_conv_intrinsic_sign): Likewise.
3066 * trans.h (gfor_fndecl_math_cabsf): Delete.
3067 (gfor_fndecl_math_cabs): Delete.
3068 (gfor_fndecl_math_sign4): Delete.
3069 (gfor_fndecl_math_sign8): Delete.
3071 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
3073 * trans-array.c (gfc_trans_array_constructor_value): Use
3075 * trans-const.c (gfc_build_string_const,
3076 gfc_init_constants, gfc_conv_mpz_to_tree,
3077 gfc_conv_constant_to_tree): Likewise.
3078 * trans-decl.c (gfc_get_symbol_decl): Likewise.
3079 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3080 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3081 * trans-io.c (add_case, set_error_locus, build_dt,
3082 transfer_expr): Likewise.
3083 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3084 gfc_trans_stop, gfc_trans_character_select): Likewise.
3085 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3086 * trans.c (gfc_trans_runtime_check): Likewise.
3088 2004-08-14 Paul Brook <paul@codesourcery.com>
3090 * trans-decl.c (gfc_build_function_decl): Remove dead code.
3092 2004-08-14 Paul Brook <paul@codesourcery.com>
3094 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3096 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3098 * gfortran.h: Add comments.
3099 * parse.c (parse_contained): Fix comment typo.
3100 * resolve.c (was_declared): Ditto.
3103 2004-08-11 Paul Brook <paul@codeourcery.com>
3106 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3108 2004-08-10 Richard Henderson <rth@redhat.com>
3110 * f95-lang.c (gfc_init_builtin_functions): Remove
3111 __builtin_stack_alloc, add __builtin_alloca.
3112 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3113 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3115 2004-08-10 Paul Brook <paul@codesourcery.com>
3117 * trans-io.c (transfer_expr): Handle pointters.
3119 2004-08-10 Paul Brook <paul@codesourcery.com>
3122 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3123 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3124 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3125 Handle GFC_SS_COMPONENT.
3126 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
3127 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3129 (gfc_conv_array_initializer): Call specific initializer routines.
3130 * trans-expr.c (gfc_trans_structure_assign): New function.
3131 (gfc_trans_subarray_assign): New function.
3132 (gfc_trans_subcomponent_assign): New fucntion
3133 (gfc_conv_structure): Use them.
3134 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3135 (gfc_ss): Add shape.
3137 2004-08-08 Victor Leikehman <lei@il.ibm.com>
3139 * simplify.c (gfc_simplify_shape): Bugfix.
3140 * expr.c (gfc_copy_shape_excluding): New function.
3141 * gfortran.h (gfc_get_shape): Bugfix.
3142 (gfc_copy_shape_excluding): Added declaration.
3143 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3144 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3145 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3146 time resolution of shape.
3148 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
3150 * intrinsic.c (add_subroutines): Add getenv and
3151 get_environment_variable. (add_sym_5s): New function.
3152 * intrinsic.h (gfc_resolve_get_environment_variable): Add
3154 * iresolve.c (gfc_resolve_get_environment_variable): New
3157 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
3159 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3160 __builtin_pow[f] arguments.
3162 2004-08-06 Steven G. Kargl <kargls@comcast.net>
3164 * arith.c: Add #define for model numbers. Remove global GMP variables.
3165 (natural_logarithm,common_logarithm,exponential,sine,
3166 cosine,arctangent,hypercos,hypersine ): Remove.
3167 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3168 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3169 gfc_check_real_range, gfc_constant_result, gfc_range_check,
3170 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3171 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3172 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3173 gfc_convert_complex,gfc_int2real,gfc_int2complex,
3174 gfc_real2int,gfc_real2real,gfc_real2complex,
3175 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3176 to MPFR, use new functions.
3177 * arith.h: Remove extern global variables.
3178 (natural_logarithm,common_logarithm,exponential, sine, cosine,
3179 arctangent,hypercos,hypersine): Remove prototypes.
3180 (arctangent2): Update prototype from GMP to MPFR.
3181 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3182 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3183 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3184 * gfortran.h (GFC_REAL_BITS): Remove.
3185 (arith): Add ARITH_NAN.
3186 Include mpfr.h. Define GFC_RND_MODE.
3187 Rename GCC_GFORTRAN_H GFC_GFC_H.
3188 (gfc_expr): Convert GMP to MPFR.
3189 * module.c: Add arith.h, correct type in comment.
3190 (mio_gmp_real): Convert GMP to MPFR.
3191 (mio_expr): Use gfc_set_model_kind().
3192 * primary.c: Update copyright date with 2004.
3193 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3194 * simplify.c: Remove global GMP variables
3195 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3196 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3197 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3198 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3199 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3200 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3201 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3202 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3203 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3204 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3205 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3206 gfc_simplify_rrspacing,gfc_simplify_scale,
3207 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3208 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3209 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3210 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
3212 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3213 gfc_conv_mpf_to_tree. Convert it to use MPFR
3214 (gfc_conv_constant_to_tree): Use it.
3215 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3216 * trans-intrinsic.c: Add arith.h, remove gmp.h
3217 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3219 2004-08-06 Victor Leikehman <lei@il.ibm.com>
3220 Paul Brook <paul@codesourcery.com>
3222 * trans-array.c (gfc_trans_allocate_array_storage,
3223 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3224 gfc_conv_loop_setup): For functions, if the shape of the result
3225 is not known in compile-time, generate an empty array descriptor for
3226 the result and let the callee to allocate the memory.
3227 (gfc_trans_dummy_array_bias): Do nothing for pointers.
3228 (gfc_conv_expr_descriptor): Use function return values directly.
3229 * trans-expr.c (gfc_conv_function_call): Always add byref call
3231 (gfc_trans_pointer_assignment): Add comments.
3232 (gfc_trans_arrayfunc_assign): Don't chain on expression.
3234 2004-08-01 Roger Sayle <roger@eyesopen.com>
3236 * options.c (gfc_init_options): Don't warn about the use GNU
3237 extensions by default.
3238 (gfc_post_options): Warn about GNU extensions with -pedantic.
3239 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3241 2004-07-30 Richard Henderson <rth@redhat.com>
3243 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3246 2004-07-25 Richard Henderson <rth@redhat.com>
3248 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3249 and DECL_IGNORED_P on RESULT_DECL.
3250 (gfc_generate_constructors): Likewise.
3252 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3255 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3257 (ffixed-line-length-80, ffixed-line-length-132): Remove.
3258 * options.c (gfc_handle_options): Deal with changed options.
3259 * scanner.c (load_line): Change second arg to 'char **',
3260 allocate if pointing to NULL. Keep track of buffer's length.
3261 Adapt buffer size to overlong lines. Pad lines to full length
3263 (load_file): Adapt to new interface of load_line.
3265 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
3267 * trans.h (builtin_function): Declare.
3269 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3272 (parts ported from g95)
3273 * parse.h (gfc_state_data): New field do_variable.
3274 (gfc_check_do_variable): Add prototype.
3275 * parse.c (push_state): Initialize field 'do_variable'.
3276 (gfc_check_do_variable): New function.
3277 (parse_do_block): Remember do iterator variable.
3278 (parse_file): Initialize field 'do_variable'.
3279 * match.c (gfc_match_assignment, gfc_match_do,
3280 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3281 Add previously missing checks.
3282 (gfc_match_return): Reformat error message.
3283 * io.c (match_out_tag): New function.
3284 (match_open_element, match_close_element,
3285 match_file_element, match_dt_element): Call match_out_tag
3286 instead of match_vtag where appropriate.
3287 (match_io_iterator, match_io_element): Add missing check.
3288 (match_io): Reformat error message.
3289 (match_inquire_element): Call match_out_tag where appropriate.
3291 * parse.c (gfc_check_do_variable): Fix error locus.
3293 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3296 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3297 for every assumed length character dummy argument.
3300 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3303 * simplify.c (gfc_simplify_bound): Copy the bound expression.
3305 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3308 * trans-array.c gfc_trans_g77_array,
3309 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3310 for assumed length characters.
3311 (gfc_conv_expr_descriptor): Set se->string_length if dealing
3312 with a character expression.
3313 (gfc_cvonv_array_parameter): Pass string length when passing
3314 character array according to g77 conventions.
3316 2004-07-12 Paul Brook <paul@codesourcery.com>
3318 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3319 * trans-array.c (gfc_trans_auto_array_allocation): Remove
3320 initialization code.
3321 * trans-common.c (create_common): Use gfc_conv_initializer.
3322 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3323 * trans-expr.c (gfc_conv_initializer): New function.
3324 (gfc_conv_structure): Use it.
3325 * trans.h (gfc_conv_initializer): Add prototype.
3327 2004-07-11 Paul Brook <paul@codesourcery.com>
3330 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3332 (parse_contained): Mark contained symbols as referenced.
3334 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3337 * module.c (gfc_dump_module, gfc_use_module): Print locus
3338 when opening of module file fails.
3341 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3344 * match.c (gfc_match_program): A program name is obligatory.
3345 (gfc_match_return): RETURN in main program is an extension.
3346 (gfc_match_block_data): A space is required before a block data
3350 * primary.c (match_boz_constant): Call gfc_notify_std only if
3351 we actually have a non-standard boz-literal-constant.