1 2005-11-21 Paul Thomas <pault@gcc.gnu.org>
4 * resolve.c (resolve_contained_fntype) Error if an internal
5 function is assumed character length.
8 * trans-decl.c (gfc_create_module_variable) Skip ICE in
9 when backend decl has been built and the symbol is marked
10 as being in an equivalence statement.
12 2005-11-20 Toon Moene <toon@moene.indiv.nluug.nl>
14 * invoke.texi: Remove superfluous @item.
16 2005-11-19 Janne Blomqvist <jb@gcc.gnu.org>
19 * trans-io.c (gfc_trans_transfer): Handle arrays of derived type.
21 2005-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
24 * scanner.c (gfc_open_included_file): Add an extra include_cwd
25 argument. Only include files in the current working directory if
27 * gfortran.h: Change prototype for gfc_open_included_file.
28 (load_file): Don't search for include files in the current working
30 * options.c (gfc_post_options): Add the directory of the source file
31 to the list of paths for included files.
32 * module.c (gfc_use_module): Look for module files in the current
35 2005-11-16 Alan Modra <amodra@bigpond.net.au>
38 * trans-types.c (gfc_init_kinds): Use one less for max_exponent
39 of IBM extended double format.
41 2005-11-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
43 * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET,
44 FPUTC, FPUT, AND, XOR and OR intrinsic functions.
45 (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic
47 * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET,
48 GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL,
49 GFC_ISYM_OR, GFC_ISYM_XOR.
50 * iresolve.c (gfc_resolve_and, gfc_resolve_complex,
51 gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget,
52 gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell,
53 gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub,
54 gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub):
56 * check.c (gfc_check_complex, gfc_check_fgetputc_sub,
57 gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput,
58 gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions.
59 * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or,
60 gfc_simplify_xor): New functions.
61 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
62 GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC,
63 GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and
65 * intrinsic.h: Add prototypes for all functions added to iresolve.c,
66 simplify.c and check.c.
68 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
69 Steven G. Kargl <kargls@comcast.net>
72 * resolve.c (resolve_symbol): Disallow automatic arrays in module scope.
74 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
78 * match.c (recursive_stmt_fcn): Add checks that symtree exists
79 for the expression to weed out inline intrinsic functions and
83 * module.c (mio_symtree_ref): Correct the patch of 0923 so that
84 a symbol is not substituted for by a the symbol for the module
85 itself and to prevent the promotion of a formal argument.
87 2005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
90 * primary.c (match_varspec): Check for implicitly typed CHARACTER
91 variables before matching substrings.
93 2005-11-09 Steven G. Kargl <kargls@comcast.net>
95 * trans-intrinsic.c: Typo in comment.
97 2005-11-09 Erik Edelmann <eedelman@gcc.gnu.org>
100 * trans-decl.c(build_function_decl): Don't set
101 DECL_IS_PURE (fndecl) = 1 for return-by-reference
104 2005-11-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
106 * dump-parse-tree.c: Fix comment typo, add a few blank lines.
108 2005-11-07 Steven G. Kargl <kargls@comcast.net>
110 * error.c: Use flag_fatal_error.
111 * invoke.texi: Remove -Werror from list of options.
113 2005-11-06 Paul Thomas <pault@gcc.gnu.org>
116 * resolve.c (resolve_symbol): Exclude case of PRIVATE declared
117 within derived type from error associated with PRIVATE type
118 components within derived type.
122 * gfortran.h: Add prototype for gfc_has_vector_index.
123 * io.c (gfc_resolve_dt): Error if internal unit has a vector index.
124 * expr.c (gfc_has_vector_index): New function to check if any of
125 the array references of an expression have vector inidices.
126 (gfc_check_pointer_assign): Error if internal unit has a vector index.
129 * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
130 and replace by a standard dependent warning/error if overwriting an
131 existing initialization.
132 * decl.c (gfc_data_variable): Remove old error for already initialized
133 variable and the unused error check for common block variables. Add
134 error for hots associated variable and standard dependent error for
135 common block variables, outside of blockdata.
136 * symbol.c (check_conflict): Add constraints for DATA statement.
138 2005-11-06 Janne Blomqvist <jb@gcc.gnu.org>
142 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind
143 argument to transfer_array.
144 (transfer_array_desc): Add kind argument.
146 2005-11-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
148 * intrinsic.c (add_functions): Add ctime and fdate intrinsics.
149 (add_subroutines): Likewise.
150 * intrinsic.h: Prototypes for gfc_check_ctime,
151 gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime,
152 gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub.
153 * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE.
154 * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate,
155 gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions.
156 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
157 gfor_fndecl_fdate and gfor_fndecl_ctime.
158 * check.c (gfc_check_ctime, gfc_check_ctime_sub,
159 gfc_check_fdate_sub): New functions.
160 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
161 gfc_conv_intrinsic_fdate): New functions.
162 (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME
164 * intrinsic.texi: Documentation for the new CTIME and FDATE
166 * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate.
168 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
170 * decl.c, trans-decl.c: Fix comment typos.
171 * gfortran.texi: Fix a typo.
173 2005-11-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
175 * intrinsic.c (add_functions): Add function version of TTYNAM.
176 * intrinsic.h: Add prototypes for gfc_check_ttynam and
178 * gfortran.h: Add case for GFC_ISYM_TTYNAM.
179 * iresolve.c (gfc_resolve_ttynam): New function.
180 * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree
181 for function call to library ttynam.
182 * check.c (gfc_check_ttynam): New function.
183 * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function.
184 (): Call gfc_conv_intrinsic_ttynam.
185 * trans.h: Add prototype for gfor_fndecl_ttynam.
187 2005-11-04 Steven G. Kargl <kargls@comcast.net>
190 * match.c (gfc_match_stopcode): Set stop_code = -1.
192 2005-11-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
195 * lang-specs.h: Pass -lang-fortran to the preprocessor.
197 2005-11-02 Andrew Pinski <pinskia@physics.uc.edu>
200 * trans-array.c (gfc_conv_resolve_dependencies): Use the correct
201 type for the temporary array.
202 * trans-expr.c (gfc_trans_assignment): Pass lss
203 instead of lss_section
204 to gfc_conv_resolve_dependencies to get the
207 2005-11-02 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
209 * decl.c (gfc_match_entry): Function entries don't need an argument
210 list if there's no RESULT clause.
212 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
215 * decl.c (gfc_match_entry): Function entries need an argument list.
217 2005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
220 * trans.c (gfc_generate_code): Move code to create a main
221 program symbol from here ...
222 * parse.c (main_program_symbol): ... to this new
223 function, setting the locus from gfc_current_locus
224 instead of ns->code->loc.
225 (gfc_parse_file): Call main_program_symbol for main programs.
227 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
230 * resolve.c (resolve_symbol): Output symbol names in more error
231 messages, clarify error message.
233 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
235 * dump-parse-tree.c (show_symtree): Revert change unintentionally
236 committed in r106246.
238 2005-11-01 Paul Thomas <pault@gcc.gnu.org>
241 * symbol.c (check_conflict): An object cannot be in a namelist and in
245 * resolve.c (resolve_symbol): Set the error flag to
246 gfc_set_default_type, in the case of an external symbol, so that
247 an error message is emitted if IMPLICIT NONE is set.
250 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
251 * check.c (gfc_check_secnds): New function.
252 * intrinsic.c (add_functions): Add call to secnds.
253 * iresolve.c (gfc_resolve_secnds): New function.
254 * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
255 secnds via case GFC_ISYM_SECNDS.
256 * intrinsic.texi: Add documentation for secnds.
258 2005-10-31 Andreas Schwab <schwab@suse.de>
260 * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define.
261 (GFORTRAN_CROSS_NAME): Remove.
262 (fortran.install-common): Correctly install a cross compiler.
263 (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of
266 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
268 * gfortran.texi: Update contributors.
270 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
273 * trans-decl.c (gfc_finish_var_decl): Add decl to the
274 current function, rather than the parent. Make
275 assertion accept fake result variables.
276 * trans-expr.c (gfc_conv_variable): If the character
277 length of an ENTRY isn't set, get the length from
278 the master function instead.
280 2005-10-30 Thomas Koenig <Thomas.Koenig@online.de>
282 * gfortran.texi: Remove reservations about I/O usability. Document
283 that array intrinsics mostly work.
285 2005-10-30 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
287 * gfortran.texi: Move license stuff to back. Add information
288 on ENUM and ENUMERATOR.
289 * invoke.texi: Document -fshort-enums.
291 2005-10-30 Gaurav Gautam <gauravga@noida.hcltech.com>
292 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
294 * arith.c (gfc_enum_initializer): New function.
295 (gfc_check_integer_range): Made extern.
296 * decl.c (enumerator_history): New typedef.
297 (last_initializer, enum_history, max_enum): New variables.
298 (create_enum_history, gfc_free_enum_history): New functions.
299 (add_init_expr_to_sym): Call create_enum_history if parsing ENUM.
300 (variable_decl): Modified to parse enumerator definition.
301 (match_attr_spec): Add PARAMETER attribute to ENUMERATORs.
302 (gfc_match_data_decl): Issues error, if match_type_spec do not
303 return desired return values.
304 (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New
306 (gfc_match_end): Deal with END ENUM.
307 * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM
309 (symbol_attribute): Bit field for enumerator added.
310 (gfc_options): Add fshort_enums.
311 (gfc_enum_initializer, gfc_check_integer_range): Add prototypes.
312 * options.c: Include target.h
313 (gfc_init_options): Initialize fshort_enums.
314 (gfc_handle_option): Deal with fshort_enums.
315 * parse.c (decode_statement): Match ENUM and ENUMERATOR statement.
316 (gfc_ascii_statement): Deal with the enumerator statements.
317 (parse_enum): New function to parse enum construct.
318 (parse_spec): Added case ST_ENUM.
319 * parse.h (gfc_compile_state): COMP_ENUM added.
320 (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history):
322 * symbol.c (gfc_copy_attr): Copy enumeration attribute.
323 * lang.opt (fshort-enums): Option added.
325 2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
327 * check.c (gfc_check_malloc, gfc_check_free): New functions.
328 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC.
329 * intrinsic.c (add_functions): Add symbols for MALLOC function.
330 (add_subroutines): Add symbol for FREE subroutine.
331 * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free,
332 gfc_resolve_malloc and gfc_resolve_free.
333 * intrinsic.texi: Add doc for FREE and MALLOC intrinsics.
334 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New
336 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for
339 2005-10-30 Steven Bosscher <stevenb@suse.de>
341 * gfortran.texi: Update contributors.
343 2005-10-29 Steven Bosscher <stevenb@suse.de>
345 * interface.c: Fix previous checkin (an incomplete patch
346 was commited for me).
348 2005-10-29 Joseph S. Myers <joseph@codesourcery.com>
350 * intrinsic.texi: Remove empty @cindex line.
352 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
354 * check.c (gfc_check_alarm_sub, gfc_check_signal,
355 gfc_check_signal_sub): New functions.
356 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
357 * intrinsic.c (add_functions): Add signal intrinsic.
358 (add_subroutines): Add signal and alarm intrinsics.
359 * intrinsic.texi: Document the new intrinsics.
360 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
361 gfc_resolve_signal_sub): New functions.
362 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
364 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
365 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
366 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
368 2005-10-28 Steven Bosscher <stevenb@suse.de>
371 * interface.c (gfc_match_end_interface): Fix typo in
372 INTERFACE_USER_OP case.
374 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
377 * resolve.c (resolve_symbol): Remove the use of whynot, so that
378 error messages are not built from pieces.
380 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
383 * decl.c (gfc_match_data_decl): Correct broken bit of code
384 that prevents undefined derived types from being used as
385 components of another derived type.
386 * resolve.c (resolve_symbol): Add backstop error when derived
387 type variables arrive here with a type that has no components.
389 2005-10-25 Jakub Jelinek <jakub@redhat.com>
391 * trans.h (gfc_conv_cray_pointee): Remove.
392 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
393 * trans-array.c (gfc_conv_array_parameter): Likewise.
394 * trans-decl.c (gfc_conv_cray_pointee): Remove.
395 (gfc_finish_cray_pointee): New function.
396 (gfc_finish_var_decl): Use it. Don't return early for Cray
398 (gfc_create_module_variable): Revert 2005-10-24 change.
399 * decl.c (cray_pointer_decl): Update comment.
400 * gfortran.texi: Don't mention Cray pointees aren't visible in the
403 * symbol.c (check_conflict): Add conflict between cray_pointee
404 and in_common resp. in_equivalence.
405 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
407 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
408 (attr_bits): Likewise.
409 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
410 (mio_symbol): For cray_pointee write/read cp_pointer reference.
412 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
415 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
417 (gfc_get_symbol_decl): Use it when a variable, including dummy
418 argument, is assigned a label.
419 (gfc_trans_assign_aux_var): New function. Set initial value of
420 the auxiliary variable explicitly.
421 (gfc_trans_deferred_vars): Use it.
422 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
424 2005-10-24 Asher Langton <langton2@llnl.gov>
428 * check.c (gfc_check_loc): New function.
429 * decl.c (variable_decl): New variables cp_as and sym. Added a
430 check for variables that have already been declared as Cray
431 Pointers, so we can get the necessary attributes without adding
433 (attr_decl1): Added code to catch pointee symbols and "fix"
435 (cray_pointer_decl): New method.
436 (gfc_match_pointer): Added Cray pointer parsing code.
437 (gfc_mod_pointee_as): New method.
438 * expr.c (gfc_check_assign): Added a check to catch vector-type
439 assignments to pointees with an unspecified final dimension.
440 * gfortran.h: (GFC_ISYM_LOC): New.
441 (symbol_attribute): Added cray_pointer and cray_pointee bits.
442 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
443 (gfc_symbol): Added gfc_symbol *cp_pointer.
444 (gfc_option): Added flag_cray_pointer.
445 (gfc_add_cray_pointee): Declare.
446 (gfc_add_cray_pointer ): Declare.
447 (gfc_mod_pointee_as): Declare.
448 * intrinsic.c (add_functions): Add code for loc() intrinsic.
449 * intrinsic.h (gfc_check_loc): Declare.
450 (gfc_resolve_loc): Declare.
451 * iresolve.c (gfc_resolve_loc): New.
452 * lang.opt: Added fcray-pointer flag.
453 * options.c (gfc_init_options): Initialized.
454 gfc_match_option.flag_cray_pointer.
455 (gfc_handle_option): Deal with -fcray-pointer.
456 * parse.c:(resolve_equivalence): Added code prohibiting Cray
457 pointees in equivalence statements.
458 * resolve.c (resolve_array_ref): Added code to prevent bounds
459 checking for Cray Pointee arrays.
460 (resolve_equivalence): Prohibited pointees in equivalence
462 * symbol.c (check_conflict): Added Cray pointer/pointee
464 (gfc_add_cray_pointer): New.
465 (gfc_add_cray_pointee): New.
466 (gfc_copy_attr): New code for Cray pointers and pointees.
467 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
468 prevent space from being allocated for pointees.
469 (gfc_conv_array_parameter): Added code to catch pointees and
470 correctly set their base address.
471 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
472 pointee declarations from making it to the back end.
473 (gfc_create_module_variable): Same.
474 * trans-expr.c (gfc_conv_variable): Added code to detect and
476 (gfc_conv_cray_pointee): New.
477 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
478 (gfc_conv_intrinsic_function): Added entry point for loc
480 * trans.h (gfc_conv_cray_pointee): Declare.
482 * gfortran.texi: Added section on Cray pointers, removed Cray
483 pointers from list of proposed extensions.
484 * intrinsic.texi: Added documentation for loc intrinsic.
485 * invoke.texi: Documented -fcray-pointer flag.
487 2005-10-24 Asher Langton <langton2@llnl.gov>
489 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
490 warnings in the absence of strict standard conformance
491 * symbol.c (gfc_add_save): Same.
493 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
496 * arith.c (gfc_arith_error): Change message to include locus.
497 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
498 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
499 the new gfc_arith_error.
500 (arith_error): Rewrite full error messages instead of building
502 * check.c (must_be): Removed.
503 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
504 kind_check, double_check, logical_array_check, array_check,
505 scalar_check, same_type_check, rank_check, kind_value_check,
506 variable_check, gfc_check_allocated, gfc_check_associated,
507 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
508 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
509 gfc_check_pack, gfc_check_precision, gfc_check_present,
510 gfc_check_spread): Rewrite full error messages instead of
511 building them from pieces.
512 * decl.c (gfc_match_entry): Rewrite full error messages instead
513 of building them from pieces.
514 * parse.c (gfc_state_name): Remove.
515 * parse.h: Remove prototype for gfc_state_name.
517 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
520 * check.c (gfc_check_ichar_iachar): Move the code around so
521 that the check on the length is after check for
524 2005-10-23 Asher Langton <langton2@llnl.gov>
526 * decl.c (match_type_spec): Add a BYTE type as an extension.
528 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
531 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
532 if there is a component ref during an array ref to force
533 use of temporary in assignment.
537 * fortran/iresolve.c (check_charlen_present): New function to
538 add a charlen to the typespec, in the case of constant
540 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
541 (gfc_resolve_spread): Make calls to library functions that
542 handle the case of the spread intrinsic with a scalar source.
544 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
547 * decl.c (variable_decl): Don't assign default initializers to
550 2005-10-21 Jakub Jelinek <jakub@redhat.com>
552 * interface.c (compare_actual_formal): Issue error when attempting
553 to pass an assumed-size array as assumed-shape array argument.
555 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
558 * resolve.c (expr_to_initialize): New function.
559 (resolve_allocate_expr): Take current statement as new
560 argument. Add default initializers to variables of
561 derived types, if they need it.
562 (resolve_code): Provide current statement as argument to
563 resolve_allocate_expr().
565 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
568 * resolve.c (resolve_symbol): Correct error in check for
569 assumed size array with default initializer by testing
570 for arrayspec before dereferencing it.
572 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
575 * gfortran.h: Primitive for gfc_is_formal_arg.
576 * resolve.c(gfc_is_formal_arg): New function to signal across
577 several function calls that formal argument lists are being
579 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
580 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
581 symbol is part of an formal argument declaration.
584 * decl.c (add_init_expr_to_sym): Make a new character
585 length for each variable, when the expression is NULL
589 * match.c (recursive_stmt_fcn): New function that tests if
590 a statement function resurses through itself or other other
592 (gfc_match_st_function): Call recursive_stmt_fcn to check
593 if this is recursive and to raise error if so.
597 * resolve.c (resolve_symbol): Errors for assumed size arrays
598 with default initializer and for external objects with an
602 * decl.c (match_attr_spec): Prevent PUBLIC from being used
605 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
608 * expr.c (check_inquiry): Add "len" to inquiry_function.
610 2005-10-14 Jakub Jelinek <jakub@redhat.com>
612 * primary.c (match_boz_constant): Add missing break after gfc_error.
614 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
617 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
618 declaration for derived types, building if necessary. Return the
619 derived type if the fields have been built by this process. Otherwise,
620 continue as before but using the already obtained backend_decls for the
621 derived type components. Change the gcc_assert to act on the field.
623 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
626 * decl.c (variable_decl): Make a new copy of the character
627 length for each variable, when the expression is not a
630 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
632 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
634 * invoke.texi: Document the new -ffpe-trap option.
635 * lang.opt: Add -ffpe-trap option.
636 * options.c (gfc_init_options): Initialize the FPE option.
637 (gfc_handle_fpe_trap_option): New function to parse the argument
638 of the -ffpe-trap option.
639 (gfc_handle_option): Add case for -ffpe-trap.
640 * trans-decl.c: Declare a tree for the set_fpe library function.
641 (gfc_build_builtin_function_decls): Build this tree.
642 (gfc_generate_function_code): Generate a call to set_fpe at
643 the beginning of the main program.
644 * trans.h: New tree for the set_fpe library function.
646 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
650 * symbol.c (check_conflict): Prevent common variables and
651 function results from having the SAVE attribute,as required
654 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
657 * resolve.c (resolve_symbol): Exclude use and host associated
658 symbols from the test for private objects in a public namelist.
660 2005-10-12 Jakub Jelinek <jakub@redhat.com>
662 * trans-common.c (build_field): Fix comment typo.
663 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
664 variables to a VAR_DECL with the COMPONENT_REF in
665 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
666 * f95-lang.c (gfc_expand_function): Emit debug info for
667 EQUIVALENCEd variables if the equiv union is going to be output.
669 2005-10-11 Steven G. Kargl <kargls@comcast.net>
672 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
675 2005-10-11 Jakub Jelinek <jakub@redhat.com>
677 * f95-lang.c (gfc_init_decl_processing): Initialize
680 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
683 * resolve.c (find_array_spec): Search through the list of
684 components in the symbol of the type instead of the symbol of the
687 2005-10-05 Richard Guenther <rguenther@suse.de>
690 * parse.c (gfc_parse_file): Exit early for empty files.
692 2005-10-03 Steve Ellcey <sje@cup.hp.com>
694 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
695 and long double floating point types through to Fortran compiler.
697 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
700 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
701 double builtin function.
702 (gfc_init_builtin_functions): Add mfunc_longdouble,
703 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
704 them for round, trunc, cabs, copysign and pow functions.
705 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
706 case for kind 10 and 16.
707 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
708 exponent10 and exponent16.
709 (gfc_build_intrinsic_function_decls): Build nodes for int16,
710 real10, real16, complex10 and complex16 types. Build all possible
711 combinations for function _gfortran_pow_?n_?n. Build function
712 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
713 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
714 real(10) and real(16).
715 * trans-intrinsic.c: Add suppport for long double builtin
716 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
718 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
720 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
721 and real16_decl in library functions.
722 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
724 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
726 (gfc_conv_intrinsic_sign): Likewise.
727 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
728 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
729 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
730 the case of kinds not available.
731 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
732 exponent10 and exponent16.
734 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
743 * gfortran.h: Prototype for gfc_add_in_equivalence.
744 * match.c (gfc_match_equivalence): Make a structure component
745 an explicit,rather than a syntax, error in an equivalence
746 group. Call gfc_add_in_equivalence to add the constraints
747 imposed in check_conflict.
748 * resolve.c (resolve_symbol): Add constraints: No public
749 structures with private-type components and no public
750 procedures with private-type dummy arguments.
751 (resolve_equivalence_derived): Add constraint that prevents
752 a structure equivalence member from having a default
754 (sequence_type): New static function to determine whether an
755 object is default numeric, default character, non-default
756 or mixed sequence. Add corresponding enum typespec.
757 (resolve_equivalence): Add constraints to equivalence groups
758 or their members: No more than one initialized member and
759 that different types are not equivalenced for std=f95. All
760 the simple constraints have been moved to check_conflict.
761 * symbol.c (check_conflict): Simple equivalence constraints
762 added, including those removed from resolve_symbol.
763 (gfc_add_in_equivalence): New function to interface calls
764 match_equivalence to check_conflict.
766 2005-09-27 Jakub Jelinek <jakub@redhat.com>
769 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
770 If it is true, set TREE_STATIC on the decl.
771 (create_common): If any symbol in equivalence has SAVE attribute,
772 pass true as last argument to build_equiv_decl.
774 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
776 * trans-io.c (gfc_build_io_library_fndecls): Add entry
777 iocall_x_array for transfer_array.
778 (transfer_array_desc): New function.
779 (gfc_trans_transfer): Add code to call transfer_array_desc.
781 2005-09-26 Jakub Jelinek <jakub@redhat.com>
784 * symbol.c (gfc_is_var_automatic): Return true if character length
785 is non-constant rather than constant.
786 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
788 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
789 to 0 for -fno-automatic.
791 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
794 * module.c (mio_component_ref): Return if the symbol is NULL
795 and wait for another iteration during module reads.
796 (mio_symtree_ref): Suppress the writing of contained symbols,
797 when a symbol is available in the main namespace.
798 (read_module): Restrict scope of special treatment of contained
799 symbols to variables only and suppress redundant call to
802 2005-09-22 Steven G. Kargl <kargls@comcast.net>
805 * interface.c (check_interface1): Fix NULL dereference.
807 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
810 * resolve.c (derived_inaccessible): New function.
811 (resolve_transfer): Use it to check for private
814 2005-09-22 Steven G. Kargl <kargls@comcast.net>
817 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
819 * intrinsic.h: Prototypes for gfc_simplify_realpart and
820 gfc_resolve_realpart.
821 * intrinsic.texi: Document intrinsic procedures.
822 * simplify.c (gfc_simplify_realpart): New function.
823 * irseolve.c (gfc_resolve_realpart): New function.
825 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
828 * trans-stmt.c (gfc_trans_deallocate): Check if the
829 object to be deallocated is an array by looking at
830 expr->rank instead of expr->symtree->n.sym->attr.dimension.
832 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
835 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
836 (match_io): Fix usage of gfc_find_symbol.
838 2005-09-20 Jakub Jelinek <jakub@redhat.com>
841 * primary.c (match_actual_arg): Handle ENTRY the same way
844 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
846 * Make-lang.in: Make check-fortran alias for check-gfortran.
848 2005-09-18 Andreas Jaeger <aj@suse.de>
850 * module.c (read_module): Add missed line from last patch.
852 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
855 * resolve.c (resolve_symbol): Don't assign default
856 initializer to pointers.
858 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
861 * module.c (read_module): Give symbols from module procedures
862 different true_name entries to those from the module proper.
864 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
867 * arith.c (gfc_arith_error): Add translation support for error
869 * array.c (gfc_match_array_ref): Likewise.
870 (gfc_match_array_spec): Likewise.
871 * check.c (must_be): Add msgid convention to third argument.
872 (same_type_check): Add translation support for error message.
873 (rank_check): Likewise.
874 (kind_value_check): Likewise.
875 (gfc_check_associated): Correct typo.
876 (gfc_check_reshape): Add translation support for error message.
877 (gfc_check_spread): Likewise.
878 * error.c (error_printf): Add nocmsgid convention to argument.
879 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
880 (gfc_error, gfc_error_now): Likewise.
881 (gfc_status): Add cmsgid convention to argument.
882 * expr.c (gfc_extract_int): Add translation support for error
884 (gfc_check_conformance): Add msgid convention to argument.
885 (gfc_check_pointer_assign): Correct tabbing.
886 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
887 * gfortranspec.c: Include intl.h header.
888 (lang_specific_driver): Add translation support for --version.
889 * io.c (check_format): Add translation support for error message.
890 (format_item_1): Likewise.
891 (data_desc): Likewise.
892 * matchexp.c: Likewise.
893 * misc.c (gfc_article): Remove function.
894 * module.c (bad_module): Use msgid convention. Add translation support
896 (require_atom): Add translation support for error messages.
897 * parse.c (gfc_ascii_statement): Likewise.
898 (gfc_state_name): Likewise.
899 * primary.c (match_boz_constant): Reorganise error messages for
901 * resolve.c (resolve_entries): Likewise.
902 (resolve_operator): Add translation support for error messages.
903 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
905 (resolve_symbol): Add translation support for error messages.
906 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
907 * trans-const.c (gfc_build_string_const): Use msgid convention.
909 2005-09-16 Paul Brook <paul@codesourcery.com>
912 * dependency.c (transform_sections): Divide by correct value.
915 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
917 PR fortran/21875 Internal Unit Array I/O, NIST
918 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
919 array descriptor to IOPARM structure.
920 * fortran/trans-io.c (set_internal_unit): New function to generate code
921 to store the character (array) and the character length for an internal
923 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
925 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
928 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
929 which uses dim[i].upper for lbound, rather than dim[i].lower.
931 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
934 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
935 of attr.elemental for specific function instead of generic name.
937 2005-09-13 Richard Sandiford <richard@codesourcery.com>
940 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
941 of argse. Remove now-redundant want_pointer assignment.
942 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
943 a pointer, keep the original bounds of a full array reference.
945 2005-09-13 Richard Sandiford <richard@codesourcery.com>
948 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
949 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
950 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
951 for character-based operations.
952 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
953 (gfc_resolve_unpack): Copy the whole typespec from the vector.
954 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
955 case, get the string length from the scalarization state.
957 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
959 * Make-lang.in: Change targets prefixes from f95 to fortran.
960 * config-lang.in: Change language name to "fortran".
961 * lang.opt: Change language name to "fortran".
962 * options.c: Change CL_F95 to CL_Fortran.
964 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
966 gfortran.texi: Document IOSTAT= specifier.
968 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
970 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
971 gfc_inquire and gfc_dt.
972 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
973 for open, close, file positioning, inquire and namelist.
974 * io.c (io_tag): Add tag_iomsg.
975 (resolve_tag): Add standards warning for iomsg.
976 (match_open_element): Add iomsg.
977 (gfc_free_open): Add iomsg.
978 (gfc_resolve_open): Add iomsg.
979 (gfc_free_close): Add iomsg.
980 (match_close_element): Add iomsg.
981 (gfc_resolve_close): Add iomsg.
982 (gfc_free_filepos): Add iomsg.
983 (match_file_element): Add iomsg.
984 (gfc_resolve_filepos): Add iostat and iomsg.
985 (match-dt_element): Add iomsg.
986 (gfc_free_dt): Add iomsg.
987 (gfc_resolve_dt): Add iomsg.
988 (gfc_free_inquire): Add iomsg.
989 (match_inquire_element): Add iomsg.
990 (gfc_resolve_inquire): Add iomsg.
991 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
992 (gfc_build_io_library_fndecls): Add iomsg as last field.
993 (gfc_trans_open): Add iomsg.
994 (gfc_trans_close): Add iomsg.
995 (build_fileos): Call set_string for iomsg.
996 (gfc_trans_inquire): Add iomsg.
997 (build_dt): Add iomsg.
999 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1001 * match.h (gfc_match_equiv_variable): Declare.
1003 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1006 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
1007 * dependency.h (gfc_ref_needs_temporary_p): Declare.
1008 * dependency.c (gfc_ref_needs_temporary_p): New function.
1009 (gfc_check_fncall_dependency): Use it instead of inlined check.
1010 By so doing, take advantage of the fact that character substrings
1011 within an array reference also need a temporary.
1012 * trans.h (GFC_SS_VECTOR): Adjust comment.
1013 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
1014 (gfc_set_vector_loop_bounds): New function.
1015 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
1016 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
1017 the vector expression and caching its descriptor for use within
1019 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
1020 (gfc_conv_array_index_offset): Handle scalar, vector and range
1021 dimensions as separate cases of a switch statement. In the vector
1022 case, use the loop variable to calculate a vector index and use the
1023 referenced element as the dimension's index. Perform bounds checking
1024 on this final index.
1025 (gfc_conv_section_upper_bound): Return null for vector indexes.
1026 (gfc_conv_section_startstride): Give vector indexes a start value
1027 of 0 and a stride of 1.
1028 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
1029 (gfc_conv_expr_descriptor): Expand comments. Generalize the
1030 handling of the !want_pointer && !direct_byref case. Use
1031 gfc_ref_needs_temporary_p to decide whether the variable case
1033 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
1034 GFC_SS_VECTOR index.
1035 * trans-expr.c: Include dependency.h.
1036 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
1038 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1041 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
1043 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1044 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1045 (gfc_apply_interface_mapping): Declare.
1046 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
1047 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1048 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
1049 (gfc_trans_allocate_array_storage): Replace loop argument with
1050 separate pre and post blocks.
1051 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1052 Update call to gfc_trans_allocate_array_storage.
1053 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
1054 interface to gfc_trans_allocate_temp_array.
1055 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
1057 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1058 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1059 (gfc_apply_interface_mapping): Make extern.
1060 (gfc_conv_function_call): Build an interface mapping for array
1061 return values too. Call gfc_set_loop_bounds_from_array_spec.
1062 Adjust call to gfc_trans_allocate_temp_array so that code is
1063 added to SE rather than LOOP.
1065 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1068 * trans.h (gfor_fndecl_internal_realloc): Declare.
1069 (gfor_fndecl_internal_realloc64): Declare.
1070 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
1071 (gfor_fndecl_internal_realloc64): New variable.
1072 (gfc_build_builtin_function_decls): Initialize them.
1073 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
1074 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
1075 to say whether the array can grow later. Don't allocate the array
1076 on the stack if so. Don't call malloc for zero-sized arrays.
1077 (gfc_trans_allocate_temp_array): Add a similar argument here.
1078 Pass it along to gfc_trans_allocate_array_storage.
1079 (gfc_get_iteration_count, gfc_grow_array): New functions.
1080 (gfc_iterator_has_dynamic_bounds): New function.
1081 (gfc_get_array_constructor_element_size): New function.
1082 (gfc_get_array_constructor_size): New function.
1083 (gfc_trans_array_ctor_element): Replace pointer argument with
1085 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
1086 argument to say whether the variable-sized part of the constructor
1087 must be allocated using realloc. Grow the array when this
1089 (gfc_trans_array_constructor_value): Likewise.
1090 (gfc_get_array_cons_size): Delete.
1091 (gfc_trans_array_constructor): If the loop bound has not been set,
1092 split the allocation into a static part and a dynamic part. Set
1093 loop->to to the bounds for static part before allocating the
1094 temporary. Adjust call to gfc_trans_array_constructor_value.
1095 (gfc_conv_loop_setup): Allow any constructor to determine the
1096 loop bounds. Check whether the constructor has a dynamic size
1097 and prefer to use something else if so. Expect the loop bound
1098 to be set later. Adjust call to gfc_trans_allocate_temp_array.
1099 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
1101 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1104 * module.c (find_use_name_n): Based on original
1105 find_use_name. Either counts number of use names for a
1106 given real name or returns use name n.
1107 (find_use_name, number_use_names): Interfaces to the
1108 function find_use_name_n.
1109 (read_module): Add the logic and calls to these functions,
1110 so that mutiple reuses of the same real name are loaded.
1112 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1119 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
1120 common.c so that it is accessible to module.c. Add common_head
1121 field to gfc_symbol structure. Add field for the equivalence
1122 name AND new attr field, in_equivalence.
1123 * match.c (gfc_match_common, gfc_match_equivalence): In loops
1124 that flag common block equivalences, emit an error if the
1125 common blocks are different, using sym->common_head as the
1126 common block identifier. Ensure that symbols that are equivalence
1127 associated with a common block are marked as being in_common.
1128 * module.c (write_blank_common): New.
1129 (write_common): Use unmangled common block name.
1130 (load_equiv): New function ported from g95.
1131 (read_module): Call load_equiv.
1132 (write_equiv): New function ported from g95. Correct
1133 string referencing for gfc functions. Give module
1134 equivalences a unique name.
1135 (write_module): Call write_equiv and write_blank_common.
1136 * primary.c (match_variable) Old gfc_match_variable, made
1137 static and third argument provided to indicate if parent
1138 namespace to be visited or not.
1139 (gfc_match_variable) New. Interface to match_variable.
1140 (gfc_match_equiv_variable) New. Interface to match_variable.
1141 * trans-common.c (finish_equivalences): Provide the call
1142 to create_common with a gfc_common_header so that
1143 module equivalences are made external, rather than local.
1144 (find_equivalences): Ensure that all members in common block
1145 equivalences are marked as used. This prevents the subsequent
1146 call to this function from making local unions.
1147 * trans-decl.c (gfc_generate_function_code): Move the call to
1148 gfc_generate_contained_functions to after the call to
1149 gfc_trans_common so the use-associated, contained common
1150 blocks produce the correct references.
1151 (gfc_create_module_variable): Return for equivalenced symbols
1152 with existing backend declaration.
1154 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1157 * match.c (gfc_match_common): Remove unnecessary / wrong special
1158 cases for end-of-statement.
1160 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
1162 * gfortran.texi: Add section about implemented F2003 features.
1164 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1167 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
1168 the GFC_SS_FUNCTION case too.
1169 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
1170 to function pointers as well as function decls.
1171 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
1172 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1173 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
1174 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
1175 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
1176 (gfc_apply_interface_mapping_to_ref)
1177 (gfc_apply_interface_mapping_to_expr)
1178 (gfc_apply_interface_mapping): New functions.
1179 (gfc_conv_function_call): Evaluate the arguments before working
1180 out where the result should go. Make the null pointer case provide
1181 the string length in parmse.string_length. Cope with non-constant
1182 string lengths, using the above functions to evaluate such lengths.
1183 Use a temporary typespec; don't assign to sym->cl->backend_decl.
1184 Don't assign to se->string_length when returning a cached array
1187 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1190 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
1191 after handling scalarized references. Make "indexse" inherit from
1192 "se" when handling AR_ELEMENTs.
1193 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
1194 substring or scalar reference that follows an array section.
1195 * trans-expr.c (gfc_conv_variable): When called from within a
1196 scalarization loop, start out with "ref" pointing to the scalarized
1197 part of the reference. Don't call gfc_advance_se_ss_chain here.
1199 2005-09-07 Richard Sandiford <richard@codesourcery.com>
1202 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
1203 descriptor if the rhs is not a null pointer or variable.
1205 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
1208 * symbol.c(check_conflict): Add conflict for parameter/save,
1210 2005-09-06 Richard Sandiford <richard@codesourcery.com>
1213 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
1214 the source, not the first element of the return value.
1216 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1219 * io.c (match_io): Correctly backup if PRINT followed by
1220 symbol which is not a namelist. Force blank between PRINT
1221 and namelist in free form.
1223 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1226 * gfortran.h (gfc_option_t): Add flag_automatic.
1227 * invoke.texi: Document the -fno-automatic option.
1228 * lang.opt: Add a -fautomatic option.
1229 * options.c (gfc_init_options): Default for -fautomatic is on.
1230 (gfc_handle_option): Add handling of -fautomatic option.
1231 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
1232 needed variables as SAVE.
1234 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
1236 * trans-array.c (gfc_trans_deferred_array): Fix comments.
1238 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
1240 * primary.c (match_charkind_name): Fix typo in comment leading to
1243 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
1246 * symbol.c (find_special): Remove.
1247 (build_sym, add_init_expr, attr_decl1): Remove calls to
1248 find_special in favor of calls to gfc_get_symbol.
1250 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
1253 * gfortran.h (symbol_attribute): Add noreturn to the structure.
1254 (gfc_intrinsic_sym): Add noreturn to the structure.
1255 * intrinsic.c (make_noreturn): New function.
1256 (add_subroutines): Mark subroutines abort and exit as noreturn.
1257 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
1258 isym to the resolved symbol.
1259 * trans-decl.c (gfc_get_extern_function_decl): Set function
1260 as VOLATILE (== noreturn) if the noreturn attribute is set.
1262 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1264 * decl.c: Typo in comment.
1266 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1268 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
1270 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1272 * gfortran.h (gfc_option_t): Remove source field. Add
1274 (gfc_new_file): Remove arguments in prototype.
1275 (gfc_source_file): Make 'const char *'.
1276 * f95-lang.c (gfc_init): Use gfc_source_file instead of
1277 gfc_option.source. Call gfc_new_file without arguments.
1278 * invoke.texi: Document new options '-fd-lines-as-code' and
1279 '-fd-lines-as-comment'.
1280 * lang.opt: Add new options. Alphabetize.
1281 * options.c (gfc_init_options): Initialize gfc_source_file instead
1282 of gfc_option.source. Initialize gfc_option.flag_d_lines.
1283 (form_from_filename): Move here from scanner.c. Make
1284 'filename' argument 'const'.
1285 (gfc_post_options): Set gfc_source_file. Determine source form.
1286 Warn if 'd-lines*' are used in free form.
1287 * scanner.c (gfc_source_file): Constify.
1288 (skip_fixed_comments): Deal with d-lines.
1289 (get_file): Constify argument 'name'.
1290 (load_file): Constify argument 'filename'.
1291 (form_from_filename): Moved to options.c.
1292 (gfc_new_file): Remove arguments. Don't initialize
1293 gfc_source_file, don't determine source form.
1294 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
1295 of gfc_option.source.
1297 2005-08-19 Steven G. Kargl <kargls@comcast.net>
1300 * gfortran.h: Remove PATH_MAX definition.
1301 * module.c (write_module, gfc_dump_module): Use alloca to allocate
1303 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
1305 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
1307 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
1310 2005-08-14 Asher Langton <langton2@llnl.gov>
1312 * parse.c (match): Enclose macro in do...while(0) and braces.
1314 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1317 * gfortran.texi: Document PRINT namelist.
1319 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1322 * io.c (match_io): Add code to implement PRINT namelist.
1324 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
1326 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
1329 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1330 Steven Bosscher <stevenb@suse.de>
1333 * gfortran.h: Add is_main_program member to symbol_attribute.
1334 * trans-decl: Add a gfor_fndecl_set_std tree.
1335 (gfc_build_builtin_function_decls): Create it.
1336 (gfc_generate_function_code): Add this call at the beginning of
1338 * trans.c (gfc_generate_code): Move main_program and attr.
1339 * trans.h: Add declaration for gfor_fndecl_set_std.
1341 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1344 gfortran.h: Declare new function gfc_resolve_dim_arg.
1345 resolve.c: New function gfc_resolve_dim_arg.
1346 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1347 (gfc_resolve_any): Likewise.
1348 (gfc_resolve_count): Likewise.
1349 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1350 gfc_default_integer_kind, convert it to default integer type.
1351 (gfc_resolve_eoshift): Likewise.
1352 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1353 (gfc_resolve_maxval): Likewise.
1354 (gfc_resolve_minloc): Likewise.
1355 (gfc_resolve_minval): Likewise.
1356 (gfc_resolve_product): Likewise.
1357 (gfc_resolve_spread): Likewise.
1358 (gfc_resolve_sum): Likewise.
1360 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1362 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1363 functions for new intrinsics TTYNAM and ISATTY.
1364 * intrinsic.c (add_functions, add_subroutines): Add new
1366 * intrinsic.h: Add prototypes for new check and resolve
1368 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1369 resolve functions for intrinsics TTYNAM and ISATTY.
1370 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1371 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1373 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1375 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1378 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1381 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1382 * gfortran.h: Add enums for FLUSH.
1383 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1384 comment appropriately. (gfc_match_flush): New function.
1385 * match.c (gfc_match_if): Add match for flush.
1386 * match.h: Add prototype.
1387 * parse.c (decode_statement): Add flush to 'f' case.
1388 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1389 * resolve.c (resolve_code): Add flush case.
1390 * st.c (gfc_free_statement): Add flush case.
1391 * trans-io.c: Add prototype for flush.
1392 (gfc_build_io_library_fndecls): Build fndecl for flush.
1393 (gfc_trans_flush): New function.
1394 * trans-stmt.h: Add prototype.
1395 * trans.c (gfc_trans_code): Add case for flush.
1397 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1399 * primary.c (match_hollerith_constant): Fix typo.
1401 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1403 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1404 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1405 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1406 comment/doc typos. Follow spelling conventions.
1408 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1412 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1413 attributes, call gfc_match_array_ref up to twice and don't do any
1414 substring or component processing.
1415 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1416 REF_SUBSTRING or nothing if needed. Check that substrings
1417 don't have zero length.
1419 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1421 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1422 stop_numeric and stop_string as non-returning.
1424 2005-08-04 Paul Brook <paul@codesourcery.com>
1426 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1427 (gfc_conv_expr_lhs): Fix assertion.
1428 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1430 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1433 * expr.c (simplify_parameter_variable): Do not copy the subobject
1434 references if the expression value is a constant.
1436 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1438 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1440 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1441 fix description of ceiling in index.
1443 2005-07-31 Steven Bosscher <stevenb@suse.de>
1445 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1446 malloc functions the 'malloc' attribute. Give runtime_error the
1447 'noreturn' attribute.
1449 2005-07-31 Steven Bosscher <stevenb@suse.de>
1451 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1452 of the assigned goto variable.
1454 2005-07-29 Steven Bosscher <stevenb@suse.de>
1456 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1458 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1460 * fortran/f95-lang.c (language_function): Remove
1461 named_labels, shadowed_labels, returns_value, returns_abnormally,
1462 warn_about_return_type, and extern_inline fields.
1463 (named_labels): Remove variable.
1464 (gfc_init_decl_processing): Remove setting of named_labels.
1466 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1469 * resolve.c (resolve_operator): Improve diagnostic for comparison
1470 of logicals with invalid operator.
1472 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1475 * data.c (gfc_assign_data_value_range): Call
1476 create_character_initializer if last_ts is a character type.
1478 2005-07-22 Manfred Hollstein <mh@suse.com>
1480 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1481 * matchexp.c (gfc_match_expr): Likewise.
1483 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1485 Make CONSTRUCTOR use VEC to store initializers.
1486 * trans-array.c (gfc_build_null_descriptor,
1487 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1488 Update to cope with VEC in CONSTRUCTOR_ELTS.
1489 * trans-common.c (create_common): Likewise.
1490 * trans-expr.c (gfc_conv_structure): Likewise.
1491 * trans-stmt.c (gfc_trans_character_select): Use
1492 build_constructor_from_list instead of build_constructor.
1494 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1497 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1498 is matched against interfaces in parent namespaces. If there
1499 the symtree is set to point to the interface.
1501 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1504 * decl.c (do_parm): Adjust character initializer to character length
1505 of symbol before assigning.
1507 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1509 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1511 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1513 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1514 (gfc_error_buf): Add allocated and index fields. Change message
1515 field from array to a pointer.
1516 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1517 (cur_error_buffer): New variable.
1518 (error_char): Use cur_error_buffer->{message,index} instead of
1519 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1521 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1522 cur_error_buffer and its index rather than {warning,error}_ptr
1523 and use_warning_buffer.
1524 (gfc_warning_check, gfc_error_check): Don't print anything if
1526 (gfc_push_error): Allocate saved message with xstrdup.
1527 (gfc_pop_error): Free saved message with gfc_free.
1528 (gfc_free_error): New function.
1529 * primary.c (match_complex_constant): Call gfc_free_error if
1530 gfc_pop_error will not be called.
1531 * match.c (gfc_match_st_function): Likewise.
1534 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1535 file. Fix file left but not entered warning.
1537 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1538 Steven G. Kargl <kargls@comcast.net>
1540 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1541 for the array and attach to namespace list for automatic deallocation.
1543 2005-07-13 Andreas Schwab <schwab@suse.de>
1545 * Make-lang.in (fortran/dependency.o): Depend on
1546 $(GFORTRAN_TRANS_DEPS).
1548 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1550 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1552 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1553 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1554 Don't clear maskindexes here.
1556 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1558 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1561 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1563 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1566 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1568 * scanner.c (load_line): Add pbuflen argument, don't make
1569 buflen static. If maxlen == 0 or preprocessor_flag,
1570 don't truncate at buflen, but at maxlen. In xrealloc add
1571 1 byte at the end for the terminating '\0'. Don't fill
1572 with spaces up to buflen, but gfc_option.fixed_line_length.
1573 (load_file): Adjust load_line caller. Add line_len variable.
1575 * scanner.c (preprocessor_line): Only set current_file->line when errors
1576 have not been encountered. Warn and don't crash if a file leave
1577 preprocessor line has no corresponding entering line. Formatting.
1579 2005-07-07 Steven Bosscher <stevenb@suse.de>
1581 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1582 for the hollerith length. Fix indentation.
1584 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1589 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1590 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1592 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1593 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1594 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1596 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1597 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1598 (gfc_check_assign): Enable conversion from Hollerith to other.
1599 * gfortran.h (bt): Add BT_HOLLERITH.
1600 (gfc_expr): Add from_H flag.
1601 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1602 (add_conversions): Add conversions from Hollerith constant to other.
1603 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1604 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1605 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1606 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1607 * primary.c (match_hollerith_constant): New function.
1608 (gfc_match_literal_constant): Add match Hollerith before Integer.
1609 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1611 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1612 convert Hollerith constant to tree.
1613 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1614 length to set string expr.
1615 (set_string): Deal with array assigned Hollerith constant and character
1617 * gfortran.texi: Document Hollerith constants as extention support.
1619 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1622 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1624 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1626 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1629 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1631 * gfortran.texi, intrinsic.texi: Fix typos.
1632 * symbol.c: Fix a comment typo.
1634 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1636 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1637 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1638 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1639 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1642 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1645 * io.c (match_dt_element): Do not allow END tag in PRINT or
1648 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1650 * lang.opt: Remove "." from end of help texts.
1652 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1654 * gfortran.texi: Fix typos and grammar.
1655 * invoke.texi: Fix typos and grammar.
1656 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1657 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1660 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1662 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1663 type than boolean_type_node.
1665 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1667 * all files: Update FSF address in copyright headers.
1669 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1672 * gfortran.h: Add symbols for new intrinsic functions.
1673 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1674 * intrinsic.h: Add prototypes for the new functions.
1675 * iresolve.c (gfc_resolve_acosh): New function.
1676 (gfc_resolve_asinh): New function.
1677 (gfc_resolve_atanh): New function.
1678 * mathbuiltins.def: Add defines.
1679 * simplify.c (gfc_simplify_acosh): New function.
1680 (gfc_simplify_asinh): New function.
1681 (gfc_simplify_atanh): New function.
1683 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1685 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1687 2005-06-22 Paul Brook <paul@codesourcery.com>
1690 * symbol.c (gfc_is_var_automatic): New function.
1691 (save_symbol): Use it.
1693 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1694 Paul Thomas <pault@gcc.gnu.org>
1698 * module.c (mio_namelist): New function. Correct to set
1699 namelist_tail and to give error on renaming namelist by use
1701 (mio_symbol): Call mio_namelist.
1703 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1705 * gfortran.h: Add flag_backslash compile-time option.
1706 * lang.opt: Add support for -fbackslash option.
1707 * options.c: Likewise.
1708 * primary.c: Implement behavior for -fno-backslash.
1709 * invoke.texi: Add doc for -fbackslash option.
1710 * gfortran.texi: Remove mention of -fno-backslash as a
1713 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1717 * match.c (gfc_match_label): Detect duplicate labels.
1720 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1722 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1723 in a warning message.
1725 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1726 Steven G. Kargl <kargls@comast.net>
1729 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1730 for an array; check that sym->as is NULL.
1733 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1735 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1736 functions whose simplification routine return FAILURE.
1738 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1740 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1741 (rule for installing f95.1 manpage): Does depend on installdirs.
1743 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1746 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1747 in the innermost loop.
1749 * trans-expr.c (gfc_conv_function_call): Return int instead of
1750 void. Use a local variable for has_alternate_specifier and
1751 return it. Avoid modification of function type's return value
1752 in place, since it may be shared.
1753 * trans.h (has_alternate_specifier): Remove.
1754 (gfc_conv_function_call): Change return type.
1755 * trans-stmt.c (has_alternate_specifier): Remove.
1756 (gfc_trans_call): Add a local has_alternate_specifier variable,
1757 set it from gfc_conv_function_call return value.
1759 2005-06-12 Richard Henderson <rth@redhat.com>
1761 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1762 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1763 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1764 (gfc_trans_allocate_array_storage): Use them.
1765 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1766 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1767 (gfc_trans_deferred_array): Likewise.
1768 * trans-expr.c (gfc_conv_function_call): Likewise.
1769 (gfc_trans_subcomponent_assign): Likewise.
1770 (gfc_trans_pointer_assignment): Likewise.
1771 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1772 * trans-types.c (gfc_array_descriptor_base): New.
1773 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1774 (gfc_get_array_descriptor_base): Break out from ...
1775 (gfc_get_array_type_bounds): ... here. Create type variants.
1776 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1777 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1779 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1781 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1782 calling conventions. Look at sym instead of sym->result.
1783 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1784 Remove condition which is always false with workaround removed.
1785 (gfc_return_by_reference): Always look at sym, never at sym->result.
1787 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1791 * trans-array.c (gfc_array_deallocate): pstat is new argument
1792 (gfc_array_allocate): update gfc_array_deallocate() call.
1793 (gfc_trans_deferred_array): ditto.
1794 * trans-array.h: update gfc_array_deallocate() prototype.
1795 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1796 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1798 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1800 * intrinsic.texi: Add documentation for dcmplx, digits,
1801 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1803 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1806 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1807 Generate correct exit condition in case of negative steps in
1810 * invoke.texi: Fix description of flags required for compatibility
1813 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1814 Erik Schnetter <schnetter@aei.mpg.de>
1817 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1818 remove FIXME comment.
1820 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1822 * match.c (match_forall_iterator): Don't immediately give error if '='
1823 is not followed by an expression.
1825 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1826 Erik Edelmann <erik.edelmann@iki.fi>
1828 * array.c (gfc_match_array_constructor): Disallow empty array
1831 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1833 * fortran/intrinsic.texi: Add documentation for
1834 command_argument_count, conjg, dconjg, count,
1835 cpu_time, cshift, date_and_time, dble, dfloat.
1837 2005-06-01 Roger Sayle <roger@eyesopen.com>
1839 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1840 its always gfc_convert_constant, instead take a "standard" argument.
1841 (add_conversions): Change all existing calls of add_conv to pass
1842 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1843 extensions support integer-logical and logical-integer conversions.
1844 (gfc_convert_type_warn): Warn about use the use of these conversions
1845 as a extension when appropriate, i.e. with -pedantic.
1846 * simplify.c (gfc_convert_constant): Add support for integer to
1847 logical and logical to integer conversions, using gfc_int2log and
1849 * arith.c (gfc_log2int, gfc_int2log): New functions.
1850 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1851 * gfortran.texi: Document this new GNU extension.
1853 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1855 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1856 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1857 Correct comments and replace convert of integer_one_node with
1860 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1863 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1864 to avoid giving error multiple times.
1865 (resolve_entries): Don't error about BT_UNKNOWN here.
1866 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1867 (resolve_fntype): New function.
1868 (gfc_resolve): Call resolve_fntype.
1870 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1873 * fortran/io.c (resolve_tag): Fix error message.
1875 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1877 * fortran/trans-decl.c: Don't include errors.h.
1878 * fortran/Make-lang.in: Updates dependencies.
1880 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1885 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1886 string length from the expression typespec character length value
1887 and set temp_ss->stringlength and backend_decl. Obtain the
1888 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1889 Dereference the expression to obtain the character.
1890 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1891 dereference of scalar character pointer structure components.
1892 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1893 string length for the structure component from the component
1896 2005-05-30 Roger Sayle <roger@eyesopen.com>
1898 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1899 * options.c (gfc_init_options): By default, allow legacy extensions
1900 but warn about them.
1901 (gfc_post_options): Make -pedantic warn about legacy extensions
1902 even with -std=legacy.
1903 (gfc_handle_option): Make -std=gnu follow the default behaviour
1904 of warning about legacy extensions, but allowing them. Make the
1905 new -std=legacy accept everything and warn about nothing.
1906 * lang.opt (std=legacy): New F95 command line option.
1907 * invoke.texi: Document both -std=f2003 and -std=legacy.
1908 * gfortran.texi: Explain the two types of extensions and document
1909 how they are affected by the various -std= command line options.
1911 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1913 * trans-expr.c: Remove trailing ^M.
1915 * trans-expr.c: Fix comment typos.
1917 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1925 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1926 length to temp_ss for character pointer array assignments.
1927 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1928 dereferencing of characters and character pointers.
1929 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1930 length as return argument for various kinds of handling of return.
1931 Return a char[]* temporary for character pointer functions and
1932 dereference the temporary upon return.
1934 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1935 Steven G. Kargl <kargls@comcast.net>
1938 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1940 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1943 * io.c (format_item_1): Add check and extension warning for
1946 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1948 * arith.c (gfc_arith_init_1): Fix off by one problem;
1949 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1951 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1952 Steven G. Kargl <kargls@comcast.net>
1954 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1957 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1959 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1960 like types in comparsion.
1962 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1964 * data.c, parse.c, trans-array.c, trans-decl.c,
1965 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1966 trans.h: Fix comment typos. Follow spelling conventions.
1968 2005-05-22 Roger Sayle <roger@eyesopen.com>
1970 * gfortran.texi: Document some more GNU extensions.
1972 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1974 * error.c (gfc_warning): Fix typo in comment.
1976 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1979 * fortran/iresolve.c (gfc_resolve_reshape): Add
1980 gfc_type_letter (BT_COMPLEX) for complex to
1981 to resolved function name.
1983 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1985 * array.c (gfc_match_array_constructor): Support [ ... ]
1986 style array constructors.
1988 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1990 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1991 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1992 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1993 to correct enum type.
1994 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1995 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1996 instead of FIX_FLOOR_EXPR.
1998 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
2001 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
2002 build character length.
2004 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
2006 * trans-types.c (gfc_array_range_type): New variable.
2007 (gfc_init_types): Initialize gfc_array_range_type.
2008 (gfc_get_array_type_bounds): Use gfc_array_range_type.
2010 2005-05-17 Jakub Jelinek <jakub@redhat.com>
2013 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
2014 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
2015 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
2017 (generate_loop_for_rhs_to_temp): Likewise.
2018 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
2019 It non-NULL, add it to body.
2020 (allocate_temp_for_forall_nest_1): New function, split from
2021 allocate_temp_for_forall_nest.
2022 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
2023 propagate it down to compute_overall_iter_number. Use
2024 allocate_temp_for_forall_nest_1.
2025 (gfc_trans_assign_need_temp): Remove COUNT2. Call
2026 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
2027 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
2028 and generate_loop_for_temp_to_lhs.
2029 (gfc_trans_pointer_assign_need_temp): Adjust calls to
2030 allocate_temp_for_forall_nest.
2031 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
2032 stmtblock_t. Call compute_overall_iter_number just once, then
2033 allocate_temp_for_forall_nest_1 twice with the same size.
2034 Initialize mask indexes if nested_forall_info != NULL.
2035 (gfc_trans_where_2): Initialize mask indexes before calling
2036 gfc_trans_nested_forall_loop.
2038 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
2039 Jerry DeLisle <jvdelisle@verizon.net>
2042 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
2043 resolve ICE on assign of format label.
2044 * trans-io.c (set_string): add fold-convert to properly
2045 handle assigned format label in write.
2047 2005-05-13 Paul Brook <paul@codesourcery.com>
2049 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
2051 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2053 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
2055 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2058 * io.c (check_format): Look for literal characters inside
2061 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2063 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
2064 attribute from result symbol to function symbol.
2065 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
2066 instead of sym->result->attr.dimension.
2068 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2071 * gfortran.h (gfc_option): Add flag_f2c.
2072 * invoke.texi: Document '-ff2c' command line option. Adapt
2073 documentation for '-fno-second-underscore' and '-fno-underscoring'.
2074 * lang.opt (ff2c): New entry.
2075 * options.c (gfc-init_options): Set default calling convention
2076 to -fno-f2c. Mark -fsecond-underscore unset.
2077 (gfc_post_options): Set -fsecond-underscore if not explicitly set
2079 (handle_options): Set gfc_option.flag_f2c according to requested
2081 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
2082 intrinsics where necessary.
2083 (gfc_trans_deferred_vars): Change todo error to assertion.
2084 * trans-expr.c (gfc_conv_variable): Dereference access
2085 to hidden result argument.
2086 (gfc_conv_function_call): Add hidden result argument to argument
2087 list if f2c calling conventions requested. Slightly restructure
2088 tests. Convert result of default REAL function to requested type
2089 if f2c calling conventions are used. Dereference COMPLEX result
2091 * trans-types.c (gfc_sym_type): Return double for default REAL
2092 function if f2c cc are used.
2093 (gfc_return_by_reference): Slightly restructure logic. Return
2094 COMPLEX by reference depending on calling conventions.
2095 (gfc_get_function_type): Correctly make hidden result argument a
2096 pass-by-reference argument for COMPLEX. Remove old code which does
2097 this for derived types.
2099 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2101 * match.c (gfc_match_return): Only require space after keyword when
2102 it is obligatory. Only give stdwarn to after matching is successful.
2103 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
2105 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2107 * intrinsic.texi: Fix typos.
2109 2005-05-07 Steven G. Kargl <kargls@comcast.net>
2111 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
2112 description to include information about scalar arguments.
2114 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2116 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
2117 match.h, trans-array.h: Update copyright.
2119 2005-04-29 Tom Tromey <tromey@redhat.com>
2121 * f95-lang.c (poplevel): Updated for change to build_block.
2123 2005-04-29 Jakub Jelinek <jakub@redhat.com>
2127 * trans-expr.c (gfc_conv_variable): Handle return values in functions
2128 with alternate entry points.
2129 * resolve.c (resolve_entries): Remove unnecessary string termination
2130 after snprintf. Set result of entry master.
2131 If all entries have the same type, set entry master's type
2132 to that common type, otherwise set mixed_entry_master attribute.
2133 * trans-types.c (gfc_get_mixed_entry_union): New function.
2134 (gfc_get_function_type): Use it for mixed_entry_master functions.
2135 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
2136 * decl.c (gfc_match_entry): Set entry->result properly for
2138 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
2140 (build_entry_thunks): Handle return values in entry thunks.
2141 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
2142 shared between multiple contexts.
2143 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
2144 current_function_decl instead of sym->backend_decl. Skip over
2145 entry master's entry id argument. For mixed_entry_master entries or
2146 their results, return a COMPONENT_REF of the fake result.
2147 (gfc_trans_deferred_vars): Don't warn about missing return value if
2148 at least one entry point uses RESULT.
2149 (gfc_generate_function_code): For entry master returning
2150 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
2151 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
2152 values optional just because they are in entry master.
2154 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2156 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
2157 Tobias forgot this in previous commit.
2159 2005-04-29 Paul Brook <paul@codesourcery.com>
2161 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
2164 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2166 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
2167 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
2168 IMPLICIT NONE, set seen_implicit_none.
2169 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
2171 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2173 * gfortran.h (gfc_gsymbol): Make name a const char *.
2174 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
2177 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2180 * resolve.c (resolve_actual_arglist): Issue an error if a statement
2181 functions is used as actual argument.
2183 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2186 * interface.c (compare_parameter): Ignore type for EXPR_NULL
2187 only if type is BT_UNKNOWN.
2189 2005-04-25 Paul Brook <paul@codesourcery.com>
2190 Steven G. Kargl <kargls@comcast.net>
2193 * check.c (gfc_check_ichar_iachar): New function.
2194 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
2195 * intrinsic.c (add_functions): Use it.
2196 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
2197 character expression lengths.
2199 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2202 * trans-common.c (translate_common): Cast offset and
2203 common_segment->offset to type int for warning message.
2205 2005-04-23 DJ Delorie <dj@redhat.com>
2207 * trans-decl.c: Adjust warning() callers.
2209 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2211 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
2212 intermediate representation. Fix typo in comment.
2214 2005-04-21 Steven G. Kargl <kargls@comcast.net>
2216 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
2217 simplify logic; Add a gcc_assert.
2219 2005-04-19 Steven G. Kargl <kargls@comcast.net>
2221 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
2223 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
2224 Steven G. Kargl <kargls@comcast.net>
2226 * invoke.texi: Update -Waliasing description
2228 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2231 * resolve.c (resolve_variable): If e->symtree is not set, this
2232 ought to be a FAILURE, and not a segfault.
2234 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
2241 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
2242 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
2243 declarations of old namelist functions.
2244 (build_dt): Simplified call to transfer_namelist_element.
2245 (nml_get_addr_expr): Generates address expression for start of
2246 object data. New function.
2247 (nml_full_name): Qualified name for derived type components. New
2249 (transfer_namelist_element): Modified for calls to new functions
2250 and improved derived type handling.
2252 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
2254 * scanner.c (gfc_next_char_literal): Reset truncation flag
2255 for lines ending in a comment for both fixed and free form.
2256 (load_line): Do not set truncated flag if only truncating
2259 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
2262 * gfortran.h (gfc_linebuf): Add truncated field.
2263 * parse.c (next_statement): Handle warning for truncated
2265 * scanner.c (load_line): Return if line was truncated.
2266 No longer warn for truncated lines. Remove unused parameters.
2267 (load_file): Store load_line return value to linebuf.
2268 (gfc_error_recovery): Do not advance line at the end.
2270 2005-04-14 Steven G. Kargl <kargls@comcast.net>
2272 * gfortran.h (gfc_real_info): Add subnormal struct member.
2273 * arith.c (gfc_arith_init_1): Set it.
2274 (gfc_check_real_range): Use it.
2275 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
2277 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
2279 * simplify.c: Fix a comment typo.
2281 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2283 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2285 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2287 * simplify.c (gfc_simplify_nearest): Overhaul.
2289 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
2291 * interface.c: Fix a comment typo.
2293 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2295 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
2298 2005-04-09 Steven G. Kargl <kargls@comcast.net>
2300 * simplify.c (gfc_simplify_anint): Use mpfr_round()
2301 (gfc_simplify_dnint): ditto.
2302 (gfc_simplify_nint): ditto.
2304 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
2307 * io.c (check_format): Allow an optional comma
2308 between descriptors.
2310 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2312 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
2313 comment according to GNU coding style.
2314 (gfc_match_if): Remove gfc_ prefix in call to
2315 match_arithmetic_if.
2317 2005-04-08 Diego Novillo <dnovillo@redhat.com>
2319 * match.c (gfc_match_arithmetic_if): Declare static.
2321 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2324 * match.c (gfc_match_arithmetic_if): New function to match an
2325 arithmetic IF statement.
2326 (gfc_match_if): Use gfc_match_arithmetic_if to match an
2327 arithmetic IF statement embedded in a simple IF statement.
2329 2005-04-07 Steven G. Kargl <kargls@comcast.net>
2331 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
2333 2005-04-06 Steven G. Kargl <kargls@comcast.net>
2335 * invoke.texi: Remove documentation of -std=f90
2337 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2339 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2340 non-pointer assignment.
2342 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2347 * array.c (resolve_character_array_constructor): New function. Set
2348 constant character array's character length.
2349 (gfc_resolve_array_constructor): Use it.
2350 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2352 (gfc_set_constant_character_len): New function. Set constant character
2353 expression according the given length.
2354 * match.h (gfc_set_constant_character_len): Add prototype.
2356 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2358 * intrinsic.texi: BES?? functions are not in the f95 standard.
2360 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2362 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2364 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2366 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2367 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2369 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2371 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2373 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2375 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2376 trans.h: Fix comment typos.
2378 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2380 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2381 flag_default_integer, flag_default_real
2382 * invoke.texi: Update documentation
2383 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2384 fdefault-integer-8, and fdefault-real-8 definitions.
2385 * options.c (gfc_init_options): Set option defaults
2386 (gfc_handle_option): Handle command line options.
2387 * trans-types.c (gfc_init_kinds): Use options.
2389 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2391 * f95-lang.c (builtin_function): Process the attrs parameter
2392 and apply the "const" attribute to the builtin if found.
2394 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2396 * intrinsic.texi: Document AIMAG, AINT, ALL
2398 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2400 * arith.c (check_result): Fix illogical logic.
2402 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2404 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2405 contain no equivalence objects.
2406 (add_equivalences): New argument saw_equiv.
2407 (trans_common): New local variable saw_equiv.
2408 (finish_equivalences): Add a local variable dummy, Always pass true
2409 for the 3rd parameter to create_common.
2411 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2413 * intrinsic.texi: Fix "make dvi"
2415 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2417 * intrinsic.texi: New file.
2418 * gfortran.texi: Include it; white space change; fix typo.
2420 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2422 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2424 2005-03-23 Steven Bosscher <stevenb@suse.de>
2426 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2427 * trans-array.c (gfc_trans_allocate_array_storage,
2428 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2429 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2430 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2431 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2432 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2433 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2434 gfc_conv_expr_descriptor): Likewise.
2435 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2436 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2437 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2438 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2439 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2440 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2441 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2442 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2443 gfc_conv_intrinsic_merge, prepare_arg_info,
2444 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2445 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2446 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2447 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2448 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2449 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2451 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2452 * trans.c (gfc_add_modify_expr): Likewise.
2454 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2456 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2457 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2458 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2459 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2460 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2461 gfc_check_perror): new functions to check newly implemented
2463 * gfortran.h: adding symbols for new intrinsics.
2464 * intrinsic.c (add_functions): adding new intrinsics.
2465 (add_subroutines): adding new intrinsics.
2466 * intrinsic.h: prototype for all checking and resolving
2468 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2469 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2470 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2471 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2472 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2473 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2474 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2475 gfc_resolve_perror): new functions to resolve intrinsics.
2476 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2479 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2481 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2482 in which the variable is declared.
2485 * resolve.c (was_declared): Also check for dummy attribute.
2487 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2489 * gfortran.h (arith): Remove ARITH_0TO0.
2490 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2491 (gfc_arith_power): Remove special casing of zero to integral
2494 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2496 * Make-lang.in (fortran-warn): Remove -Wno-error.
2497 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2498 trans-common.o-warn): Specify -Wno-error.
2500 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2502 * trans-array.c (gfc_trans_static_array_pointer,
2503 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2504 comment and formatting typos.
2506 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2508 * invoke.texi: Fix typos.
2510 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2512 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2514 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2516 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2517 to zero on label_tree.
2519 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2522 * io.c (resolve_tag): Add checking on assigned label.
2523 (match_dt_format): Does not set symbol assign attribute.
2524 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2525 * resolve.c (resolve_code): Add checking on assigned label.
2526 * trans-common.c (build_field): Deals with common variable assigned
2528 * trans-stmt.c (gfc_conv_label_variable): New function.
2529 (gfc_trans_label_assign): Use it.
2530 (gfc_trans_goto): Ditto.
2531 * trans-io.c (set_string): Ditto.
2532 * trans.h (gfc_conv_label_variable): Add prototype.
2534 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2537 * symbol.c (check_conflict): A dummy argument can't be a statement
2540 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2542 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2543 the argument of the shift to the unsigned type.
2545 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2548 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2550 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2553 * resolve.c (gfc_resolve): Check if character lengths are
2554 specification expressions.
2556 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2559 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2560 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2562 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2563 Remove declaration / prototype.
2564 * trans-common.c (build_equiv_decl): Give union a name. Check if
2565 it can be put on the stack.
2566 * trans-decl.c (gfc_stack_space_left): Move function here.
2567 (gfc_build_qualified_array): Fix comment typo.
2568 * trans.h (gfc_put_var_on_stack): Add prototype.
2570 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2572 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2573 * decl.c, trans.c: Don't use C++ style comments.
2574 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2575 ifsrc): Give names to enums and use ENUM_BITFIELD.
2576 (gfc_access): Remove trailing comma.
2578 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2581 * primary.c (match_complex_constant): Mangled complex constant may
2582 be an implied do-loop. Give implied do-loop matcher a chance.
2584 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2587 * resolve.c (compare_shapes): New function.
2588 (resolve_operator): Use it.
2590 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2592 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2593 type for COMPLEX constants.
2595 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2598 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2599 argument from a pointer function also if it has a result clause.
2601 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2603 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2605 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2607 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2610 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2614 * simplify.c (gfc_simplify_bound): Rename to ...
2615 (simplify_bound): ... this and overhaul.
2617 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2619 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2620 (gfc_conv_intrinsic_function): update function calls
2622 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2625 * trans-types.c (gfc_max_integer_kind): Declare
2626 (gfc_init_kinds): Initialize it.
2627 * gfortran.h (gfc_max_integer_kind): extern it.
2628 * primary.c (match_boz_constant): Use it; remove gfortran extension
2629 of kind suffixes on BOZ literal constants
2632 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2634 * arith.c (gfc_check_real_range): Remove multiple returns
2635 (check_result): New function.
2636 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2637 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2640 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2642 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2645 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2647 Unrevert previously reverted patch. Adding this fix:
2648 * module.c (find_true_name): Deal with NULL module.
2650 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2652 Revert yesterday's patch:
2653 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2655 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2656 ... argument. Copy string instead of pointing to it.
2658 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2660 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2661 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2663 * module.c (mio_namespace_ref, load_needed): Likewise.
2664 * parse.c (parse_interface, parse_contained): Likewise. Here the
2665 correct second argument matters.
2666 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2667 parent's implicit types if this is set.
2668 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2669 * trans-common.c (build_common_decl): Likewise.
2671 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2673 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2674 and checking 'untyped' attribute.
2676 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2677 fields into new struct 'op' inside the 'value' union.
2678 * arith.c (eval_intrinsic): Adapt all users.
2679 * dependency.c (gfc_check_dependency): Likewise.
2680 * dump-parse-tree.c (gfc_show_expr): Likewise.
2681 * expr.c (gfc_get_expr): Don't clear removed fields.
2682 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2683 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2684 check_intrinsic_op): Adapt to new field names.
2685 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2686 nullify 'esym' and 'isym' fields of new function call.
2687 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2688 Adapt to renamed structure fields.
2689 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2690 * module.c (mio_expr): Likewise.
2691 * resolve.c (resolve_operator): Likewise.
2692 (gfc_find_forall_index): Likewise. Only look through operands
2693 if dealing with EXPR_OP
2694 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2695 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2696 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2699 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2700 'name' a 'const char *'.
2701 (gfc_symbol): Likewise, also for 'module'.
2702 (gfc_symtree): Make 'name' a 'const char *'.
2703 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2704 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2706 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2707 initialize 'SYM->module'.
2708 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2709 pointer instead of empty string.
2710 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2711 * interface.c (gfc_compare_types): Adapt check to account for possible
2713 (compare_actual_formal): Check for NULL pointer instead of empty
2715 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2716 Add 'const' qualifier.
2717 (conv_name): Return a heap allocated string.
2718 (find_conv): Add 'const' qualifier to 'target'.
2719 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2720 (make_generic): Check for NULL pointer instead of empty string.
2721 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2722 (add_conv): No need to strcpy result from 'conv_name'.
2723 (sort_actual): Check for NULL pointer instead of empty string.
2724 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2726 * module.c (compare_true_names): Compare pointers instead of strings
2727 for 'module' member.
2728 (find_true_name): Initialize string fields with gfc_get_string.
2729 (mio_pool_string): New function.
2730 (mio_internal_string): Adapt comment.
2731 (mio_component_ref, mio_component, mio_actual_arg): Use
2732 'mio_pool_string' instead of 'mio_internal_string'.
2733 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2734 Add level of indirection. Use 'mio_pool_string' instead of
2735 'mio_internal_string'.
2736 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2737 (write_common, write_symbol): Use 'mio_pool_string' instead of
2738 'mio_internal_string'.
2739 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2740 instead of empty string.
2741 (write_operator, write_generic): Pass correct type variable to
2742 'mio_symbol_interface'.
2743 (write_symtree): Use 'mio_pool_string' instead of
2744 'mio_internal_string'.
2745 * primary.c (match_keyword_arg): Adapt check to possible
2746 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2747 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2748 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2750 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2751 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2753 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2754 pointer instead of empty string.
2755 * trans-decl.c (gfc_sym_mangled_identifier,
2756 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2757 gfc_get_symbol_decl): Likewise.
2758 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2759 argument. Copy string instead of pointing to it.
2761 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2763 * intrinsic.h, st.c: Update copyright.
2765 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2767 * symbol.c: Typos in comments.
2769 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2771 * expr.c (gfc_type_convert_binary): Typo in comment.
2773 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2775 * check.c (gfc_check_selected_int_kind): New function.
2776 * intrinsic.h: Prototype it.
2777 * intrinsic.c (add_function): Use it.
2778 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2779 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2781 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2783 * check.c (gfc_check_int): improve checking of optional kind
2784 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2786 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2788 * check.c (gfc_check_achar): New function
2789 * intrinsic.h: Prototype it.
2790 * intrinsic.c (add_function): Use it.
2792 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2794 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2795 generate_loop_for_rhs_to_temp): Remove if whose condition is
2798 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2800 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2801 (gfc_use_derived): ... this function.
2803 2005-02-09 Richard Henderson <rth@redhat.com>
2805 * f95-lang.c (gfc_init_builtin_functions): Call
2806 build_common_builtin_nodes; do not define any functions handled
2809 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2811 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2813 (gfc_is_constant_expr): Check 'ref' to determine if substring
2814 reference is constant.
2815 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2816 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2818 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2820 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2822 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2823 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2824 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2825 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2826 gfc_add_procedure): Add argument.
2827 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2828 gfc_match_null, match_type_spec, match_attr_spec,
2829 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2830 Update callers to match.
2831 (gfc_match_entry): Likewise, fix comment typo.
2832 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2833 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2834 gfc_match_derived_decl): Update callers.
2835 * interface.c (gfc_match_interface): Likewise.
2836 * match.c (gfc_match_label, gfc_add_flavor,
2837 gfc_match_call, gfc_match_common, gfc_match_block_data,
2838 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2840 * parse.c (parse_derived, parse_interface, parse_contained),
2841 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2842 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2843 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2844 use when printing error message.
2845 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2846 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2847 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2848 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2849 gfc_add_procedure): Add new 'name' argument. Pass along to
2850 check_conflict and check_used.
2851 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2852 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2853 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2854 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2855 argument in calls to any of the modified functions.
2857 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2859 * gfortran.texi: Don't give last update date.
2861 2006-01-30 Richard Henderson <rth@redhat.com>
2863 * options.c (gfc_init_options): Zero flag_errno_math.
2865 2005-01-29 Paul Brook <paul@codesourcery.com>
2868 * check.c (real_or_complex_check): New function.
2869 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2870 * intrinsic.c (add_functions): Use new check functions.
2871 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2874 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2877 * expr.c (gfc_check_assign): Check for conformance of logical operands
2879 2004-01-27 Steven Bosscher <stevenb@suse.de>
2881 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2882 TREE_USED for all labels.
2883 (gfc_trans_entry_master_switch): Use it instead of building a
2885 * trans-io.c (add_case): Likewise.
2886 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2888 2004-01-23 Paul Brook <paul@codesourcery.com>
2889 Steven G. Kargl <kargls@comcast.net>
2892 * arith.c (gfc_convert_real): Remove sign handling.
2893 * primary.c (match_digits): Allow whitespace after initial sign.
2894 (match_real_const): Handle signs here. Allow whitespace after
2895 initial sign. Remove dead code.
2896 (match_const_complex_part): Remove.
2897 (match_complex_part): Use match_{real,integer}_const.
2898 (match_complex_constant): Cross-promote integer types.
2900 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2903 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2904 transpose_c8 for complex types.
2906 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2908 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2909 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2910 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2911 Follow spelling conventions.
2913 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2916 * trans-io.c (gfc_trans_inquire): Added code to support
2919 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2921 * intrinsic.c (make_alias): Add standard argument.
2922 (add_functions): Update make_alias calls.
2924 2005-01-22 Paul Brook <paul@codesourcery.com>
2926 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2928 2005-01-22 Paul Brook <paul@codesourcery.com>
2930 * gfortran.h (gfc_check_access): Add prototype.
2931 * match.c (gfc_match_namelist): Remove TODO.
2932 * module.c (check_access): Rename ...
2933 (gfc_check_access): ... to this. Boolify. Update callers.
2934 * resolve.c (resolve_symbol): Check for private objects in public
2937 2005-01-22 Paul Brook <paul@codesourcery.com>
2939 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2940 does not have an explicit type.
2941 (gfc_match_variable): Resolve implicit derived types in all cases.
2942 Resolve contained function types from their own namespace, not the
2944 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2945 checking. Resolve from the contained namespace, not the parent.
2947 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2950 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2951 constants the correct type.
2954 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2956 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2959 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2961 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2962 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2963 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2964 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2965 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2967 2005-01-17 Ira Rosen <irar@il.ibm.com>
2969 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2971 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2974 * error.c (error_char): Line-buffer errors / warnings.
2976 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2978 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2979 unsigned issue. Use build_int_cst instead of converting
2980 integer_zero_node. Remove unnecessary conversion.
2982 * trans-types.c (gfc_get_character_type_len): Use
2983 gfc_charlen_type_node as basic type for the range field.
2985 * trans-intrinsic.c (build_fixbound_expr,
2986 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2987 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2988 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2989 of converting 'integer_zero_node' or 'integer_one_node'
2991 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2993 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2994 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2995 'build_int_cst' instead of converting 'integer_zero_node' or
2996 'integer_one_node' respectively.
2998 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2999 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
3000 'gfc'-prefix from local variable, remove dead code, use correct
3001 type when inserting argument.
3003 * trans-intrinsic.c, trans-types.c: Update copyright years.
3005 2005-01-16 Steven G. Kargl <kargls@comcast.net>
3008 * resolve.c (check_case_overlap): Typo in comment.
3009 (validate_case_label_expr): Fix up kinds of case values
3010 (resolve_select): Properly handle kind mismatches.
3012 2004-01-16 Paul Brook <paul@codesourcery.com>
3015 * trans-common.c (translate_common): Remove duplicate function call.
3016 (finish_equivalences): Preserve alignment when biasing offsets.
3018 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
3020 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
3021 ASCII-like character encoding.
3023 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3025 * resolve.c (compare_case): Cleanup.
3027 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3029 * resolve.c (compare_case): Give arguments correct type.
3031 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
3033 * iresolve.c, trans-common.c, trans-types.c: Fix comment
3036 2005-01-09 Paul Brook <paul@codesourcery.com>
3039 * trans-common.c (current_common, current_offset): Remove.
3040 (create_common): Add head argument.
3041 (align_segment): New function.
3042 (apply_segment_offset): New function.
3043 (translate_common): Merge code from new_segment. Handle alignment.
3044 (new_segment): Remove.
3045 (finish_equivalences): Ensure proper alignment.
3047 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3049 * trans-const.c: Don't include unused math.h.
3051 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
3052 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
3053 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
3054 trailing whitespace.
3055 (prepare_arg_info): Fix formatting, indenting and remove trailing
3057 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
3058 trailing whitespace.
3060 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
3061 gfc_constant_result, gfc_range_check, gfc_arith_power,
3062 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
3063 gfc_real2complex, gfc_complex2int, gfc_complex2real,
3064 gfc_complex2complex): Fix whitespace issues.
3065 * check.c (must_be, type_check, numeric_check, int_or_real_check,
3066 logical_array_check, array_check, scalar_check, nonoptional_check,
3067 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
3068 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
3069 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
3070 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
3071 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
3072 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
3073 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
3074 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
3075 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
3076 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
3077 gfc_check_lbound, gfc_check_logical, min_max_args,
3078 gfc_check_min_max_integer, gfc_check_min_max_real,
3079 gfc_check_min_max_double, gfc_check_matmul,
3080 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
3081 gfc_check_pack, gfc_check_precision, gfc_check_radix,
3082 gfc_check_range, gfc_check_real, gfc_check_repeat,
3083 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
3084 gfc_check_set_exponent): Fix formatting issues.
3085 (gfc_check_size, gfc_check_sign): Alphabetize function order,
3086 remove whitespace-only line.
3087 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
3088 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
3089 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
3090 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
3091 gfc_check_random_number, gfc_check_random_seed,
3092 gfc_check_second_sub, gfc_check_system_clock,
3093 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
3094 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
3095 gfc_check_unlink_sub): Fix formatting issues.
3097 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3099 * gfortran.h: Remove outdated comment. Don't include stdio.h
3102 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3104 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
3105 output of 'gfortran --version'.
3107 2005-01-03 Steven G. Kargl <kargls@comcast.net>
3109 * arith.c: Add system.h; remove string.h
3115 * check.c: Remove stdlib.h and stdarg.h
3116 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
3117 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
3118 * f95-lang.c: Add system.h; remove stdio.h
3119 * interface.c: Add system.h; remove stdlib.h and string.h
3120 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
3121 * io.c: Remove string.h
3123 * match.c: Remove stdarg.h and string.h
3124 * misc.c: Update copyright; add system.h; remove stdlib.h,
3125 string.h, and sys/stat.h
3126 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
3127 unistd.h, and time.h
3128 * option.c: Remove string.h and stdlib.h
3130 * scanner.c: Update copyright; add system.h; remove stdlib.h,
3131 stdio.h, string.h, and strings.h
3132 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
3133 * trans-array.c: Remove stdio.h and gmp.h
3134 * trans-const.c: Ditto
3135 * trans-expr.c: Ditto
3137 * trans-stmt.c: Ditto
3139 * trans-intrinsic.c: Remove stdio.h and string.h
3141 2004-12-29 Steven G. Kargl <kargls@comcast.net>
3143 * gfortran.h (gfc_case): fix typo in comment.
3145 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3147 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
3148 logical shift. Call fold. Remove 0-bit shift shortcut.
3149 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
3150 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
3151 result if width(arg 1) < 4 bytes. Call fold.
3154 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
3155 in front of function to match the standard. Correct handling
3158 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
3160 * trans-expr.c (gfc_conv_cst_int_power): Only check for
3161 flag_unsafe_math_optimizations if we have a float type.
3163 2004-12-23 Steven G. Kargl <kargls@comcast.net>
3165 * gfortran.texi: Fix typo.
3167 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3169 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
3172 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3175 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
3176 (gfc_match_nullify): Make sure that ')' is in front of the end of
3179 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
3182 2004-12-14 Richard Henderson <rth@redhat.com>
3184 * gfortran.h (gfc_expr.function.name): Make const.
3185 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3186 (gfc_get_string): Update prototype.
3187 * iresolve.c: Include tree.h.
3188 (string_node, HASH_SIZE, string_head, hash): Remove.
3189 (gfc_get_string): Use vsnprintf, get_identifier.
3190 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3191 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
3192 (gfc_done_1): Don't call gfc_iresolve_done_1.
3193 * module.c (mio_allocated_string): Take and return const char *,
3194 instead of modifying char**.
3195 (mio_expr): Update to match.
3196 * resolve.c (pure_function): Constify name argument.
3197 (resolve_function): Constify name.
3198 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
3200 2004-12-12 Richard Henderson <rth@redhat.com>
3202 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3203 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
3204 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
3205 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
3206 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
3207 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
3208 gfc_resolve_unpack: Use PREFIX.
3210 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3213 * match.c (gfc_match_common): Skip whitespace.
3215 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3218 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
3219 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
3220 integer kind check; Issue error for -std=f95 when needed.
3221 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
3223 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
3224 Promote arguments to same kind.
3226 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3227 Paul Brook <paul@codesourcery.com>
3230 * resolve.c (gfc_resolve_iterator_expr): New function.
3231 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
3232 start, end and stride to correct type.
3233 (resolve_code): Pass extra argument.
3234 * array.c (resolve_array_list): Pass extra argument.
3235 * gfortran.h (gfc_resolve): Add prototype.
3236 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
3237 Handle real type iterators.
3239 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3242 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
3243 same kind as C's 'int'.
3244 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
3246 2004-12-08 Richard Henderson <rth@redhat.com>
3248 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
3249 to the output expression.
3250 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
3252 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
3255 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3258 * resolve.c (resolve_code): Impose correct restrictions on
3261 * decl.c (gfc_match_end): Use locus of END when eos is an error.
3263 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3264 Paul Brook <paul@codesourcery.com>
3266 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
3267 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
3268 (gfc_check_stat, gfc_check_stat_sub): New functions.
3269 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
3270 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
3271 fstat, and stat to intrinsics symbol tables.
3272 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
3273 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
3274 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
3275 (gfc_resolve_stat, gfc_resolve_flush): New functions.
3276 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
3277 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
3279 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3281 * intrinsic.c: Fix and add comments, fix function declarations
3282 (OPTIONAL,REQUIRED): New symbols
3283 (add_functions,add_subroutines): Use symbols
3284 (gmp.h): Remove unused include
3286 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3288 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
3291 2004-11-24 Steven Bosscher <stevenb@suse.de>
3293 * options.c (gfc_post_options): Don't clear flag_inline_functions.
3295 2004-11-20 Steven G. Kargl <kargls@comcast.net>
3297 * check.c (gfc_check_getcwd_sub): Fix seg fault.
3299 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
3300 gfc_check_unlink,gfc_check_unlink_sub): New functions
3301 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
3302 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
3303 exit to intrinsics symbol tables.
3304 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
3305 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
3306 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
3307 gfc_resolve_unlink_sub): Add and sort prototypes.
3308 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
3309 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
3310 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
3312 2004-11-16 Paul Brook <paul@codesourcery.com>
3315 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
3316 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
3317 * trans-types.c (gfc_get_dtype): Accept array type rather than element
3319 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
3320 (gfc_get_array_type_bounds): Ditto.
3321 (gfc_get_derived_type): Recurse into derived type pointers.
3322 * trans-types.h (gfc_get_dtype): Add prototype.
3323 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
3325 2004-11-15 Paul Brook <paul@codesourcery.com>
3327 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
3329 2004-11-10 Paul Brook <paul@codesourcery.com>
3332 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
3333 * trans-io.c (transfer_array_component): Ditto.
3335 2004-11-10 Paul Brook <paul@codesourcery.com>
3337 * invoke.texi: Fix typo.
3339 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3341 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3342 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3343 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3344 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3345 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3347 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3350 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3352 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3354 * gfortranspec.c: Replace GNU CC with GCC.
3356 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3358 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3360 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3363 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3366 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3369 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3370 module procedures as if they were module variables.
3372 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3377 * module.c (write_symbol1): Set module_name for dummy arguments.
3379 2004-11-02 Paul Brook <paul@codesourcery.com>
3381 * intrinsic.c (check_intrinsic_standard): Include error locus.
3383 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3384 locus to check_intrinsic_standard.
3386 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3389 * gfortran.h: Change GFC_STD_* flags to more appropriate
3390 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3391 gfc_option_t): Add field for warning about use of nonstandard
3393 * intrinsic.c (add_sym): Add parameter for standard version, check
3394 this against current standard.
3395 (add_sym_0): Pass standard parameter to add_sym.
3396 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3397 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3398 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3399 (make_generic): Add parameter for standard, check this
3400 against currently selected standard.
3401 (add_functions, add_subroutines): Add parameter to tell which
3402 standard an intrinsic belongs to.
3403 (check_intrinsic_standard): New function.
3404 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3405 (gfc_intrinsic_sub_interface): Ditto.
3406 * lang.opt: Add Wnonstd-intrinsics option.
3407 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3409 (set_Wall): Add warning about nonstd intrinsics.
3410 (gfc_handle_option): Change to use new GFC_STD_* flags,
3412 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3414 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3416 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3418 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3420 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3422 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3424 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3427 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3429 * check.c (gfc_check_rand): Allow missing optional argument.
3430 (gfc_check_irand): Ditto.
3431 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3433 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3435 PR fortran/13490, PR fortran/17912
3436 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3437 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3438 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3439 warning when compiling with pedantic.
3440 * gcc/fortran/arith.c: Set minimum integer values to reflect
3441 realities of two's complement signed integers. Added
3444 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3446 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3447 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3450 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3452 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3454 (gfc_generate_function_code): Fix formatting issue.
3456 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3458 * module.c: Fix formatting issues.
3460 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3462 * module.c (mio_interface_rest): Set where member of interface
3465 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3468 * options.c (gfc_handle_option): Add break after handing the
3471 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3473 * arith.c: Fix formatting issues.
3475 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3478 * resolve.c (resolve_operator): Use correct operator name in message.
3480 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3482 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3483 Move standard warning further to the front.
3485 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3487 * trans-stmt.c: Fix a comment typo.
3489 2004-10-07 Paul Brook <paul@codesourcery.com>
3492 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3495 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3498 * simplify.c (twos_complement): New function.
3499 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3501 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3503 2004-10-06 Paul Brook <paul@codesourcery.com>
3505 * trans-stmt.c (gfc_trans_simple_do): New function.
3506 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3507 loop. Update comments.
3509 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3512 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3516 * intrinsic.c (add_sym_5): Remove.
3517 (add_subroutines): Add resolution function for MVBITS.
3518 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3520 * iresolve.c (gfc_resolve_mvbits): New function.
3521 (gfc_resolve_random_number): Remove empty line at end of function.
3523 * trans-const.c (gfc_build_cstring_const): New function.
3524 (gfc_init_cst): Use new function.
3525 * trans-const.h (gfc_build_cstring_const): Add prototype.
3526 * trans-io.c (set_string, set_error_locus): Use new function.
3527 * trans-stmt.c (gfc_trans_goto): Use new function.
3530 * parse.c (accept_statement): Don't treat END DO like END IF and
3532 (parse_do_block): Generate possible END DO label inside END DO
3536 * check.c (gfc_check_system_sub): New function.
3537 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3538 * intrinsic.c (add_functions): Add 'system'.
3539 (add_subroutines): Add 'system'.
3540 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3541 Move prototypes to other suborutines.
3542 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3544 (gfc_resolve_system_clock): Fix formatting of prototype.
3545 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3547 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3550 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3552 * scanner.c (preprocessor_line): Accept preprocessor lines without
3553 file names. Check file names for closing quotes. Handle escaped
3554 quotes in file names.
3556 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3557 Paul Brook <paul@codesourcery.com>
3559 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3560 Use gfc_get_expr_charlen.
3561 * trans-expr.c (gfc_get_expr_charlen): New function.
3562 * trans.h (gfc_get_expr_charlen): Add prototype.
3564 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3566 * trans-intrinsic.c: Fix a comment typo.
3568 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3570 * simplify.c (range_check): Remove blank line at beginning of function.
3571 (gfc_simplify_dint): Same at end of function.
3572 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3573 (gfc_simplify_bound): Fix indentation.
3574 (gfc_simplify_log10): Simplify calculation.
3575 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3577 (gfc_simplify_nearest): Same at end of function.
3578 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3580 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3581 gfc_simplify_spacing): Simplify calulations.
3583 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3585 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3586 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3588 2004-10-01 Jan Hubicka <jh@suse.cz>
3590 * f95-lang.c (gfc_expand_function): Update call of
3591 tree_rest_of_compilation.
3592 * trans-decl.c (gfc_generate_constructors): Likewise.
3594 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3596 * trans-intrinsic.c: Comment fixes.
3598 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3600 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3602 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3604 * trans-types.c (gfc_return_by_reference): Remove superfluous
3607 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3608 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3611 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3612 function to determine return type.
3614 2004-09-20 Jan Hubicka <jh@suse.cz>
3616 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3618 (gfc_generate_function_code): Likewise.
3620 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3623 * simplify.c (gfc_simplify_reshape): Set shape of return value
3626 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3627 Zack Weinberg <zack@codesourcery.com>
3629 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3630 enumeration constants.
3632 2004-09-17 Paul Brook <paul@codesourcery.com>
3634 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3635 (gfc_linebuf_header_size): Define.
3636 * scanner.c (load_file): Use it.
3638 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3640 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3641 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3642 resolve.c, scanner.c, trans-array.c, trans-array.h,
3643 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3644 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3645 trans.h: Fix comment typos. Follow spelling conventions.
3647 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3650 * trans-io.c (transfer_array_component): New function.
3651 (transfer_expr): For array fields, call transfer_array_component.
3653 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3655 * gfortran.texi: Fix a typo.
3657 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3659 * parse.c (eof_buf): Rename eof to eof_buf.
3660 (unexpected_eof): Same.
3661 (gfc_parse_file): Same.
3663 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3665 * check.c (gfc_check_getcwd_sub): New function.
3666 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3667 * intrinsic.c (add_functions): Add function definition;
3669 * intrinsic.c (add_subroutines): Add subroutine definitions.
3670 * intrinsic.h: Add prototypes.
3671 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3673 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3675 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3678 * module.c (write_symbol): Don't fill in module name here.
3679 (write_symbol0): Fill in here instead.
3681 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3683 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3684 trans-array.c, trans-common.c, trans-expr.c,
3685 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3686 comment typos. Follow spelling conventions.
3688 2004-09-09 Paul Brook <paul@codesourcery.com>
3690 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3692 2004-09-08 Paul Brook <paul@codesourcery.com>
3694 * array.c: Don't include assert.h.
3695 * data.c: Don't include assert.h. Replace assert and abort with
3696 gcc_assert and gcc_unreachable.
3697 * dependency.c: Ditto.
3698 * f95-lang.c: Ditto.
3699 * iresolve.c: Ditto.
3701 * simplify.c: Ditto.
3703 * trans-array.c: Ditto.
3704 * trans-common.c: Ditto.
3705 * trans-const.c: Ditto.
3706 * trans-decl.c: Ditto.
3707 * trans-expr.c: Ditto.
3708 * trans-intrinsic.c: Ditto.
3709 * trans-io.c: Ditto.
3710 * trans-stmt.c: Ditto.
3711 * trans-types.c: Ditto.
3714 2004-09-07 Per Bothner <per@bothner.com>
3715 Paul Brook <paul@codesourcery.com>
3717 * error.c (show_locus): Handle mapped locations.
3718 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3719 * gfortran.h: Include input.h.
3720 (struct gfc_linebuf): Use source_location.
3721 * scanner.c (get_file): Initialize linemap.
3722 (preprocessor_line): Pass extra argument to get_file.
3723 (load_file): Ditto. Setup linemap.
3724 (gfc_new_file): Handle mapped locations.
3725 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3726 Set decl source locations.
3727 (gfc_trans_common): Set blank common block location.
3728 * trans-decl.c (gfc_set_decl_location): New function.
3729 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3730 (trans_function_start): Move call to gfc_set_backend_locus..
3731 (build_function_decl): ... to here.
3732 (build_entry_thunks): Set and restore the backend locus.
3733 (gfc_generate_constructors): Remove excess arguments to
3734 init_function_start.
3735 (gfc_generate_block_data): Add comments. Set the decl locus.
3736 * trans-io.c (set_error_locus): Handle mapped locations.
3737 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3738 (gfc_trans_code): Use SET_EXPR_LOCATION.
3739 (gfc_generate_code): Override the location of the new symbol.
3740 * trans.h (gfc_set_decl_location): Add prototype.
3742 2004-08-31 Paul Brook <paul@codesourcery.com>
3744 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3746 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3749 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3752 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3757 * resolve.c (resolve_transfer): New function.
3758 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3760 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3763 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3766 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3768 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3770 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3773 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3774 add comment pointing out possible issue WRT compatibility with g77.
3776 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3778 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3779 all occurences of 'gfc_strlen_type_node' by
3780 'gfc_charlen_type_node'.
3781 * trans-types.h: Same. Also update comment accordingly.
3783 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3785 * primary.c: Update copyright boilerplate to say GCC.
3786 * f95-lang.c: Change initial comment to say gfortran.
3788 2004-08-31 Paul Brook <paul@codesourcery.com>
3790 * trans-types.h: Add comments.
3791 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3793 2004-08-30 Richard Henderson <rth@redhat.com>
3795 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3796 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3797 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3798 c_long, c_long_long.
3799 (gfc_logical_info): Add c_bool.
3800 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3801 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3802 rather than gfc_int[48]_type_node for allocate choice.
3803 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3804 local copies of some kind type nodes.
3805 (gfc_build_builtin_function_decls): Likewise.
3806 * trans-expr.c (gfc_conv_power_op): Likewise.
3807 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3808 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3809 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3810 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3811 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3812 * trans-io.c (gfc_pint4_type_node): Move into ...
3813 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3814 some kind type nodes.
3815 * trans-types.c (gfc_type_nodes): Remove.
3816 (gfc_character1_type_node, gfc_strlen_type_node): New.
3817 (gfc_integer_types, gfc_logical_types): New.
3818 (gfc_real_types, gfc_complex_types): New.
3819 (gfc_init_kinds): Fill in real mode_precision.
3820 (gfc_build_int_type, gfc_build_real_type): New.
3821 (gfc_build_complex_type, gfc_build_logical_type): New.
3822 (c_size_t_size): New.
3823 (gfc_init_types): Loop over kinds.
3824 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3825 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3826 (gfc_get_character_type_len): Likewise.
3827 (gfc_type_for_size): Loop over kinds; use a reduced set of
3828 unsigned type nodes.
3829 (gfc_type_for_mode): Loop over kinds.
3830 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3831 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3832 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3833 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3834 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3835 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3836 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3837 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3838 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3839 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3840 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3841 gfc_complex8_type_node, gfc_complex16_type_node,
3842 gfc_logical1_type_node, gfc_logical2_type_node,
3843 gfc_logical4_type_node, gfc_logical8_type_node,
3844 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3845 (gfc_character1_type_node): Turn in to a variable.
3846 (gfc_strlen_type_node): Likewise.
3848 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3850 * gfortran.h (gfc_namespace): Add new field is_block_data.
3851 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3852 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3853 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3854 * trans.h (gfc_generate_block_data): Add prototype.
3855 * trans-decl.c (gfc_generate_block_data): New function.
3857 2004-08-29 Richard Henderson <rth@redhat.com>
3859 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3860 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3861 than two HOST_WIDE_INT.
3863 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3866 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3867 var_element, top_var_list, match_data_constant, top_val_list,
3868 gfc_match_data): Move here from match.c.
3869 (match_old_style_init): New function.
3870 (variable_decl): Match old-style initialization.
3871 * expr.c (gfc_get_variable_expr): New function.
3872 * gfortran.h (gfc_get_variable_expr): Add prototype.
3873 * gfortran.texi: Start documentation for supported extensions.
3874 * match.c: Remove the functions moved to decl.c.
3875 * match.h (gfc_match_data): Move prototype to under decl.c.
3876 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3879 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3880 Paul Brook <paul@codesourcery.com>
3882 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3883 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3884 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3885 (build_builtin_fntypes): New function.
3886 (gfc_init_builtin_functions): Use it.
3887 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3888 and GFC_ISYM_ERF{,C}.
3889 (gfc_c_int_kind): Declare.
3890 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3891 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3892 gfc_resolve_g77_math1): Add prototypes.
3893 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3894 * mathbuiltins.def: Add comment. Change third argument. Use
3895 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3896 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3897 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3898 * trans-types.c (gfc_c_int_kind): Declare.
3899 (gfc_init_kinds): Set it.
3901 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3902 Paul Brook <paul@codesourcery.com>
3904 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3905 (gfc_check_f, gfc_simplify_f): Add f0.
3906 * intrinsic.c (do_check): Call f0. Flatten.
3907 (add_sym_0): Fix prototype. Set f0.
3908 (add_functions): Add getgid, getgid and getuid.
3909 (resolve_intrinsic): Remove obsolete comment.
3910 (do_simplify): Call f0.
3911 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3912 gfc_resolve_getuid): Add prototypes.
3913 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3914 gfc_resolve_getuid): New functions.
3915 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3918 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3920 * error.c (gfc_error_init_1): Remove blank line in front of
3921 function body. Add missing blank.
3922 (gfc_buffer_error, error_char, error_string): Remove blank line in
3923 front of function body.
3924 (show_locus): Add comma in comment.
3925 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3926 gfc_push_error, gfc_pop_error): Remove blank line in front of
3928 (gfc_get_errors): Typo fix in comment in front of function. Remove
3929 blank line in front of function body.
3931 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3933 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3934 variable declaration of same name.
3935 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3936 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3937 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3938 Replace all calls to gfc_default_*_kind with variable accesses.
3939 * trans-types.c: Same as above.
3940 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3941 static qualifier. Replace all occurences.
3942 (gfc_default_*_kind): Remove functions.
3944 2004-08-26 Richard Henderson <rth@redhat.com>
3946 * arith.c: Include system.h, not real system headers.
3947 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3948 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3949 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3950 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3951 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3952 gfc_index_integer_kind, gfc_default_integer_kind,
3953 gfc_default_real_kind,gfc_default_double_kind,
3954 gfc_default_character_kind, gfc_default_logical_kind,
3955 gfc_default_complex_kind, validate_integer, validate_real,
3956 validate_logical, validate_character,
3957 gfc_validate_kind): Move to trans-types.c.
3958 (gfc_set_model_kind): Use gfc_validate_kind.
3959 (gfc_set_model): Just copy the current precision to default.
3960 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3961 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3962 * gfortran.h: Update file commentary.
3963 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3964 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3965 gfc_default_double_kind_1, gfc_default_character_kind_1,
3966 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3967 (gfc_init_kinds): New.
3968 (gfc_init_types): Don't set gfc_index_integer_kind here.
3969 * trans-types.h (gfc_init_kinds): Declare.
3970 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3972 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3974 * check.c (gfc_check_atan2): New function.
3975 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3976 * intrinsic.h (gfc_check_atan2): Add prototype.
3978 2004-08-25 Richard Henderson <rth@redhat.com>
3980 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3981 false and we don't validate the kind.
3982 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3983 * check.c (kind_check): Likewise.
3984 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3985 (match_char_spec, match_logical_spec): Likewise.
3986 * gfortran.h (gfc_validate_kind): Likewise.
3987 * options.c (gfc_handle_option): Likewise.
3988 * primary.c (match_integer_constant, match_real_constant,
3989 match_string_constant, match_logical_constant,
3990 match_const_complex_part): Likewise.
3991 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3992 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3993 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3994 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3995 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3996 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3997 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3998 gfc_simplify_tiny): Likewise.
3999 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
4000 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
4001 prepare_arg_info): Likewise.
4003 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4005 * expr.c (gfc_check_assign): Add comment. Add new warning.
4006 * trans-expr.c (gfc_conv_function_call): Correctly dereference
4007 result of pointer valued function when not in pointer assignment.
4009 2004-08-25 Paul Brook <paul@codesourcery.com>
4011 * config-lang.in: Remove dead commented line.
4012 * module.c: Replace g95 with gfortran in comment.
4014 2004-08-25 Paul Brook <paul@codesourcery.com>
4017 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
4019 2004-08-25 Paul Brook <paul@codesourcery.com>
4022 * trans-array.c (gfc_trans_allocate_temp_array): Remove
4023 string_length argument.
4024 (gfc_trans_array_ctor_element): New function.
4025 (gfc_trans_array_constructor_subarray): Use it.
4026 (gfc_trans_array_constructor_value): Ditto. Handle constant
4028 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
4029 (gfc_trans_array_constructor): Use them.
4030 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
4031 (gfc_conv_ss_descriptor): Remember section string length.
4032 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
4033 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
4034 (gfc_conv_expr_descriptor): Ditto.
4035 (gfc_conv_loop_setup): Ditto. Spelling fixes.
4036 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
4037 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
4038 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
4039 (gfc_conv_variable): Set string_length from section.
4040 (gfc_conv_function_call): Remove extra argument.
4041 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
4042 * trans-types.c (gfc_get_character_type_len): New function.
4043 (gfc_get_character_type): Use it.
4044 (gfc_get_dtype): Return zero for internal types.
4045 * trans-types.h (gfc_get_character_type_len): Add prototype.
4046 * trans.h (struct gfc_ss): Move string_length out of union.
4048 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4050 * trans.h (build2_v, build3_v): New macros.
4052 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
4054 * trans-array.c (gfc_conv_descriptor_data,
4055 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
4056 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
4057 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
4058 gfc_trans_allocate_temp_array,
4059 gfc_trans_array_constructor_subarray,
4060 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
4061 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
4062 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
4063 gfc_conv_array_ref, gfc_trans_preloop_setup,
4064 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
4065 gfc_conv_loop_setup, gfc_array_init_size,
4066 gfc_conv_array_initializer, gfc_trans_array_bounds,
4067 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
4068 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
4069 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
4070 of build and build_v as appropriate.
4071 * trans-common.c (create_common): Same.
4072 * trans-decl.c (gfc_trans_auto_character_variable,
4073 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
4074 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4075 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
4076 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
4077 gfc_conv_expr_op, gfc_conv_function_call,
4078 gfc_trans_structure_assign): Same.
4079 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
4080 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
4081 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
4082 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
4083 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
4084 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4085 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
4086 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
4087 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
4088 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
4089 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
4090 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
4091 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
4092 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
4093 gfc_conv_intrinsic_iargc): Same.
4094 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
4095 set_flag, add_case, io_result, transfer_namelist_element,
4096 transfer_expr): Same.
4097 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
4098 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
4099 gfc_trans_integer_select, gfc_trans_logical_select,
4100 gfc_trans_character_select, gfc_trans_forall_loop,
4101 gfc_trans_nested_forall_loop, gfc_do_allocate,
4102 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4103 compute_inner_temp_size, compute_overall_iter_number,
4104 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
4105 gfc_trans_forall_1, gfc_evaluate_where_mask,
4106 gfc_trans_where_assign, gfc_trans_allocate): Same.
4107 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
4108 * trans.c (gfc_add_modify_expr, gfc_finish_block,
4109 gfc_build_array_ref, gfc_build_function_call,
4110 gfc_trans_runtime_check): Same.
4112 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4114 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
4115 build_int_cst to build_int_cst_wide in accordance to Nathan's
4118 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4120 * trans-array.c (gfc_trans_array_constructor_value): Adjust
4121 build_int_cst calls.
4122 * trans-const.c (gfc_build_string_const, gfc_init_constants,
4123 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
4124 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
4125 gfc_trans_entry_master_switch): Likewise.
4126 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4127 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4128 * trans-io.c (add_case, set_error_locus,
4129 transfer_namelist_element, transfer_expr): Likewise.
4130 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4131 gfc_trans_stop, gfc_trans_character_select): Likewise.
4132 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4133 * trans.c (gfc_trans_runtime_check): Likewise.
4135 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4137 * trans-decl.c, trans-types.c: Add and remove blank lines as
4140 2004-08-24 Richard Henderson <rth@redhat.com>
4142 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
4144 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4146 * resolve.c (merge_argument_lists): Revert unintentionally
4149 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4151 * trans-decl.c (build_function_decl): Fix spelling in comment.
4152 (build_entry_thunks): Remove code with no function.
4153 (gfc_build_intrinsic_function_decls): Remove empty line.
4155 * resolve.c (resolve_entries): Fix a bunch of comment typos.
4157 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4159 * f95-lang.c (gfc_init_decl_processing): Adjust
4160 build_common_tree_nodes call.
4162 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4164 * trans-types.c: Spelling and formatting fixes.
4166 2004-08-23 Richard Henderson <rth@redhat.com>
4168 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
4169 of going through an intermediate string. Fix 32/64 int/long bug.
4171 2004-08-23 Eric Christopher <echristo@redhat.com>
4173 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
4174 usage. Use build_vector_type_for_mode for vector types.
4176 2004-08-22 Richard Henderson <rth@redhat.com>
4179 * data.c (find_con_by_offset): Search ordered list; handle
4180 elements with repeat counts.
4181 (gfc_assign_data_value_range): New.
4182 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
4183 (gfc_assign_data_value_range): Declare.
4184 * match.c (top_val_list): Extract repeat count into a temporary.
4185 * resolve.c (values): Make left unsigned.
4186 (next_data_value): Don't decrement left.
4187 (check_data_variable): Use gfc_assign_data_value_range.
4189 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4191 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
4193 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4195 * check.c (gfc_check_reduction): Rename to ...
4196 (check_reduction): ... this. Make static. Don't check type of
4198 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
4199 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
4200 SUM to use new check functions.
4201 (check_specific): Change logic to call new functions.
4202 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
4204 (gfc_check_reduction): Remove prototype.
4206 2004-08-20 Paul Brook <paul@codesourcery.com>
4207 Canqun Yang <canqun@nudt.edu.cn>
4210 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
4211 for automatic arrays.
4212 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
4214 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4218 * match.c (match_simple_forall, match_simple_where): Forward-declare.
4219 (gfc_match_if): Order statement list alphabetically, add WHERE and
4220 FORALL, remove double PAUSE.
4221 (gfc_match_simple_where, match_forall_header,
4222 gfc_match_simple_forall): New functions.
4223 (gfc_match_forall): Use match_forall_header.
4225 2004-08-19 Paul Brook <paul@codesourcery.com>
4228 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
4229 * symbol.c (gfc_clear_attr): Use memset.
4231 2004-08-19 Paul Brook <paul@codesourcery.com>
4235 * data.c (assign_substring_data_value): Remove.
4236 (create_character_intializer): New function.
4237 (gfc_assign_data_value): Track the typespec for the current
4238 subobject. Use create_character_intializer.
4240 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
4243 * check.c (gfc_check_reduction): New function.
4244 (gfc_check_minval_maxval): Removed.
4245 (gfc_check_product): Removed.
4246 (gfc_check_sum): Removed.
4247 * intrinsic.h: Add/remove declarations for these.
4248 * gfortran.h: Add field f3red to union gfc_check_f.
4249 * intrinsic.c (add_sym_3red): New function.
4250 (add_functions): Register maxval, minval, product, and sum intrinsics
4251 through add_sym_3red.
4252 (check_specific): Handle f3red union field.
4253 * iresolve.c: Whitespace change.
4255 2004-08-18 Paul Brook <paul@codesourcery.com>
4257 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
4259 2004-08-18 Victor Leikehman <lei@il.ibm.com>
4262 * trans-io.c (transfer_namelist_element): New. Recursively handle
4263 derived-type variables. Pass string lengths.
4264 (build_dt): Code moved to build_namelist, with some
4265 changes and additions.
4266 (gfc_build_io_library_fndecls): Declare the fifth
4267 argument in st_set_nml_var_char -- string_length.
4269 2004-08-17 Paul Brook <paul@codesourcery.com>
4270 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4273 * decl.c (get_proc_name): Update mystery comment.
4274 (gfc_match_entry): Check for errors earlier. Add entry point to list.
4275 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
4276 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
4277 (struct gfc_entry_list): Define.
4278 (gfc_get_entry_list): Define.
4279 (struct gfc_namespace): Add refs and entries.
4280 (enum gfc_exec_op): Add EXEC_ENTRY.
4281 (struct gfc_code): Add ext.entry.
4282 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
4283 (mio_symbol_attribute): Don't save/reture addr->entry.
4284 (mio_namespace_ref): Refcount namespaces.
4285 * parse.c (accept_statement): Handle ST_ENTRY.
4286 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
4287 (parse_contained): Fixup sibling references to entry points
4288 after parsing the procedure body.
4289 * resolve.c (resolve_contained_fntype): New function.
4290 (merge_argument_lists, resolve_entries): New functions.
4291 (resolve_contained_functions): Use them.
4292 (resolve_code): Handle EXEC_ENTRY.
4293 (gfc_resolve): Call resolve_entries.
4294 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
4295 * symbol.c (gfc_get_namespace): Refcount namespaces.
4296 (gfc_free_namespace): Ditto.
4297 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
4298 optional when multiple entry points are present.
4299 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
4300 (gfc_get_extern_function_decl): Add assertion. Fix coment.
4301 (create_function_arglist, trans_function_start, build_entry_thunks):
4303 (gfc_build_function_decl): Rename ...
4304 (build_function_decl): ... to this.
4305 (gfc_create_function_decl): New function.
4306 (gfc_generate_contained_functions): Use it.
4307 (gfc_trans_entry_master_switch): New function.
4308 (gfc_generate_function_code): Use new functions.
4309 * trans-stmt.c (gfc_trans_entry): New function.
4310 * trans-stmt.h (gfc_trans_entry): Add prototype.
4311 * trans-types.c (gfc_get_function_type): Add entry point argument.
4312 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
4313 (gfc_generate_module_code): Call gfc_create_function_decl.
4314 * trans.h (gfc_build_function_decl): Remove.
4315 (gfc_create_function_decl): Add prototype.
4317 2004-08-15 Andrew Pinski <apinski@apple.com>
4320 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
4321 for cabs{,f} and copysign{,f}.
4322 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
4323 (gfor_fndecl_math_cabs): Delete.
4324 (gfor_fndecl_math_sign4): Delete.
4325 (gfor_fndecl_math_sign8): Delete.
4326 (gfc_build_intrinsic_function_decls): Remove the
4327 initializing of cabs{,f} and copysign{,f} functions.
4328 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
4329 instead of the functions definitions.
4330 (gfc_conv_intrinsic_sign): Likewise.
4331 * trans.h (gfor_fndecl_math_cabsf): Delete.
4332 (gfor_fndecl_math_cabs): Delete.
4333 (gfor_fndecl_math_sign4): Delete.
4334 (gfor_fndecl_math_sign8): Delete.
4336 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4338 * trans-array.c (gfc_trans_array_constructor_value): Use
4340 * trans-const.c (gfc_build_string_const,
4341 gfc_init_constants, gfc_conv_mpz_to_tree,
4342 gfc_conv_constant_to_tree): Likewise.
4343 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4344 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4345 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4346 * trans-io.c (add_case, set_error_locus, build_dt,
4347 transfer_expr): Likewise.
4348 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4349 gfc_trans_stop, gfc_trans_character_select): Likewise.
4350 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4351 * trans.c (gfc_trans_runtime_check): Likewise.
4353 2004-08-14 Paul Brook <paul@codesourcery.com>
4355 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4357 2004-08-14 Paul Brook <paul@codesourcery.com>
4359 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4361 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4363 * gfortran.h: Add comments.
4364 * parse.c (parse_contained): Fix comment typo.
4365 * resolve.c (was_declared): Ditto.
4368 2004-08-11 Paul Brook <paul@codeourcery.com>
4371 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4373 2004-08-10 Richard Henderson <rth@redhat.com>
4375 * f95-lang.c (gfc_init_builtin_functions): Remove
4376 __builtin_stack_alloc, add __builtin_alloca.
4377 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4378 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4380 2004-08-10 Paul Brook <paul@codesourcery.com>
4382 * trans-io.c (transfer_expr): Handle pointters.
4384 2004-08-10 Paul Brook <paul@codesourcery.com>
4387 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4388 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4389 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4390 Handle GFC_SS_COMPONENT.
4391 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4392 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4394 (gfc_conv_array_initializer): Call specific initializer routines.
4395 * trans-expr.c (gfc_trans_structure_assign): New function.
4396 (gfc_trans_subarray_assign): New function.
4397 (gfc_trans_subcomponent_assign): New fucntion
4398 (gfc_conv_structure): Use them.
4399 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4400 (gfc_ss): Add shape.
4402 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4404 * simplify.c (gfc_simplify_shape): Bugfix.
4405 * expr.c (gfc_copy_shape_excluding): New function.
4406 * gfortran.h (gfc_get_shape): Bugfix.
4407 (gfc_copy_shape_excluding): Added declaration.
4408 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4409 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4410 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4411 time resolution of shape.
4413 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4415 * intrinsic.c (add_subroutines): Add getenv and
4416 get_environment_variable. (add_sym_5s): New function.
4417 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4419 * iresolve.c (gfc_resolve_get_environment_variable): New
4422 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4424 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4425 __builtin_pow[f] arguments.
4427 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4429 * arith.c: Add #define for model numbers. Remove global GMP variables.
4430 (natural_logarithm,common_logarithm,exponential,sine,
4431 cosine,arctangent,hypercos,hypersine ): Remove.
4432 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4433 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4434 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4435 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4436 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4437 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4438 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4439 gfc_real2int,gfc_real2real,gfc_real2complex,
4440 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4441 to MPFR, use new functions.
4442 * arith.h: Remove extern global variables.
4443 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4444 arctangent,hypercos,hypersine): Remove prototypes.
4445 (arctangent2): Update prototype from GMP to MPFR.
4446 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4447 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4448 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4449 * gfortran.h (GFC_REAL_BITS): Remove.
4450 (arith): Add ARITH_NAN.
4451 Include mpfr.h. Define GFC_RND_MODE.
4452 Rename GCC_GFORTRAN_H GFC_GFC_H.
4453 (gfc_expr): Convert GMP to MPFR.
4454 * module.c: Add arith.h, correct type in comment.
4455 (mio_gmp_real): Convert GMP to MPFR.
4456 (mio_expr): Use gfc_set_model_kind().
4457 * primary.c: Update copyright date with 2004.
4458 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4459 * simplify.c: Remove global GMP variables
4460 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4461 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4462 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4463 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4464 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4465 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4466 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4467 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4468 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4469 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4470 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4471 gfc_simplify_rrspacing,gfc_simplify_scale,
4472 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4473 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4474 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4475 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4477 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4478 gfc_conv_mpf_to_tree. Convert it to use MPFR
4479 (gfc_conv_constant_to_tree): Use it.
4480 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4481 * trans-intrinsic.c: Add arith.h, remove gmp.h
4482 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4484 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4485 Paul Brook <paul@codesourcery.com>
4487 * trans-array.c (gfc_trans_allocate_array_storage,
4488 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4489 gfc_conv_loop_setup): For functions, if the shape of the result
4490 is not known in compile-time, generate an empty array descriptor for
4491 the result and let the callee to allocate the memory.
4492 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4493 (gfc_conv_expr_descriptor): Use function return values directly.
4494 * trans-expr.c (gfc_conv_function_call): Always add byref call
4496 (gfc_trans_pointer_assignment): Add comments.
4497 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4499 2004-08-01 Roger Sayle <roger@eyesopen.com>
4501 * options.c (gfc_init_options): Don't warn about the use GNU
4502 extensions by default.
4503 (gfc_post_options): Warn about GNU extensions with -pedantic.
4504 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4506 2004-07-30 Richard Henderson <rth@redhat.com>
4508 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4511 2004-07-25 Richard Henderson <rth@redhat.com>
4513 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4514 and DECL_IGNORED_P on RESULT_DECL.
4515 (gfc_generate_constructors): Likewise.
4517 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4520 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4522 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4523 * options.c (gfc_handle_options): Deal with changed options.
4524 * scanner.c (load_line): Change second arg to 'char **',
4525 allocate if pointing to NULL. Keep track of buffer's length.
4526 Adapt buffer size to overlong lines. Pad lines to full length
4528 (load_file): Adapt to new interface of load_line.
4530 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4532 * trans.h (builtin_function): Declare.
4534 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4537 (parts ported from g95)
4538 * parse.h (gfc_state_data): New field do_variable.
4539 (gfc_check_do_variable): Add prototype.
4540 * parse.c (push_state): Initialize field 'do_variable'.
4541 (gfc_check_do_variable): New function.
4542 (parse_do_block): Remember do iterator variable.
4543 (parse_file): Initialize field 'do_variable'.
4544 * match.c (gfc_match_assignment, gfc_match_do,
4545 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4546 Add previously missing checks.
4547 (gfc_match_return): Reformat error message.
4548 * io.c (match_out_tag): New function.
4549 (match_open_element, match_close_element,
4550 match_file_element, match_dt_element): Call match_out_tag
4551 instead of match_vtag where appropriate.
4552 (match_io_iterator, match_io_element): Add missing check.
4553 (match_io): Reformat error message.
4554 (match_inquire_element): Call match_out_tag where appropriate.
4556 * parse.c (gfc_check_do_variable): Fix error locus.
4558 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4561 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4562 for every assumed length character dummy argument.
4565 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4568 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4570 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4573 * trans-array.c gfc_trans_g77_array,
4574 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4575 for assumed length characters.
4576 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4577 with a character expression.
4578 (gfc_cvonv_array_parameter): Pass string length when passing
4579 character array according to g77 conventions.
4581 2004-07-12 Paul Brook <paul@codesourcery.com>
4583 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4584 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4585 initialization code.
4586 * trans-common.c (create_common): Use gfc_conv_initializer.
4587 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4588 * trans-expr.c (gfc_conv_initializer): New function.
4589 (gfc_conv_structure): Use it.
4590 * trans.h (gfc_conv_initializer): Add prototype.
4592 2004-07-11 Paul Brook <paul@codesourcery.com>
4595 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4597 (parse_contained): Mark contained symbols as referenced.
4599 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4602 * module.c (gfc_dump_module, gfc_use_module): Print locus
4603 when opening of module file fails.
4606 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4609 * match.c (gfc_match_program): A program name is obligatory.
4610 (gfc_match_return): RETURN in main program is an extension.
4611 (gfc_match_block_data): A space is required before a block data
4615 * primary.c (match_boz_constant): Call gfc_notify_std only if
4616 we actually have a non-standard boz-literal-constant.
4619 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4620 warning if assigning NULL().
4622 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4624 * f95-lang.c (set_block): Remove.
4625 (gfc_clear_binding_stack): New.
4626 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4627 (struct binding_level): Remove block_created_by_back_end.
4628 (clear_binding_level): Likewise.
4629 (poplevel): Don't handle block_created_by_back_end.
4631 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4633 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4634 symbol is in common, because we ...
4635 (gfc_generate_module_vars): Call gfc_trans_common.
4637 2004-07-10 Paul Brook <paul@codesourcery.com>
4639 * trans-array.c (gfc_build_null_descriptor): New function.
4640 (gfc_trans_static_array_pointer): Use it.
4641 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4642 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4644 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4647 * decl.c (gfc_match_save): Use-associated common block
4649 * gfortran.h (gfc_common_head): Add new field 'name'.
4650 Fix typo in comment after #endif.
4651 * match.c (gfc_get_common): Add new argument from_common,
4652 mangle name if flag is set, fill in new field in structure
4654 (match_common): Set new arg in call to gfc_get_common,
4655 use-associated common block doesn't collide.
4656 * match.h (gfc_get_common): Adapt prototype.
4657 * module.c (load_commons): Set new arg in call to
4659 * symbol.c (free_common_tree): New function.
4660 (gfc_free_namespace): Call new function.
4661 * trans-common.c (several functions): Remove argument
4662 'name', use name from gfc_common_head instead.
4664 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4666 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4667 and RHS match. Return early if the RHS is NULL().
4670 * match.c (match_common): Fix error reporting for used common.
4673 * trans-expr.c (gfc_conv_structure): Handle initialization
4674 of scalar pointer components.
4676 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4678 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4679 by fix for PR 15481.
4681 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4683 * trans-common.c: Fix whitespace issues, make variable names
4685 (create_common): Additionally, make loop logic more obvious.
4687 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4688 Paul Brook <paul@codesourcery.com>
4691 * trans-common.c (calculate_length): Remove ...
4692 (get_segment_info): Merge into here. Save field type.
4693 (build_field): Use saved type.
4694 (create_common, new_condition, new_segment, finish_equivalences):
4695 Use new get_segment_info.
4696 * trans-types.c: Update comment.
4698 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4701 * moduele.c (mio_symbol): Don't I/O initial values unless
4702 symbol is a parameter.
4704 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4707 * resolve.c (resolve_symbol): Verify that the shape of a
4708 parameter array is not only explicit, but also constant.
4709 * array.c (gfc_is_compile_time_shape): New function.
4710 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4712 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4718 * module.c (write_symbol, write_symtree): Remove workaround.
4719 * primary.c (match_actual_arglist): Enhance comment.
4720 (gfc_match_rvalue): Handle function call with first argument
4721 a keyword argument correctly.
4722 * resolve.c (resolve_symbol): Change call to
4723 gfc_set_default_type to issue error if no implicit type
4725 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4727 2004-07-08 Paul Brook <paul@codesourcery.com>
4729 * intrinsic.c (add_sym_4s): New function.
4730 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4732 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4733 Paul Brook <paul@codesourcery.com>
4737 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4738 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4739 * intrinsic.c (add_functions): Identify iargc. Add
4740 command_argument_count.
4741 (add_subroutines): Resolve getarg. Add get_command and
4742 get_command_argument.
4743 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4744 gfc_resolve_get_command_argument): Add prototypes.
4745 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4746 gfc_resolve_get_command_argument): New functions.
4747 * trans-decl.c (gfor_fndecl_iargc): New variable.
4748 (gfc_build_intrinsic_function_decls): Set it.
4749 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4750 (gfc_conv_intrinsic_function): Use it.
4751 * trans.h (gfor_fndecl_iargc): Declare.
4753 2004-07-04 Matthias Klose <doko@debian.org>
4755 * Make-lang.in: Generate and install gfortran man page.
4756 * invoke.texi: Remove extra '@c man end'.
4758 2004-07-04 Richard Henderson <rth@redhat.com>
4760 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4762 2004-07-04 Paul Brook <paul@codesourcery.com>
4764 * decl.c (gfc_match_implicit_range): Don't use typespec.
4765 (gfc_match_implicit): Handle character selectors.
4766 * gfortran.h (gfc_set_implicit): Remove prototype.
4767 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4768 * parse.c (accept_statement): Don't call gfc_set_implicit.
4769 * symbol.c (new_ts): Remove.
4770 (gfc_set_implicit_none): Use same loop bounds as other functions.
4771 (gfc_set_implicit): Remove.
4772 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4773 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4775 2004-06-30 Richard Henderson <rth@redhat.com>
4777 * match.c (var_element): Remove unused variable.
4779 * trans-decl.c (gfc_generate_function_code): Don't set
4780 x_whole_function_mode_p.
4781 (gfc_generate_constructors): Likewise.
4783 2004-06-30 Richard Henderson <rth@redhat.com>
4785 * trans-decl.c (gfc_generate_function_code): Don't set
4786 immediate_size_expand.
4787 (gfc_generate_constructors): Likewise.
4789 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4792 * decl.c (gfc_match_type_spec): Rename second argument to
4793 'implicit_flag', reverse meaning. Don't match_char_spec if
4794 'implicit_flag' is set. Rename to ...
4795 (match_type_spec): ... this.
4796 (gfc_match_implicit_none, match_implicit_range): Move here
4798 (gfc_match_implicit): Move here from match.c, try to
4799 match_char_len if match_implicit_range doesn't succeed for
4800 CHARACTER implicits. Call renamed fucntion match_type_spec.
4801 (gfc_match_data_decl, match_prefix): Call renamed function
4803 * match.c (gfc_match_implicit_none, match_implicit_range,
4804 gfc_match_implicit): Move to decl.c.
4805 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4806 Move protoypes to section 'decl.c'.
4807 (gfc_match_type_spec): Remove prototype.
4809 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4811 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4814 2004-06-29 Steven Bosscher <stevenb@suse.de>
4816 Make sure types in assignments are compatible. Mostly mechanical.
4817 * trans-const.h (gfc_index_one_node): New define.
4818 * trans-array.c (gfc_trans_allocate_array_storage,
4819 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4820 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4821 gfc_conv_array_ubound, gfc_conv_array_ref,
4822 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4823 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4824 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4825 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4826 types in assignments, conversions and conditionals for expressions.
4827 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4828 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4829 gfc_conv_function_call, gfc_trans_pointer_assignment,
4830 gfc_trans_scalar_assign): Likewise.
4831 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4832 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4833 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4834 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4835 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4836 gfc_conv_allocated, gfc_conv_associated,
4837 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4838 * trans-io.c (set_string): Likewise.
4839 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4840 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4841 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4842 compute_overall_iter_number, gfc_trans_assign_need_temp,
4843 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4844 gfc_evaluate_where_mask, gfc_trans_where_assign,
4845 gfc_trans_where_2): Likewise.
4846 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4847 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4849 * trans.c (gfc_add_modify_expr): Add sanity check that types
4850 for the lhs and rhs are the same for scalar assignments.
4852 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4854 * dump-parse-tree.c (show_common): New function.
4855 (gfc_show_namespace): Show commons.
4857 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4858 Andrew Vaught <andyv@firstinter.net>
4862 * decl.c (gfc_match_save): Adapt to new common structures,
4863 don't allow saving USE-associated common.
4864 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4865 symbol attributes any longer.
4866 (gfc_show_symbol): Don't show old-style commons any longer.
4867 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4869 * gfortran.h (symbol_attribute): Remove common and saved_common
4871 (gfc_symbol): Remove common_head element.
4872 (gfc_common_head): New struct.
4873 (gfc_get_common_head): New macro.
4874 (gfc_symtree): Add field 'common' to union.
4875 (gfc_namespace): Add field 'common_root'; change type of field
4876 'blank_common' to blank_common.
4877 (gfc_add_data): New prototype.
4878 (gfc_traverse_symtree): Expect a symtree as first argument
4879 instead of namespace.
4880 * match.c (gfc_get_common): New function.
4881 (match_common_name): Change to take char * as argument, adapt,
4882 fix bug with empty name.
4883 (gfc_match_common): Adapt to new data structures. Disallow
4884 redeclaration of USE-associated COMMON-block. Fix bug with
4886 (var_element): Adapt to new common structures.
4887 * match.h (gfc_get_common): Declare.
4888 * module.c: Add 2004 to copyright years, add commons to module
4889 file layout description.
4890 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4891 for removed attributes.
4892 (mio_symbol): Adapt to new way of storing common relations.
4893 (load_commons): New function.
4894 (read_module): Skip common list on first pass, load_commons at
4896 (write_commons): New function.
4897 (write_module): Call write_commons().
4898 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4899 functions related to removed attributes.
4900 (gfc_add_data): New function.
4901 (gfc_clear_attr): Don't set removed attributes.
4902 (gfc_copy_attr): Don't copy removed attributes.
4903 (traverse_symtree): Remove.
4904 (gfc_traverse_symtree): Don't traverse symbol
4905 tree of the passed namespace, but require a symtree to be passed
4906 instead. Unify with traverse_symtree.
4907 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4909 (save_symbol): Remove setting of removed attribute.
4910 * trans-common.c (gfc_sym_mangled_common_id): Change to
4911 take 'char *' argument instead of 'gfc_symbol'.
4912 (build_common_decl, new_segment, translate_common): Adapt to new
4913 data structures, add new
4915 (create_common): Adapt to new data structures, add new
4916 argument name. Fix typo in intialization of derived types.
4917 (finish_equivalences): Add second argument in call to
4919 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4920 (gfc_trans_common): Adapt to new data structures.
4921 * trans-decl.c (gfc_create_module_variables): Remove test for
4924 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4926 * io.c: Add 2004 to copyright years.
4928 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4929 Andrew Vaught <andyv@firstinter.net>
4931 * gfortran.h (gfc_gsymbol): New typedef.
4932 (gfc_gsym_root): New variable.
4933 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4934 * parse.c (global_used): New function.
4935 (parse_block_data): Check for double empty BLOCK DATA,
4936 use global symbol table.
4937 (parse_module): Use global symbol table.
4938 (add_global_procedure, add_global_program): New functions.
4939 (gfc_parse_file): Use global symbol table.
4940 * symbol.c (gfc_gsym_root): New variable.
4941 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4944 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4946 * module.c (mio_gmp_real): Correct writing of negative numbers.
4948 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4951 * expr.c (check_intrinsic_op): Allow comparison of characters.
4954 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4955 Andrew Vaught <andyv@firstinter.net>
4957 * decl.c (contained_procedure): New function.
4958 (match_end): Verify correctness of END STATEMENT in
4961 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4962 Andrew Vaught <andyv@firstinter.net>
4965 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4966 (decode_statement): Enforce required space in free-form.
4968 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4970 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4971 * trans-array.c (gfc_conv_descriptor_data): Add operand
4973 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4974 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4975 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4976 * trans-common.c (create_common): Likewise.
4977 * trans-expr.c (gfc_conv_component_ref): Likewise.
4978 * trans-io.c (set_parameter_value): Likewise.
4979 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4980 (transfer_expr): Likewise.
4981 * trans-decl.c (gfc_trans_auto_character_variable):
4982 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4983 (gfc_gimplify_function): New function.
4984 (gfc_generate_function-code): Properly handle nested functions.
4985 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4987 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4990 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4991 (gfc_resolve_inquire): Resolve the iolength tag. Return
4992 SUCCESS at end of function if no failure has occured.
4993 * resolve.c (resolve_code): Resolve if iolength is encountered.
4994 * trans-io.c: (ioparm_iolength, iocall_iolength,
4995 iocall_iolength_done): New variables.
4996 (last_dt): Add IOLENGTH.
4997 (gfc_build_io_library_fndecls ): Set iolength related variables.
4998 (gfc_trans_iolength): Implement.
4999 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
5001 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
5004 * scanner.c (load_line): Don't truncate preprocessor lines.
5005 Reformat error message.
5006 (preprocessor_line): Issue warning in case of malformed
5009 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5011 * resolve.c (resolve_symbol): Add comment in function body.
5012 (check_data_variable): Change type of mark to ar_type, adapt code
5015 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5017 * array.c (gfc_insert_constructor): Avoid redundant call to
5018 mpz_comp. Add 2004 to copyright years.
5020 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5022 * trans.h (stmtblock_t): Change has_scope to unsigned int.
5024 2004-06-20 Steven G. Kargl <kargls@comcast.net>
5026 * arith.c (gfc_range_check): correct complex underflow.
5028 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5031 * match.c (match_case_selector): Call gfc_match_init_expr
5032 instead of gfc_match_expr.
5033 * resolve.c (validate_case_label_expr): No need to check for
5034 constant, since it wouldn't have been matched with the fix to
5037 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5040 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
5043 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5046 * trans-deecl.c (generate_local_decl): Do not issue warning for
5047 unused variables if they're use associated.
5049 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5050 Andrew Vaught <andyv@firstinter.net>
5053 * gfortran.h (gfc_check_f): Add new field f3ml.
5054 * check.c (gfc_check_minloc_maxloc): Take argument list instead
5055 of individual arguments, reorder if necessary.
5056 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
5057 * intrinsic.c (add_sym_3ml): New function.
5058 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
5059 (check_specific): Catch special case MINLOC, MAXLOC.
5061 2004-06-14 Paul Brook <paul@codesourcery.com>
5063 * intrinsic.c (add_sym_2s): Use correct function types.
5065 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5067 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
5068 * data.c (gfc_get_section_index): Remove dependency on trans.h.
5070 2004-06-12 Steven G. Kargl <kargls@comcast.net>
5072 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
5073 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
5074 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
5075 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
5076 * trans-intrinsic.c: Use symbols.
5077 * intrinsic.c (add_sym_2s): New function.
5078 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
5079 * intrinsic.h: Function prototypes.
5080 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
5081 gfc_resolve_srand): New functions.
5083 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5086 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
5087 contained procedure.
5089 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5092 * interface.c (compare_parameter, compare_actual_formal): Don't
5093 check types and array shapes for NULL()
5094 * trans-expr.c (conv_function_call): No double indirection for
5097 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
5099 * trans-expr.c (gfc_conv_cst_int_power): Compute
5100 x**(-n) by converting it to (1/x)**n instead of
5103 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5106 * module.c (write_symbol, write_symtree): Don't write symbols
5107 wrongly added to namespace.
5108 * trans-decl.c (gfc_create_module_variable): Don't create a
5109 backend decl for a symbol incorrectly added to namespace.
5111 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5114 * resolve.c (resolve_symbol): Verify that parameter array has an
5115 explicit shape. Fix typos and coding style issues in surrounding
5118 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5121 * gfortran.texi: The documentation doesn't contain infomration on
5122 how to report bugs, and shouldn't, so remove the line which
5125 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5127 * intrinsic.c (sort_actual): Keep track of type of missing
5128 arguments. (Missing from previous commit.)
5130 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5132 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
5133 * interface.c (compare_actual_formal): Keep type of omitted
5135 * trans-expr.c (gfc_conv_function_call): Add string length
5136 argument for omitted string argument.
5138 2004-06-03 Paul Brook <paul@codesourcery.com>
5140 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
5141 lists instead of compound expr chains.
5142 (gfc_trans_code): Annotate statement lists.
5144 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5146 * trans-array.c: Fix spelling in comments.
5148 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5151 * data.c (assign_substring_data_value): New function.
5152 (gfc_assign_data_value): Call the new function if we're dealing
5153 with a substring LHS.
5155 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5158 * gfortran.h (GFC_VERSION): Remove.
5159 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
5162 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5164 * trans-types.c: Fix spelling & layout in comments.
5166 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5169 * trans-const.c (gfc_conv_string_init): Allow variable string
5170 length lower than initialization string length.
5172 2004-05-30 Paul Brook <paul@codesourcery.com>
5175 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
5176 * trans-expr.c (gfc_trans_string_copy): New function.
5177 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
5179 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
5180 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
5181 * trans.h (struct gfc_saved_var): Define.
5182 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
5184 2004-05-30 Steven G. Kargl <kargls@comcast.net>
5186 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
5188 2004-05-29 Steven G. Kargl <kargls@comcast.net>
5190 * simplify.c (gfc_simplify_log): Remove useless line of code.
5192 2004-05-29 Paul Brook <paul@codesourcery.com>
5194 * trans-common.c (find_equivalence): Find multiple rules.
5196 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5198 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
5199 (gfc_current_locus): Declare new global variable.
5200 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
5201 (gfc_current_locus1): Rename ...
5202 (gfc_current_locus): ... to this.
5203 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
5204 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
5205 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
5206 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
5207 and gfc_current_locus(), respectively.
5208 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
5209 match_array_cons_element, gfc_match_array_constructor):
5210 Read/modify gfc_current_locus instead of calling gfc_set_locus()
5211 and gfc_current_locus().
5212 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
5213 match_attr_spec, gfc_match_function_decl, gfc_match_end,
5214 attr_decl1, gfc_match_save): Likewise.
5215 * error.c (error_print, gfc_internal_error): Likewise.
5216 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
5217 * interface.c (gfc_add_interface): Likewise.
5218 * io.c (gfc_match_format, match_dt_format, match_dt_element,
5219 match_io_iterator, match_io): Likewise.
5220 * match.c (gfc_match_space, gfc_match_eos,
5221 gfc_match_small_literal_int, gfc_match_st_label,
5222 gfc_match_strings, gfc_match_name, gfc_match_iterator,
5223 gfc_match_char, gfc_match, gfc_match_assignment,
5224 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
5225 gfc_match_nullify, gfc_match_call, match_implicit_range,
5226 gfc_match_implicit, gfc_match_data, match_case_selector,
5227 gfc_match_case, match_forall_iterator): Likewise.
5228 * matchexp.c (gfc_match_defined_op_name, next_operator,
5229 match_level_1, match_mult_operand, match_ext_mult_operand,
5230 match_add_operand, match_ext_add_operand, match_level_2,
5231 match_level_3, match_level_4, match_and_operand, match_or_operand,
5232 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
5233 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
5234 * parse.c (match_word, decode_statement, next_free, next_fixed,
5235 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
5237 * primary.c (match_digits, match_integer_constant,
5238 match_boz_constant, match_real_constant, match_substring,
5239 next_string_char, match_charkind_name, match_string_constant,
5240 match_logical_constant, match_const_complex_part,
5241 match_complex_constant, match_actual_arg, match_keyword_arg,
5242 gfc_match_actual_arglist, gfc_match_structure_constructor,
5243 gfc_match_rvalue, gfc_match_variable): Likewise.
5244 * st.c (gfc_get_code): Likewise.
5245 * symbol.c (check_conflict, check_used, check_done,
5246 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
5247 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
5248 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
5250 2004-05-26 Roger Sayle <roger@eyesopen.com>
5252 * io.c (format_asterisk): Silence compiler warnings by correcting
5253 the number of elements of a "locus" initializer.
5255 2004-05-25 Roger Sayle <roger@eyesopen.com>
5258 * matchexp.c: Allow unary operators after arithmetic operators
5260 (match_ext_mult_operand, match_ext_add_operand): New functions.
5261 (match_mult_operand): Tweak to call match_ext_mult_operand.
5262 (match_add_operand): Tweak to call match_ext_mult_operand.
5263 (match_level_2): Rearrange to call match_ext_add_operand.
5265 2004-05-25 Paul Brook <paul@codesourcery.com>
5267 * expr.c (check_inquiry): Remove bogus tests.
5269 2004-05-23 Paul Brook <paul@codesourcery.com>
5272 * expr.c (restricted_args): Remove redundant checks/argument.
5273 (external_spec_function): Update to match.
5274 (restricted_intrinsic): Rewrite.
5276 2004-05-23 Paul Brook <paul@codesourcery.com>
5277 Victor Leikehman <lei@haifasphere.co.il>
5279 * gfortran.h (struct gfc_symbol): Add equiv_built.
5280 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
5282 (current_length): Remove.
5283 (add_segments): New function.
5284 (build_equiv_decl): Create initialized common blocks.
5285 (build_common_decl): Always add decl to bindings.
5286 (create_common): Create initializers.
5287 (find_segment_info): Reformat to match coding conventions.
5288 (new_condition): Use add_segments.
5289 (add_condition, find_equivalence, add_equivalences): Move iteration
5290 inside functions. Only process each segment once.
5291 (new_segment, finish_equivalences, translate_common): Simplify.
5293 2004-05-23 Steven G. Kargl <kargls@comcast.net>
5295 * check.c (gfc_check_random_seed): Issue for too many arguments.
5297 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5299 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
5301 2004-05-22 Paul Brook <paul@codesourcery.com>
5303 * dump-parse-tree.c (gfc_show_equiv): New function.
5304 (gfc_show_namespace): Use it.
5306 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
5309 * symbol.c (gfc_add_common): Disable checks to work around other more
5310 fundamental inadequacies.
5312 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5314 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
5316 (gfc_build_function_decl): Likewise.
5318 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5320 * check.c (gfc_check_system_clock): New function.
5321 * intrinsic.c (add_sym_3s): New function.
5322 (add_subroutines): Use it.
5323 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
5325 * iresolve.c (gfc_resolve_system_clock): New function.
5327 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5329 * invoke.texi: Document -Wunderflow and spell check.
5330 * lang.opt: Add Wunderflow.
5331 * gfortran.h (gfc_option_t): Add warn_underflow option.
5332 * options.c (gfc_init_options, set_Wall): Use it.
5333 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
5334 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
5335 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
5336 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
5337 * arith.c (common_logarithm): Fix typo in comment.
5339 2004-05-21 Roger Sayle <roger@eyesopen.com>
5341 * io.c (check_format): As a GNU extension, allow the comma after a
5342 string literal to be optional in a format. Use gfc_notify_std to
5343 issue an error/warning as appropriate.
5345 2004-05-21 Roger Sayle <roger@eyesopen.com>
5347 * io.c (check_format): Use gfc_notify_std to determine whether to
5348 issue an error/warning for omitting the digits from the X format.
5350 2004-05-20 Roger Sayle <roger@eyesopen.com>
5352 * io.c (check_format): Allow the number before the X format to
5353 be optional when not -pedantic.
5355 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5356 Paul Brook <paul@codesourcery.com>
5358 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5359 Create decls for __builtin_pow{,f}.
5360 * gfortran.h (PREFIX_LEN): Define.
5361 * trans-decl.c (gfor_fndecl_math_powi): Add.
5362 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5363 (gfc_build_intrinsic_function_decls): Create decls for powi.
5364 * trans-expr.c (powi_table): Add.
5365 (gfc_conv_integer_power): Remove.
5366 (gfc_conv_powi): New function.
5367 (gfc_conv_cst_int_power): New function.
5368 (gfc_conv_power_op): Use new powi routines.
5369 * trans.h (struct gfc_powdecl_list): Add.
5370 (gfor_fndecl_math_powi): Add.
5371 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5373 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5375 * trans.c, trans-decl.c: Fix comment typos.
5377 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5379 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5381 2004-05-18 Steve Kargl <kargls@comcast.net>
5383 * arith.c (gfc_int2complex): Fix incorrect range checking.
5385 2004-05-18 Paul Brook <paul@codesourcery.com>
5388 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5389 (default_initializer): Move to expr.c.
5390 (variable_decl): Don't assign default initializer to variables.
5391 * expr.c (gfc_default_initializer): Move to here.
5392 * gfortran.h (gfc_default_initializer): Add prototype.
5393 * resolve.c (resolve_symbol): Check for illegal initializers.
5394 Assign default initializer.
5396 2004-05-17 Steve Kargl <kargls@comcast.net>
5398 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5400 2004-05-17 Steve Kargl <kargls@comcast.net>
5402 * arith.c (gfc_real2complex): Range checking wrong part of complex
5405 2004-05-16 Paul Brook <paul@codesourcery.com>
5407 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5409 2004-05-16 Paul Brook <paul@codesourcery.com>
5411 * arith.c (gfc_range_check): Fix logic error.
5413 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5415 * arith.c: Fix comment typos.
5417 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5420 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5421 not initialized in a disallowed fashion.
5422 * match.c (gfc_match_common): Likewise.
5423 (var_element): Verify that variable is not in the blank COMMON,
5424 if it is in a common.
5426 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5428 * Make-lang.in (f95.generated-manpages): Remove.
5429 (f95.srcextra): New.
5430 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5431 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5434 (f95.install-info): Remove.
5435 (install-info): New.
5437 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5439 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5441 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5443 * primary.c (match_boz_constant): Use gfc_notify_std() for
5444 issuing a warning or an error.
5446 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5449 * primary.c (match_structure_constructor): Rename ...
5450 (gfc_match_structure_constructor): ... to this. Make non-static.
5451 (gfc_match_rvalue): Call renamed function.
5452 * match.h (gfc_match_structure_constructor): Declare.
5453 * match.c (gfc_match_data_constant): Handle structure
5456 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5460 * gfortran.h (gfc_linebuf): New typedef.
5462 (gfc_file): Revamped, use new gfc_linebuf.
5463 (locus): Revamped, use new types.
5464 (gfc_current_file): Remove.
5465 (gfc_current_form, gfc_source_file): New global variables.
5466 * match.c (gfc_match_space, gfc_match_strings): Use
5467 gfc_current_form to find source form.
5468 * module.c (gfc_dump_module): Use gfc_source_file when printing
5470 * error.c (show_locus, show_loci) Use new data structures to print
5472 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5474 (file_head, current_file, gfc_current_form, line_head, line_tail,
5475 gfc_current_locus1, gfc_source_file): New global variables.
5476 (gfc_scanner_init1): Set new global variables.
5477 (gfc_scanner_done1): Free new data structures.
5478 (gfc_current_locus): Return pointer to gfc_current_locus1.
5479 (gfc_set_locus): Set gfc_current_locus1.
5480 (gfc_at_eof): Set new variables.
5481 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5482 to new locus structure.
5483 (gfc_check_include): Remove.
5484 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5485 (gfc_skip_comments): Use gfc_current_form, find locus with
5487 (gfc_next_char): Use gfc_current_form.
5488 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5489 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5491 (get_file): New function.
5492 (preprocessor_line, include_line): New functions.
5493 (load_file): Move down, rewrite to match new data structures.
5494 (gfc_new_file): Rewrite to match new data structures.
5495 * parse.c (next_statement): Remove code which is now useless. Use
5496 gfc_source_form and gfc_source_file where appropriate.
5497 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5498 when determining locus of frontend code.
5499 * trans-io.c (set_error_locus): Same.
5500 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5501 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5503 (all): Add missing initializers.
5505 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5507 * Make-lang.in (trans-common.o): Remove redundant dependency.
5508 (data.c): Replace object file name ...
5509 (data.o): ... by the correct one.
5511 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5513 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5514 for ranges when dumping array references.
5516 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5518 * decl.c (variable_decl): Always apply default initializer.
5520 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5523 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5524 handle zero correctly.
5526 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5528 * match.c (gfc_match): Eliminate dead code.
5530 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5532 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5533 Detect bad continuation line in fixed form sources.
5535 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5538 * iresolve.c (gfc_resolve_nearest): Add new function.
5539 * intrinsic.h: ... declare it here.
5540 * intrinsic.c (add_functions): ... add it as resolving function
5543 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5546 * match.c (gfc_match_do): Allow infinite loops with
5547 label-do-stmt. Do not enforce space after comma.
5549 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5552 * parse.c (parse_interface): Allow empty INTERFACE, remove
5555 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5557 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5558 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5559 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5560 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5561 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5562 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5563 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5564 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5565 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5566 trans-types.h, trans.c, trans.h: Update copyright years and
5568 * data.c: Likewise, also removed two whitespace-only lines.
5569 * gfortranspec.c, lang.opt: Update copyright years.
5571 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5574 * trans-decl.c (generate_local_decl): Don't warn for unused
5575 variables which are in common blocks.
5577 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5579 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5580 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5581 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5583 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5586 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5588 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5590 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5591 Remove "set DEVELOPMENT".
5592 (Compiling GFORTRAN): Remove.
5594 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5596 * array.c (match_subscript, match_array_ref): Add comments
5597 explaining argument 'init'.
5598 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5599 trans-expr.c, trans.c: Fix some typos in comments.
5600 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5601 * primary.c (match_digits, match_integer_constant): Add comment
5602 explaining signflag.
5604 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5607 * primary.c: Include system.h and flags.h, needed for pedantic.
5608 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5611 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5614 * match.c (match_data_constant): Handle case where
5615 gfc_find_symbol sets sym to NULL
5617 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5619 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5620 dependency on mathbuiltins.def
5622 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5624 * trans-io.c (transfer_expr): Implemented recursive printing
5627 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5629 * gfortranspec.c: Do not include multilib.h.
5631 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5633 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5634 2004 to copyright years.
5635 * trans-expr.c, trans-decl.c: Comment update, we now generate
5636 GENERIC, not SIMPLE. Add 2004 to copyright years.
5638 2004-04-24 Paul Brook <paul@codesourcery.com>
5640 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5642 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5645 * arith.c (gfc_arith_divide): Fix complex divide.
5647 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5649 * gfortranspec.c: Include the target headers.
5651 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5655 * arith.c (arctangent2): New function.
5656 * arith.h (arctangent2): Add function prototype.
5657 * simplify.c (gfc_simplify_atan2): Use it.
5658 (gfc_simplify_log): Use it.
5660 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5662 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5663 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5665 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5668 * trans-io.c (build_dt): Change REC to value.
5670 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5673 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5674 the real value when converting mpf to string.
5676 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5679 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5682 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5685 * simplify.c (simplify_min_max): Convert the type of the result.
5687 2004-04-11 Paul Brook <paul@codesourcery.com>
5689 * gfortran.texi: Use full target triplet.
5691 2004-04-11 Paul Brook <paul@codesourcery.com>
5693 * Make-lang.in (GFORTRAN_TEXI): Set it.
5694 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5695 (fortran/gfortran.info): Ditto.
5696 * gfortran.texi: Major update.
5697 * invoke.texi: New file.
5699 2004-04-10 Paul Brook <paul@codesourcery.com>
5701 * trans-array.c (gfc_trans_allocate_temp_array,
5702 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5703 * trans-decl.c (gfc_build_dummy_array_decl,
5704 gfc_get_symbol_decl, gfc_build_function_decl,
5705 gfc_create_module_variable): Ditto.
5706 * trans-expr.c (gfc_conv_variable): Ditto.
5707 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5708 * trans.h (GFC_DECL_STRING): Remove.
5709 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5710 GFC_DECL_ASSIGN): Renumber flags.
5712 2004-04-05 Paul Brook <paul@codesourcery.com>
5716 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5718 * gfortran.h (struct gfc_charlen): Add backend_decl.
5719 * trans-array.c (gfc_trans_allocate_temp_array,
5720 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5721 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5722 Remove old, broken string handling.
5723 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5724 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5725 gfc_trans_deferred_array): Handle character arrays.
5726 * trans-const.c (gfc_conv_const_charlen): New function.
5727 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5728 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5730 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5731 (gfc_create_string_length): New function.
5732 (gfc_get_symbol_decl): Create lengths for character variables.
5733 (gfc_get_fake_result_decl): Ditto.
5734 (gfc_build_function_decl): Only set length for assumed length
5735 character arguments.
5736 (gfc_trans_dummy_character): New function.
5737 (gfc_trans_auto_character_variable): Rewrite.
5738 (gfc_trans_deferred_vars): Handle more types of character variable.
5739 (gfc_create_module_variable): String lengths have moved.
5740 (gfc_generate_function_code): Initialize deferred var chain earlier.
5741 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5742 (gfc_trans_init_string_length): ... to this.
5743 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5744 gfc_conv_function_call): Update to new format for character variables.
5745 (gfc_conv_string_length): Remove.
5746 (gfc_conv_string_parameter): Update assertion.
5747 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5748 * trans-io.c (set_string): Use new macro names.
5749 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5750 * trans-types.c (gfc_get_character_type): Use existing length expr.
5751 (gfc_is_nodesc_array): Make public.
5752 (gfc_get_dtype_cst): Rename ...
5753 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5754 (gfc_get_nodesc_array_type): Use new name.
5755 (gfc_sym_type): New character variable code.
5756 (gfc_get_derived_type): Ditto.
5757 (gfc_get_function_type): Evaluate character variable lengths.
5758 * trans-types.h (gfc_strlen_kind): Define.
5759 (gfc_is_nodesc_array): Add prototype.
5760 * trans.h: Update prototypes.
5761 (struct lang_type): Update comments.
5762 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5763 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5765 2004-04-04 Paul Brook <paul@codesourcery.com>
5767 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5768 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5769 * trans-expr.c (gfc_conv_function_call): Ditto.
5770 * trans-types.c (gfc_is_nodesc_array): Ditto
5771 * lang.opt (fg77-calls): Remove.
5773 2004-04-04 Paul Brook <paul@codesourcery.com>
5775 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5776 (gfc_conv_descriptor_base): Rename ...
5777 (gfc_conv_descriptor_offset): ... to this.
5778 (gfc_trans_allocate_array_storage): Set offset to zero.
5779 (gfc_conv_array_base): Rename ...
5780 (gfc_conv_array_offset): ... to this.
5781 (gfc_conv_array_index_ref): Add offset parameter.
5782 (gfc_conv_array_ref): Include offset.
5783 (gfc_trans_preloop_setup): Use existing offset.
5784 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5785 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5786 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5787 gfc_conf_ss_descriptor): Set offset.
5788 * trans-array.h: Rename prototypes.
5789 * trans-const.h (gfc_index_zero_node): Define.
5790 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5791 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5792 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5794 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5796 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5798 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5801 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5802 before conversion by gmp library call.
5804 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5807 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5809 2004-02-24 Richard Henderson <rth@redhat.com>
5811 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5813 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5815 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5816 (fortran/gfortran.info): ... to here.
5819 2004-02-16 Richard Henderson <rth@redhat.com>
5821 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5822 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5823 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5824 (gfc_expand_function): Rename from expand_function_body, make static,
5825 don't do anything except invoke tree_rest_of_compilation.
5826 (gfc_be_parse_file): Invoke cgraph.
5827 (gfc_expand_decl): Remove.
5828 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5829 __builtin_adjust_trampoline.
5830 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5831 (gfc_finalize): New.
5832 (gfc_generate_function_code): Use it. Lower nested functions.
5833 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5835 * trans.c (gfc_build_function_call): Likewise.
5836 * trans.h (expand_function_body): Remove.
5838 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5841 * trans-decl.c (gfc_build_function_decl) For functions
5842 returning CHARACTER pass an extra length argument,
5843 following g77 calling conventions.
5844 * trans-types.c (gfc_get_function_type) Ditto.
5845 * trans-expr.c (gfc_conv_function_call) Ditto.
5847 2004-02-14 Paul Brook <paul@codesourcery.com>
5849 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5851 2004-02-12 Paul Brook <paul@nowt.org>
5855 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5857 * gfortran.texi: Fix typos.
5859 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5862 * intrinsic.c (add_conversions) Use logical conversion instead
5864 * trans-types.c (gfc_get_logical_type) implemented logical*1
5867 2004-01-17 Paul Brook <paul@codesourcery.com>
5869 * lang-specs.h: Remove %<fixed-form.
5871 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5873 * lang-specs.h: Enable preprocessing of source files
5874 ending in .F, .fpp, .FPP, .F90 and .F95.
5876 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5879 * lang-specs.h: Enable compilation of files ending
5880 in .f, .for and .FOR.
5882 2004-01-11 Paul Brook <paul@codesourcery.com>
5884 * trans-stmt.c (gfc_trans_if_1): New function.
5885 (gfc_trans_if): Use it.
5887 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5889 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5890 (gfc_option_t): Add max_identifier_length.
5891 * lang.opt: Add fmax-identifier-length.
5892 * match.c (parse_name): Use limit.
5893 * options.c (gfc_init_options): Set max_identifier_length.
5894 (gfc_handle_option): Ditto.
5896 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5898 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5899 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5900 * iresolve.c (gfc_resolve_dcmplx): New function.
5902 2004-01-10 Paul Brook <paul@codesourcery.com>
5904 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5905 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5906 (gfc_return_by_reference): Correct condition.
5907 (gfc_get_function_type): Ditto.
5909 2004-01-10 Paul Brook <paul@codesourcery.com>
5911 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5914 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5916 * iresolve.c: Use correct kind.
5918 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5921 * trans-decl.c (gfc_create_module_variable): Output array valued
5924 2004-01-10 Paul Brook <paul@codesourcery.com>
5926 * resolve.c (resolve_branch): Get error message right way round.
5928 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5930 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5932 (gfc_array_allocate): Don't count size of element twice.
5934 2004-01-04 Paul Brook <paul@codesourcery.com>
5936 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5938 2004-01-04 Paul Brook <paul@codesourcery.com>
5940 * error.c (gfc_notify_std): New function.
5941 * gfortran.h (gfc_notify_std): Declare.
5942 (GFC_STD_*): Define.
5943 (gfc_option_t): Add warn_std and allow_std.
5944 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5945 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5946 * check.c (check_rest): Use gfc_notify_std.
5947 * match.c (gfc_match_pause): Ditto.
5948 (gfc_match_assign): Ditto.
5949 (gfc_match_goto): Ditto.
5950 * resolve.c (resolve_branch): Ditto.
5951 * lang.opt: Add std=<foo> and w.
5952 * options.c (gfc_init_options): Set allow_std and warn_std.
5953 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5955 2004-01-01 Paul Brook <paul@codesourcery.com>
5957 * array.c (gfc_append_constructor): Take constructor, not expression.
5958 * data.c (struct gfc_expr_stack): Remove.
5959 (expr_stack): Remove.
5960 (find_con_by_offset): Rename from find_expr_in_con.
5961 (find_con_by_component): Rename from find_component_in_con.
5962 (gfc_get_expr_stack): Remove.
5963 (gfc_assign_data_value): Rewrite.
5964 (gfc_expr_push): Remove.
5965 (gfc_expr_pop): Remove.
5966 (gfc_advance_section): Rename from
5967 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5968 (gfc_get_section_index): Handle unbounded sections.
5969 * gfortran.h: Update prototypes.
5970 * resolve.c (check_data_variable): Array section maight not be the
5973 2004-01-01 Paul Brook <paul@codesourcery.com>
5976 * resolve.c (resolve_symbol): Allow assumed length function results.
5978 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5980 * match.c (gfc_match_pause): Fix spelling.
5982 2004-01-01 Steven Bosscher <stevenb@suse.de>
5985 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5986 reference from the expression.
5988 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5990 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5992 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5993 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5994 (symbol_attribute):New variable attribute: assign.
5995 * io.c (resolve_tag):Integer variable is allowed.
5996 (match_dt_format): Add ASSIGN statement. Set assign flag.
5997 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5998 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5999 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
6000 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
6001 (next_statement): Add ST_LABEL_ASSIGNMENT.
6002 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
6003 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
6004 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
6005 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
6006 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
6007 assign. Put them into the stuct lang_decl.
6008 * trans-io.c (set_string): Add the assign statement.
6009 * trans-stmt.c (gfc_trans_label_assign): New function.
6010 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
6011 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
6012 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
6013 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
6014 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
6015 (GFC_DECL_ASSIGN(node)): New macro to access flag.
6017 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
6020 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
6023 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
6025 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
6026 that arguments to subroutines/functions can't alias themselves, nor global
6029 2003-12-20 Steven Bosscher <stevenb@suse.de>
6031 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
6032 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
6034 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
6036 * primary.c (match_substring): Fix substring bug for start point
6037 or end point is NULL.
6038 * trans-expr.c (gfc_conv_substring): Ditto
6039 * trans-types.c (gfc_sym_type): Get correct type of scalar
6040 character variables.
6041 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
6044 2003-12-10 Richard Henderson <rth@redhat.com>
6046 * options.c (gfc_post_options): Don't ever use rtl inlining.
6048 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
6050 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
6051 * trans-equivalence.c: Remove.
6052 * trans-decl.c (gfc_get_symbol_decl): Update to match.
6053 (gfc_generate_function_code): Ditto.
6054 * trans-array.c (gfc_conv_array_parameter): Ditto.
6055 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
6056 (F95_ADDITIONAL_OBJS): Add stor-layout.o
6057 * trans.h (gfc_trans_equivalence): Remove.
6058 * gfortran.h (struct gfc_equiv): Add used field.
6059 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
6060 equiv_offset fields.
6062 2003-12-05 Richard Henderson <rth@redhat.com>
6064 * trans.c (gfc_build_addr_expr): New.
6065 (gfc_build_indirect_ref, gfc_build_array_ref): New.
6066 * trans.h: Declare them.
6067 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
6068 trans-stmt.c, trans.c (*): Use them.
6070 * f95-lang.c (gfc_post_options): Remove dead prototype.
6071 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
6072 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
6075 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
6077 * io.c (gfc_match_format): Check for missing format label.
6079 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
6082 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
6083 from interfaces in modules.
6085 2003-11-30 Paul Brook <paul@nowt.org>
6087 * trans-array.c (gfc_trans_g77_array): Make non-static.
6088 (gfc_trans_assumed_size): Remove.
6089 (gfc_trans_dummy_array_bias): Explicitly free temporary.
6090 * trans-array.h (gfc_trans_g77_array): Add prototype.
6091 (gfc_trans_assumed_size): Remove.
6092 * trans-decls.c (gfor_fndecl_push_context): Remove.
6093 (gfor_fndecl_pop_context): Remove.
6094 (gfc_build_function)decls): Don't create them.
6095 (gfc_trans_deferred_vars): Update to match. Remove dead code.
6096 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
6098 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
6100 * trans-array.c (gfc_conv_array_parameter): Simplify
6101 array argument passing for array name actual argument.
6102 * trans-expr.c (gfc_conv_function_call): Ditto
6103 * trans-types.c (gfc_is_nodesc_array):Ditto.
6105 2003-11-30 Paul Brook <paul@nowt.org>
6107 * f95-lang.c (gfc_post_options): Move ...
6108 * options.c (gfc_post_options): .. to here. Handle inlining options.
6109 * gfortran.h (gfc_post_options): Add prototype.
6111 2003-11-28 Richard Henderson <rth@redhat.com>
6113 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
6115 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
6117 * trans.h (has_alternate_specifier): New global variable.
6118 * match.c (gfc_match_call): Handle actual arguments associated with
6119 alternate return indicators.
6120 * trans-expr.c (gfc_conv_function_call): Ditto
6121 * trans-stmt.c (gfc_trans_call): Ditto
6122 (gfc_trans_return): Handle return statement with value.
6123 * trans-decl.c (gfc_generate_function_code): Handle functions with
6125 (gfc_get_fake_result_decl): Ditto
6126 * trans-types.c (gfc_get_function_type): Ditto
6127 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
6128 (resolve_formal_arglist): Check asterisk dummy.
6130 2003-11-27 Paul Brook <paul@nowt.org>
6132 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
6133 allocation interface.
6134 (gfc_conv_ array_parameter): Ditto.
6135 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
6136 * trans-array.c: Update prototype.
6137 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
6138 (gfc_trans_auto_character_variable): Use new memory alloc interface.
6139 * trans-expr.c (gfc_conv_string_tmp): Ditto.
6140 (gfc_conv_function_call): Use gfc_conv_string_tmp.
6141 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
6142 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
6143 * trans.h (gfc_ss_info): Remove unused pdata field.
6144 * trans.c (gfc_create_var_np): Change T to V.
6146 2003-11-26 Richard Henderson <rth@redhat.com>
6148 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
6149 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
6150 FRACTION, NEAREST, SET_EXPONENT.
6151 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
6152 Fix GTY marking. Remove unnecessary const's.
6153 (LIBM_FUNCTION): Rename from I_LIB.
6154 (LIBF_FUNCTION): New.
6155 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
6156 conventions. Assume the expr signature is correct. Mark const.
6157 (gfc_conv_intrinsic_exponent): Use library functions.
6158 (gfc_conv_intrinsic_set_exponent): Remove.
6159 (gfc_conv_intrinsic_scale): Remove.
6160 (gfc_conv_intrinsic_nearest): Remove.
6161 (gfc_conv_intrinsic_fraction): Remove.
6162 (gfc_conv_intrinsic_function): Update.
6163 * trans-decl.c (gfor_fndecl_math_exponent4): New.
6164 (gfor_fndecl_math_exponent8): New.
6165 (gfc_build_intrinsic_function_decls): Set them.
6166 * trans.h: Declare them.
6168 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
6170 * trans-common.c (gfc_layout_global_equiv): Locate the error for
6171 underflow COMMON block.
6172 (gfc_trans_one_common): Fix bug for size of COMMON block containing
6173 EQUIVALENCE object. Also fix typo in an error message.
6175 2003-11-25 Diego Novillo <dnovillo@redhat.com>
6177 * Make-lang.in: Add check-gfortran to lang_checks.
6178 (check-f95): Alias for check-gfortran.
6180 2003-11-25 Jason Merrill <jason@redhat.com>
6182 * Make-lang.in (f95.tags): Create TAGS.sub files in each
6183 directory and TAGS files that include them for each front end.
6185 2003-11-24 Paul Brook <paul@nowt.org>
6188 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
6190 2003-11-24 Paul Brook <paul@nowt.org>
6192 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
6194 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
6196 2003-11-24 Paul Brook <paul@nowt.org>
6199 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
6200 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
6202 2003-11-20 Richard Henderson <rth@redhat.com>
6204 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
6205 (gfc_conv_array_base): Likewise.
6206 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
6207 * trans-expr.c (gfc_conv_string_tmp): Likewise.
6208 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
6209 * trans-stmt.c (gfc_trans_character_select): Likewise.
6211 2003-11-13 Paul Brook <paul@nowt.org>
6213 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
6215 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
6217 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
6218 (resolve_equivalence): New function.
6219 (resolve_equivalence_derived): New function.
6221 2003-11-12 Richard Henderson <rth@redhat.com>
6223 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
6224 annotate_all_with_locus.
6226 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
6228 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
6229 * trans-decl.c (gfc_finish_var_decl): Modified.
6231 2003-11-08 Paul Brook <paul@nowt.org>
6234 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
6237 2003-11-06 Paul Brook <paul@nowt.org>
6239 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
6241 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
6243 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
6245 2003-10-27 Anthony Green <green@redhat.com>
6247 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
6248 (f95.stagefeedback): Ditto.
6250 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
6253 * Make-lang.in (f95.stageprofile): Add.
6254 (f95.stagefeedback): Add.
6256 2003-10-23 Richard Henderson <rth@redhat.com>
6258 * f96-lang.c (gfc_gimplify_expr): Remove.
6259 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
6260 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
6262 2003-10-23 Richard Henderson <rth@redhat.com>
6264 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
6266 2003-10-20 Paul Brook <paul@nowt.org>
6268 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
6269 * trans-stmt.c (gfc_trans_do_while): Ditto.
6271 2003-10-17 Paul Brook <paul@nowt.org>
6273 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
6275 2003-10-17 Paul Brook <paul@nowt.org>
6277 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
6279 2003-10-17 Feng Wang <wf_cs@yahoo.com>
6281 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
6282 (gfc_resolve_minloc): Ditto.
6283 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
6284 Return the value after subtracting the lower bound.
6286 2003-10-16 Richard Henderson <rth@redhat.com>
6288 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
6290 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
6292 * lang.c: Remove -M option for now, it's in the way for C.
6294 2003-10-14 Jason Merrill <jason@redhat.com>
6296 * Make-lang.in (f95.tags): New rule.
6298 2003-10-13 Richard Henderson <rth@redhat.com>
6300 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
6302 2003-10-13 Paul Brook <paul@nowt.org>
6304 * trans-decl.c (generate_local_decl): Don't create junk variables.
6306 2003-10-13 Paul Brook <paul@nowt.org>
6308 * resolve.c (resolve_formal_arglist): Use function result decl in
6309 preference to function decl.
6311 2003-10-12 Richard Henderson <rth@redhat.com>
6313 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
6314 TREE_READONLY. Update all callers.
6316 2003-10-12 Feng Wang <wf_cs@yahoo.com>
6318 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
6319 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
6320 (gfc_is_intrinsic_libcall): Add CSHIFT.
6322 2003-10-12 Richard Henderson <rth@redhat.com>
6324 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
6325 (gfc_trans_array_constructor_value): Likewise.
6326 (gfc_conv_array_initializer): Likewise.
6327 * trans-stmt.c (gfc_trans_character_select): Likewise.
6329 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
6331 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
6333 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6335 * check.c (gfc_check_repeat): Check arguments are scalar.
6336 (gfc_check_trim): New function.
6337 * intrinsic.h (gfc_check_trim): Add prototype.
6338 * intrinsic.c (add_functions): Use it.
6339 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
6341 * trans-decl.c: Ditto.
6342 (gfc_build_intrinsic_fucntion_decls): Set them.
6343 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
6344 (gfc_conv_intrinsic_trim): New function.
6345 (gfc_conv_intrinsic_repeat): New function.
6346 (gfc_conv_intrinsic_function): Use them.
6348 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6350 * trans-types.c (gfc_sym_type): Handle result variables.
6352 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6354 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6355 gfc_get_character_type.
6357 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6359 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6361 2003-10-11 Paul Brook <paul@nowt.org>
6363 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6364 (gfc_resolve_dprod): New function.
6365 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6366 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6367 (gfc_resolve_dprod): Declare.
6368 * intrinsic.c (add_functions): Use them.
6369 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6371 2003-10-06 Richard Henderson <rth@redhat.com>
6373 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6374 * trans-intrinsic.c (call_builtin_clz): Use it.
6376 2003-10-05 Paul Brook <paul@nowt.org>
6378 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6379 * trans-decl.c (gfc_generate_function_code): Set
6380 cfun->function_end_locus.
6382 2003-09-24 Jason Merrill <jason@redhat.com>
6384 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6387 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6388 Paul Brook <paul@nowt.org>
6390 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6391 * array.c (gfc_inser_constructor): New function.
6392 (gfc_get_constructor): New function.
6393 (gfc_free_constructor): Initialize offset and repeat.
6394 (iterator_stack): Remove.
6395 (expand_info): Add offset, component and repeat fields.
6396 (expand_constructor): Set them.
6397 (expand): Set new fields.
6398 (gfc_copy_constructor): Ditto. Avoid recursion.
6399 * gfortran.h: Add prototypes for new functions.
6400 (gfc_constructor): Add offset, component and repeat.
6401 (iteratio_stack): Move to here.
6402 * resolve.c (check_data_variable): Convert data values into variable
6404 (traverse_data_list): Build implicit loop chain.
6405 (gfc_resolve): Ditto.
6406 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6407 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6408 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6409 (gfc_conv_expr): Update to match.
6410 * trans.h (gfc_conv_structure): Declare.
6413 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6415 * trans.h: Add declarations for gfor_fndecl_si_kind and
6416 gfor_fndecl_sr_kind.
6417 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6418 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6419 (g95_conv_intrinsic_sr_kind): New function.
6420 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6423 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6425 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6426 instead of _4 and _8 as postfix for libgfortran calls.
6428 2003-09-16 Paul Brook <paul@nowt.org>
6430 * array.c (compare_bounds): New function.
6431 (gfc_compare_array_spec): Use it.
6433 2003-09-14 Paul Brook <paul@nowt.org>
6435 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6436 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6438 2003-09-14 Paul Brook <paul@nowt.org>
6440 * check.c (dim_rank_check): Allow assumed bounds if requested.
6441 (gfc_check_lbound): Call it.
6442 (gfc_check_ubound): Ditto.
6443 (gfc_check_size): Change to match.
6444 * simplify.c (gfc_simplify_bound): New function.
6445 (gfc_simplify_lbound): New function.
6446 (gfc_simplify_ubound): New function.
6447 * intrinsic.h: Declare them.
6448 * intrinsic.c (add_functions): Use them.
6450 2003-09-14 Paul Brook <paul@nowt.org>
6452 * io.c (format_lex): Initialize negative_flag.
6453 (check_format): Intialize repeat.
6454 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6455 (gfc_new_var_expr): Ditto.
6457 2003-09-14 Paul Brook <paul@nowt.org>
6459 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6460 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6462 2003-09-12 Paul Brook <paul@nowt.org>
6464 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6466 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6468 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6469 for a correct expression.
6471 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6473 * trans-intrinsic.c (real_compnt_info): New struct.
6474 (prepare_arg_info): New function.
6475 (gfc_conv_intrinsic_set_exponent): New function.
6476 (gfc_conv_intrinsic_scale): New function.
6477 (gfc_conv_intrinsic_nearest): New function.
6478 (gfc_conv_intrinsic_fraction): New function.
6479 (gfc_conv_intrinsic_exponent): New function.
6480 (gfc_conv_intrinsic_spacing): New function.
6481 (gfc_conv_intrinsic_rrspacing): New function.
6482 (gfc_conv_intrinsic_function): Use them.
6484 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6486 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6487 build_int_2 changed from (high, low) to (low, high).
6488 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6489 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6490 iocall_set_nml_val_float, iocall_set_nml_val_char,
6491 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6492 (gfc_build_io_library_fndecls): Add variable initialization.
6493 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6494 (build_dt): Add namelist support.
6495 * io.c (value): New variable.
6496 (check_format): Support FMT_H now.
6498 2003-09-07 Paul Brook <paul@nowt.org>
6500 * io.c (gfc_resolve_dt): Error if format label is not defined.
6502 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6504 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6505 about case_switch's break. The other is about building the condition
6506 statement tree, which judges the argument in the range of the
6507 corresponding integer type.
6508 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6509 for the large values.
6511 2003-09-05 Paul Brook <paul@nowt.org>
6513 * f95-lang.c (expand_function_body): Gimplify the function.
6515 2003-09-04 Jeff Law <law@redhat.com>
6517 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6520 2003-09-04 Paul Brook <paul@nowt.org>
6522 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6523 (gfc_expand_stmt): New function.
6524 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6525 (expand_function_body): Use tree_rest_of_compilation.
6526 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6528 2003-09-03 Jeff Law <law@redhat.com>
6530 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6533 2003-08-30 Paul Brook <paul@nowt.org>
6535 * f95-lang.c (builtin_function): Remove #if 0 code.
6536 (gfc_define_builtin): New function.
6537 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6538 * mathbuiltins.def: New file.
6539 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6540 (gfc_intrinsic_map): Use mathbuiltins.def.
6541 (gfc_intrinsic_builtin_t): Remove.
6542 (gfc_build_intrinsic_lib_fndecls): Update.
6543 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6544 signed_size_type_node.
6546 2003-08-29 Paul Brook <paul@nowt.org>
6548 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6550 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6552 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6553 (gfc_conv_intrinsic_function): Add MODULO.
6555 2003-08-22 Jason Merrill <jason@redhat.com>
6557 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6559 2003-08-22 Andreas Jaeger <aj@suse.de>
6561 * Make-lang.in (f95.install-common): Add DESTDIR support.
6562 * (f95.install-info): Likewise.
6563 (f95.uninstall): Likewise.
6565 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6567 * trans-types.c (gfc_init_types): Initialize
6568 signed_size_type_node with size_type_node.
6570 2003-08-18 Paul Brook <paul@nowt.org>
6572 * dependency.c (gfc_dependency): New enum.
6573 (check_another_array_ref): Remove.
6574 (gfc_get_array_from_component): Remove.
6576 (get_range): Remove.
6577 (get_no_of_elements): Use mpz_t, not mpf_t.
6578 (transform_sections): New function.
6579 (gfc_check_range_range): Rename ...
6580 (gfc_check_section_vs_section): ... to this. Use new function.
6581 (gfc_is_inside_range): Rewrite to match.
6582 (gfc_check_element_vs_section): Ditto.
6583 (gfc_check_element_vs_element): Ditto.
6585 (gfc_dep_resolver): Ditto. Remove unused parameter.
6586 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6587 gfc_check_element_vs_element, gfc_is_inside_range,
6588 gfc_get_array_from_component): Remove prototypes for static functions.
6589 (gfc_dep_resolver): Update prototype.
6590 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6592 2003-08-15 Paul Brook <paul@nowt.org>
6594 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6595 return values to parent scope.
6596 (gfc_build_dummy_array_decl): Ditto.
6598 2003-08-14 Paul Brook <paul@nowt.org>
6600 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6601 size of the type, not the pointer.
6602 * resolve.c (resolve_symbol): Give more accurate error message.
6604 2003-08-10 Paul Brook <paul@nowt.org>
6606 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6608 2003-08-10 Paul Brook <paul@nowt.org>
6610 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6613 2003-08-10 Chun Huang <compiler@sohu.com>
6615 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6616 (resolve_symbol): Ditto.
6617 * trans-expr.c (gfc_conv_statement_function): New function.
6618 (gfc_conv_function_expr): Use it.
6620 2003-08-10 Paul Brook <paul@nowt.org>
6622 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6623 (walk_function_expr): Set section rank.
6624 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6626 2003-08-10 Paul Brook <paul@nowt.org>
6628 * intrinsic.c (add_sym): Prefix names with correct string.
6629 (add_sym_0s): New function.
6630 (add_subroutines): Register abort.
6632 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6634 * gfortran.h: Introduce options to control the mangling.
6635 * lang.opt: Likewise.
6636 * options.c (gfc_init_options): Handle the options.
6637 * trans-common.c (gfc_sym_mangled_common_id): New function.
6638 (gfc_build_common_decl): Call it.
6639 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6640 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6642 2003-08-09 Paul Brook <paul@nowt.org>
6644 * module.c (mio_symbol): Always ouput a namespace for formal args.
6645 (load_needed): Namespace now belong to their proper symbol.
6646 (gfc_dump_module): Change G95=>GFORTRAN.
6648 2003-08-05 Paul Brook <paul@nowt.org>
6650 * options.c: Force -fg77-calls.
6652 2003-08-02 Paul Brook <paul@nowt.org>
6654 * Makelang.in: Rename G95_* to GFORTRAN_*.
6655 * All sources: Rename G95_* to GFC_*.
6657 2003-08-01 Paul Brook <paul@nowt.org>
6659 * fortran/Make-lang.in: Use GMPLIBS.
6660 * fortran/config-lang.in: Set need_gmp.
6661 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6663 2003-07-27 Andreas Jaeger <aj@suse.de>
6665 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6667 * trans-const.c (gfc_init_constants): Likewise.
6668 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6670 * gfortranspec.c: Convert to ISO C90.
6671 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6673 2003-07-26 Paul Brook <paul@nowt.org>
6675 * lang.opt: Add -fdump-parse-tree.
6676 * options.c (gfc_handle_option): Ditto.
6677 * resolve.c (resolve_forall_iterators): Convert to proper type.
6678 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6680 2003-07-26 Paul Brook <paul@nowt.org>
6682 * Makefile.in: Add build dependencies on files common with rest of gcc.
6684 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6686 * trans.h: Declare g95_trans_pointer_assignment.
6687 * trans-expr.c (g95_trans_pointer_assignment): New function.
6688 (g95_trans_pointer_assign): Use it.
6689 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6690 (g95_trans_pointer_assign_need_temp): New function.
6692 2003-07-26 Paul Brook <paul@nowt.org>
6694 * gfortran.texi: Replace references to g95.
6696 2003-07-26 Paul Brook <paul@nowt.org>
6698 Rename g95_* to gfc_*.
6700 2003-07-25 Paul Brook <paul@nowt.org>
6702 * gfortran.h: Rename from g95.h.
6703 * trans-types.c (boolean_type_node, booelan_true_node,
6704 boolean_false_node): Remove.
6705 * trans-types.h: Ditto.
6707 2003-07-25 Chun Huang <compiler@sohu.com>
6709 * parse.c (accept_statement): Implement BLOCK DATA statement.
6710 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6713 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6715 * trans-stmt.c (temporary_list): Define.
6716 (g95_trans_assign_need_temp): New function.
6717 (g95_trans_forall_1): Modified for WHERE.
6718 (g95_trans_where_assign): Modified.
6719 (g95_trans_where_2): Modified.
6720 (g95_evaluate_where_mask): Modified.
6721 (g95_trans_where): Modified.
6722 (g95_get_temp_expr): Removed.
6723 (g95_add_to_where_stmt_list): Removed.
6724 (compute_overall_iter_number): Modified for WHERE.
6725 * trans.h: Remove where_stmt_list.
6727 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6729 * lang.opt: Correct description of options -J and -M.
6731 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6733 * lang.opt: Move help text to here.
6734 * lang-options.h: Remove.
6736 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6737 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6738 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6741 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6742 Paul Brook <paul@nowt.org>
6744 * check.c (check_rest): Use global pedantic flag.
6745 * io.c (data_desc): Ditto.
6746 * error.c (g95_warning, g95_warning_now): Use global flag.
6747 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6748 (expand_function_body): Update to new prototypes.
6749 (g95_init): Use new option names.
6750 * g95.h (g95_option_t): Standardize names.
6751 (g95_init_options, g95_handle_option): Update prototypes.
6752 * interface.c: Use new option names.
6759 * simplify.c: Ditto.
6761 * trans-array.c: Ditto.
6762 * trans-expr.c: Ditto.
6763 * trans-types.c: Ditto.
6764 * trans-decl.c: Ditto.
6765 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6767 * options.c (g95_display_help): Remove.
6768 (g95_init_options): Convert to new scheme.
6770 (g95module_option): Ditto, rename from g95_parse_arg.
6771 (g95_handle_module_path_options): New function.
6772 * trans-equivalence.c: Fix error message.
6773 * lang.opt: Corrections.
6775 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6777 * lang.opt: New file.
6779 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6781 * decl.c (match_attr_spec): Set colon_seen.
6783 2003-07-14 Paul Brook <paul@nowt.org>
6785 * trans-array.c: Update comment.
6786 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6787 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6788 minmaxloc,minmaxval): Ditto.
6789 * trans-io.c (g95_trans_transfer): Ditto.
6790 * trans-stmt.c: Remove unneeded prototypes.
6791 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6792 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6793 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6794 Don't share loopinfo.
6795 (compute_overall_iter_number): Declare as static.
6796 (allocate_temp_for_forall_nest): Ditto.
6797 (g95_trans_forall_1): Don't pass shared loopinfo.
6798 * trans.c (g95_start_block): Expand comment.
6800 2003-07-12 Paul Brook <paul@nowt.org>
6802 * arith.c (g95_index_integer_kind): Remove unused initializer.
6803 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6804 index by size of element.
6805 (generate_loop_for_rhs_to_temp): Ditto.
6806 (allocate_temp_for_forall_nest): Use element size, not index size.
6808 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6810 * arith.c (g95_index_integer_kind): Add a TODO.
6811 * simplify.c (g95_simplify_nearest): Add a TODO.
6813 2003-07-09 Chun Huang <compiler@sohu.com>
6815 * trans.h: Add declarations for gfor_fndecl_string_scan and
6816 gfor_fndecl_string_verify.
6817 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6818 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6819 (g95_conv_intrinsic_verify): New function.
6820 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6821 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6822 of parameter 'BACK=.TRUE.'
6824 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6826 * trans-stmt.c (iter_info, forall_info): Define.
6827 (g95_trans_forall_block): Remove.
6828 (g95_trans_forall_loop): Use forall info blocks.
6829 (g95_trans_nested_forall_loop): New function.
6830 (g95_do_allocate): Handle things other than logical masks.
6831 (generate_loop_for_temp_to_lhs): New function.
6832 (generate_loop_for_rsh_to_temp): New function.
6833 (compute_inner_temp_size): New function.
6834 (compute_overall_iter_number): New function.
6835 (allocate_temp_for_forall_nest): New function.
6836 (g95_trans_forall): Move body ...
6837 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6839 2003-07-02 Paul Brook <paul@nowt.org>
6841 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6842 in correct scope. Change callers to match.
6843 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6844 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6846 2003-07-02 Paul Brook <paul@nowt.org>
6848 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6849 expression shape for all expressions.
6850 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6852 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6854 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6855 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6857 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6858 * resolve.c (g95_resolve_index): Call it.
6860 2003-07-02 Paul Brook <paul@nowt.org>
6862 * iresolve.c (g95_resolve_reshape): Set expression shape.
6863 (g95_resolve_shape): Ditto.
6864 * simplify.c (g95_simplify_shape): Move common code outside condition.
6865 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6867 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6869 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6872 2003-06-29 Paul Brook <paul@nowt.org>
6874 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6875 * expr.c (find_array_element, find_component_ref): New functions.
6876 (remove_subobject_ref): New function.
6877 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6878 (simplify_ref_chain): New function.
6879 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6880 (g95_specification_expr): Simplify the expression.
6881 * resolve.c (resolve_operator): Check simplifications return code.
6882 (g95_resolve_expr): Ditto.
6884 2003-06-26 Paul Brook <paul@nowt.org>
6886 * expr.c (simplify_component_ref): New function.
6887 (g95_simplify_expr): Use it.
6888 * resolve.c (resolve_structure_cons): Handle references.
6890 2003-06-25 Paul Brook <paul@nowt.org>
6892 * trans-io.c (build_dt): Handle internal units.
6894 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6896 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6897 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6898 Use g95_array_index_type instead of integer_type_node.
6899 (g95_build_common_decl, g95_set_common_master_type): Use
6900 g95_character1_type_node instead of char_type_node.
6901 * trans-equivalence.c (g95_layout_local_equiv): As above.
6903 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6905 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6906 remove last remains of -fquiet.
6908 2003-06-22 Paul Brook <paul@nowt.org>
6910 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6911 (g95_resolve_expr): Ditto.
6912 (resolce_code): Mark as static.
6913 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6914 gimplifer doesn't (yet).
6916 2003-06-20 Paul Brook <paul@nowt.org>
6918 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6919 * match.c (g95_match_if): Add ST_PAUSE.
6920 (g95_match_stopcode): New function.
6921 (g95_match_pause, g95_match_stop): Use it.
6922 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6923 (decode_stmt, next_statement, parse_executable): Ditto.
6924 * resolve.c (resolve_code): Ditto.
6925 * st.c (g95_free_statement): Ditto.
6926 * trans-stmt.c (g95_trans_pause): New function.
6927 * trans-stmt.h: Declare it.
6928 * trans.c (g95_trans_code): Use it.
6929 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6931 (g95_build_builtin_function_decls): Initialize them.
6933 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6935 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6937 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6938 match_filepos): Fix error handling.
6940 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6942 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6943 Add assertions on arguments.
6944 * resolve.c (expression_shape): Remove useless &.
6945 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6946 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6947 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6948 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6949 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6950 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6951 (g95_simplify_not, g95_simplify_scale): Add assertions.
6953 2003-06-15 Paul Brook <paul@nowt.org>
6955 Clean up stuff to work with the ssa optimizers.
6956 * convert.c (convert): Handle BOOLEAN_TYPEs.
6957 * f95-lang.c (g95_truthvalue_conversion): Implement.
6958 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6960 * trans.h (g95_truthvalue_conversion): Declare.
6961 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6962 * trans-stmt.c (g95_trans_character_select): Don't create array
6963 assignments. Mark labels as indirect jump targets.
6964 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6965 (g95_get_dtype_cst): Handle LOGICAL types.
6967 2003-06-14 Paul Brook <paul@nowt.org>
6969 * f95-lang.c (g95_gimplify_expr): New function.
6970 * trans-array.c (g95_trans_array_constructor_value): Don't create
6972 (g95_conv_expr_descriptor): Rename simple->gimple.
6973 * trans-expr.c (conv_expr_op): Use proper logical operators.
6974 * trans-intrinsic.c (build_fixbound_expr): New function.
6975 (build_fix_expr): Ditto.
6976 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6977 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6979 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6981 * array.c (g95_compare_array_spec): Remove unreachable code.
6982 * expr.c (g95_copy_expr): Likewise.
6983 * intrinsic.c (g95_convert_type): Likewise.
6984 * misc.c (g95_code2string): Likewise.
6985 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6986 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6987 * trans-stmt.c (g95_trans_select): Likewise.
6988 * primary.c (extend_ref): Add an assertion.
6989 * simplify.c (g95_convert_constant): Add const.
6990 * intrinsic.h: Remove g95_check_x_ni.
6991 * f95-lang.c (g95_finish): Call g95_release_include_path.
6993 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6995 * resolve.c (resolve_contained_functions): Fix typo introduced on
6998 2003-06-09 Paul Brook <paul@nowt.org>
7000 * g95.h: Include system.h not hwint.h.
7001 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
7002 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
7004 2003-06-09 Paul Brook <paul@nowt.org>
7006 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
7007 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
7008 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
7009 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
7010 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
7012 * trans.h (g95_trans_equivalence, g95_trans_common,
7013 g95_add_decl_to_function): Declare.
7014 * trans-common.c, trans-equivalence.c: New files.
7016 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
7018 * intrinsic.c (g95_intrinsic_extension): Remove.
7019 (add_functions): Substitute g95_check_x for g95_check_x_ni
7021 (g95_init_expr_extensions): New function.
7022 (g95_intrinsic_func_interface): Use it.
7023 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
7024 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
7025 g95_check_precision, g95_check_present, g95_check_radix,
7026 g95_check_range, g95_check_selected_real_kind): Do not set
7027 g95_intrinsic_extension.
7028 (g95_check_x_ni): Remove now duplicate of g95_check_x.
7030 * expr.c (check_inquiry): Add FIXME, fixup some code style.
7032 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7034 * g95.h (ref_type): Name this type explicitly.
7035 * module.c (MIO_NAME): Add specialisations of mio_name.
7036 (mio_symbol_attribute, mio_typespec, mio_array_ref,
7037 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
7038 (ab_attribute): Name this type explicitly.
7039 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
7041 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
7043 * trans-intrinsic.c (g95_conv_allocated): New function.
7044 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
7046 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7048 * f95-lang.c: Don't include g95-support.h
7049 (g95_mark_addressable): Add prototype.
7050 (g95_init_decl_processing): Remove C front end hack.
7051 * f95-tree.c: Remove file.
7052 * support.c: Remove file.
7053 * g95-support.h: Remove file.
7054 * trans-types.c (g95_init_types): Set up boolean
7055 type related tree nodes.
7056 * Make-lang.in: Remove rules for dead files and
7057 dependencies on them.
7059 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7061 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
7062 C front end dependency. Also, convert.c does not depend on
7063 g95-support.h anymore.
7064 * convert.c: Don't include c-common.h and g95-support.h
7065 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
7066 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
7067 stmts_are_full_exprs_p, current_stmt_tree,
7068 current_scope_stmt_stack): Remove.
7069 * g95-support.h (unsigned_conversion_warning): Kill proto.
7070 (boolean_type_node, boolean_true_node, boolean_false_node):
7071 Don't define here. Instead, make then true tree nodes in
7073 * support.c (c_global_trees): Die, C front end, die!!!
7074 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
7075 uintmax_type_node, string_type_node and const_string_type_node.
7076 (decl_constant_value, overflow_warning): Make static functions.
7077 They are in death row too, though.
7078 (default_conversion, c_expand_asm_operands): Remove.
7079 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
7080 trans.c: Don't include c-common.h.
7081 * trans-types.c (boolean_type_node, boolean_true_node,
7082 boolean_false_node): Make them real tree nodes.
7083 * trans-types.h (intmax_type_node, string_type_node,
7084 const_string_type_node): Hack to work around C dependencies
7085 in builtin-types.def.
7087 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7089 * decl.c (decl_types): Add some iterators-like sentinels.
7090 * decl.c (match_attr_spec): Use them.
7091 Use "decl_types" instead of "int".
7092 Add cast in call to g95_match_strings.
7093 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
7095 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
7096 (g95_interface_info): Use "g95_intrinsic_op".
7097 * dump-parse-tree.c (g95_show_namespace): Use them.
7098 * interface.c (g95_check_interfaces): Use them.
7099 * module.c (read_module, write_module): Use them.
7100 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
7101 Use "g95_intrinsic_op".
7102 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
7103 Add a default case in switch statement.
7104 * intrinsic.h (g95_generic_isym_id): Moved to...
7105 * g95.h (g95_generic_isym_id): here.
7106 (g95_intrinsic_sym): Use "g95_generic_isym_id".
7107 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
7108 * trans-intrinsic.c (g95_intrinsic_map_t,
7109 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
7110 * match.c (g95_match_intrinsic_op): Add cast in call to
7113 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
7115 * support.c (skip_evaluation, warn_conversion, lvalue_p,
7116 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
7117 constant_fits_type_p, convert_and_check,
7118 unsigned_conversion_warning): Remove these ugly remnants
7119 we inherited from the C front end.
7120 (function_types_compatible): Remove '#if 0'-edcode.
7121 (build_modify_expr): Likewise.
7122 (convert_for_assignment): Don't use the deceased functions.
7123 The parameter fundecl is now unused.
7124 (decl_constant_value): Always just return decl. In fact
7125 this function is not used at present, but it might be in
7126 the future, when we start using the tree inliner.
7127 (overflow_warning, default_conversion, c_expand_asm_operands):
7128 Abort when these are called, they are part of the C type
7129 checking implementation and therefore poison to Fortran.
7131 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
7133 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
7134 c-pretty-print.o and c-dump.o. Add a comment on why we
7135 depend on c-semantics.c.
7136 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
7137 Don't use the C front end tree dumper hook to dump the
7138 language specific tree representation -- we don't have
7139 one. So instead, inherit the default langhook.
7141 2003-06-02 Paul Brook <paul@nowt.org>
7143 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
7145 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7147 * check.c (g95_check_associated): Use proper types. Remove
7148 extraneous argument in call to g95_error().
7150 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7152 * resolve.c (resolve_operator): Make logical operands convert to the
7153 type with higher kind.
7155 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7157 * check.c (g95_check_associated): Make sure both pointer and target has
7158 the same type and rank. Null pointer or array section with vector
7159 subscript as target are not allowed.
7160 * trans.h: Declare gfor_fndecl_associated.
7161 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
7162 gfor_fndecl_associated.
7163 * trans-intrinsic.c (g95_conv_associated): New function.
7164 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
7166 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7168 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
7169 according to POINTER itself rather than TARGET.
7170 (g95_conv_expr_descriptor): Make lbound start at 1.
7171 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
7173 2003-06-01 Paul Brook <paul@nowt.org>
7175 * expr.c (g95_type_convert_binary): Make it match the standard.
7176 * g95.texi: Remove dead link.
7178 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
7180 * g95.texi: Cleanup somewhat in preparation for inclusion
7183 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7184 Canqun Yang <canqun@yahoo.com.cn>
7186 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
7188 (g95_find_forall_index): Return proper value.
7189 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
7190 compare the return value from g95_find_forall_index.
7192 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7193 * g95.h, io.c (g95_st_label): Remove "length".
7194 (g95_symtree): Remove "link".
7195 (g95_case): Remove "code".
7196 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
7197 g95_convert_real): Make an argument pointer to const.
7198 * decl.c (colon_seen): Add a TODO.
7199 * interface.c (g95_compare_types): Fix typo.
7200 * interface.c (compare_interfaces): Preserve value of "p".
7201 * intrinsic.c (sort_actual): Remove "i".
7202 * match.c (g95_match_assign): Proper type in call to g95_match().
7203 * parse.c (next_free): Avoid duplicate call due to macro.
7204 * parse.c (check_statement_label): wrong type in call to g95_error.
7205 * primary.c (match_real_constant): Add a TODO.
7206 * resolve.c (resolve_select): Remove useless conditional.
7207 * simplify.c (g95_simplify_repeat): Proper assignment to
7208 "value.character.string".
7209 * simplify.c (g95_simplify_reshape): Wrong variable in call to
7212 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
7214 * trans-stmt.c: Remove unnecessary include file defaults.h.
7216 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
7218 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
7220 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
7221 actual variables used as FORALL indexes.
7223 2003-05-15 Paul Brook <paul@nowt.org>
7225 * trans-array.c (g95_trans_static_array_pointer): Use
7227 (g95_trans_deferred_array): Initialize static array pointers.
7228 * trans-expr.c (g95_conv_function_call): Use formal arglist to
7229 correctly pass POINTER and absent CHARACTER arguments.
7231 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
7233 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
7234 (g95_resolve_forall_body): Resolve FORALL body.
7235 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
7236 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
7237 (g95_find_forall_index): Check whether the FORALL index appears in
7238 the expression or not.
7239 (resolve_code): Modified.
7241 2003-05-14 Paul Brook <paul@nowt.org>
7243 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
7245 2003-05-13 Paul Brook <paul@nowt.org>
7247 * trans-types.c (g95_max_array_element_size): Now a tree node.
7248 (g95_init_types): Work out max size properly.
7249 (g95_get_dtype_cst): Modify to match.
7251 2003-05-11 Paul Brook <paul@nowt.org>
7253 * trans-io.c (add_case): Create a label decl for case labels.
7255 2003-05-11 Paul Brook <paul@nowt.org>
7257 * arith.c (g95_integer_index_kind): New variable.
7258 * f95-lang.c (g95_init): Move frontend initialization here ...
7259 (g95_post_options): ... from here.
7260 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
7261 * intrinsic.c (add_functions): Use index kinds.
7262 * iresolve.c: Convert to index_kind where needed.
7263 * resolve.c (g95_resolve_index): Make public, use index_kind.
7264 (resolve_array_ref): Adjust to match.
7265 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
7266 * trans-stmt.c: Ditto.
7267 * trans-types.c: Ditto.
7268 * trans-types.h (g95_array_index_kind): Remove declaration.
7269 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
7271 2003-05-07 Paul Brook <paul@nowt.org>
7273 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
7274 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
7277 2003-05-07 Paul Brook <paul@nowt.org>
7279 * trans-array.c (trans_static_array_pointer,
7280 g95_trans_array_constructor_value, g95_conv_array_initializer,
7281 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
7282 (g95_add_loop_ss_code): Convert subscripts to the correct type.
7283 * trans-stmt.c (g95_trans_character_select): Ditto.
7284 * trans-types.c (g95_init_types): Ditto.
7286 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
7288 * f95-lang.c (expand_function_body): Use input_line, not lineno.
7289 * trans-decl.c (g95_generate_function_code,
7290 g95_generate_constructors): Likewise.
7291 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
7292 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
7295 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7296 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
7297 with components point to the DERIVED type itself, and two DERIVED
7298 type with components point to each other.
7299 * trans-expr.c (g95_conv_componet_ref): Modified
7301 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7302 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
7304 (g95_trans_pointer_assign): Implement Nullify.
7306 2003-05-01 Paul Brook <paul@nowt.org>
7308 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
7309 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
7311 2003-05-01 Paul Brook <paul@nowr.org>
7313 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
7314 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
7317 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
7319 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
7322 2003-04-28 Paul Brook <paul@nowt.org>
7324 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
7325 as their kind suggests.
7326 (g95_resolve_reshape): Ditto.
7328 2003-04-28 Chun Huang <compiler@sohu.com>
7330 * trans-expr.c (g95_conv_substring_expr): New function.
7331 (g95_conv_expr): Use it.
7333 2003-04-28 Paul Brook <paul@nowt.org>
7335 * iresolve.c (g95_resolve_transpose): Make it match the
7337 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
7339 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7341 * trans-types.c (g95_add_field_to_struct): New function to
7342 add a field to a UNION_TYPE or RECORD_TYPE.
7343 * trans-types.h (g95_add_field_to_struct): Prototype.
7344 (g95_get_derived_type): Use g95_add_field_to_struct to add
7346 * trans-io.c (g95_add_field): Remove.
7347 (ADD_FIELD): Use new g95_add_field_to_struct function.
7348 (ADD_STRING): Likewise.
7349 * trans-stmt.c (g95_trans_select): Likewise.
7350 (g95_add_field): Remove duplicated function.
7352 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7354 Port implementation for CHARACTER SELECT from Andy's tree.
7355 * trans-stmt.c (g95_trans_character_select): Implement character
7356 select. (g95_add_field): New function.
7357 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7358 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7359 * g95.h (struct g95_case): Add field 'int n'.
7360 * trans.h: Declare 'gfor_fndecl_select_string'.
7362 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7364 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7365 (g95_insert_bbd): Die on duplicates.
7366 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7368 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7370 * g95.texi: Require GMP 4.0 -- like we actually
7371 do. Explain the testsuite and what-goes-where.
7372 Don't use undefined texinfo symbol. Break very
7373 long line. Remove finished item from the list
7376 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7378 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7381 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7383 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7384 (g95_trans_forall_body): New function.
7386 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7388 * resolve.c (resove_where): New function.
7389 (resolve_where_shape): New function.
7390 (resolve_code): Add call to 'resolve_where'
7391 * trans-stmt.c (g95_trans_where): Modified.
7392 (g95_trans_where_2): New function.
7393 (g95_trans_where_assign): New function.
7394 (g95_evaluate_where_mask): New function.
7395 (g95_add_to_stmt_list): New function.
7396 (g95_get_temp_expr): New function.
7397 * trans.h (where_stmt_list): New structure.
7399 2003-04-10 Paul Brook <paul@nowt.org>
7401 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7402 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7404 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7406 Update after mainline -> tree-ssa-branch merge.
7407 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7409 (g95_init): Update for new lang_hooks definition.
7410 (g95_post_options): New langhook.
7411 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7412 * scanner.c (g95_new_file): Comment update.
7414 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7416 * g95.h, lang-options.h: Add -Wimplicit-interface.
7417 * options.c (g95_init_options, g95_parse_arg): Set it.
7418 * interface.c (check_intents): Warn about call with implicit
7420 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7423 2003-04-05 Paul Brook <paul@nowt.org>
7425 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7426 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7428 2003-03-29 Paul Brook <paul@nowt.org>
7430 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7431 (g95_resolve_unpack): Ditto.
7432 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7433 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7434 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7436 2003-03-25 Paul Brook <paul@nowt.org>
7438 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7440 * array.c (g95_free_array_ref): Ditto.
7442 * symbol.c (g95_use_derived_tree): Ditto.
7443 * intrinsic.c (add_functions): Use simplification for SCALE.
7444 * primary.c (g95_match_rvalue): Test sym, not symtree.
7446 2003-03-25 Paul Brook <paul@nowt.org>
7448 * trans-decl.c (build_function_decl): Add parameter before it gets
7449 turned into a constant.
7450 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7451 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7452 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7454 2003-03-22 Paul Brook <paul@nowt.org>
7456 * trans-array.c (g95_conv_array_initializer): Allow scalar
7458 * trans-decl.c (g95_finish_var_decl): Result variables are not
7460 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7461 (g95_conv_intrinsic_function): Use it.
7462 * trans-types.h (g95_type_spec): Remove dead declaration.
7464 2003-03-21 Paul Brook <paul@nowt.org>
7466 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7468 2003-03-20 Paul Brook <paul@nowt.org>
7470 * trans-decl.c (g95_build_function_decl): Put character length
7471 parameters at the end of the function declaration.
7472 * trans-expr.c (g95_conv_function_call): Ditto.
7473 * trans-types.c (g95_get_function_type): Ditto.
7475 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7477 * resolve.c (resolve_formal_arglist): Don't impose intent for
7478 procedure arguments of pure functions.
7479 (resolve_select): Remove redundant assignment.
7481 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7483 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7485 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7486 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7488 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7490 * symbol.c (g95_add_type): Fix typo in comment.
7493 2003-03-16 Paul Brook <paul@nowt.org>
7495 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7496 * expr.c (g95_build_call): Remove.
7497 * f95-lang.c (puchdecl_top_level): New function.
7498 * g95.h (g95_code): Store resolved symbol, not just the name.
7499 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7500 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7501 (g95_get_intrinsic_sub_symbol): New function.
7502 * iresolve.c (g95_resolve_cpu_time): Use it.
7503 (g95_resolve_random_number): Ditto.
7504 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7505 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7506 the correct DECL_CONTEXT. Add global symbold to the global scope.
7507 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7510 2003-03-16 Paul Brook <paul@nowt.org>
7512 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7513 * options.c (g95_parse_arg): Ditto.
7514 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7515 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7516 for the procedure, not the parameter.
7517 * trans-array.c (g95_trans_g77_array): New function.
7518 (g95_trans_assumed_size): Use it.
7519 (g95_trans_dummy_array_bias): Ditto.
7520 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7521 (g95_conv_expr_descriptor): ... to here. Update callers.
7522 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7523 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7524 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7525 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7526 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7527 (g95_sym_type): Ditto.
7529 2003-03-15 Paul Brook <paul@nowt.org>
7531 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7533 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7535 2003-03-14 Paul Brook <paul@nowt.org>
7537 * trans-array.c (g95_array_is_packed): Remove.
7538 (g95_conv_array_base): Correctly handle all descriptorless cases.
7539 (g95_conv_array_stride): Use descriptorless strides.
7540 (g95_trans_dummy_array_bias): Don't always repack the array.
7541 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7543 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7544 dummy and non-dummy arrays...
7545 (g95_sym_type, g95_get_derived_type): ... like these.
7546 (g95_get_array_type_bounds): Allow discontiguous arrays.
7548 2003-03-12 Paul Brook <paul@nowt.org>
7550 * array.c (g95_resolve_array_spec): Fix comment.
7551 * g95.h (symbol_attributes): New flag always_explicit.
7552 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7553 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7554 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7555 (g95_trans_array_bounds): Allow assumed shape arrays.
7556 (g95_trans_repack_array): Remove.
7557 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7558 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7559 bounds for assumed size arrays.
7560 (g95_build_dummy_array_decl): Use descriptorless arrays.
7561 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7562 (g95_trans_pointer_assign): Fix typo.
7563 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7565 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7566 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7567 Also modify callers.
7568 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7570 2003-03-08 Paul Brook <paul@nowt.org>
7572 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7573 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7574 * resolve.c (compare_spec_to_ref): Allow full array sections.
7576 2003-03-08 Paul Brook <paul@nowt.org>
7578 * expr.c (g95_simplify_expr): Also simplify array index and
7579 substring expressions.
7580 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7581 * trans-array.c (g95_trans_array_bounds): New function.
7582 (g95_trans_auto_array_allocation): Use it.
7583 (g95_trans_assumed_size): Rewrite.
7584 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7585 (gfor_fndecl_repack): Remove.
7586 (g95_build_qualified_array): Handle absent upper bounds.
7587 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7588 (g95_get_symbol_decl): Update.
7589 (g95_build_intrinsic_function_decls): Initialize new decls.
7590 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7591 (gfor_fndecl_repack): Remove.
7592 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7593 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7594 (g95_get_nodesc_array_type): Handle absent bounds.
7595 * trans-types.h (g95_get_nodesc_array_type): Declare.
7597 2003-03-04 Paul Brook <paul@nowt.org>
7599 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7602 2003-03-02 Paul Brook <paul@nowt.org>
7604 * options.c (g95_init_options): Drfault to 1.
7605 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7606 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7607 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7608 Handle non-constant size automatic arrays.
7609 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7610 generic bound functions.
7611 (g95_trans_auto_array_allocation): Don't create a descriptor.
7612 (g95_trans_assumed_size): New function (broken).
7613 (g95_trans_dummy_array_bias): Remove unused var.
7614 * trans-array.h (g95_trans_assumed_size): Declare.
7615 * trans-decl.c (create_index_var): New fuction.
7616 (g95_build_qualified_array): New function.
7617 (g95_get_symbol_decl): Use it.
7618 (g95_trans_deferred_vars): Handle assumed shape seperately.
7619 * trans-types.c (get_element_type): Handle heap allocated arrays.
7620 (g95_is_nodesc_array): Include non-const size arrays.
7621 (g95_get_nodesc_array_type): Ditto.
7623 2003-02-23 Paul Brook <paul@nowt.org>
7625 * trans-array.c (g95_array_init_size): Should use stride, not size of
7628 2003-02-18 Paul Brook <paul@nowt.org>
7630 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7631 after intrinsic function check.
7633 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7635 * io.c (match_io): Fix missing return value and remove useless
7637 * match.c (g95_match): Remove useless assignment.
7638 * module.c (parse_string): Remove useless post increment.
7639 * simplify.c (g95_simplify_verify): Remove useless assignment.
7641 2003-02-15 Paul Brook <paul@nowt.org>
7643 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7644 * g95.h (symbol_attribute): Add referenced member.
7645 (g95_symbol): Add dummy_order member.
7646 (g95_set_sym_referenced): Declare.
7647 * match.c (g95_match_assignment, g95_match_call): Use it
7648 * primary.c (match_actual_arg, g95_match_rvalue,
7649 g95_match_variable): Ditto.
7650 * symbol.c (next_dummy_order): New variable.
7651 (g95_set_sym_referenced): New function.
7652 (check_done): New function.
7653 (g95_add_*): Use it.
7654 * trans-decl.c: Make formatting conform to GCC standards.
7655 (g95_defer_symbol_init): Add dummy variables in the right order.
7656 (g95_get_symbol_decl): Only accept referenced variables.
7657 (g95_create_module_variable): Module variables are always required.
7658 (generatr_local_decls): New function.
7659 (generate_local_vars): New function.
7660 (g95_generate_function_code): Use it.
7662 2003-02-13 Paul Brook <paul@nowt.org>
7664 * trans-decl.c (g95_conv_struct_cons): Remove.
7665 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7666 * trans-expr.c (g95_conv_structure): New function.
7667 (g95_conv_expr): Use it.
7669 2003-02-09 Paul Brook <paul@nowt.org>
7671 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7672 expressions multiple times.
7673 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7675 2003-02-08 Paul Brook <paul@nowt.org>
7677 * module.c (mio_symtree_ref): Declare as static.
7678 (mio_expr): Remove dead code.
7679 (read_module): Set the symtree link for fixups.
7680 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7681 (build_round_expr): ... to this.
7682 (g95_conv_intrinsic_aint): New function.
7683 (g95_conv_intrinsic_function): Use it.
7685 2003-02-08 Paul Brook <paul@nowt.org>
7687 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7688 offset after modificaton, not the increment expression.
7689 * dependency.c: Kill excess whitespace.
7691 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7693 * dependency.h: Remove some function declarations.
7694 * dependency.c (get_no_of_elements): Change this function not to
7696 * other: Add comments for all modified functions.
7698 2003-02-06 Paul Brook <paul@nowt.org>
7700 * g95spec.c (lang_specific_functions): Fix initializer warning.
7701 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7702 for structure type names.
7703 * trans-decl.c (g95_cons_structure_cons): New function.
7704 (g95_get_symbol_decl): Use it.
7705 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7708 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7710 * resolve.c (compare_cases): Add const to casts.
7712 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7714 * g95.h (g95_check_f): Change a1 to f1m.
7715 * intrinsic.c (add_sym_1m, check_specific,
7716 g95_intrinsic_func_interface): Use it.
7718 * module.c (init_pi_tree): Remove useless cast.
7719 (fp2): Fix argument type.
7721 * parse.c (parse_select_block): Add comment.
7723 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7725 * lang-options.h: Fix warning involving C90 concatenated
7728 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7729 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7731 * io.c (format_asterisk): Complete initializer to kill warning.
7732 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7733 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7734 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7735 new defines to complete initializers. Kills all warnings.
7737 * Make-lang.in: Comment cleanup.
7739 2003-02-05 Paul Brook <paul@nowt.org>
7741 * array.c (g95_free_constructor): Handle NULL expressions.
7742 * resolve.c (resolve_structure_cons): Ditto.
7743 * decl.c (g95_match_null): New Function.
7744 (variable_decl): Use it.
7745 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7746 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7747 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7749 2003-02-05 Paul Brook <paul@nowt.org>
7751 * trans.h (build1_v): New macro.
7752 (build_v): Remove pointless and incorrect prototype.
7753 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7754 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7756 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7758 * Make-lang.in (F95_OBJS): Remove one more dead file.
7760 2003-02-01 Paul Brook <paul@nowt.org>
7762 * lang-specs.h: Don't pass -ffixed-form to the linker.
7763 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7765 2003-02-01 Paul Brook <paul@nowt.org>
7767 * Make-lang.in (F95_OBJS): Remove dead files.
7768 * trans-array.c (g95_array_init_size): Do the right thing when
7770 * trans-decl.c (g95_generate_function_code): Initialize deffered
7771 symbol list before translating contained subroutines.
7772 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7773 scalar invariant values here...
7774 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7775 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7777 2003-01-29 Paul Brook <paul@nowt.org>
7779 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7780 (g95_walk_elemental_function_args): Reverse chains before adding.
7781 (g95_reverse_ss): Move about a bit.
7782 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7785 2003-01-28 Paul Brook <paul@nowt.org>
7787 * intrinsic.c (resolve_intrinsic): Use correct union member.
7788 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7790 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7791 use associated variables.
7792 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7793 * trans-expr.c (g95_conv_expr_present): ... to here.
7794 * trans.h: Declare it.
7795 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7797 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7799 * array.c (expand_iterator): Suppress useless assignment.
7800 * decl.c (match_char_spec): Ditto.
7801 * io.c (match_io_iterator): Ditto.
7802 * primary.c (match_real_constant): Ditto.
7803 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7804 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7805 * matchexp.c (match_add_operand, match_level_5): Likewise.
7806 * module.c (parse_atom, find_enum): Likewise.
7807 * resolve.c: move #include <string.h>
7808 (resolve_select): Fix serious typo.
7810 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7812 * Make-lang.in: Don't build with broken tree-ssa-pre.
7814 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7816 * resolve.c (resolve_index): Add a TODO.
7817 * symbol.c: Remove useless "#include <ctype.h>".
7819 2003-01-27 Paul Brook <paul@nowt.org>
7821 * check.c (check_rest): Allow different type kinds as an extension.
7822 * g95.h (g95_resolve_f): Add f1m.
7823 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7824 * intrinsic.h: Chenge prototypes for MIN and MAX.
7825 * iresolve.c (g95_resolve_minmax): New function.
7826 (g95_resolve_min, g95_resolve_max): Use it.
7827 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7829 (g95_conv_intrinsic_present): Fix logic.
7831 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7833 * g95.h (g95_case): Don't be a tree, be a double linked list.
7834 * match.c (match_case_selector): Remove redundant semantics check.
7835 Clean up a few goto's to make it a tiny little bit faster.
7836 * resolve.c (case_tree): Die.
7837 (compare_cases): Accept and compare unbounded cases too.
7838 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7839 whole list of g95_cases passed from resolve_select.
7840 (sane_logical_select): Die.
7841 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7843 (resolve_select): Fixup case expression for computed GOTOs, put it
7844 in expr, not expr2, for easier handing in the parse tree dumper and
7845 the code generator. Rewrite the rest of the function: Kill
7846 unreachable case labels and unreachable case blocks.
7847 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7848 an EXEC_SELECT, not case2 anymore.
7849 * trans-const.c (g95_conv_constant_to_tree): New function.
7850 (g95_conv_constant): Use it.
7851 * trans-const.h: Declare prototype for the new function.
7852 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7853 g95_trans_character_select): New static functions.
7854 (g95_trans_select): Rewrite.
7856 2003-01-26 Paul Brook <paul@nowt.org>
7858 * intrinsic.c (add_fnctions): Properly add dreal.
7859 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7860 (g95_conv_intrinsic_function): Use it.
7861 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7863 2003-01-26 Paul Brook <paul@nowt.org>
7865 Widespread changes to the handling of symbols in expressions. These
7866 are now linked via g95_symtree nodes.
7867 * parse.c (g95_fixup_sibling symbols): New function.
7868 (parse_contained): Use it.
7869 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7870 contained procedure that has bee correctly fixed up.
7871 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7873 2003-01-24 Paul Brook <paul@nowt.org>
7875 * trans-array.c (g95_walk_expr): Function result attributes are in
7877 * trans-expr.c (g95_conv_function_call,
7878 g95_trans_arrayfunc_assign): Ditto.
7879 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7881 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7883 * expr.c (check_restricted): Fix error message.
7884 * symbol.c (free_st_labels): Plug memleak.
7886 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7888 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7889 reduce_binary_aa, reduce_binary, eval_intrinsic,
7890 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7891 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7892 for typesafe intrinsics helper functions.
7893 (g95_intrinsic_sym): Use them.
7894 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7895 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7896 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7897 check_specific, g95_intrinsic_func_interface,
7898 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7900 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7901 * Make-lang.in: Don't disable warnings for strict prototypes
7902 any longer, everything is typesafe now.
7904 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7906 * bbt.c (duplicate_node): Make static.
7907 * module.c (module_name): Make static.
7908 * scanner.c (include_dirs): Make static.
7910 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7912 Hard coded _gfor_'s should not show up anymore.
7913 * g95.h (PREFIX): New macro.
7914 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7916 (g95_resolve_random_number): Likewise.
7917 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7918 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7919 the new PREFIX macro from g95.h.
7921 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7923 The troubles of forking... Andy implemented this just now too.
7924 Let's stick to that and keep the trees close.
7925 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7926 * io.c: Revert previous changes.
7927 (g95_match_format): Match the format string as a character
7929 * match.h (g95_statement_label): Declare external.
7930 * parse.c: Revert previous changes.
7931 * symbol.c (g95_free_st_label): Free a g95_expr instead
7933 * trans-io.c: Revert previous changes.
7934 (build_dt): Use set_string to set the format string.
7936 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7938 * io.c (format_string): Make non-static.
7939 (g95_match_format): Remember the format string.
7940 (terminate_io): Add I/O termination for empty I/O lists.
7941 * match.h: Declare external format_string.
7942 * parse.c (check_statement_label): Attack the format string
7943 to a format label for FORMAT statements.
7944 * trans-io.c (g95_add_field): Define prefix macro. Replace
7945 all uses of PREFIX define with a use of this macro.
7946 (build_dt): Implement formatted I/O for format labels.
7948 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7950 * lang-options.h: Kill "-std=F".
7951 * options.c: Remove unimplemented "-std=F". Modify
7953 * misc.c (g95_terminal_width): New function.
7954 * error.c (g95_error_init_1): Use g95_terminal_width.
7955 * g95.h: Add prototype for g95_terminal_width, remove
7958 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7960 * Make-lang.in: Fix typo.
7962 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7964 * g95.h (struct g95_case): Remove unused cruft, new member
7965 'where' to keep track of the locus of the default case.
7966 * match.c (g95_match_case): Add locus to the current case.
7967 (match_case_selector): Likewise.
7968 * parse.c (parse_select_block): Move semantics check for
7969 multiple DEFAULT cases out of here to...
7970 * resolve.c (check_case_overlap): ...here. Return sooner
7972 (check_case_expr): Take two g95_cases now, use to sure the
7973 expression kinds are the same.
7974 (resolve_select): Cleanup.
7976 2003-01-18 Paul Brook <paul@nowt.org>
7978 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7979 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7981 (g95_get_extern_function_decl): Put decls in the correct context.
7983 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7985 * trans-io.c: Port changes from Andy to set ERR flag.
7987 2003-01-17 Paul Brook <paul@nowt.org>
7989 * trans-array.c: Add various comments.
7990 (g95_ss_terminator): Declare as const.
7991 (g95_walk_expr): Remove first parameter and update all callers.
7992 (g95_walk_op_expr): Initialize scalar SS properly.
7993 * trans-array.h (g95_walk_expr): Update prototype.
7994 * trans-expr.c: Update for new g95_walk_expr.
7995 * trans-intrinsic.c: Ditto.
7996 * trans-io.c: Ditto.
7997 * trans.h: Various comments for SS chains.
7999 2003-01-17 Paul Brook <paul@nowt.org>
8001 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
8003 * intrinsic.c (add_functions): Use them.
8004 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
8005 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
8007 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8009 Fallout of a small merge conflict:
8010 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
8012 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8014 * initrinsic.c: New add_sym_* functions for strong typing.
8015 (add_conv): Make prototype strict.
8016 * dump-parse-tree.c, dependency.c: Include config.h
8017 * resolve.c, trans-io.c: Fix typos.
8019 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8021 * dump-parse-tree.c (g95_show_code_node): Show the
8022 condition for a computed GOTO that was transformed
8023 to a SELECT CASE construct.
8024 * resolve.c (check_case_overlap): Revert previous switch
8025 to treaps, it was too slow and didn't catch all trouble.
8026 (resolve_symbol): Be more flexible about module procedures.
8027 * symbol.c (check_conflict): Point to relevant section in
8028 the standard for dubious conflict. Allow procedure
8029 dummy arguments to be optional again.
8030 * trans-io (add_field): Rename to g95_add_field. Change
8032 * trans-stmt (trans_select): Handle unbounded cases for
8033 integer SELECT CASE constructs. Fix/add more comment.
8035 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8037 * g95.h: Uses GCC's function attribute macros.
8038 * error.c, module.c, parse.c, g95.h: More function attributes.
8040 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8042 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
8043 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
8046 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8048 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
8050 * trans.c (g95_trans_code): Use annotate_all_with_file_line
8051 instead of nowdead wrap_all_with_wfl.
8053 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8055 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
8056 before generating code, so we can still see it even if the code
8057 generation phase dies.
8059 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8061 * decl.c (build_sym): Split out initialization expression parts...
8062 (add_init_expr_to_sym): ...to here.
8063 (variable_decl): Add the symbol following an attribute list to the
8064 symbol tree before parsing the optional initialization expression
8065 if the symbol is not of a derived type.
8066 * primary.c (g95_match_rvalue): Don't assume a symbol always has
8067 a value if it is a PARAMETER.
8069 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8071 * misc.c: Don't #include <mcheck.h>
8072 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
8073 ever was a glibc bug, then either this was never reported to
8074 glibc people, or it has been fixed for so long that there's
8075 no information you can find about it, anywhere.
8077 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8080 * module.c (attr_bits, bt_types, array_spec_types):
8081 Switch 'const' and 'static'.
8082 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
8084 GNU'ify source code:
8085 * trans-io.c: Numerous fixes, one fixed warning and a few
8086 TODO markers so that we don't forget about them.
8088 2003-01-13 Paul Brook <paul@nowt.org>
8090 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
8091 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
8093 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
8094 * match.c (g95_match_stop): Fix dumb == -> != error.
8096 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8098 * dump-parse-tree.c (show_indent): Add line breaks. This
8099 whole dumping process needs cleanups.
8100 * f95-lang.c (g95_mark_addressable): Fix prototype to match
8101 the langhook. Fix 'return's accordingly.
8102 * g95-support.h: Adjust prototype.
8103 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
8104 * lang-options.h: Add '-fsyntax-only'.
8105 * options.c (g95_init_options): Init 'no_backend'.
8106 (g95_parse_arg): Deal with '-fsyntax-only'.
8107 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
8110 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8112 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
8113 arguments. Also make sure that if a symbol is marked INTRINSIC,
8114 an intrinsic with the symbol's name actually exists.
8115 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
8116 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
8117 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
8119 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8121 * resolve.c (resolve_contained_functions): Fix condition, don't
8122 throw internal_error if a child namespace has no name. Apparently
8123 this can be the case?
8125 2003-01-11 Paul Brook <paul@nowt.org>
8127 Port changes from Andy's tree:
8128 * g95.h (g95_code): Add stop_code.
8129 * match.c (g95_match_stop): Detter syntax checking.
8130 * resolve.c (resolve_generic_f0): Return match type.
8131 (resolve_generic_f): Remove dead/duplicated code.
8132 (resolve_specific_f): Ditto.
8133 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
8134 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
8135 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
8137 2003-01-11 Paul Brook <paul@nowt.org>
8139 * trans-array.c: Various documentation/comment changes.
8140 * trans-stmt.c: Ditto.
8143 2003-01-10 Paul Brook <paul@nowt.org>
8145 * options.c/h: Add -fdump-parse-tree as alias of -v.
8147 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8149 * dump-parse-tree.c (g95_show_namespace): Fixed another
8150 typo. Sorry, it's Friday...
8152 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8155 * trans-array.c, trans-array.h, trans.c, trans-const.c,
8156 trans-const.h, trans-decl.c, trans-expr.c, trans.h
8157 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
8158 trans-types.c: Fix bogus copyright years, add 2003.
8159 * trans-types.h: Give copyright header.
8161 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8163 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
8164 * expr.c, options.c, scanner.c: Add some more 'const' markers.
8165 * intrinsic.c: Some constant strings moved to read-only memory.
8166 * io.c (format_asterisk): Move to...
8169 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8171 * dump-parse-tree.c (g95_show_namespace): Dump implicit
8172 types for ranges instead of per-letter. Indent the
8173 'CONTAINS' just like everything else.
8174 * resolve.c (resolve_contained_functions): Clarify comment.
8175 Explain non-obvious conditional expression. Improve
8176 diagnostics if tyoe cannot be resolved.
8177 Port semi-fix from Andy's tree:
8178 (was_declared): Move up before first use.
8179 (generic_sym, specific_sym): New functions. Code moved
8180 out if procedure_kind.
8181 (procedure_kind): Simplify using new functions.
8182 (resolve_generic_f): Make sure the functions we find in
8183 a parent namespace is generic.
8184 (resolve_specific_f): Ditto for specific functions.
8186 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8188 * trans-stmt.c, trans.c: Fix some code style issues. Add
8189 some more comment (but still not enough!).
8191 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8193 * symbol.c (flavors, procedures, intents, acces_types,
8194 access_types, ifsrc_types): Make const.
8195 * misc.c (g95_string2code): Make 'm' param 'const'.
8196 * module.c (find_enum, write_atom, mio_name): Make
8198 (attr_bits, bt_types, array_spec_types, array_ref_types,
8199 ref_types, expr_types): Make const.
8200 * g95.h: Adjust external decls.
8202 2003-01-09 Paul Brook <paul@nowt.org>
8204 * Testsuite: Add a load of new cases.
8206 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8208 * Make-file.in: Add dependency on back end header files;
8209 a parallel build should work now.
8210 * f95-lang-c (lang_identifier): Remove bogus comment.
8211 (g95_be_parse_file): Fix prototype.
8212 (g95_init): Make static.
8213 (g95_finish): Make static.
8214 * error.c (g95_syntax_error): Kill. Make define in...
8215 * g95.h (g95_syntax_error): Define.
8216 (g95.options): Make 'source' member 'const'.
8217 * interface.c (g95_match_interface): Explain
8218 hard-to-read condition.
8219 (g95_match_end_interface): Ditto.
8220 * trans_const.c (g95_build_string_const): Make 's' parameter
8222 * trans_const.h: Adjust protoype accordingly.
8223 * trans-decl.c: Include tree-dump.h
8224 (g95_generate_function_code): Build fixes for recent changes
8225 in the tree-ssa branch.
8227 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8229 * format.c: Kill, move code from here...
8231 * Make-lang.in: Adjust.
8234 * BUGS: Mention where to submit bugs. Move old content...
8235 * TODO: ...to here. New file.
8237 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8238 Fix most warnings, and suppress the ones we can't fix for now.
8239 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
8240 these warnings just clutter the screen and there's not much
8241 we can do about them for now anyway.
8242 * check.c, iresolve.c: Mark unused function parameters.
8243 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
8244 they should be resolved before they get here.
8245 * error.c: Remove unused FILE *status_out.
8246 * f95-lang.c (g95_init): Remove bogus cast.
8247 * Many files: Make things 'const' where required.
8248 * g95.h: Fix prototypes for all modified functions above.
8249 (g95_options): Remove 'object' member.
8251 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8253 * Make-file.in: Cleanup bogus targets. Add more comment.
8254 * lang-options.h: New option '-w'.
8255 * g95.h: add no_options field to struct g95_options.
8256 * options.c (g95_init_options): Default no_warnings to off.
8257 (g95_parse_arg): Recognise the '-w' switch and its alias,
8259 * error.c (g95_warning, g95_warning_now): Don't emit warning if
8260 no_warning option is set.
8261 * iresolve.c (g95_resolve_shape): Fix warning.
8263 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8265 * primary.c (g95_next_string_char): Rename next_string_char, and
8266 make static. Adjust callers accordingly.
8267 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
8268 callers accordingly.
8269 * g95.h: Split out all g95_match* functions to...
8270 * match.h: ...here. New file.
8271 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
8272 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
8274 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8276 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
8277 g95_merge_new_implicit): New functions.
8278 (g95_match_implicit_none, g95_match_implicit): Move from here...
8279 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
8280 Modify to use the new functions in symbol.c.
8281 * g95.h: Add and move prototypes.
8283 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8285 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
8286 node compare function.
8287 (g95_insert_bbt): Likewise.
8288 (g95_insert_bbt_with_overlap): Likewise.
8289 (g95_delete_bbt): Likewise.
8290 (delete_treap): Likewise. Also fix a potential bug when calling it.
8291 * module.c (compare_pointers): Change proto to compare_fn.
8292 (compare_integers): Likewise.
8293 (compare_true_names): Likewise.
8294 (find_true_name): Adjust call to compare_true_names to match proto.
8295 (require_atom, write_atom, mio_name): Fix 'const' warnings.
8296 (init_pi_tree): Make compare a compare_fn instead of (int *).
8297 * resolve.c (compare_cases): Change proto to compare_fn.
8298 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
8299 it static, and rename to compare_symtree.
8300 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
8302 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
8303 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
8305 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8306 * Make-lang.in: Fix spaces/tabs issues from previous patch.
8307 * patch.options: Blow away Paul's checkin mistake :-)
8308 * io.c (terminate_io): Fix memory leak (Arnaud).
8310 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8312 * Make-lang.in: Teach about building DVI, info manual.
8313 * g95.texi: New file.
8315 2003-01-02 Paul Brook <paul@nowt.org>
8317 * trans-array.c (g95_reverse_ss): Make static and don't use.
8318 (g95_conv_ss_descriptor): Don't use g95_loopinfo
8319 (g95_conv_array_parameters): Modify for pointer assignments.
8320 (g95_walk_subexpr): New function.
8321 (g95_walk_expr*): Use it.
8322 * trans-array.h (g95_reverse_ss): Remove prototype.
8323 * trans-expr.c (g95_trans_pointer_assign): Implement.
8324 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
8325 * trans-intrinsic.c: Sync with scalarizer changes.
8326 * trans-io.c: Ditto.
8328 2002-12-29 Paul Brook <paul@nowt.org>
8330 * trans-array.c: Document calling convention for arrays.
8332 2002-12-19 Paul Brook <paul@nowt.org>
8334 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
8335 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
8336 optional parameters for some intrinsics.
8337 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
8338 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
8339 optional parameters.
8340 * trans.h (g95_se): Add ignore_optional flag.
8342 2002-12-15 Paul Brook <paul@nowt.org>
8344 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
8345 * trans-decl.c (g95_generate_function_code): Use TDI_original.
8347 2002-12-14 Paul Brook <paul@nowt.org>
8349 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8351 2002-12-12 Paul Brook <paul@nowt.org>
8353 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8354 initialize the scalarizer.
8355 (various): Update to new format of g95_expr->value.constructor.
8357 2002-12-08 Paul Brook <paul@nowt.org>
8359 * trans-array.c (g95_put_offset_into_var): New function.
8360 (g95_trans_array_constructor_subarray): New function.
8361 (g95_trans_array_constructor_value): Use it.
8362 (g95_array_cons_size): Don't abort() on array components.
8364 2002-12-08 Paul Brook <paul@nowt.org>
8366 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8367 * support.c: Update #includes.
8368 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8369 * trans-array.c: Update #includes.
8371 * trans-const.c: Ditto.
8372 * trans-io.c: Ditto.
8373 * trans-types.c: Ditto.
8374 (g95_init_types): Set size_type_node.
8375 * trans-decl.c: Update #includes.
8376 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8377 * trans-stmt.c: Update #includes.
8378 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8379 (g95_trans_select): Fix check for unbounded ranges.
8380 * trans-expr.c: Update #includes.
8381 (g95_conv_string_tmp): New function.
8382 (g95_conv_concat_op): Use it.
8383 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8384 * Trans-intrisic.c: Update #includes.
8385 (g95_conv_intrinsic_strcmp): New function.
8386 (g95_conv_intrinsic_adjust): Ditto.
8387 (g95_conv_intrinsic_function: Use them.
8389 2002-11-30 Paul Brook <paul@nowt.org>
8391 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8393 * trans-dec.c (g95_build_function_decl): Handle character return
8395 (g95_get_fake_result_decl): Ditto.
8396 (g95_trans_deferred_vars): Ditto.
8397 * trans-expr.c (g95_conv_function_call): Ditto.
8398 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8399 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8400 (g95_conv_intrinsic_function): Use it.
8401 * trans-types.c (g95_sym_type): Handle functions returning strings.
8402 (g95_return_by_reference): Ditto.
8403 (g95_get_function_type): Ditto.
8405 2002-11-18 Paul Brook <paul@nowt.org>
8407 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8408 requires a temporary.
8409 (g95_trans_select): Handle computed gotos.
8410 * trans-types.c (g95_build_array_type): Warn about non-functional
8411 assumed shape arrays.
8412 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8414 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8415 (g95_conv_intrinsic_int): New function.
8416 (g95_conv_intrinsic_mod): New function.
8417 (g95_conv_intrinsic_ichar): New function.
8418 (g95_conv_intrinsic_function): Use them.
8419 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8421 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8423 * trans-types.c (g95_build_array_type): Assumed
8424 sized arrays can have rank > 1.
8425 * trans.c (g95_trans_code): Remove erroneous
8426 warning about CONTINUE.
8427 * trans-expr.c (g95_conv_variable): Remove
8430 2002-11-15 Paul Brook <paul@nowt.org>
8432 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8434 2002-10-31 Paul Brook <paul@nowt.org>
8436 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8437 * trans-expr.c (g95_conv_component_ref): Handle character string
8439 (g95_conv_string_parameter): Ditto.
8440 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8443 2002-10-10 Paul Brook <paul@nowt.org>
8445 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8446 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8448 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8449 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8450 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8451 * trans-types.c (pvoid_type_node): Declare and initialize.
8452 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8453 (g95_array_allocate): Fix when base==data.
8454 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8455 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8457 2002-10-09 Paul Brook <paul@nowt.org>
8459 * (g95_conv_expr_reference): Handle character strings correctly.
8461 2002-10-07 Paul Brook <paul@nowt.org>
8463 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8465 * trans-array.c (g95_build_array_initializer): Remove.
8466 (g95_conv_array_initializer): New Function.
8467 (g95_trans_auto_arry_allocation): Cleanup.
8468 (g95_trans_init_character_array): Remove.
8469 * g95spec.c: Link in libgforbegin.
8470 * trans.c (g95_generate_code): Rename main function to MAIN__.
8471 (g95_create_var): New function.
8472 (g95_create_var_np): New function.
8473 (g95_evaluate_now): New function.
8474 (g95_start_block): New function.
8475 (g95_finish_block): New function.
8476 (g95_add_expr_to_block): New function.
8477 (g95_add_block_to_block): New function.
8478 * trans-expr.c (g95_conv_componen_ref): New function.
8479 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8480 (F95_OBJS): Add dependency.o.
8481 * f95-lang.c (g95_is_simple_stmt): Remove.
8482 * f95-tree.c (mark_not_simple): New function.
8483 (unshare_all_trees): New function.
8484 (create_tmp_var, create_tmp_alias_var): Remove.
8485 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8486 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8487 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8489 2002-10-01 Paul Brook <paul@nowt.org>
8491 * trans-array.c: Add support for descriptorless arrays.
8492 (g95_conv_array_data): New function.
8493 (g95_conv_array_base): New function.
8494 * trans-array.h: Declare these here.
8495 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8496 initialization and creation here.
8497 (g95_create_module_vars): Instead of here.
8498 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8499 * trans-intrinsic.c: Ditto.
8500 * trans-types.c (g95_is_nodesc_array): New function.
8501 (g95_get_nodesc_array_type): New function.
8502 (g95_sym_type, g95_get_derived_type): Use them.
8503 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8505 2002-09-28 Paul Brook <paul@nowt.org>
8507 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8508 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8511 2002-09-24 Paul Brook <paul@nowt.org>
8513 * f95-lang.c (listify): Remove declaration.
8514 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8516 * f95-tree.c (get_name): New function.
8517 * trans.c (module_namespace): Remove.
8518 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8519 * trans-types.c: Ditto.
8521 2002-09-19 Paul Brook <paul@nowt.org>
8523 * trans-array.c (g95_get_array_cons_size): New Function.
8524 (g95_con_ss_startstride): Handle Array constructors.
8525 (g95_conv_loop_setup): Ditto.
8526 (g95_conv_array_parameter): Ditto.
8527 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8530 2002-09-19 Paul Brook <paul@nowt.org>
8532 * trans.c (g95_simple_fold_tmp): Detect variables inside
8534 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8536 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8538 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8540 2002-09-14 Paul Brook <paul@nowt.org>
8542 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8543 * trans-const.c (g95_conv_string_init): New Function.
8544 * trans-const.h: Declare it.
8545 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8546 variables. Don't bail on intrinsic symbols.
8547 (get_extern_function_decl): Handle specific intrinsic functions.
8548 * trans-types.c (g95_sym_type): Dummy functions don't return
8550 * trans-array.c (g95_build_array_initializer): New Function.
8551 (g95_trans_auto_array_allocation): Build initializer for static decls.
8552 Don't use mpz_addmul, it's GMP4 only.
8554 2002-09-12 Paul Brook <paul@nowt.org>
8556 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8557 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8558 assembler names for module procedures.
8560 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8562 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8565 2002-09-10 Paul Brook <paul@nowt.org>
8567 * trans-array.c: Change format of G95_SS_TEMP strictures.
8568 (g95_check_fncall_dependancy): New function.
8569 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8571 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8573 (g95_build_function_decl): Don't assume result arrays are packed.
8574 (g95_trans-deferred-vars): Handle array result variables.
8575 (g95_generate_fuction_code): Clear saved_function_decls.
8576 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8578 (g95_trans_arrayfunc_assign): New function.
8579 (g95_trans_assignment): Use it.
8580 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8581 (g95_se): Add direct_byref.
8582 * trans-types.c: Use sym->result rather than sym where appropriate.
8583 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8584 Update other functions to use this.
8585 (g95_is_intrinsic_libcall): New function.
8586 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8587 (g95_walk_intrinsic_function): Ditto.
8589 2002-09-08 Paul Brook <paul@nowt.org>
8591 * trans-types.c: Change rank field to dtype field in array descriptor.
8592 * trans-array.c: Implement filling of dtype array descriptor field.
8593 * trans-intrinsic.c: Fix broken LEN intrinsic.
8595 2002-09-07 Paul Brook <paul@nowt.org>
8597 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8598 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8599 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8601 2002-09-06 Paul Brook <paul@nowt.org>
8603 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8604 (gt-f95-trans-types.h): Add dependancy information.
8605 * config-lang.in (gtfiles): Add trans-types.c
8606 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8607 back to top-level code.
8608 * trans-array.c, trans-types.c: Change format of array descriptor.
8609 (g95_conv_descriptor_dimension): New function.
8610 * trans-types.h (g95_conv_descriptor_rank): define.
8611 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8614 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8616 * trans-array.c, trans-types.c: Add rank information to descriptor.
8618 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8620 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8622 2002-09-04 Paul Brook <paul@nowt.org>
8624 * f95-lang.c (g95_create_decls): New function.
8625 (g95_init): Move initialization of external decls to above, and call
8626 from g95_be_parse_file.
8627 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8628 * trans-types.c (g95_init_types): Always name integer and char types.
8629 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8631 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8633 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8635 2002-09-02 Paul Brook <paul@nowt.org>
8637 * g95_generate_code: Clear the attr for __fortran_main.
8638 * trans-types.c (g95_finish_type): New function.
8639 * g95_init_io_state_type: Use g95_finish_type.
8640 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8642 2002-09-01 Paul Brook <paul@nowt.org>
8644 * README.backend: Warn about the dangers of extra config.h files.
8645 Remove obsolete libgfor stuff.
8646 * config-lang.in: Add target-libgfor dependancy.
8647 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8649 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8651 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8654 2002-08-30 Paul Brook <paul@nowt.org>
8656 * trans-intrinsic.c (g95_conv_intrinsic_function,
8657 g95_walk_intrinsic_function): Added ANY and ALL.
8658 (g95_conv_intrinsic_anyall): New function.
8659 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in