1 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
3 * gfortran.texi: Update contributors.
5 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
8 * trans-decl.c (gfc_finish_var_decl): Add decl to the
9 current function, rather than the parent. Make
10 assertion accept fake result variables.
11 * trans-expr.c (gfc_conv_variable): If the character
12 length of an ENTRY isn't set, get the length from
13 the master function instead.
15 2005-10-30 Thomas Koenig <Thomas.Koenig@online.de>
17 * gfortran.texi: Remove reservations about I/O usability. Document
18 that array intrinsics mostly work.
20 2005-10-30 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
22 * gfortran.texi: Move license stuff to back. Add information
23 on ENUM and ENUMERATOR.
24 * invoke.texi: Document -fshort-enums.
26 2005-10-30 Gaurav Gautam <gauravga@noida.hcltech.com>
27 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
29 * arith.c (gfc_enum_initializer): New function.
30 (gfc_check_integer_range): Made extern.
31 * decl.c (enumerator_history): New typedef.
32 (last_initializer, enum_history, max_enum): New variables.
33 (create_enum_history, gfc_free_enum_history): New functions.
34 (add_init_expr_to_sym): Call create_enum_history if parsing ENUM.
35 (variable_decl): Modified to parse enumerator definition.
36 (match_attr_spec): Add PARAMETER attribute to ENUMERATORs.
37 (gfc_match_data_decl): Issues error, if match_type_spec do not
38 return desired return values.
39 (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New
41 (gfc_match_end): Deal with END ENUM.
42 * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM
44 (symbol_attribute): Bit field for enumerator added.
45 (gfc_options): Add fshort_enums.
46 (gfc_enum_initializer, gfc_check_integer_range): Add prototypes.
47 * options.c: Include target.h
48 (gfc_init_options): Initialize fshort_enums.
49 (gfc_handle_option): Deal with fshort_enums.
50 * parse.c (decode_statement): Match ENUM and ENUMERATOR statement.
51 (gfc_ascii_statement): Deal with the enumerator statements.
52 (parse_enum): New function to parse enum construct.
53 (parse_spec): Added case ST_ENUM.
54 * parse.h (gfc_compile_state): COMP_ENUM added.
55 (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history):
57 * symbol.c (gfc_copy_attr): Copy enumeration attribute.
58 * lang.opt (fshort-enums): Option added.
60 2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
62 * check.c (gfc_check_malloc, gfc_check_free): New functions.
63 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC.
64 * intrinsic.c (add_functions): Add symbols for MALLOC function.
65 (add_subroutines): Add symbol for FREE subroutine.
66 * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free,
67 gfc_resolve_malloc and gfc_resolve_free.
68 * intrinsic.texi: Add doc for FREE and MALLOC intrinsics.
69 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New
71 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for
74 2005-10-30 Steven Bosscher <stevenb@suse.de>
76 * gfortran.texi: Update contributors.
78 2005-10-29 Steven Bosscher <stevenb@suse.de>
80 * interface.c: Fix previous checkin (an incomplete patch
83 2005-10-29 Joseph S. Myers <joseph@codesourcery.com>
85 * intrinsic.texi: Remove empty @cindex line.
87 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
89 * check.c (gfc_check_alarm_sub, gfc_check_signal,
90 gfc_check_signal_sub): New functions.
91 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
92 * intrinsic.c (add_functions): Add signal intrinsic.
93 (add_subroutines): Add signal and alarm intrinsics.
94 * intrinsic.texi: Document the new intrinsics.
95 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
96 gfc_resolve_signal_sub): New functions.
97 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
99 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
100 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
101 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
103 2005-10-28 Steven Bosscher <stevenb@suse.de>
106 * interface.c (gfc_match_end_interface): Fix typo in
107 INTERFACE_USER_OP case.
109 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
112 * resolve.c (resolve_symbol): Remove the use of whynot, so that
113 error messages are not built from pieces.
115 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
118 * decl.c (gfc_match_data_decl): Correct broken bit of code
119 that prevents undefined derived types from being used as
120 components of another derived type.
121 * resolve.c (resolve_symbol): Add backstop error when derived
122 type variables arrive here with a type that has no components.
124 2005-10-25 Jakub Jelinek <jakub@redhat.com>
126 * trans.h (gfc_conv_cray_pointee): Remove.
127 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
128 * trans-array.c (gfc_conv_array_parameter): Likewise.
129 * trans-decl.c (gfc_conv_cray_pointee): Remove.
130 (gfc_finish_cray_pointee): New function.
131 (gfc_finish_var_decl): Use it. Don't return early for Cray
133 (gfc_create_module_variable): Revert 2005-10-24 change.
134 * decl.c (cray_pointer_decl): Update comment.
135 * gfortran.texi: Don't mention Cray pointees aren't visible in the
138 * symbol.c (check_conflict): Add conflict between cray_pointee
139 and in_common resp. in_equivalence.
140 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
142 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
143 (attr_bits): Likewise.
144 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
145 (mio_symbol): For cray_pointee write/read cp_pointer reference.
147 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
150 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
152 (gfc_get_symbol_decl): Use it when a variable, including dummy
153 argument, is assigned a label.
154 (gfc_trans_assign_aux_var): New function. Set initial value of
155 the auxiliary variable explicitly.
156 (gfc_trans_deferred_vars): Use it.
157 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
159 2005-10-24 Asher Langton <langton2@llnl.gov>
163 * check.c (gfc_check_loc): New function.
164 * decl.c (variable_decl): New variables cp_as and sym. Added a
165 check for variables that have already been declared as Cray
166 Pointers, so we can get the necessary attributes without adding
168 (attr_decl1): Added code to catch pointee symbols and "fix"
170 (cray_pointer_decl): New method.
171 (gfc_match_pointer): Added Cray pointer parsing code.
172 (gfc_mod_pointee_as): New method.
173 * expr.c (gfc_check_assign): Added a check to catch vector-type
174 assignments to pointees with an unspecified final dimension.
175 * gfortran.h: (GFC_ISYM_LOC): New.
176 (symbol_attribute): Added cray_pointer and cray_pointee bits.
177 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
178 (gfc_symbol): Added gfc_symbol *cp_pointer.
179 (gfc_option): Added flag_cray_pointer.
180 (gfc_add_cray_pointee): Declare.
181 (gfc_add_cray_pointer ): Declare.
182 (gfc_mod_pointee_as): Declare.
183 * intrinsic.c (add_functions): Add code for loc() intrinsic.
184 * intrinsic.h (gfc_check_loc): Declare.
185 (gfc_resolve_loc): Declare.
186 * iresolve.c (gfc_resolve_loc): New.
187 * lang.opt: Added fcray-pointer flag.
188 * options.c (gfc_init_options): Initialized.
189 gfc_match_option.flag_cray_pointer.
190 (gfc_handle_option): Deal with -fcray-pointer.
191 * parse.c:(resolve_equivalence): Added code prohibiting Cray
192 pointees in equivalence statements.
193 * resolve.c (resolve_array_ref): Added code to prevent bounds
194 checking for Cray Pointee arrays.
195 (resolve_equivalence): Prohibited pointees in equivalence
197 * symbol.c (check_conflict): Added Cray pointer/pointee
199 (gfc_add_cray_pointer): New.
200 (gfc_add_cray_pointee): New.
201 (gfc_copy_attr): New code for Cray pointers and pointees.
202 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
203 prevent space from being allocated for pointees.
204 (gfc_conv_array_parameter): Added code to catch pointees and
205 correctly set their base address.
206 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
207 pointee declarations from making it to the back end.
208 (gfc_create_module_variable): Same.
209 * trans-expr.c (gfc_conv_variable): Added code to detect and
211 (gfc_conv_cray_pointee): New.
212 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
213 (gfc_conv_intrinsic_function): Added entry point for loc
215 * trans.h (gfc_conv_cray_pointee): Declare.
217 * gfortran.texi: Added section on Cray pointers, removed Cray
218 pointers from list of proposed extensions.
219 * intrinsic.texi: Added documentation for loc intrinsic.
220 * invoke.texi: Documented -fcray-pointer flag.
222 2005-10-24 Asher Langton <langton2@llnl.gov>
224 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
225 warnings in the absence of strict standard conformance
226 * symbol.c (gfc_add_save): Same.
228 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
231 * arith.c (gfc_arith_error): Change message to include locus.
232 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
233 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
234 the new gfc_arith_error.
235 (arith_error): Rewrite full error messages instead of building
237 * check.c (must_be): Removed.
238 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
239 kind_check, double_check, logical_array_check, array_check,
240 scalar_check, same_type_check, rank_check, kind_value_check,
241 variable_check, gfc_check_allocated, gfc_check_associated,
242 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
243 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
244 gfc_check_pack, gfc_check_precision, gfc_check_present,
245 gfc_check_spread): Rewrite full error messages instead of
246 building them from pieces.
247 * decl.c (gfc_match_entry): Rewrite full error messages instead
248 of building them from pieces.
249 * parse.c (gfc_state_name): Remove.
250 * parse.h: Remove prototype for gfc_state_name.
252 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
255 * check.c (gfc_check_ichar_iachar): Move the code around so
256 that the check on the length is after check for
259 2005-10-23 Asher Langton <langton2@llnl.gov>
261 * decl.c (match_type_spec): Add a BYTE type as an extension.
263 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
266 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
267 if there is a component ref during an array ref to force
268 use of temporary in assignment.
272 * fortran/iresolve.c (check_charlen_present): New function to
273 add a charlen to the typespec, in the case of constant
275 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
276 (gfc_resolve_spread): Make calls to library functions that
277 handle the case of the spread intrinsic with a scalar source.
279 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
282 * decl.c (variable_decl): Don't assign default initializers to
285 2005-10-21 Jakub Jelinek <jakub@redhat.com>
287 * interface.c (compare_actual_formal): Issue error when attempting
288 to pass an assumed-size array as assumed-shape array argument.
290 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
293 * resolve.c (expr_to_initialize): New function.
294 (resolve_allocate_expr): Take current statement as new
295 argument. Add default initializers to variables of
296 derived types, if they need it.
297 (resolve_code): Provide current statement as argument to
298 resolve_allocate_expr().
300 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
303 * resolve.c (resolve_symbol): Correct error in check for
304 assumed size array with default initializer by testing
305 for arrayspec before dereferencing it.
307 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
310 * gfortran.h: Primitive for gfc_is_formal_arg.
311 * resolve.c(gfc_is_formal_arg): New function to signal across
312 several function calls that formal argument lists are being
314 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
315 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
316 symbol is part of an formal argument declaration.
319 * decl.c (add_init_expr_to_sym): Make a new character
320 length for each variable, when the expression is NULL
324 * match.c (recursive_stmt_fcn): New function that tests if
325 a statement function resurses through itself or other other
327 (gfc_match_st_function): Call recursive_stmt_fcn to check
328 if this is recursive and to raise error if so.
332 * resolve.c (resolve_symbol): Errors for assumed size arrays
333 with default initializer and for external objects with an
337 * decl.c (match_attr_spec): Prevent PUBLIC from being used
340 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
343 * expr.c (check_inquiry): Add "len" to inquiry_function.
345 2005-10-14 Jakub Jelinek <jakub@redhat.com>
347 * primary.c (match_boz_constant): Add missing break after gfc_error.
349 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
352 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
353 declaration for derived types, building if necessary. Return the
354 derived type if the fields have been built by this process. Otherwise,
355 continue as before but using the already obtained backend_decls for the
356 derived type components. Change the gcc_assert to act on the field.
358 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
361 * decl.c (variable_decl): Make a new copy of the character
362 length for each variable, when the expression is not a
365 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
367 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
369 * invoke.texi: Document the new -ffpe-trap option.
370 * lang.opt: Add -ffpe-trap option.
371 * options.c (gfc_init_options): Initialize the FPE option.
372 (gfc_handle_fpe_trap_option): New function to parse the argument
373 of the -ffpe-trap option.
374 (gfc_handle_option): Add case for -ffpe-trap.
375 * trans-decl.c: Declare a tree for the set_fpe library function.
376 (gfc_build_builtin_function_decls): Build this tree.
377 (gfc_generate_function_code): Generate a call to set_fpe at
378 the beginning of the main program.
379 * trans.h: New tree for the set_fpe library function.
381 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
385 * symbol.c (check_conflict): Prevent common variables and
386 function results from having the SAVE attribute,as required
389 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
392 * resolve.c (resolve_symbol): Exclude use and host associated
393 symbols from the test for private objects in a public namelist.
395 2005-10-12 Jakub Jelinek <jakub@redhat.com>
397 * trans-common.c (build_field): Fix comment typo.
398 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
399 variables to a VAR_DECL with the COMPONENT_REF in
400 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
401 * f95-lang.c (gfc_expand_function): Emit debug info for
402 EQUIVALENCEd variables if the equiv union is going to be output.
404 2005-10-11 Steven G. Kargl <kargls@comcast.net>
407 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
410 2005-10-11 Jakub Jelinek <jakub@redhat.com>
412 * f95-lang.c (gfc_init_decl_processing): Initialize
415 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
418 * resolve.c (find_array_spec): Search through the list of
419 components in the symbol of the type instead of the symbol of the
422 2005-10-05 Richard Guenther <rguenther@suse.de>
425 * parse.c (gfc_parse_file): Exit early for empty files.
427 2005-10-03 Steve Ellcey <sje@cup.hp.com>
429 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
430 and long double floating point types through to Fortran compiler.
432 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
435 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
436 double builtin function.
437 (gfc_init_builtin_functions): Add mfunc_longdouble,
438 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
439 them for round, trunc, cabs, copysign and pow functions.
440 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
441 case for kind 10 and 16.
442 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
443 exponent10 and exponent16.
444 (gfc_build_intrinsic_function_decls): Build nodes for int16,
445 real10, real16, complex10 and complex16 types. Build all possible
446 combinations for function _gfortran_pow_?n_?n. Build function
447 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
448 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
449 real(10) and real(16).
450 * trans-intrinsic.c: Add suppport for long double builtin
451 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
453 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
455 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
456 and real16_decl in library functions.
457 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
459 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
461 (gfc_conv_intrinsic_sign): Likewise.
462 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
463 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
464 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
465 the case of kinds not available.
466 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
467 exponent10 and exponent16.
469 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
478 * gfortran.h: Prototype for gfc_add_in_equivalence.
479 * match.c (gfc_match_equivalence): Make a structure component
480 an explicit,rather than a syntax, error in an equivalence
481 group. Call gfc_add_in_equivalence to add the constraints
482 imposed in check_conflict.
483 * resolve.c (resolve_symbol): Add constraints: No public
484 structures with private-type components and no public
485 procedures with private-type dummy arguments.
486 (resolve_equivalence_derived): Add constraint that prevents
487 a structure equivalence member from having a default
489 (sequence_type): New static function to determine whether an
490 object is default numeric, default character, non-default
491 or mixed sequence. Add corresponding enum typespec.
492 (resolve_equivalence): Add constraints to equivalence groups
493 or their members: No more than one initialized member and
494 that different types are not equivalenced for std=f95. All
495 the simple constraints have been moved to check_conflict.
496 * symbol.c (check_conflict): Simple equivalence constraints
497 added, including those removed from resolve_symbol.
498 (gfc_add_in_equivalence): New function to interface calls
499 match_equivalence to check_conflict.
501 2005-09-27 Jakub Jelinek <jakub@redhat.com>
504 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
505 If it is true, set TREE_STATIC on the decl.
506 (create_common): If any symbol in equivalence has SAVE attribute,
507 pass true as last argument to build_equiv_decl.
509 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
511 * trans-io.c (gfc_build_io_library_fndecls): Add entry
512 iocall_x_array for transfer_array.
513 (transfer_array_desc): New function.
514 (gfc_trans_transfer): Add code to call transfer_array_desc.
516 2005-09-26 Jakub Jelinek <jakub@redhat.com>
519 * symbol.c (gfc_is_var_automatic): Return true if character length
520 is non-constant rather than constant.
521 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
523 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
524 to 0 for -fno-automatic.
526 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
529 * module.c (mio_component_ref): Return if the symbol is NULL
530 and wait for another iteration during module reads.
531 (mio_symtree_ref): Suppress the writing of contained symbols,
532 when a symbol is available in the main namespace.
533 (read_module): Restrict scope of special treatment of contained
534 symbols to variables only and suppress redundant call to
537 2005-09-22 Steven G. Kargl <kargls@comcast.net>
540 * interface.c (check_interface1): Fix NULL dereference.
542 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
545 * resolve.c (derived_inaccessible): New function.
546 (resolve_transfer): Use it to check for private
549 2005-09-22 Steven G. Kargl <kargls@comcast.net>
552 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
554 * intrinsic.h: Prototypes for gfc_simplify_realpart and
555 gfc_resolve_realpart.
556 * intrinsic.texi: Document intrinsic procedures.
557 * simplify.c (gfc_simplify_realpart): New function.
558 * irseolve.c (gfc_resolve_realpart): New function.
560 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
563 * trans-stmt.c (gfc_trans_deallocate): Check if the
564 object to be deallocated is an array by looking at
565 expr->rank instead of expr->symtree->n.sym->attr.dimension.
567 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
570 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
571 (match_io): Fix usage of gfc_find_symbol.
573 2005-09-20 Jakub Jelinek <jakub@redhat.com>
576 * primary.c (match_actual_arg): Handle ENTRY the same way
579 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
581 * Make-lang.in: Make check-fortran alias for check-gfortran.
583 2005-09-18 Andreas Jaeger <aj@suse.de>
585 * module.c (read_module): Add missed line from last patch.
587 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
590 * resolve.c (resolve_symbol): Don't assign default
591 initializer to pointers.
593 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
596 * module.c (read_module): Give symbols from module procedures
597 different true_name entries to those from the module proper.
599 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
602 * arith.c (gfc_arith_error): Add translation support for error
604 * array.c (gfc_match_array_ref): Likewise.
605 (gfc_match_array_spec): Likewise.
606 * check.c (must_be): Add msgid convention to third argument.
607 (same_type_check): Add translation support for error message.
608 (rank_check): Likewise.
609 (kind_value_check): Likewise.
610 (gfc_check_associated): Correct typo.
611 (gfc_check_reshape): Add translation support for error message.
612 (gfc_check_spread): Likewise.
613 * error.c (error_printf): Add nocmsgid convention to argument.
614 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
615 (gfc_error, gfc_error_now): Likewise.
616 (gfc_status): Add cmsgid convention to argument.
617 * expr.c (gfc_extract_int): Add translation support for error
619 (gfc_check_conformance): Add msgid convention to argument.
620 (gfc_check_pointer_assign): Correct tabbing.
621 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
622 * gfortranspec.c: Include intl.h header.
623 (lang_specific_driver): Add translation support for --version.
624 * io.c (check_format): Add translation support for error message.
625 (format_item_1): Likewise.
626 (data_desc): Likewise.
627 * matchexp.c: Likewise.
628 * misc.c (gfc_article): Remove function.
629 * module.c (bad_module): Use msgid convention. Add translation support
631 (require_atom): Add translation support for error messages.
632 * parse.c (gfc_ascii_statement): Likewise.
633 (gfc_state_name): Likewise.
634 * primary.c (match_boz_constant): Reorganise error messages for
636 * resolve.c (resolve_entries): Likewise.
637 (resolve_operator): Add translation support for error messages.
638 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
640 (resolve_symbol): Add translation support for error messages.
641 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
642 * trans-const.c (gfc_build_string_const): Use msgid convention.
644 2005-09-16 Paul Brook <paul@codesourcery.com>
647 * dependency.c (transform_sections): Divide by correct value.
650 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
652 PR fortran/21875 Internal Unit Array I/O, NIST
653 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
654 array descriptor to IOPARM structure.
655 * fortran/trans-io.c (set_internal_unit): New function to generate code
656 to store the character (array) and the character length for an internal
658 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
660 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
663 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
664 which uses dim[i].upper for lbound, rather than dim[i].lower.
666 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
669 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
670 of attr.elemental for specific function instead of generic name.
672 2005-09-13 Richard Sandiford <richard@codesourcery.com>
675 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
676 of argse. Remove now-redundant want_pointer assignment.
677 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
678 a pointer, keep the original bounds of a full array reference.
680 2005-09-13 Richard Sandiford <richard@codesourcery.com>
683 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
684 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
685 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
686 for character-based operations.
687 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
688 (gfc_resolve_unpack): Copy the whole typespec from the vector.
689 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
690 case, get the string length from the scalarization state.
692 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
694 * Make-lang.in: Change targets prefixes from f95 to fortran.
695 * config-lang.in: Change language name to "fortran".
696 * lang.opt: Change language name to "fortran".
697 * options.c: Change CL_F95 to CL_Fortran.
699 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
701 gfortran.texi: Document IOSTAT= specifier.
703 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
705 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
706 gfc_inquire and gfc_dt.
707 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
708 for open, close, file positioning, inquire and namelist.
709 * io.c (io_tag): Add tag_iomsg.
710 (resolve_tag): Add standards warning for iomsg.
711 (match_open_element): Add iomsg.
712 (gfc_free_open): Add iomsg.
713 (gfc_resolve_open): Add iomsg.
714 (gfc_free_close): Add iomsg.
715 (match_close_element): Add iomsg.
716 (gfc_resolve_close): Add iomsg.
717 (gfc_free_filepos): Add iomsg.
718 (match_file_element): Add iomsg.
719 (gfc_resolve_filepos): Add iostat and iomsg.
720 (match-dt_element): Add iomsg.
721 (gfc_free_dt): Add iomsg.
722 (gfc_resolve_dt): Add iomsg.
723 (gfc_free_inquire): Add iomsg.
724 (match_inquire_element): Add iomsg.
725 (gfc_resolve_inquire): Add iomsg.
726 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
727 (gfc_build_io_library_fndecls): Add iomsg as last field.
728 (gfc_trans_open): Add iomsg.
729 (gfc_trans_close): Add iomsg.
730 (build_fileos): Call set_string for iomsg.
731 (gfc_trans_inquire): Add iomsg.
732 (build_dt): Add iomsg.
734 2005-09-09 Richard Sandiford <richard@codesourcery.com>
736 * match.h (gfc_match_equiv_variable): Declare.
738 2005-09-09 Richard Sandiford <richard@codesourcery.com>
741 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
742 * dependency.h (gfc_ref_needs_temporary_p): Declare.
743 * dependency.c (gfc_ref_needs_temporary_p): New function.
744 (gfc_check_fncall_dependency): Use it instead of inlined check.
745 By so doing, take advantage of the fact that character substrings
746 within an array reference also need a temporary.
747 * trans.h (GFC_SS_VECTOR): Adjust comment.
748 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
749 (gfc_set_vector_loop_bounds): New function.
750 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
751 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
752 the vector expression and caching its descriptor for use within
754 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
755 (gfc_conv_array_index_offset): Handle scalar, vector and range
756 dimensions as separate cases of a switch statement. In the vector
757 case, use the loop variable to calculate a vector index and use the
758 referenced element as the dimension's index. Perform bounds checking
760 (gfc_conv_section_upper_bound): Return null for vector indexes.
761 (gfc_conv_section_startstride): Give vector indexes a start value
762 of 0 and a stride of 1.
763 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
764 (gfc_conv_expr_descriptor): Expand comments. Generalize the
765 handling of the !want_pointer && !direct_byref case. Use
766 gfc_ref_needs_temporary_p to decide whether the variable case
768 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
770 * trans-expr.c: Include dependency.h.
771 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
773 2005-09-09 Richard Sandiford <richard@codesourcery.com>
776 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
778 (gfc_init_interface_mapping, gfc_free_interface_mapping)
779 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
780 (gfc_apply_interface_mapping): Declare.
781 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
782 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
783 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
784 (gfc_trans_allocate_array_storage): Replace loop argument with
785 separate pre and post blocks.
786 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
787 Update call to gfc_trans_allocate_array_storage.
788 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
789 interface to gfc_trans_allocate_temp_array.
790 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
792 (gfc_init_interface_mapping, gfc_free_interface_mapping)
793 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
794 (gfc_apply_interface_mapping): Make extern.
795 (gfc_conv_function_call): Build an interface mapping for array
796 return values too. Call gfc_set_loop_bounds_from_array_spec.
797 Adjust call to gfc_trans_allocate_temp_array so that code is
798 added to SE rather than LOOP.
800 2005-09-09 Richard Sandiford <richard@codesourcery.com>
803 * trans.h (gfor_fndecl_internal_realloc): Declare.
804 (gfor_fndecl_internal_realloc64): Declare.
805 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
806 (gfor_fndecl_internal_realloc64): New variable.
807 (gfc_build_builtin_function_decls): Initialize them.
808 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
809 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
810 to say whether the array can grow later. Don't allocate the array
811 on the stack if so. Don't call malloc for zero-sized arrays.
812 (gfc_trans_allocate_temp_array): Add a similar argument here.
813 Pass it along to gfc_trans_allocate_array_storage.
814 (gfc_get_iteration_count, gfc_grow_array): New functions.
815 (gfc_iterator_has_dynamic_bounds): New function.
816 (gfc_get_array_constructor_element_size): New function.
817 (gfc_get_array_constructor_size): New function.
818 (gfc_trans_array_ctor_element): Replace pointer argument with
820 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
821 argument to say whether the variable-sized part of the constructor
822 must be allocated using realloc. Grow the array when this
824 (gfc_trans_array_constructor_value): Likewise.
825 (gfc_get_array_cons_size): Delete.
826 (gfc_trans_array_constructor): If the loop bound has not been set,
827 split the allocation into a static part and a dynamic part. Set
828 loop->to to the bounds for static part before allocating the
829 temporary. Adjust call to gfc_trans_array_constructor_value.
830 (gfc_conv_loop_setup): Allow any constructor to determine the
831 loop bounds. Check whether the constructor has a dynamic size
832 and prefer to use something else if so. Expect the loop bound
833 to be set later. Adjust call to gfc_trans_allocate_temp_array.
834 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
836 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
839 * module.c (find_use_name_n): Based on original
840 find_use_name. Either counts number of use names for a
841 given real name or returns use name n.
842 (find_use_name, number_use_names): Interfaces to the
843 function find_use_name_n.
844 (read_module): Add the logic and calls to these functions,
845 so that mutiple reuses of the same real name are loaded.
847 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
854 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
855 common.c so that it is accessible to module.c. Add common_head
856 field to gfc_symbol structure. Add field for the equivalence
857 name AND new attr field, in_equivalence.
858 * match.c (gfc_match_common, gfc_match_equivalence): In loops
859 that flag common block equivalences, emit an error if the
860 common blocks are different, using sym->common_head as the
861 common block identifier. Ensure that symbols that are equivalence
862 associated with a common block are marked as being in_common.
863 * module.c (write_blank_common): New.
864 (write_common): Use unmangled common block name.
865 (load_equiv): New function ported from g95.
866 (read_module): Call load_equiv.
867 (write_equiv): New function ported from g95. Correct
868 string referencing for gfc functions. Give module
869 equivalences a unique name.
870 (write_module): Call write_equiv and write_blank_common.
871 * primary.c (match_variable) Old gfc_match_variable, made
872 static and third argument provided to indicate if parent
873 namespace to be visited or not.
874 (gfc_match_variable) New. Interface to match_variable.
875 (gfc_match_equiv_variable) New. Interface to match_variable.
876 * trans-common.c (finish_equivalences): Provide the call
877 to create_common with a gfc_common_header so that
878 module equivalences are made external, rather than local.
879 (find_equivalences): Ensure that all members in common block
880 equivalences are marked as used. This prevents the subsequent
881 call to this function from making local unions.
882 * trans-decl.c (gfc_generate_function_code): Move the call to
883 gfc_generate_contained_functions to after the call to
884 gfc_trans_common so the use-associated, contained common
885 blocks produce the correct references.
886 (gfc_create_module_variable): Return for equivalenced symbols
887 with existing backend declaration.
889 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
892 * match.c (gfc_match_common): Remove unnecessary / wrong special
893 cases for end-of-statement.
895 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
897 * gfortran.texi: Add section about implemented F2003 features.
899 2005-09-08 Richard Sandiford <richard@codesourcery.com>
902 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
903 the GFC_SS_FUNCTION case too.
904 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
905 to function pointers as well as function decls.
906 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
907 (gfc_init_interface_mapping, gfc_free_interface_mapping)
908 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
909 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
910 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
911 (gfc_apply_interface_mapping_to_ref)
912 (gfc_apply_interface_mapping_to_expr)
913 (gfc_apply_interface_mapping): New functions.
914 (gfc_conv_function_call): Evaluate the arguments before working
915 out where the result should go. Make the null pointer case provide
916 the string length in parmse.string_length. Cope with non-constant
917 string lengths, using the above functions to evaluate such lengths.
918 Use a temporary typespec; don't assign to sym->cl->backend_decl.
919 Don't assign to se->string_length when returning a cached array
922 2005-09-08 Richard Sandiford <richard@codesourcery.com>
925 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
926 after handling scalarized references. Make "indexse" inherit from
927 "se" when handling AR_ELEMENTs.
928 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
929 substring or scalar reference that follows an array section.
930 * trans-expr.c (gfc_conv_variable): When called from within a
931 scalarization loop, start out with "ref" pointing to the scalarized
932 part of the reference. Don't call gfc_advance_se_ss_chain here.
934 2005-09-07 Richard Sandiford <richard@codesourcery.com>
937 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
938 descriptor if the rhs is not a null pointer or variable.
940 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
943 * symbol.c(check_conflict): Add conflict for parameter/save,
945 2005-09-06 Richard Sandiford <richard@codesourcery.com>
948 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
949 the source, not the first element of the return value.
951 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
954 * io.c (match_io): Correctly backup if PRINT followed by
955 symbol which is not a namelist. Force blank between PRINT
956 and namelist in free form.
958 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
961 * gfortran.h (gfc_option_t): Add flag_automatic.
962 * invoke.texi: Document the -fno-automatic option.
963 * lang.opt: Add a -fautomatic option.
964 * options.c (gfc_init_options): Default for -fautomatic is on.
965 (gfc_handle_option): Add handling of -fautomatic option.
966 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
967 needed variables as SAVE.
969 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
971 * trans-array.c (gfc_trans_deferred_array): Fix comments.
973 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
975 * primary.c (match_charkind_name): Fix typo in comment leading to
978 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
981 * symbol.c (find_special): Remove.
982 (build_sym, add_init_expr, attr_decl1): Remove calls to
983 find_special in favor of calls to gfc_get_symbol.
985 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
988 * gfortran.h (symbol_attribute): Add noreturn to the structure.
989 (gfc_intrinsic_sym): Add noreturn to the structure.
990 * intrinsic.c (make_noreturn): New function.
991 (add_subroutines): Mark subroutines abort and exit as noreturn.
992 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
993 isym to the resolved symbol.
994 * trans-decl.c (gfc_get_extern_function_decl): Set function
995 as VOLATILE (== noreturn) if the noreturn attribute is set.
997 2005-08-21 Steven G. Kargl <kargls@comcast.net>
999 * decl.c: Typo in comment.
1001 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1003 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
1005 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1007 * gfortran.h (gfc_option_t): Remove source field. Add
1009 (gfc_new_file): Remove arguments in prototype.
1010 (gfc_source_file): Make 'const char *'.
1011 * f95-lang.c (gfc_init): Use gfc_source_file instead of
1012 gfc_option.source. Call gfc_new_file without arguments.
1013 * invoke.texi: Document new options '-fd-lines-as-code' and
1014 '-fd-lines-as-comment'.
1015 * lang.opt: Add new options. Alphabetize.
1016 * options.c (gfc_init_options): Initialize gfc_source_file instead
1017 of gfc_option.source. Initialize gfc_option.flag_d_lines.
1018 (form_from_filename): Move here from scanner.c. Make
1019 'filename' argument 'const'.
1020 (gfc_post_options): Set gfc_source_file. Determine source form.
1021 Warn if 'd-lines*' are used in free form.
1022 * scanner.c (gfc_source_file): Constify.
1023 (skip_fixed_comments): Deal with d-lines.
1024 (get_file): Constify argument 'name'.
1025 (load_file): Constify argument 'filename'.
1026 (form_from_filename): Moved to options.c.
1027 (gfc_new_file): Remove arguments. Don't initialize
1028 gfc_source_file, don't determine source form.
1029 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
1030 of gfc_option.source.
1032 2005-08-19 Steven G. Kargl <kargls@comcast.net>
1035 * gfortran.h: Remove PATH_MAX definition.
1036 * module.c (write_module, gfc_dump_module): Use alloca to allocate
1038 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
1040 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
1042 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
1045 2005-08-14 Asher Langton <langton2@llnl.gov>
1047 * parse.c (match): Enclose macro in do...while(0) and braces.
1049 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1052 * gfortran.texi: Document PRINT namelist.
1054 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1057 * io.c (match_io): Add code to implement PRINT namelist.
1059 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
1061 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
1064 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1065 Steven Bosscher <stevenb@suse.de>
1068 * gfortran.h: Add is_main_program member to symbol_attribute.
1069 * trans-decl: Add a gfor_fndecl_set_std tree.
1070 (gfc_build_builtin_function_decls): Create it.
1071 (gfc_generate_function_code): Add this call at the beginning of
1073 * trans.c (gfc_generate_code): Move main_program and attr.
1074 * trans.h: Add declaration for gfor_fndecl_set_std.
1076 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1079 gfortran.h: Declare new function gfc_resolve_dim_arg.
1080 resolve.c: New function gfc_resolve_dim_arg.
1081 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1082 (gfc_resolve_any): Likewise.
1083 (gfc_resolve_count): Likewise.
1084 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1085 gfc_default_integer_kind, convert it to default integer type.
1086 (gfc_resolve_eoshift): Likewise.
1087 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1088 (gfc_resolve_maxval): Likewise.
1089 (gfc_resolve_minloc): Likewise.
1090 (gfc_resolve_minval): Likewise.
1091 (gfc_resolve_product): Likewise.
1092 (gfc_resolve_spread): Likewise.
1093 (gfc_resolve_sum): Likewise.
1095 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1097 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1098 functions for new intrinsics TTYNAM and ISATTY.
1099 * intrinsic.c (add_functions, add_subroutines): Add new
1101 * intrinsic.h: Add prototypes for new check and resolve
1103 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1104 resolve functions for intrinsics TTYNAM and ISATTY.
1105 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1106 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1108 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1110 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1113 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1116 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1117 * gfortran.h: Add enums for FLUSH.
1118 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1119 comment appropriately. (gfc_match_flush): New function.
1120 * match.c (gfc_match_if): Add match for flush.
1121 * match.h: Add prototype.
1122 * parse.c (decode_statement): Add flush to 'f' case.
1123 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1124 * resolve.c (resolve_code): Add flush case.
1125 * st.c (gfc_free_statement): Add flush case.
1126 * trans-io.c: Add prototype for flush.
1127 (gfc_build_io_library_fndecls): Build fndecl for flush.
1128 (gfc_trans_flush): New function.
1129 * trans-stmt.h: Add prototype.
1130 * trans.c (gfc_trans_code): Add case for flush.
1132 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1134 * primary.c (match_hollerith_constant): Fix typo.
1136 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1138 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1139 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1140 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1141 comment/doc typos. Follow spelling conventions.
1143 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1147 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1148 attributes, call gfc_match_array_ref up to twice and don't do any
1149 substring or component processing.
1150 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1151 REF_SUBSTRING or nothing if needed. Check that substrings
1152 don't have zero length.
1154 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1156 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1157 stop_numeric and stop_string as non-returning.
1159 2005-08-04 Paul Brook <paul@codesourcery.com>
1161 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1162 (gfc_conv_expr_lhs): Fix assertion.
1163 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1165 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1168 * expr.c (simplify_parameter_variable): Do not copy the subobject
1169 references if the expression value is a constant.
1171 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1173 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1175 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1176 fix description of ceiling in index.
1178 2005-07-31 Steven Bosscher <stevenb@suse.de>
1180 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1181 malloc functions the 'malloc' attribute. Give runtime_error the
1182 'noreturn' attribute.
1184 2005-07-31 Steven Bosscher <stevenb@suse.de>
1186 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1187 of the assigned goto variable.
1189 2005-07-29 Steven Bosscher <stevenb@suse.de>
1191 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1193 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1195 * fortran/f95-lang.c (language_function): Remove
1196 named_labels, shadowed_labels, returns_value, returns_abnormally,
1197 warn_about_return_type, and extern_inline fields.
1198 (named_labels): Remove variable.
1199 (gfc_init_decl_processing): Remove setting of named_labels.
1201 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1204 * resolve.c (resolve_operator): Improve diagnostic for comparison
1205 of logicals with invalid operator.
1207 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1210 * data.c (gfc_assign_data_value_range): Call
1211 create_character_initializer if last_ts is a character type.
1213 2005-07-22 Manfred Hollstein <mh@suse.com>
1215 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1216 * matchexp.c (gfc_match_expr): Likewise.
1218 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1220 Make CONSTRUCTOR use VEC to store initializers.
1221 * trans-array.c (gfc_build_null_descriptor,
1222 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1223 Update to cope with VEC in CONSTRUCTOR_ELTS.
1224 * trans-common.c (create_common): Likewise.
1225 * trans-expr.c (gfc_conv_structure): Likewise.
1226 * trans-stmt.c (gfc_trans_character_select): Use
1227 build_constructor_from_list instead of build_constructor.
1229 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1232 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1233 is matched against interfaces in parent namespaces. If there
1234 the symtree is set to point to the interface.
1236 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1239 * decl.c (do_parm): Adjust character initializer to character length
1240 of symbol before assigning.
1242 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1244 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1246 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1248 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1249 (gfc_error_buf): Add allocated and index fields. Change message
1250 field from array to a pointer.
1251 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1252 (cur_error_buffer): New variable.
1253 (error_char): Use cur_error_buffer->{message,index} instead of
1254 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1256 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1257 cur_error_buffer and its index rather than {warning,error}_ptr
1258 and use_warning_buffer.
1259 (gfc_warning_check, gfc_error_check): Don't print anything if
1261 (gfc_push_error): Allocate saved message with xstrdup.
1262 (gfc_pop_error): Free saved message with gfc_free.
1263 (gfc_free_error): New function.
1264 * primary.c (match_complex_constant): Call gfc_free_error if
1265 gfc_pop_error will not be called.
1266 * match.c (gfc_match_st_function): Likewise.
1269 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1270 file. Fix file left but not entered warning.
1272 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1273 Steven G. Kargl <kargls@comcast.net>
1275 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1276 for the array and attach to namespace list for automatic deallocation.
1278 2005-07-13 Andreas Schwab <schwab@suse.de>
1280 * Make-lang.in (fortran/dependency.o): Depend on
1281 $(GFORTRAN_TRANS_DEPS).
1283 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1285 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1287 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1288 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1289 Don't clear maskindexes here.
1291 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1293 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1296 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1298 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1301 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1303 * scanner.c (load_line): Add pbuflen argument, don't make
1304 buflen static. If maxlen == 0 or preprocessor_flag,
1305 don't truncate at buflen, but at maxlen. In xrealloc add
1306 1 byte at the end for the terminating '\0'. Don't fill
1307 with spaces up to buflen, but gfc_option.fixed_line_length.
1308 (load_file): Adjust load_line caller. Add line_len variable.
1310 * scanner.c (preprocessor_line): Only set current_file->line when errors
1311 have not been encountered. Warn and don't crash if a file leave
1312 preprocessor line has no corresponding entering line. Formatting.
1314 2005-07-07 Steven Bosscher <stevenb@suse.de>
1316 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1317 for the hollerith length. Fix indentation.
1319 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1324 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1325 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1327 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1328 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1329 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1331 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1332 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1333 (gfc_check_assign): Enable conversion from Hollerith to other.
1334 * gfortran.h (bt): Add BT_HOLLERITH.
1335 (gfc_expr): Add from_H flag.
1336 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1337 (add_conversions): Add conversions from Hollerith constant to other.
1338 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1339 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1340 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1341 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1342 * primary.c (match_hollerith_constant): New function.
1343 (gfc_match_literal_constant): Add match Hollerith before Integer.
1344 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1346 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1347 convert Hollerith constant to tree.
1348 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1349 length to set string expr.
1350 (set_string): Deal with array assigned Hollerith constant and character
1352 * gfortran.texi: Document Hollerith constants as extention support.
1354 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1357 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1359 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1361 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1364 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1366 * gfortran.texi, intrinsic.texi: Fix typos.
1367 * symbol.c: Fix a comment typo.
1369 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1371 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1372 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1373 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1374 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1377 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1380 * io.c (match_dt_element): Do not allow END tag in PRINT or
1383 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1385 * lang.opt: Remove "." from end of help texts.
1387 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1389 * gfortran.texi: Fix typos and grammar.
1390 * invoke.texi: Fix typos and grammar.
1391 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1392 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1395 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1397 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1398 type than boolean_type_node.
1400 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1402 * all files: Update FSF address in copyright headers.
1404 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1407 * gfortran.h: Add symbols for new intrinsic functions.
1408 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1409 * intrinsic.h: Add prototypes for the new functions.
1410 * iresolve.c (gfc_resolve_acosh): New function.
1411 (gfc_resolve_asinh): New function.
1412 (gfc_resolve_atanh): New function.
1413 * mathbuiltins.def: Add defines.
1414 * simplify.c (gfc_simplify_acosh): New function.
1415 (gfc_simplify_asinh): New function.
1416 (gfc_simplify_atanh): New function.
1418 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1420 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1422 2005-06-22 Paul Brook <paul@codesourcery.com>
1425 * symbol.c (gfc_is_var_automatic): New function.
1426 (save_symbol): Use it.
1428 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1429 Paul Thomas <pault@gcc.gnu.org>
1433 * module.c (mio_namelist): New function. Correct to set
1434 namelist_tail and to give error on renaming namelist by use
1436 (mio_symbol): Call mio_namelist.
1438 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1440 * gfortran.h: Add flag_backslash compile-time option.
1441 * lang.opt: Add support for -fbackslash option.
1442 * options.c: Likewise.
1443 * primary.c: Implement behavior for -fno-backslash.
1444 * invoke.texi: Add doc for -fbackslash option.
1445 * gfortran.texi: Remove mention of -fno-backslash as a
1448 2005-06-20 Steven G. Kargl <kargls@comcast.net>
1452 * match.c (gfc_match_label): Detect duplicate labels.
1455 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
1457 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1458 in a warning message.
1460 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
1461 Steven G. Kargl <kargls@comast.net>
1464 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1465 for an array; check that sym->as is NULL.
1468 2005-06-18 Steven G. Kargl <kargls@comcast.net>
1470 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1471 functions whose simplification routine return FAILURE.
1473 2005-06-13 Geoffrey Keating <geoffk@apple.com>
1475 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1476 (rule for installing f95.1 manpage): Does depend on installdirs.
1478 2005-06-13 Jakub Jelinek <jakub@redhat.com>
1481 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1482 in the innermost loop.
1484 * trans-expr.c (gfc_conv_function_call): Return int instead of
1485 void. Use a local variable for has_alternate_specifier and
1486 return it. Avoid modification of function type's return value
1487 in place, since it may be shared.
1488 * trans.h (has_alternate_specifier): Remove.
1489 (gfc_conv_function_call): Change return type.
1490 * trans-stmt.c (has_alternate_specifier): Remove.
1491 (gfc_trans_call): Add a local has_alternate_specifier variable,
1492 set it from gfc_conv_function_call return value.
1494 2005-06-12 Richard Henderson <rth@redhat.com>
1496 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1497 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1498 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1499 (gfc_trans_allocate_array_storage): Use them.
1500 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1501 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1502 (gfc_trans_deferred_array): Likewise.
1503 * trans-expr.c (gfc_conv_function_call): Likewise.
1504 (gfc_trans_subcomponent_assign): Likewise.
1505 (gfc_trans_pointer_assignment): Likewise.
1506 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1507 * trans-types.c (gfc_array_descriptor_base): New.
1508 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1509 (gfc_get_array_descriptor_base): Break out from ...
1510 (gfc_get_array_type_bounds): ... here. Create type variants.
1511 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1512 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1514 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1516 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1517 calling conventions. Look at sym instead of sym->result.
1518 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1519 Remove condition which is always false with workaround removed.
1520 (gfc_return_by_reference): Always look at sym, never at sym->result.
1522 2005-06-11 Steven G. Kargl <kargls@comcast.net>
1526 * trans-array.c (gfc_array_deallocate): pstat is new argument
1527 (gfc_array_allocate): update gfc_array_deallocate() call.
1528 (gfc_trans_deferred_array): ditto.
1529 * trans-array.h: update gfc_array_deallocate() prototype.
1530 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1531 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1533 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
1535 * intrinsic.texi: Add documentation for dcmplx, digits,
1536 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1538 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1541 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1542 Generate correct exit condition in case of negative steps in
1545 * invoke.texi: Fix description of flags required for compatibility
1548 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1549 Erik Schnetter <schnetter@aei.mpg.de>
1552 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1553 remove FIXME comment.
1555 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1557 * match.c (match_forall_iterator): Don't immediately give error if '='
1558 is not followed by an expression.
1560 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1561 Erik Edelmann <erik.edelmann@iki.fi>
1563 * array.c (gfc_match_array_constructor): Disallow empty array
1566 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
1568 * fortran/intrinsic.texi: Add documentation for
1569 command_argument_count, conjg, dconjg, count,
1570 cpu_time, cshift, date_and_time, dble, dfloat.
1572 2005-06-01 Roger Sayle <roger@eyesopen.com>
1574 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1575 its always gfc_convert_constant, instead take a "standard" argument.
1576 (add_conversions): Change all existing calls of add_conv to pass
1577 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1578 extensions support integer-logical and logical-integer conversions.
1579 (gfc_convert_type_warn): Warn about use the use of these conversions
1580 as a extension when appropriate, i.e. with -pedantic.
1581 * simplify.c (gfc_convert_constant): Add support for integer to
1582 logical and logical to integer conversions, using gfc_int2log and
1584 * arith.c (gfc_log2int, gfc_int2log): New functions.
1585 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1586 * gfortran.texi: Document this new GNU extension.
1588 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
1590 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1591 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1592 Correct comments and replace convert of integer_one_node with
1595 2005-06-01 Jakub Jelinek <jakub@redhat.com>
1598 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1599 to avoid giving error multiple times.
1600 (resolve_entries): Don't error about BT_UNKNOWN here.
1601 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1602 (resolve_fntype): New function.
1603 (gfc_resolve): Call resolve_fntype.
1605 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1608 * fortran/io.c (resolve_tag): Fix error message.
1610 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1612 * fortran/trans-decl.c: Don't include errors.h.
1613 * fortran/Make-lang.in: Updates dependencies.
1615 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
1620 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1621 string length from the expression typespec character length value
1622 and set temp_ss->stringlength and backend_decl. Obtain the
1623 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1624 Dereference the expression to obtain the character.
1625 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1626 dereference of scalar character pointer structure components.
1627 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1628 string length for the structure component from the component
1631 2005-05-30 Roger Sayle <roger@eyesopen.com>
1633 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1634 * options.c (gfc_init_options): By default, allow legacy extensions
1635 but warn about them.
1636 (gfc_post_options): Make -pedantic warn about legacy extensions
1637 even with -std=legacy.
1638 (gfc_handle_option): Make -std=gnu follow the default behaviour
1639 of warning about legacy extensions, but allowing them. Make the
1640 new -std=legacy accept everything and warn about nothing.
1641 * lang.opt (std=legacy): New F95 command line option.
1642 * invoke.texi: Document both -std=f2003 and -std=legacy.
1643 * gfortran.texi: Explain the two types of extensions and document
1644 how they are affected by the various -std= command line options.
1646 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1648 * trans-expr.c: Remove trailing ^M.
1650 * trans-expr.c: Fix comment typos.
1652 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
1660 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1661 length to temp_ss for character pointer array assignments.
1662 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1663 dereferencing of characters and character pointers.
1664 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1665 length as return argument for various kinds of handling of return.
1666 Return a char[]* temporary for character pointer functions and
1667 dereference the temporary upon return.
1669 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
1670 Steven G. Kargl <kargls@comcast.net>
1673 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1675 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1678 * io.c (format_item_1): Add check and extension warning for
1681 2005-05-28 Steven G. Kargl <kargls@comcast.net>
1683 * arith.c (gfc_arith_init_1): Fix off by one problem;
1684 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1686 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
1687 Steven G. Kargl <kargls@comcast.net>
1689 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1692 2005-05-27 Steven G. Kargl <kargls@comcast.net>
1694 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1695 like types in comparsion.
1697 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1699 * data.c, parse.c, trans-array.c, trans-decl.c,
1700 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1701 trans.h: Fix comment typos. Follow spelling conventions.
1703 2005-05-22 Roger Sayle <roger@eyesopen.com>
1705 * gfortran.texi: Document some more GNU extensions.
1707 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1709 * error.c (gfc_warning): Fix typo in comment.
1711 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1714 * fortran/iresolve.c (gfc_resolve_reshape): Add
1715 gfc_type_letter (BT_COMPLEX) for complex to
1716 to resolved function name.
1718 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1720 * array.c (gfc_match_array_constructor): Support [ ... ]
1721 style array constructors.
1723 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1725 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1726 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1727 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1728 to correct enum type.
1729 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1730 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1731 instead of FIX_FLOOR_EXPR.
1733 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1736 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1737 build character length.
1739 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1741 * trans-types.c (gfc_array_range_type): New variable.
1742 (gfc_init_types): Initialize gfc_array_range_type.
1743 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1745 2005-05-17 Jakub Jelinek <jakub@redhat.com>
1748 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1749 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1750 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1752 (generate_loop_for_rhs_to_temp): Likewise.
1753 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1754 It non-NULL, add it to body.
1755 (allocate_temp_for_forall_nest_1): New function, split from
1756 allocate_temp_for_forall_nest.
1757 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1758 propagate it down to compute_overall_iter_number. Use
1759 allocate_temp_for_forall_nest_1.
1760 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1761 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1762 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1763 and generate_loop_for_temp_to_lhs.
1764 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1765 allocate_temp_for_forall_nest.
1766 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1767 stmtblock_t. Call compute_overall_iter_number just once, then
1768 allocate_temp_for_forall_nest_1 twice with the same size.
1769 Initialize mask indexes if nested_forall_info != NULL.
1770 (gfc_trans_where_2): Initialize mask indexes before calling
1771 gfc_trans_nested_forall_loop.
1773 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1774 Jerry DeLisle <jvdelisle@verizon.net>
1777 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
1778 resolve ICE on assign of format label.
1779 * trans-io.c (set_string): add fold-convert to properly
1780 handle assigned format label in write.
1782 2005-05-13 Paul Brook <paul@codesourcery.com>
1784 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1786 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1788 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1790 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1793 * io.c (check_format): Look for literal characters inside
1796 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1798 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1799 attribute from result symbol to function symbol.
1800 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1801 instead of sym->result->attr.dimension.
1803 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1806 * gfortran.h (gfc_option): Add flag_f2c.
1807 * invoke.texi: Document '-ff2c' command line option. Adapt
1808 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1809 * lang.opt (ff2c): New entry.
1810 * options.c (gfc-init_options): Set default calling convention
1811 to -fno-f2c. Mark -fsecond-underscore unset.
1812 (gfc_post_options): Set -fsecond-underscore if not explicitly set
1814 (handle_options): Set gfc_option.flag_f2c according to requested
1816 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1817 intrinsics where necessary.
1818 (gfc_trans_deferred_vars): Change todo error to assertion.
1819 * trans-expr.c (gfc_conv_variable): Dereference access
1820 to hidden result argument.
1821 (gfc_conv_function_call): Add hidden result argument to argument
1822 list if f2c calling conventions requested. Slightly restructure
1823 tests. Convert result of default REAL function to requested type
1824 if f2c calling conventions are used. Dereference COMPLEX result
1826 * trans-types.c (gfc_sym_type): Return double for default REAL
1827 function if f2c cc are used.
1828 (gfc_return_by_reference): Slightly restructure logic. Return
1829 COMPLEX by reference depending on calling conventions.
1830 (gfc_get_function_type): Correctly make hidden result argument a
1831 pass-by-reference argument for COMPLEX. Remove old code which does
1832 this for derived types.
1834 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1836 * match.c (gfc_match_return): Only require space after keyword when
1837 it is obligatory. Only give stdwarn to after matching is successful.
1838 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1840 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
1842 * intrinsic.texi: Fix typos.
1844 2005-05-07 Steven G. Kargl <kargls@comcast.net>
1846 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
1847 description to include information about scalar arguments.
1849 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
1851 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1852 match.h, trans-array.h: Update copyright.
1854 2005-04-29 Tom Tromey <tromey@redhat.com>
1856 * f95-lang.c (poplevel): Updated for change to build_block.
1858 2005-04-29 Jakub Jelinek <jakub@redhat.com>
1862 * trans-expr.c (gfc_conv_variable): Handle return values in functions
1863 with alternate entry points.
1864 * resolve.c (resolve_entries): Remove unnecessary string termination
1865 after snprintf. Set result of entry master.
1866 If all entries have the same type, set entry master's type
1867 to that common type, otherwise set mixed_entry_master attribute.
1868 * trans-types.c (gfc_get_mixed_entry_union): New function.
1869 (gfc_get_function_type): Use it for mixed_entry_master functions.
1870 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1871 * decl.c (gfc_match_entry): Set entry->result properly for
1873 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1875 (build_entry_thunks): Handle return values in entry thunks.
1876 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1877 shared between multiple contexts.
1878 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1879 current_function_decl instead of sym->backend_decl. Skip over
1880 entry master's entry id argument. For mixed_entry_master entries or
1881 their results, return a COMPONENT_REF of the fake result.
1882 (gfc_trans_deferred_vars): Don't warn about missing return value if
1883 at least one entry point uses RESULT.
1884 (gfc_generate_function_code): For entry master returning
1885 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1886 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1887 values optional just because they are in entry master.
1889 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1891 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1892 Tobias forgot this in previous commit.
1894 2005-04-29 Paul Brook <paul@codesourcery.com>
1896 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
1899 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1901 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1902 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1903 IMPLICIT NONE, set seen_implicit_none.
1904 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1906 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1908 * gfortran.h (gfc_gsymbol): Make name a const char *.
1909 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1912 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1915 * resolve.c (resolve_actual_arglist): Issue an error if a statement
1916 functions is used as actual argument.
1918 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1921 * interface.c (compare_parameter): Ignore type for EXPR_NULL
1922 only if type is BT_UNKNOWN.
1924 2005-04-25 Paul Brook <paul@codesourcery.com>
1925 Steven G. Kargl <kargls@comcast.net>
1928 * check.c (gfc_check_ichar_iachar): New function.
1929 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1930 * intrinsic.c (add_functions): Use it.
1931 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1932 character expression lengths.
1934 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1937 * trans-common.c (translate_common): Cast offset and
1938 common_segment->offset to type int for warning message.
1940 2005-04-23 DJ Delorie <dj@redhat.com>
1942 * trans-decl.c: Adjust warning() callers.
1944 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1946 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1947 intermediate representation. Fix typo in comment.
1949 2005-04-21 Steven G. Kargl <kargls@comcast.net>
1951 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1952 simplify logic; Add a gcc_assert.
1954 2005-04-19 Steven G. Kargl <kargls@comcast.net>
1956 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1958 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
1959 Steven G. Kargl <kargls@comcast.net>
1961 * invoke.texi: Update -Waliasing description
1963 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1966 * resolve.c (resolve_variable): If e->symtree is not set, this
1967 ought to be a FAILURE, and not a segfault.
1969 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
1976 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1977 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1978 declarations of old namelist functions.
1979 (build_dt): Simplified call to transfer_namelist_element.
1980 (nml_get_addr_expr): Generates address expression for start of
1981 object data. New function.
1982 (nml_full_name): Qualified name for derived type components. New
1984 (transfer_namelist_element): Modified for calls to new functions
1985 and improved derived type handling.
1987 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
1989 * scanner.c (gfc_next_char_literal): Reset truncation flag
1990 for lines ending in a comment for both fixed and free form.
1991 (load_line): Do not set truncated flag if only truncating
1994 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
1997 * gfortran.h (gfc_linebuf): Add truncated field.
1998 * parse.c (next_statement): Handle warning for truncated
2000 * scanner.c (load_line): Return if line was truncated.
2001 No longer warn for truncated lines. Remove unused parameters.
2002 (load_file): Store load_line return value to linebuf.
2003 (gfc_error_recovery): Do not advance line at the end.
2005 2005-04-14 Steven G. Kargl <kargls@comcast.net>
2007 * gfortran.h (gfc_real_info): Add subnormal struct member.
2008 * arith.c (gfc_arith_init_1): Set it.
2009 (gfc_check_real_range): Use it.
2010 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
2012 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
2014 * simplify.c: Fix a comment typo.
2016 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2018 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2020 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2022 * simplify.c (gfc_simplify_nearest): Overhaul.
2024 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
2026 * interface.c: Fix a comment typo.
2028 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2030 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
2033 2005-04-09 Steven G. Kargl <kargls@comcast.net>
2035 * simplify.c (gfc_simplify_anint): Use mpfr_round()
2036 (gfc_simplify_dnint): ditto.
2037 (gfc_simplify_nint): ditto.
2039 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
2042 * io.c (check_format): Allow an optional comma
2043 between descriptors.
2045 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2047 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
2048 comment according to GNU coding style.
2049 (gfc_match_if): Remove gfc_ prefix in call to
2050 match_arithmetic_if.
2052 2005-04-08 Diego Novillo <dnovillo@redhat.com>
2054 * match.c (gfc_match_arithmetic_if): Declare static.
2056 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2059 * match.c (gfc_match_arithmetic_if): New function to match an
2060 arithmetic IF statement.
2061 (gfc_match_if): Use gfc_match_arithmetic_if to match an
2062 arithmetic IF statement embedded in a simple IF statement.
2064 2005-04-07 Steven G. Kargl <kargls@comcast.net>
2066 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
2068 2005-04-06 Steven G. Kargl <kargls@comcast.net>
2070 * invoke.texi: Remove documentation of -std=f90
2072 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2074 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2075 non-pointer assignment.
2077 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2082 * array.c (resolve_character_array_constructor): New function. Set
2083 constant character array's character length.
2084 (gfc_resolve_array_constructor): Use it.
2085 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2087 (gfc_set_constant_character_len): New function. Set constant character
2088 expression according the given length.
2089 * match.h (gfc_set_constant_character_len): Add prototype.
2091 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2093 * intrinsic.texi: BES?? functions are not in the f95 standard.
2095 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2097 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2099 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2101 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2102 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2104 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2106 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2108 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2110 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2111 trans.h: Fix comment typos.
2113 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2115 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2116 flag_default_integer, flag_default_real
2117 * invoke.texi: Update documentation
2118 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2119 fdefault-integer-8, and fdefault-real-8 definitions.
2120 * options.c (gfc_init_options): Set option defaults
2121 (gfc_handle_option): Handle command line options.
2122 * trans-types.c (gfc_init_kinds): Use options.
2124 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2126 * f95-lang.c (builtin_function): Process the attrs parameter
2127 and apply the "const" attribute to the builtin if found.
2129 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2131 * intrinsic.texi: Document AIMAG, AINT, ALL
2133 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2135 * arith.c (check_result): Fix illogical logic.
2137 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2139 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2140 contain no equivalence objects.
2141 (add_equivalences): New argument saw_equiv.
2142 (trans_common): New local variable saw_equiv.
2143 (finish_equivalences): Add a local variable dummy, Always pass true
2144 for the 3rd parameter to create_common.
2146 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2148 * intrinsic.texi: Fix "make dvi"
2150 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2152 * intrinsic.texi: New file.
2153 * gfortran.texi: Include it; white space change; fix typo.
2155 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2157 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2159 2005-03-23 Steven Bosscher <stevenb@suse.de>
2161 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2162 * trans-array.c (gfc_trans_allocate_array_storage,
2163 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2164 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2165 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2166 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2167 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2168 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2169 gfc_conv_expr_descriptor): Likewise.
2170 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2171 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2172 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2173 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2174 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2175 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2176 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2177 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2178 gfc_conv_intrinsic_merge, prepare_arg_info,
2179 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2180 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2181 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2182 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2183 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2184 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2186 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2187 * trans.c (gfc_add_modify_expr): Likewise.
2189 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2191 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2192 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2193 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2194 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2195 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2196 gfc_check_perror): new functions to check newly implemented
2198 * gfortran.h: adding symbols for new intrinsics.
2199 * intrinsic.c (add_functions): adding new intrinsics.
2200 (add_subroutines): adding new intrinsics.
2201 * intrinsic.h: prototype for all checking and resolving
2203 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2204 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2205 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2206 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2207 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2208 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2209 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2210 gfc_resolve_perror): new functions to resolve intrinsics.
2211 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2214 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2216 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2217 in which the variable is declared.
2220 * resolve.c (was_declared): Also check for dummy attribute.
2222 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2224 * gfortran.h (arith): Remove ARITH_0TO0.
2225 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2226 (gfc_arith_power): Remove special casing of zero to integral
2229 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2231 * Make-lang.in (fortran-warn): Remove -Wno-error.
2232 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2233 trans-common.o-warn): Specify -Wno-error.
2235 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2237 * trans-array.c (gfc_trans_static_array_pointer,
2238 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2239 comment and formatting typos.
2241 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2243 * invoke.texi: Fix typos.
2245 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2247 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2249 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2251 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2252 to zero on label_tree.
2254 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2257 * io.c (resolve_tag): Add checking on assigned label.
2258 (match_dt_format): Does not set symbol assign attribute.
2259 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2260 * resolve.c (resolve_code): Add checking on assigned label.
2261 * trans-common.c (build_field): Deals with common variable assigned
2263 * trans-stmt.c (gfc_conv_label_variable): New function.
2264 (gfc_trans_label_assign): Use it.
2265 (gfc_trans_goto): Ditto.
2266 * trans-io.c (set_string): Ditto.
2267 * trans.h (gfc_conv_label_variable): Add prototype.
2269 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2272 * symbol.c (check_conflict): A dummy argument can't be a statement
2275 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2277 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2278 the argument of the shift to the unsigned type.
2280 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2283 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2285 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2288 * resolve.c (gfc_resolve): Check if character lengths are
2289 specification expressions.
2291 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2294 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2295 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2297 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2298 Remove declaration / prototype.
2299 * trans-common.c (build_equiv_decl): Give union a name. Check if
2300 it can be put on the stack.
2301 * trans-decl.c (gfc_stack_space_left): Move function here.
2302 (gfc_build_qualified_array): Fix comment typo.
2303 * trans.h (gfc_put_var_on_stack): Add prototype.
2305 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2307 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2308 * decl.c, trans.c: Don't use C++ style comments.
2309 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2310 ifsrc): Give names to enums and use ENUM_BITFIELD.
2311 (gfc_access): Remove trailing comma.
2313 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2316 * primary.c (match_complex_constant): Mangled complex constant may
2317 be an implied do-loop. Give implied do-loop matcher a chance.
2319 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2322 * resolve.c (compare_shapes): New function.
2323 (resolve_operator): Use it.
2325 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2327 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2328 type for COMPLEX constants.
2330 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2333 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2334 argument from a pointer function also if it has a result clause.
2336 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2338 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2340 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2342 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2345 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2349 * simplify.c (gfc_simplify_bound): Rename to ...
2350 (simplify_bound): ... this and overhaul.
2352 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2354 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2355 (gfc_conv_intrinsic_function): update function calls
2357 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2360 * trans-types.c (gfc_max_integer_kind): Declare
2361 (gfc_init_kinds): Initialize it.
2362 * gfortran.h (gfc_max_integer_kind): extern it.
2363 * primary.c (match_boz_constant): Use it; remove gfortran extension
2364 of kind suffixes on BOZ literal constants
2367 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2369 * arith.c (gfc_check_real_range): Remove multiple returns
2370 (check_result): New function.
2371 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2372 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2375 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2377 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2380 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2382 Unrevert previously reverted patch. Adding this fix:
2383 * module.c (find_true_name): Deal with NULL module.
2385 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2387 Revert yesterday's patch:
2388 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2390 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2391 ... argument. Copy string instead of pointing to it.
2393 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2395 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2396 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2398 * module.c (mio_namespace_ref, load_needed): Likewise.
2399 * parse.c (parse_interface, parse_contained): Likewise. Here the
2400 correct second argument matters.
2401 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2402 parent's implicit types if this is set.
2403 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2404 * trans-common.c (build_common_decl): Likewise.
2406 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2408 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2409 and checking 'untyped' attribute.
2411 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2412 fields into new struct 'op' inside the 'value' union.
2413 * arith.c (eval_intrinsic): Adapt all users.
2414 * dependency.c (gfc_check_dependency): Likewise.
2415 * dump-parse-tree.c (gfc_show_expr): Likewise.
2416 * expr.c (gfc_get_expr): Don't clear removed fields.
2417 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2418 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2419 check_intrinsic_op): Adapt to new field names.
2420 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2421 nullify 'esym' and 'isym' fields of new function call.
2422 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2423 Adapt to renamed structure fields.
2424 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2425 * module.c (mio_expr): Likewise.
2426 * resolve.c (resolve_operator): Likewise.
2427 (gfc_find_forall_index): Likewise. Only look through operands
2428 if dealing with EXPR_OP
2429 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2430 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2431 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2434 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2435 'name' a 'const char *'.
2436 (gfc_symbol): Likewise, also for 'module'.
2437 (gfc_symtree): Make 'name' a 'const char *'.
2438 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2439 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2441 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2442 initialize 'SYM->module'.
2443 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2444 pointer instead of empty string.
2445 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2446 * interface.c (gfc_compare_types): Adapt check to account for possible
2448 (compare_actual_formal): Check for NULL pointer instead of empty
2450 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2451 Add 'const' qualifier.
2452 (conv_name): Return a heap allocated string.
2453 (find_conv): Add 'const' qualifier to 'target'.
2454 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2455 (make_generic): Check for NULL pointer instead of empty string.
2456 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2457 (add_conv): No need to strcpy result from 'conv_name'.
2458 (sort_actual): Check for NULL pointer instead of empty string.
2459 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2461 * module.c (compare_true_names): Compare pointers instead of strings
2462 for 'module' member.
2463 (find_true_name): Initialize string fields with gfc_get_string.
2464 (mio_pool_string): New function.
2465 (mio_internal_string): Adapt comment.
2466 (mio_component_ref, mio_component, mio_actual_arg): Use
2467 'mio_pool_string' instead of 'mio_internal_string'.
2468 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2469 Add level of indirection. Use 'mio_pool_string' instead of
2470 'mio_internal_string'.
2471 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2472 (write_common, write_symbol): Use 'mio_pool_string' instead of
2473 'mio_internal_string'.
2474 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2475 instead of empty string.
2476 (write_operator, write_generic): Pass correct type variable to
2477 'mio_symbol_interface'.
2478 (write_symtree): Use 'mio_pool_string' instead of
2479 'mio_internal_string'.
2480 * primary.c (match_keyword_arg): Adapt check to possible
2481 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2482 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2483 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2485 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2486 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2488 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2489 pointer instead of empty string.
2490 * trans-decl.c (gfc_sym_mangled_identifier,
2491 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2492 gfc_get_symbol_decl): Likewise.
2493 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2494 argument. Copy string instead of pointing to it.
2496 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2498 * intrinsic.h, st.c: Update copyright.
2500 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2502 * symbol.c: Typos in comments.
2504 2005-02-20 Steven G. Kargl <kargls@comcast.net>
2506 * expr.c (gfc_type_convert_binary): Typo in comment.
2508 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2510 * check.c (gfc_check_selected_int_kind): New function.
2511 * intrinsic.h: Prototype it.
2512 * intrinsic.c (add_function): Use it.
2513 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2514 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2516 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2518 * check.c (gfc_check_int): improve checking of optional kind
2519 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2521 2005-02-19 Steven G. Kargl <kargls@comcast.net>
2523 * check.c (gfc_check_achar): New function
2524 * intrinsic.h: Prototype it.
2525 * intrinsic.c (add_function): Use it.
2527 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2529 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2530 generate_loop_for_rhs_to_temp): Remove if whose condition is
2533 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2535 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2536 (gfc_use_derived): ... this function.
2538 2005-02-09 Richard Henderson <rth@redhat.com>
2540 * f95-lang.c (gfc_init_builtin_functions): Call
2541 build_common_builtin_nodes; do not define any functions handled
2544 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2546 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2548 (gfc_is_constant_expr): Check 'ref' to determine if substring
2549 reference is constant.
2550 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2551 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2553 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2555 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2557 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2558 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2559 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2560 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2561 gfc_add_procedure): Add argument.
2562 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2563 gfc_match_null, match_type_spec, match_attr_spec,
2564 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2565 Update callers to match.
2566 (gfc_match_entry): Likewise, fix comment typo.
2567 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2568 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2569 gfc_match_derived_decl): Update callers.
2570 * interface.c (gfc_match_interface): Likewise.
2571 * match.c (gfc_match_label, gfc_add_flavor,
2572 gfc_match_call, gfc_match_common, gfc_match_block_data,
2573 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2575 * parse.c (parse_derived, parse_interface, parse_contained),
2576 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2577 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2578 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2579 use when printing error message.
2580 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2581 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2582 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2583 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2584 gfc_add_procedure): Add new 'name' argument. Pass along to
2585 check_conflict and check_used.
2586 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2587 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2588 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2589 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2590 argument in calls to any of the modified functions.
2592 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2594 * gfortran.texi: Don't give last update date.
2596 2006-01-30 Richard Henderson <rth@redhat.com>
2598 * options.c (gfc_init_options): Zero flag_errno_math.
2600 2005-01-29 Paul Brook <paul@codesourcery.com>
2603 * check.c (real_or_complex_check): New function.
2604 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2605 * intrinsic.c (add_functions): Use new check functions.
2606 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2609 2005-01-29 Steven G. Kargl <kargls@comcast.net>
2612 * expr.c (gfc_check_assign): Check for conformance of logical operands
2614 2004-01-27 Steven Bosscher <stevenb@suse.de>
2616 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2617 TREE_USED for all labels.
2618 (gfc_trans_entry_master_switch): Use it instead of building a
2620 * trans-io.c (add_case): Likewise.
2621 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2623 2004-01-23 Paul Brook <paul@codesourcery.com>
2624 Steven G. Kargl <kargls@comcast.net>
2627 * arith.c (gfc_convert_real): Remove sign handling.
2628 * primary.c (match_digits): Allow whitespace after initial sign.
2629 (match_real_const): Handle signs here. Allow whitespace after
2630 initial sign. Remove dead code.
2631 (match_const_complex_part): Remove.
2632 (match_complex_part): Use match_{real,integer}_const.
2633 (match_complex_constant): Cross-promote integer types.
2635 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
2638 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2639 transpose_c8 for complex types.
2641 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2643 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2644 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2645 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2646 Follow spelling conventions.
2648 2005-01-22 Bud Davis <bdavis9659@comcast.net>
2651 * trans-io.c (gfc_trans_inquire): Added code to support
2654 2005-01-22 Steven G. Kargl <kargls@comcast.net>
2656 * intrinsic.c (make_alias): Add standard argument.
2657 (add_functions): Update make_alias calls.
2659 2005-01-22 Paul Brook <paul@codesourcery.com>
2661 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2663 2005-01-22 Paul Brook <paul@codesourcery.com>
2665 * gfortran.h (gfc_check_access): Add prototype.
2666 * match.c (gfc_match_namelist): Remove TODO.
2667 * module.c (check_access): Rename ...
2668 (gfc_check_access): ... to this. Boolify. Update callers.
2669 * resolve.c (resolve_symbol): Check for private objects in public
2672 2005-01-22 Paul Brook <paul@codesourcery.com>
2674 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2675 does not have an explicit type.
2676 (gfc_match_variable): Resolve implicit derived types in all cases.
2677 Resolve contained function types from their own namespace, not the
2679 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2680 checking. Resolve from the contained namespace, not the parent.
2682 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2685 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2686 constants the correct type.
2689 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2691 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2694 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2696 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2697 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2698 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2699 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2700 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2702 2005-01-17 Ira Rosen <irar@il.ibm.com>
2704 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2706 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2709 * error.c (error_char): Line-buffer errors / warnings.
2711 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2713 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2714 unsigned issue. Use build_int_cst instead of converting
2715 integer_zero_node. Remove unnecessary conversion.
2717 * trans-types.c (gfc_get_character_type_len): Use
2718 gfc_charlen_type_node as basic type for the range field.
2720 * trans-intrinsic.c (build_fixbound_expr,
2721 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2722 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2723 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2724 of converting 'integer_zero_node' or 'integer_one_node'
2726 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2728 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2729 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2730 'build_int_cst' instead of converting 'integer_zero_node' or
2731 'integer_one_node' respectively.
2733 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2734 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2735 'gfc'-prefix from local variable, remove dead code, use correct
2736 type when inserting argument.
2738 * trans-intrinsic.c, trans-types.c: Update copyright years.
2740 2005-01-16 Steven G. Kargl <kargls@comcast.net>
2743 * resolve.c (check_case_overlap): Typo in comment.
2744 (validate_case_label_expr): Fix up kinds of case values
2745 (resolve_select): Properly handle kind mismatches.
2747 2004-01-16 Paul Brook <paul@codesourcery.com>
2750 * trans-common.c (translate_common): Remove duplicate function call.
2751 (finish_equivalences): Preserve alignment when biasing offsets.
2753 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2755 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2756 ASCII-like character encoding.
2758 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2760 * resolve.c (compare_case): Cleanup.
2762 2005-01-14 Steven G. Kargl <kargls@comcast.net>
2764 * resolve.c (compare_case): Give arguments correct type.
2766 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2768 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2771 2005-01-09 Paul Brook <paul@codesourcery.com>
2774 * trans-common.c (current_common, current_offset): Remove.
2775 (create_common): Add head argument.
2776 (align_segment): New function.
2777 (apply_segment_offset): New function.
2778 (translate_common): Merge code from new_segment. Handle alignment.
2779 (new_segment): Remove.
2780 (finish_equivalences): Ensure proper alignment.
2782 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2784 * trans-const.c: Don't include unused math.h.
2786 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2787 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2788 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2789 trailing whitespace.
2790 (prepare_arg_info): Fix formatting, indenting and remove trailing
2792 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2793 trailing whitespace.
2795 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2796 gfc_constant_result, gfc_range_check, gfc_arith_power,
2797 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2798 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2799 gfc_complex2complex): Fix whitespace issues.
2800 * check.c (must_be, type_check, numeric_check, int_or_real_check,
2801 logical_array_check, array_check, scalar_check, nonoptional_check,
2802 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2803 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2804 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2805 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2806 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2807 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2808 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2809 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2810 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2811 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2812 gfc_check_lbound, gfc_check_logical, min_max_args,
2813 gfc_check_min_max_integer, gfc_check_min_max_real,
2814 gfc_check_min_max_double, gfc_check_matmul,
2815 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2816 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2817 gfc_check_range, gfc_check_real, gfc_check_repeat,
2818 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2819 gfc_check_set_exponent): Fix formatting issues.
2820 (gfc_check_size, gfc_check_sign): Alphabetize function order,
2821 remove whitespace-only line.
2822 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2823 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2824 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2825 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2826 gfc_check_random_number, gfc_check_random_seed,
2827 gfc_check_second_sub, gfc_check_system_clock,
2828 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2829 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2830 gfc_check_unlink_sub): Fix formatting issues.
2832 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2834 * gfortran.h: Remove outdated comment. Don't include stdio.h
2837 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2839 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2840 output of 'gfortran --version'.
2842 2005-01-03 Steven G. Kargl <kargls@comcast.net>
2844 * arith.c: Add system.h; remove string.h
2850 * check.c: Remove stdlib.h and stdarg.h
2851 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2852 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2853 * f95-lang.c: Add system.h; remove stdio.h
2854 * interface.c: Add system.h; remove stdlib.h and string.h
2855 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2856 * io.c: Remove string.h
2858 * match.c: Remove stdarg.h and string.h
2859 * misc.c: Update copyright; add system.h; remove stdlib.h,
2860 string.h, and sys/stat.h
2861 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2862 unistd.h, and time.h
2863 * option.c: Remove string.h and stdlib.h
2865 * scanner.c: Update copyright; add system.h; remove stdlib.h,
2866 stdio.h, string.h, and strings.h
2867 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2868 * trans-array.c: Remove stdio.h and gmp.h
2869 * trans-const.c: Ditto
2870 * trans-expr.c: Ditto
2872 * trans-stmt.c: Ditto
2874 * trans-intrinsic.c: Remove stdio.h and string.h
2876 2004-12-29 Steven G. Kargl <kargls@comcast.net>
2878 * gfortran.h (gfc_case): fix typo in comment.
2880 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2882 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2883 logical shift. Call fold. Remove 0-bit shift shortcut.
2884 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2885 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
2886 result if width(arg 1) < 4 bytes. Call fold.
2889 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2890 in front of function to match the standard. Correct handling
2893 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
2895 * trans-expr.c (gfc_conv_cst_int_power): Only check for
2896 flag_unsafe_math_optimizations if we have a float type.
2898 2004-12-23 Steven G. Kargl <kargls@comcast.net>
2900 * gfortran.texi: Fix typo.
2902 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2904 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2907 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2910 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2911 (gfc_match_nullify): Make sure that ')' is in front of the end of
2914 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2917 2004-12-14 Richard Henderson <rth@redhat.com>
2919 * gfortran.h (gfc_expr.function.name): Make const.
2920 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2921 (gfc_get_string): Update prototype.
2922 * iresolve.c: Include tree.h.
2923 (string_node, HASH_SIZE, string_head, hash): Remove.
2924 (gfc_get_string): Use vsnprintf, get_identifier.
2925 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2926 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2927 (gfc_done_1): Don't call gfc_iresolve_done_1.
2928 * module.c (mio_allocated_string): Take and return const char *,
2929 instead of modifying char**.
2930 (mio_expr): Update to match.
2931 * resolve.c (pure_function): Constify name argument.
2932 (resolve_function): Constify name.
2933 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2935 2004-12-12 Richard Henderson <rth@redhat.com>
2937 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2938 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2939 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2940 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2941 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2942 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2943 gfc_resolve_unpack: Use PREFIX.
2945 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948 * match.c (gfc_match_common): Skip whitespace.
2950 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2953 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2954 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2955 integer kind check; Issue error for -std=f95 when needed.
2956 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2958 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2959 Promote arguments to same kind.
2961 2004-12-12 Steven G. Kargl <kargls@comcast.net>
2962 Paul Brook <paul@codesourcery.com>
2965 * resolve.c (gfc_resolve_iterator_expr): New function.
2966 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
2967 start, end and stride to correct type.
2968 (resolve_code): Pass extra argument.
2969 * array.c (resolve_array_list): Pass extra argument.
2970 * gfortran.h (gfc_resolve): Add prototype.
2971 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2972 Handle real type iterators.
2974 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2977 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2978 same kind as C's 'int'.
2979 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2981 2004-12-08 Richard Henderson <rth@redhat.com>
2983 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2984 to the output expression.
2985 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2987 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2990 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2993 * resolve.c (resolve_code): Impose correct restrictions on
2996 * decl.c (gfc_match_end): Use locus of END when eos is an error.
2998 2004-12-02 Steven G. Kargl <kargls@comcast.net>
2999 Paul Brook <paul@codesourcery.com>
3001 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
3002 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
3003 (gfc_check_stat, gfc_check_stat_sub): New functions.
3004 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
3005 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
3006 fstat, and stat to intrinsics symbol tables.
3007 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
3008 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
3009 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
3010 (gfc_resolve_stat, gfc_resolve_flush): New functions.
3011 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
3012 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
3014 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3016 * intrinsic.c: Fix and add comments, fix function declarations
3017 (OPTIONAL,REQUIRED): New symbols
3018 (add_functions,add_subroutines): Use symbols
3019 (gmp.h): Remove unused include
3021 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3023 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
3026 2004-11-24 Steven Bosscher <stevenb@suse.de>
3028 * options.c (gfc_post_options): Don't clear flag_inline_functions.
3030 2004-11-20 Steven G. Kargl <kargls@comcast.net>
3032 * check.c (gfc_check_getcwd_sub): Fix seg fault.
3034 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
3035 gfc_check_unlink,gfc_check_unlink_sub): New functions
3036 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
3037 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
3038 exit to intrinsics symbol tables.
3039 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
3040 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
3041 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
3042 gfc_resolve_unlink_sub): Add and sort prototypes.
3043 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
3044 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
3045 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
3047 2004-11-16 Paul Brook <paul@codesourcery.com>
3050 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
3051 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
3052 * trans-types.c (gfc_get_dtype): Accept array type rather than element
3054 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
3055 (gfc_get_array_type_bounds): Ditto.
3056 (gfc_get_derived_type): Recurse into derived type pointers.
3057 * trans-types.h (gfc_get_dtype): Add prototype.
3058 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
3060 2004-11-15 Paul Brook <paul@codesourcery.com>
3062 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
3064 2004-11-10 Paul Brook <paul@codesourcery.com>
3067 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
3068 * trans-io.c (transfer_array_component): Ditto.
3070 2004-11-10 Paul Brook <paul@codesourcery.com>
3072 * invoke.texi: Fix typo.
3074 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3076 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3077 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3078 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3079 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3080 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3082 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3085 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3087 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3089 * gfortranspec.c: Replace GNU CC with GCC.
3091 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3093 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3095 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3098 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3101 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3104 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3105 module procedures as if they were module variables.
3107 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3112 * module.c (write_symbol1): Set module_name for dummy arguments.
3114 2004-11-02 Paul Brook <paul@codesourcery.com>
3116 * intrinsic.c (check_intrinsic_standard): Include error locus.
3118 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3119 locus to check_intrinsic_standard.
3121 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3124 * gfortran.h: Change GFC_STD_* flags to more appropriate
3125 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3126 gfc_option_t): Add field for warning about use of nonstandard
3128 * intrinsic.c (add_sym): Add parameter for standard version, check
3129 this against current standard.
3130 (add_sym_0): Pass standard parameter to add_sym.
3131 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3132 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3133 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3134 (make_generic): Add parameter for standard, check this
3135 against currently selected standard.
3136 (add_functions, add_subroutines): Add parameter to tell which
3137 standard an intrinsic belongs to.
3138 (check_intrinsic_standard): New function.
3139 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3140 (gfc_intrinsic_sub_interface): Ditto.
3141 * lang.opt: Add Wnonstd-intrinsics option.
3142 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3144 (set_Wall): Add warning about nonstd intrinsics.
3145 (gfc_handle_option): Change to use new GFC_STD_* flags,
3147 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3149 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3151 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3153 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3155 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3157 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3159 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3162 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3164 * check.c (gfc_check_rand): Allow missing optional argument.
3165 (gfc_check_irand): Ditto.
3166 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3168 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3170 PR fortran/13490, PR fortran/17912
3171 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3172 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3173 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3174 warning when compiling with pedantic.
3175 * gcc/fortran/arith.c: Set minimum integer values to reflect
3176 realities of two's complement signed integers. Added
3179 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3181 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3182 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3185 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3187 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3189 (gfc_generate_function_code): Fix formatting issue.
3191 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3193 * module.c: Fix formatting issues.
3195 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3197 * module.c (mio_interface_rest): Set where member of interface
3200 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3203 * options.c (gfc_handle_option): Add break after handing the
3206 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3208 * arith.c: Fix formatting issues.
3210 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3213 * resolve.c (resolve_operator): Use correct operator name in message.
3215 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3217 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3218 Move standard warning further to the front.
3220 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3222 * trans-stmt.c: Fix a comment typo.
3224 2004-10-07 Paul Brook <paul@codesourcery.com>
3227 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3230 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3233 * simplify.c (twos_complement): New function.
3234 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3236 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3238 2004-10-06 Paul Brook <paul@codesourcery.com>
3240 * trans-stmt.c (gfc_trans_simple_do): New function.
3241 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3242 loop. Update comments.
3244 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3247 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3251 * intrinsic.c (add_sym_5): Remove.
3252 (add_subroutines): Add resolution function for MVBITS.
3253 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3255 * iresolve.c (gfc_resolve_mvbits): New function.
3256 (gfc_resolve_random_number): Remove empty line at end of function.
3258 * trans-const.c (gfc_build_cstring_const): New function.
3259 (gfc_init_cst): Use new function.
3260 * trans-const.h (gfc_build_cstring_const): Add prototype.
3261 * trans-io.c (set_string, set_error_locus): Use new function.
3262 * trans-stmt.c (gfc_trans_goto): Use new function.
3265 * parse.c (accept_statement): Don't treat END DO like END IF and
3267 (parse_do_block): Generate possible END DO label inside END DO
3271 * check.c (gfc_check_system_sub): New function.
3272 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3273 * intrinsic.c (add_functions): Add 'system'.
3274 (add_subroutines): Add 'system'.
3275 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3276 Move prototypes to other suborutines.
3277 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3279 (gfc_resolve_system_clock): Fix formatting of prototype.
3280 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3282 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3285 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3287 * scanner.c (preprocessor_line): Accept preprocessor lines without
3288 file names. Check file names for closing quotes. Handle escaped
3289 quotes in file names.
3291 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3292 Paul Brook <paul@codesourcery.com>
3294 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3295 Use gfc_get_expr_charlen.
3296 * trans-expr.c (gfc_get_expr_charlen): New function.
3297 * trans.h (gfc_get_expr_charlen): Add prototype.
3299 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3301 * trans-intrinsic.c: Fix a comment typo.
3303 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3305 * simplify.c (range_check): Remove blank line at beginning of function.
3306 (gfc_simplify_dint): Same at end of function.
3307 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3308 (gfc_simplify_bound): Fix indentation.
3309 (gfc_simplify_log10): Simplify calculation.
3310 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3312 (gfc_simplify_nearest): Same at end of function.
3313 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3315 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3316 gfc_simplify_spacing): Simplify calulations.
3318 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3320 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3321 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3323 2004-10-01 Jan Hubicka <jh@suse.cz>
3325 * f95-lang.c (gfc_expand_function): Update call of
3326 tree_rest_of_compilation.
3327 * trans-decl.c (gfc_generate_constructors): Likewise.
3329 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3331 * trans-intrinsic.c: Comment fixes.
3333 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3335 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3337 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3339 * trans-types.c (gfc_return_by_reference): Remove superfluous
3342 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3343 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3346 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3347 function to determine return type.
3349 2004-09-20 Jan Hubicka <jh@suse.cz>
3351 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3353 (gfc_generate_function_code): Likewise.
3355 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3358 * simplify.c (gfc_simplify_reshape): Set shape of return value
3361 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3362 Zack Weinberg <zack@codesourcery.com>
3364 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3365 enumeration constants.
3367 2004-09-17 Paul Brook <paul@codesourcery.com>
3369 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3370 (gfc_linebuf_header_size): Define.
3371 * scanner.c (load_file): Use it.
3373 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3375 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3376 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3377 resolve.c, scanner.c, trans-array.c, trans-array.h,
3378 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3379 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3380 trans.h: Fix comment typos. Follow spelling conventions.
3382 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3385 * trans-io.c (transfer_array_component): New function.
3386 (transfer_expr): For array fields, call transfer_array_component.
3388 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3390 * gfortran.texi: Fix a typo.
3392 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3394 * parse.c (eof_buf): Rename eof to eof_buf.
3395 (unexpected_eof): Same.
3396 (gfc_parse_file): Same.
3398 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3400 * check.c (gfc_check_getcwd_sub): New function.
3401 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3402 * intrinsic.c (add_functions): Add function definition;
3404 * intrinsic.c (add_subroutines): Add subroutine definitions.
3405 * intrinsic.h: Add prototypes.
3406 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3408 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3410 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3413 * module.c (write_symbol): Don't fill in module name here.
3414 (write_symbol0): Fill in here instead.
3416 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3418 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3419 trans-array.c, trans-common.c, trans-expr.c,
3420 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3421 comment typos. Follow spelling conventions.
3423 2004-09-09 Paul Brook <paul@codesourcery.com>
3425 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3427 2004-09-08 Paul Brook <paul@codesourcery.com>
3429 * array.c: Don't include assert.h.
3430 * data.c: Don't include assert.h. Replace assert and abort with
3431 gcc_assert and gcc_unreachable.
3432 * dependency.c: Ditto.
3433 * f95-lang.c: Ditto.
3434 * iresolve.c: Ditto.
3436 * simplify.c: Ditto.
3438 * trans-array.c: Ditto.
3439 * trans-common.c: Ditto.
3440 * trans-const.c: Ditto.
3441 * trans-decl.c: Ditto.
3442 * trans-expr.c: Ditto.
3443 * trans-intrinsic.c: Ditto.
3444 * trans-io.c: Ditto.
3445 * trans-stmt.c: Ditto.
3446 * trans-types.c: Ditto.
3449 2004-09-07 Per Bothner <per@bothner.com>
3450 Paul Brook <paul@codesourcery.com>
3452 * error.c (show_locus): Handle mapped locations.
3453 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3454 * gfortran.h: Include input.h.
3455 (struct gfc_linebuf): Use source_location.
3456 * scanner.c (get_file): Initialize linemap.
3457 (preprocessor_line): Pass extra argument to get_file.
3458 (load_file): Ditto. Setup linemap.
3459 (gfc_new_file): Handle mapped locations.
3460 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3461 Set decl source locations.
3462 (gfc_trans_common): Set blank common block location.
3463 * trans-decl.c (gfc_set_decl_location): New function.
3464 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3465 (trans_function_start): Move call to gfc_set_backend_locus..
3466 (build_function_decl): ... to here.
3467 (build_entry_thunks): Set and restore the backend locus.
3468 (gfc_generate_constructors): Remove excess arguments to
3469 init_function_start.
3470 (gfc_generate_block_data): Add comments. Set the decl locus.
3471 * trans-io.c (set_error_locus): Handle mapped locations.
3472 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3473 (gfc_trans_code): Use SET_EXPR_LOCATION.
3474 (gfc_generate_code): Override the location of the new symbol.
3475 * trans.h (gfc_set_decl_location): Add prototype.
3477 2004-08-31 Paul Brook <paul@codesourcery.com>
3479 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3481 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3484 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3487 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3492 * resolve.c (resolve_transfer): New function.
3493 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3495 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3498 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3501 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3503 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3505 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3508 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3509 add comment pointing out possible issue WRT compatibility with g77.
3511 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3513 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3514 all occurences of 'gfc_strlen_type_node' by
3515 'gfc_charlen_type_node'.
3516 * trans-types.h: Same. Also update comment accordingly.
3518 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3520 * primary.c: Update copyright boilerplate to say GCC.
3521 * f95-lang.c: Change initial comment to say gfortran.
3523 2004-08-31 Paul Brook <paul@codesourcery.com>
3525 * trans-types.h: Add comments.
3526 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3528 2004-08-30 Richard Henderson <rth@redhat.com>
3530 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3531 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3532 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3533 c_long, c_long_long.
3534 (gfc_logical_info): Add c_bool.
3535 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3536 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3537 rather than gfc_int[48]_type_node for allocate choice.
3538 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3539 local copies of some kind type nodes.
3540 (gfc_build_builtin_function_decls): Likewise.
3541 * trans-expr.c (gfc_conv_power_op): Likewise.
3542 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3543 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3544 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3545 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3546 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3547 * trans-io.c (gfc_pint4_type_node): Move into ...
3548 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3549 some kind type nodes.
3550 * trans-types.c (gfc_type_nodes): Remove.
3551 (gfc_character1_type_node, gfc_strlen_type_node): New.
3552 (gfc_integer_types, gfc_logical_types): New.
3553 (gfc_real_types, gfc_complex_types): New.
3554 (gfc_init_kinds): Fill in real mode_precision.
3555 (gfc_build_int_type, gfc_build_real_type): New.
3556 (gfc_build_complex_type, gfc_build_logical_type): New.
3557 (c_size_t_size): New.
3558 (gfc_init_types): Loop over kinds.
3559 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3560 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3561 (gfc_get_character_type_len): Likewise.
3562 (gfc_type_for_size): Loop over kinds; use a reduced set of
3563 unsigned type nodes.
3564 (gfc_type_for_mode): Loop over kinds.
3565 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3566 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3567 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3568 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3569 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3570 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3571 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3572 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3573 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3574 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3575 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3576 gfc_complex8_type_node, gfc_complex16_type_node,
3577 gfc_logical1_type_node, gfc_logical2_type_node,
3578 gfc_logical4_type_node, gfc_logical8_type_node,
3579 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3580 (gfc_character1_type_node): Turn in to a variable.
3581 (gfc_strlen_type_node): Likewise.
3583 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3585 * gfortran.h (gfc_namespace): Add new field is_block_data.
3586 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3587 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3588 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3589 * trans.h (gfc_generate_block_data): Add prototype.
3590 * trans-decl.c (gfc_generate_block_data): New function.
3592 2004-08-29 Richard Henderson <rth@redhat.com>
3594 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3595 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3596 than two HOST_WIDE_INT.
3598 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3601 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3602 var_element, top_var_list, match_data_constant, top_val_list,
3603 gfc_match_data): Move here from match.c.
3604 (match_old_style_init): New function.
3605 (variable_decl): Match old-style initialization.
3606 * expr.c (gfc_get_variable_expr): New function.
3607 * gfortran.h (gfc_get_variable_expr): Add prototype.
3608 * gfortran.texi: Start documentation for supported extensions.
3609 * match.c: Remove the functions moved to decl.c.
3610 * match.h (gfc_match_data): Move prototype to under decl.c.
3611 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3614 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3615 Paul Brook <paul@codesourcery.com>
3617 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3618 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3619 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3620 (build_builtin_fntypes): New function.
3621 (gfc_init_builtin_functions): Use it.
3622 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3623 and GFC_ISYM_ERF{,C}.
3624 (gfc_c_int_kind): Declare.
3625 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3626 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3627 gfc_resolve_g77_math1): Add prototypes.
3628 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3629 * mathbuiltins.def: Add comment. Change third argument. Use
3630 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3631 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3632 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3633 * trans-types.c (gfc_c_int_kind): Declare.
3634 (gfc_init_kinds): Set it.
3636 2004-08-29 Steven G. Kargl <kargls@comcast.net>
3637 Paul Brook <paul@codesourcery.com>
3639 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3640 (gfc_check_f, gfc_simplify_f): Add f0.
3641 * intrinsic.c (do_check): Call f0. Flatten.
3642 (add_sym_0): Fix prototype. Set f0.
3643 (add_functions): Add getgid, getgid and getuid.
3644 (resolve_intrinsic): Remove obsolete comment.
3645 (do_simplify): Call f0.
3646 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3647 gfc_resolve_getuid): Add prototypes.
3648 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3649 gfc_resolve_getuid): New functions.
3650 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3653 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3655 * error.c (gfc_error_init_1): Remove blank line in front of
3656 function body. Add missing blank.
3657 (gfc_buffer_error, error_char, error_string): Remove blank line in
3658 front of function body.
3659 (show_locus): Add comma in comment.
3660 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3661 gfc_push_error, gfc_pop_error): Remove blank line in front of
3663 (gfc_get_errors): Typo fix in comment in front of function. Remove
3664 blank line in front of function body.
3666 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3668 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3669 variable declaration of same name.
3670 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3671 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3672 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3673 Replace all calls to gfc_default_*_kind with variable accesses.
3674 * trans-types.c: Same as above.
3675 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3676 static qualifier. Replace all occurences.
3677 (gfc_default_*_kind): Remove functions.
3679 2004-08-26 Richard Henderson <rth@redhat.com>
3681 * arith.c: Include system.h, not real system headers.
3682 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3683 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3684 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3685 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3686 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3687 gfc_index_integer_kind, gfc_default_integer_kind,
3688 gfc_default_real_kind,gfc_default_double_kind,
3689 gfc_default_character_kind, gfc_default_logical_kind,
3690 gfc_default_complex_kind, validate_integer, validate_real,
3691 validate_logical, validate_character,
3692 gfc_validate_kind): Move to trans-types.c.
3693 (gfc_set_model_kind): Use gfc_validate_kind.
3694 (gfc_set_model): Just copy the current precision to default.
3695 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3696 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3697 * gfortran.h: Update file commentary.
3698 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3699 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3700 gfc_default_double_kind_1, gfc_default_character_kind_1,
3701 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3702 (gfc_init_kinds): New.
3703 (gfc_init_types): Don't set gfc_index_integer_kind here.
3704 * trans-types.h (gfc_init_kinds): Declare.
3705 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3707 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3709 * check.c (gfc_check_atan2): New function.
3710 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3711 * intrinsic.h (gfc_check_atan2): Add prototype.
3713 2004-08-25 Richard Henderson <rth@redhat.com>
3715 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3716 false and we don't validate the kind.
3717 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3718 * check.c (kind_check): Likewise.
3719 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3720 (match_char_spec, match_logical_spec): Likewise.
3721 * gfortran.h (gfc_validate_kind): Likewise.
3722 * options.c (gfc_handle_option): Likewise.
3723 * primary.c (match_integer_constant, match_real_constant,
3724 match_string_constant, match_logical_constant,
3725 match_const_complex_part): Likewise.
3726 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3727 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3728 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3729 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3730 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3731 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3732 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3733 gfc_simplify_tiny): Likewise.
3734 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3735 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3736 prepare_arg_info): Likewise.
3738 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3740 * expr.c (gfc_check_assign): Add comment. Add new warning.
3741 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3742 result of pointer valued function when not in pointer assignment.
3744 2004-08-25 Paul Brook <paul@codesourcery.com>
3746 * config-lang.in: Remove dead commented line.
3747 * module.c: Replace g95 with gfortran in comment.
3749 2004-08-25 Paul Brook <paul@codesourcery.com>
3752 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3754 2004-08-25 Paul Brook <paul@codesourcery.com>
3757 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3758 string_length argument.
3759 (gfc_trans_array_ctor_element): New function.
3760 (gfc_trans_array_constructor_subarray): Use it.
3761 (gfc_trans_array_constructor_value): Ditto. Handle constant
3763 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3764 (gfc_trans_array_constructor): Use them.
3765 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3766 (gfc_conv_ss_descriptor): Remember section string length.
3767 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3768 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3769 (gfc_conv_expr_descriptor): Ditto.
3770 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3771 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3772 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3773 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3774 (gfc_conv_variable): Set string_length from section.
3775 (gfc_conv_function_call): Remove extra argument.
3776 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3777 * trans-types.c (gfc_get_character_type_len): New function.
3778 (gfc_get_character_type): Use it.
3779 (gfc_get_dtype): Return zero for internal types.
3780 * trans-types.h (gfc_get_character_type_len): Add prototype.
3781 * trans.h (struct gfc_ss): Move string_length out of union.
3783 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3785 * trans.h (build2_v, build3_v): New macros.
3787 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3789 * trans-array.c (gfc_conv_descriptor_data,
3790 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3791 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3792 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3793 gfc_trans_allocate_temp_array,
3794 gfc_trans_array_constructor_subarray,
3795 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3796 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3797 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3798 gfc_conv_array_ref, gfc_trans_preloop_setup,
3799 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3800 gfc_conv_loop_setup, gfc_array_init_size,
3801 gfc_conv_array_initializer, gfc_trans_array_bounds,
3802 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3803 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3804 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3805 of build and build_v as appropriate.
3806 * trans-common.c (create_common): Same.
3807 * trans-decl.c (gfc_trans_auto_character_variable,
3808 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3809 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3810 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3811 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3812 gfc_conv_expr_op, gfc_conv_function_call,
3813 gfc_trans_structure_assign): Same.
3814 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3815 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3816 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3817 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3818 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3819 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3820 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3821 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3822 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3823 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3824 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3825 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3826 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3827 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3828 gfc_conv_intrinsic_iargc): Same.
3829 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3830 set_flag, add_case, io_result, transfer_namelist_element,
3831 transfer_expr): Same.
3832 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3833 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3834 gfc_trans_integer_select, gfc_trans_logical_select,
3835 gfc_trans_character_select, gfc_trans_forall_loop,
3836 gfc_trans_nested_forall_loop, gfc_do_allocate,
3837 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3838 compute_inner_temp_size, compute_overall_iter_number,
3839 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3840 gfc_trans_forall_1, gfc_evaluate_where_mask,
3841 gfc_trans_where_assign, gfc_trans_allocate): Same.
3842 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3843 * trans.c (gfc_add_modify_expr, gfc_finish_block,
3844 gfc_build_array_ref, gfc_build_function_call,
3845 gfc_trans_runtime_check): Same.
3847 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3849 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3850 build_int_cst to build_int_cst_wide in accordance to Nathan's
3853 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
3855 * trans-array.c (gfc_trans_array_constructor_value): Adjust
3856 build_int_cst calls.
3857 * trans-const.c (gfc_build_string_const, gfc_init_constants,
3858 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3859 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3860 gfc_trans_entry_master_switch): Likewise.
3861 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3862 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3863 * trans-io.c (add_case, set_error_locus,
3864 transfer_namelist_element, transfer_expr): Likewise.
3865 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3866 gfc_trans_stop, gfc_trans_character_select): Likewise.
3867 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3868 * trans.c (gfc_trans_runtime_check): Likewise.
3870 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3872 * trans-decl.c, trans-types.c: Add and remove blank lines as
3875 2004-08-24 Richard Henderson <rth@redhat.com>
3877 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3879 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3881 * resolve.c (merge_argument_lists): Revert unintentionally
3884 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3886 * trans-decl.c (build_function_decl): Fix spelling in comment.
3887 (build_entry_thunks): Remove code with no function.
3888 (gfc_build_intrinsic_function_decls): Remove empty line.
3890 * resolve.c (resolve_entries): Fix a bunch of comment typos.
3892 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
3894 * f95-lang.c (gfc_init_decl_processing): Adjust
3895 build_common_tree_nodes call.
3897 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3899 * trans-types.c: Spelling and formatting fixes.
3901 2004-08-23 Richard Henderson <rth@redhat.com>
3903 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3904 of going through an intermediate string. Fix 32/64 int/long bug.
3906 2004-08-23 Eric Christopher <echristo@redhat.com>
3908 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3909 usage. Use build_vector_type_for_mode for vector types.
3911 2004-08-22 Richard Henderson <rth@redhat.com>
3914 * data.c (find_con_by_offset): Search ordered list; handle
3915 elements with repeat counts.
3916 (gfc_assign_data_value_range): New.
3917 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3918 (gfc_assign_data_value_range): Declare.
3919 * match.c (top_val_list): Extract repeat count into a temporary.
3920 * resolve.c (values): Make left unsigned.
3921 (next_data_value): Don't decrement left.
3922 (check_data_variable): Use gfc_assign_data_value_range.
3924 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3926 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3928 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3930 * check.c (gfc_check_reduction): Rename to ...
3931 (check_reduction): ... this. Make static. Don't check type of
3933 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3934 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3935 SUM to use new check functions.
3936 (check_specific): Change logic to call new functions.
3937 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3939 (gfc_check_reduction): Remove prototype.
3941 2004-08-20 Paul Brook <paul@codesourcery.com>
3942 Canqun Yang <canqun@nudt.edu.cn>
3945 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3946 for automatic arrays.
3947 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3949 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3953 * match.c (match_simple_forall, match_simple_where): Forward-declare.
3954 (gfc_match_if): Order statement list alphabetically, add WHERE and
3955 FORALL, remove double PAUSE.
3956 (gfc_match_simple_where, match_forall_header,
3957 gfc_match_simple_forall): New functions.
3958 (gfc_match_forall): Use match_forall_header.
3960 2004-08-19 Paul Brook <paul@codesourcery.com>
3963 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3964 * symbol.c (gfc_clear_attr): Use memset.
3966 2004-08-19 Paul Brook <paul@codesourcery.com>
3970 * data.c (assign_substring_data_value): Remove.
3971 (create_character_intializer): New function.
3972 (gfc_assign_data_value): Track the typespec for the current
3973 subobject. Use create_character_intializer.
3975 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
3978 * check.c (gfc_check_reduction): New function.
3979 (gfc_check_minval_maxval): Removed.
3980 (gfc_check_product): Removed.
3981 (gfc_check_sum): Removed.
3982 * intrinsic.h: Add/remove declarations for these.
3983 * gfortran.h: Add field f3red to union gfc_check_f.
3984 * intrinsic.c (add_sym_3red): New function.
3985 (add_functions): Register maxval, minval, product, and sum intrinsics
3986 through add_sym_3red.
3987 (check_specific): Handle f3red union field.
3988 * iresolve.c: Whitespace change.
3990 2004-08-18 Paul Brook <paul@codesourcery.com>
3992 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3994 2004-08-18 Victor Leikehman <lei@il.ibm.com>
3997 * trans-io.c (transfer_namelist_element): New. Recursively handle
3998 derived-type variables. Pass string lengths.
3999 (build_dt): Code moved to build_namelist, with some
4000 changes and additions.
4001 (gfc_build_io_library_fndecls): Declare the fifth
4002 argument in st_set_nml_var_char -- string_length.
4004 2004-08-17 Paul Brook <paul@codesourcery.com>
4005 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4008 * decl.c (get_proc_name): Update mystery comment.
4009 (gfc_match_entry): Check for errors earlier. Add entry point to list.
4010 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
4011 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
4012 (struct gfc_entry_list): Define.
4013 (gfc_get_entry_list): Define.
4014 (struct gfc_namespace): Add refs and entries.
4015 (enum gfc_exec_op): Add EXEC_ENTRY.
4016 (struct gfc_code): Add ext.entry.
4017 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
4018 (mio_symbol_attribute): Don't save/reture addr->entry.
4019 (mio_namespace_ref): Refcount namespaces.
4020 * parse.c (accept_statement): Handle ST_ENTRY.
4021 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
4022 (parse_contained): Fixup sibling references to entry points
4023 after parsing the procedure body.
4024 * resolve.c (resolve_contained_fntype): New function.
4025 (merge_argument_lists, resolve_entries): New functions.
4026 (resolve_contained_functions): Use them.
4027 (resolve_code): Handle EXEC_ENTRY.
4028 (gfc_resolve): Call resolve_entries.
4029 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
4030 * symbol.c (gfc_get_namespace): Refcount namespaces.
4031 (gfc_free_namespace): Ditto.
4032 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
4033 optional when multiple entry points are present.
4034 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
4035 (gfc_get_extern_function_decl): Add assertion. Fix coment.
4036 (create_function_arglist, trans_function_start, build_entry_thunks):
4038 (gfc_build_function_decl): Rename ...
4039 (build_function_decl): ... to this.
4040 (gfc_create_function_decl): New function.
4041 (gfc_generate_contained_functions): Use it.
4042 (gfc_trans_entry_master_switch): New function.
4043 (gfc_generate_function_code): Use new functions.
4044 * trans-stmt.c (gfc_trans_entry): New function.
4045 * trans-stmt.h (gfc_trans_entry): Add prototype.
4046 * trans-types.c (gfc_get_function_type): Add entry point argument.
4047 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
4048 (gfc_generate_module_code): Call gfc_create_function_decl.
4049 * trans.h (gfc_build_function_decl): Remove.
4050 (gfc_create_function_decl): Add prototype.
4052 2004-08-15 Andrew Pinski <apinski@apple.com>
4055 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
4056 for cabs{,f} and copysign{,f}.
4057 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
4058 (gfor_fndecl_math_cabs): Delete.
4059 (gfor_fndecl_math_sign4): Delete.
4060 (gfor_fndecl_math_sign8): Delete.
4061 (gfc_build_intrinsic_function_decls): Remove the
4062 initializing of cabs{,f} and copysign{,f} functions.
4063 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
4064 instead of the functions definitions.
4065 (gfc_conv_intrinsic_sign): Likewise.
4066 * trans.h (gfor_fndecl_math_cabsf): Delete.
4067 (gfor_fndecl_math_cabs): Delete.
4068 (gfor_fndecl_math_sign4): Delete.
4069 (gfor_fndecl_math_sign8): Delete.
4071 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4073 * trans-array.c (gfc_trans_array_constructor_value): Use
4075 * trans-const.c (gfc_build_string_const,
4076 gfc_init_constants, gfc_conv_mpz_to_tree,
4077 gfc_conv_constant_to_tree): Likewise.
4078 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4079 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4080 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4081 * trans-io.c (add_case, set_error_locus, build_dt,
4082 transfer_expr): Likewise.
4083 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4084 gfc_trans_stop, gfc_trans_character_select): Likewise.
4085 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4086 * trans.c (gfc_trans_runtime_check): Likewise.
4088 2004-08-14 Paul Brook <paul@codesourcery.com>
4090 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4092 2004-08-14 Paul Brook <paul@codesourcery.com>
4094 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4096 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4098 * gfortran.h: Add comments.
4099 * parse.c (parse_contained): Fix comment typo.
4100 * resolve.c (was_declared): Ditto.
4103 2004-08-11 Paul Brook <paul@codeourcery.com>
4106 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4108 2004-08-10 Richard Henderson <rth@redhat.com>
4110 * f95-lang.c (gfc_init_builtin_functions): Remove
4111 __builtin_stack_alloc, add __builtin_alloca.
4112 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4113 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4115 2004-08-10 Paul Brook <paul@codesourcery.com>
4117 * trans-io.c (transfer_expr): Handle pointters.
4119 2004-08-10 Paul Brook <paul@codesourcery.com>
4122 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4123 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4124 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4125 Handle GFC_SS_COMPONENT.
4126 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4127 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4129 (gfc_conv_array_initializer): Call specific initializer routines.
4130 * trans-expr.c (gfc_trans_structure_assign): New function.
4131 (gfc_trans_subarray_assign): New function.
4132 (gfc_trans_subcomponent_assign): New fucntion
4133 (gfc_conv_structure): Use them.
4134 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4135 (gfc_ss): Add shape.
4137 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4139 * simplify.c (gfc_simplify_shape): Bugfix.
4140 * expr.c (gfc_copy_shape_excluding): New function.
4141 * gfortran.h (gfc_get_shape): Bugfix.
4142 (gfc_copy_shape_excluding): Added declaration.
4143 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4144 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4145 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4146 time resolution of shape.
4148 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4150 * intrinsic.c (add_subroutines): Add getenv and
4151 get_environment_variable. (add_sym_5s): New function.
4152 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4154 * iresolve.c (gfc_resolve_get_environment_variable): New
4157 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4159 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4160 __builtin_pow[f] arguments.
4162 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4164 * arith.c: Add #define for model numbers. Remove global GMP variables.
4165 (natural_logarithm,common_logarithm,exponential,sine,
4166 cosine,arctangent,hypercos,hypersine ): Remove.
4167 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4168 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4169 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4170 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4171 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4172 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4173 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4174 gfc_real2int,gfc_real2real,gfc_real2complex,
4175 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4176 to MPFR, use new functions.
4177 * arith.h: Remove extern global variables.
4178 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4179 arctangent,hypercos,hypersine): Remove prototypes.
4180 (arctangent2): Update prototype from GMP to MPFR.
4181 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4182 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4183 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4184 * gfortran.h (GFC_REAL_BITS): Remove.
4185 (arith): Add ARITH_NAN.
4186 Include mpfr.h. Define GFC_RND_MODE.
4187 Rename GCC_GFORTRAN_H GFC_GFC_H.
4188 (gfc_expr): Convert GMP to MPFR.
4189 * module.c: Add arith.h, correct type in comment.
4190 (mio_gmp_real): Convert GMP to MPFR.
4191 (mio_expr): Use gfc_set_model_kind().
4192 * primary.c: Update copyright date with 2004.
4193 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4194 * simplify.c: Remove global GMP variables
4195 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4196 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4197 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4198 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4199 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4200 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4201 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4202 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4203 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4204 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4205 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4206 gfc_simplify_rrspacing,gfc_simplify_scale,
4207 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4208 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4209 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4210 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4212 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4213 gfc_conv_mpf_to_tree. Convert it to use MPFR
4214 (gfc_conv_constant_to_tree): Use it.
4215 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4216 * trans-intrinsic.c: Add arith.h, remove gmp.h
4217 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4219 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4220 Paul Brook <paul@codesourcery.com>
4222 * trans-array.c (gfc_trans_allocate_array_storage,
4223 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4224 gfc_conv_loop_setup): For functions, if the shape of the result
4225 is not known in compile-time, generate an empty array descriptor for
4226 the result and let the callee to allocate the memory.
4227 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4228 (gfc_conv_expr_descriptor): Use function return values directly.
4229 * trans-expr.c (gfc_conv_function_call): Always add byref call
4231 (gfc_trans_pointer_assignment): Add comments.
4232 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4234 2004-08-01 Roger Sayle <roger@eyesopen.com>
4236 * options.c (gfc_init_options): Don't warn about the use GNU
4237 extensions by default.
4238 (gfc_post_options): Warn about GNU extensions with -pedantic.
4239 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4241 2004-07-30 Richard Henderson <rth@redhat.com>
4243 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4246 2004-07-25 Richard Henderson <rth@redhat.com>
4248 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4249 and DECL_IGNORED_P on RESULT_DECL.
4250 (gfc_generate_constructors): Likewise.
4252 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4255 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4257 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4258 * options.c (gfc_handle_options): Deal with changed options.
4259 * scanner.c (load_line): Change second arg to 'char **',
4260 allocate if pointing to NULL. Keep track of buffer's length.
4261 Adapt buffer size to overlong lines. Pad lines to full length
4263 (load_file): Adapt to new interface of load_line.
4265 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4267 * trans.h (builtin_function): Declare.
4269 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4272 (parts ported from g95)
4273 * parse.h (gfc_state_data): New field do_variable.
4274 (gfc_check_do_variable): Add prototype.
4275 * parse.c (push_state): Initialize field 'do_variable'.
4276 (gfc_check_do_variable): New function.
4277 (parse_do_block): Remember do iterator variable.
4278 (parse_file): Initialize field 'do_variable'.
4279 * match.c (gfc_match_assignment, gfc_match_do,
4280 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4281 Add previously missing checks.
4282 (gfc_match_return): Reformat error message.
4283 * io.c (match_out_tag): New function.
4284 (match_open_element, match_close_element,
4285 match_file_element, match_dt_element): Call match_out_tag
4286 instead of match_vtag where appropriate.
4287 (match_io_iterator, match_io_element): Add missing check.
4288 (match_io): Reformat error message.
4289 (match_inquire_element): Call match_out_tag where appropriate.
4291 * parse.c (gfc_check_do_variable): Fix error locus.
4293 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4296 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4297 for every assumed length character dummy argument.
4300 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4303 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4305 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4308 * trans-array.c gfc_trans_g77_array,
4309 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4310 for assumed length characters.
4311 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4312 with a character expression.
4313 (gfc_cvonv_array_parameter): Pass string length when passing
4314 character array according to g77 conventions.
4316 2004-07-12 Paul Brook <paul@codesourcery.com>
4318 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4319 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4320 initialization code.
4321 * trans-common.c (create_common): Use gfc_conv_initializer.
4322 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4323 * trans-expr.c (gfc_conv_initializer): New function.
4324 (gfc_conv_structure): Use it.
4325 * trans.h (gfc_conv_initializer): Add prototype.
4327 2004-07-11 Paul Brook <paul@codesourcery.com>
4330 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4332 (parse_contained): Mark contained symbols as referenced.
4334 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4337 * module.c (gfc_dump_module, gfc_use_module): Print locus
4338 when opening of module file fails.
4341 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4344 * match.c (gfc_match_program): A program name is obligatory.
4345 (gfc_match_return): RETURN in main program is an extension.
4346 (gfc_match_block_data): A space is required before a block data
4350 * primary.c (match_boz_constant): Call gfc_notify_std only if
4351 we actually have a non-standard boz-literal-constant.
4354 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4355 warning if assigning NULL().
4357 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4359 * f95-lang.c (set_block): Remove.
4360 (gfc_clear_binding_stack): New.
4361 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4362 (struct binding_level): Remove block_created_by_back_end.
4363 (clear_binding_level): Likewise.
4364 (poplevel): Don't handle block_created_by_back_end.
4366 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4368 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4369 symbol is in common, because we ...
4370 (gfc_generate_module_vars): Call gfc_trans_common.
4372 2004-07-10 Paul Brook <paul@codesourcery.com>
4374 * trans-array.c (gfc_build_null_descriptor): New function.
4375 (gfc_trans_static_array_pointer): Use it.
4376 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4377 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4379 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4382 * decl.c (gfc_match_save): Use-associated common block
4384 * gfortran.h (gfc_common_head): Add new field 'name'.
4385 Fix typo in comment after #endif.
4386 * match.c (gfc_get_common): Add new argument from_common,
4387 mangle name if flag is set, fill in new field in structure
4389 (match_common): Set new arg in call to gfc_get_common,
4390 use-associated common block doesn't collide.
4391 * match.h (gfc_get_common): Adapt prototype.
4392 * module.c (load_commons): Set new arg in call to
4394 * symbol.c (free_common_tree): New function.
4395 (gfc_free_namespace): Call new function.
4396 * trans-common.c (several functions): Remove argument
4397 'name', use name from gfc_common_head instead.
4399 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4401 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4402 and RHS match. Return early if the RHS is NULL().
4405 * match.c (match_common): Fix error reporting for used common.
4408 * trans-expr.c (gfc_conv_structure): Handle initialization
4409 of scalar pointer components.
4411 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4413 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4414 by fix for PR 15481.
4416 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4418 * trans-common.c: Fix whitespace issues, make variable names
4420 (create_common): Additionally, make loop logic more obvious.
4422 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4423 Paul Brook <paul@codesourcery.com>
4426 * trans-common.c (calculate_length): Remove ...
4427 (get_segment_info): Merge into here. Save field type.
4428 (build_field): Use saved type.
4429 (create_common, new_condition, new_segment, finish_equivalences):
4430 Use new get_segment_info.
4431 * trans-types.c: Update comment.
4433 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4436 * moduele.c (mio_symbol): Don't I/O initial values unless
4437 symbol is a parameter.
4439 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4442 * resolve.c (resolve_symbol): Verify that the shape of a
4443 parameter array is not only explicit, but also constant.
4444 * array.c (gfc_is_compile_time_shape): New function.
4445 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4447 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4453 * module.c (write_symbol, write_symtree): Remove workaround.
4454 * primary.c (match_actual_arglist): Enhance comment.
4455 (gfc_match_rvalue): Handle function call with first argument
4456 a keyword argument correctly.
4457 * resolve.c (resolve_symbol): Change call to
4458 gfc_set_default_type to issue error if no implicit type
4460 * trans-decl.c (gfc_create_module_variable): Remove workaround.
4462 2004-07-08 Paul Brook <paul@codesourcery.com>
4464 * intrinsic.c (add_sym_4s): New function.
4465 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4467 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4468 Paul Brook <paul@codesourcery.com>
4472 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4473 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4474 * intrinsic.c (add_functions): Identify iargc. Add
4475 command_argument_count.
4476 (add_subroutines): Resolve getarg. Add get_command and
4477 get_command_argument.
4478 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4479 gfc_resolve_get_command_argument): Add prototypes.
4480 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4481 gfc_resolve_get_command_argument): New functions.
4482 * trans-decl.c (gfor_fndecl_iargc): New variable.
4483 (gfc_build_intrinsic_function_decls): Set it.
4484 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4485 (gfc_conv_intrinsic_function): Use it.
4486 * trans.h (gfor_fndecl_iargc): Declare.
4488 2004-07-04 Matthias Klose <doko@debian.org>
4490 * Make-lang.in: Generate and install gfortran man page.
4491 * invoke.texi: Remove extra '@c man end'.
4493 2004-07-04 Richard Henderson <rth@redhat.com>
4495 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4497 2004-07-04 Paul Brook <paul@codesourcery.com>
4499 * decl.c (gfc_match_implicit_range): Don't use typespec.
4500 (gfc_match_implicit): Handle character selectors.
4501 * gfortran.h (gfc_set_implicit): Remove prototype.
4502 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4503 * parse.c (accept_statement): Don't call gfc_set_implicit.
4504 * symbol.c (new_ts): Remove.
4505 (gfc_set_implicit_none): Use same loop bounds as other functions.
4506 (gfc_set_implicit): Remove.
4507 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4508 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4510 2004-06-30 Richard Henderson <rth@redhat.com>
4512 * match.c (var_element): Remove unused variable.
4514 * trans-decl.c (gfc_generate_function_code): Don't set
4515 x_whole_function_mode_p.
4516 (gfc_generate_constructors): Likewise.
4518 2004-06-30 Richard Henderson <rth@redhat.com>
4520 * trans-decl.c (gfc_generate_function_code): Don't set
4521 immediate_size_expand.
4522 (gfc_generate_constructors): Likewise.
4524 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4527 * decl.c (gfc_match_type_spec): Rename second argument to
4528 'implicit_flag', reverse meaning. Don't match_char_spec if
4529 'implicit_flag' is set. Rename to ...
4530 (match_type_spec): ... this.
4531 (gfc_match_implicit_none, match_implicit_range): Move here
4533 (gfc_match_implicit): Move here from match.c, try to
4534 match_char_len if match_implicit_range doesn't succeed for
4535 CHARACTER implicits. Call renamed fucntion match_type_spec.
4536 (gfc_match_data_decl, match_prefix): Call renamed function
4538 * match.c (gfc_match_implicit_none, match_implicit_range,
4539 gfc_match_implicit): Move to decl.c.
4540 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4541 Move protoypes to section 'decl.c'.
4542 (gfc_match_type_spec): Remove prototype.
4544 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4546 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4549 2004-06-29 Steven Bosscher <stevenb@suse.de>
4551 Make sure types in assignments are compatible. Mostly mechanical.
4552 * trans-const.h (gfc_index_one_node): New define.
4553 * trans-array.c (gfc_trans_allocate_array_storage,
4554 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4555 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4556 gfc_conv_array_ubound, gfc_conv_array_ref,
4557 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4558 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4559 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4560 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4561 types in assignments, conversions and conditionals for expressions.
4562 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4563 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4564 gfc_conv_function_call, gfc_trans_pointer_assignment,
4565 gfc_trans_scalar_assign): Likewise.
4566 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4567 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4568 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4569 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4570 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4571 gfc_conv_allocated, gfc_conv_associated,
4572 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4573 * trans-io.c (set_string): Likewise.
4574 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4575 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4576 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4577 compute_overall_iter_number, gfc_trans_assign_need_temp,
4578 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4579 gfc_evaluate_where_mask, gfc_trans_where_assign,
4580 gfc_trans_where_2): Likewise.
4581 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4582 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4584 * trans.c (gfc_add_modify_expr): Add sanity check that types
4585 for the lhs and rhs are the same for scalar assignments.
4587 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4589 * dump-parse-tree.c (show_common): New function.
4590 (gfc_show_namespace): Show commons.
4592 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4593 Andrew Vaught <andyv@firstinter.net>
4597 * decl.c (gfc_match_save): Adapt to new common structures,
4598 don't allow saving USE-associated common.
4599 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4600 symbol attributes any longer.
4601 (gfc_show_symbol): Don't show old-style commons any longer.
4602 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4604 * gfortran.h (symbol_attribute): Remove common and saved_common
4606 (gfc_symbol): Remove common_head element.
4607 (gfc_common_head): New struct.
4608 (gfc_get_common_head): New macro.
4609 (gfc_symtree): Add field 'common' to union.
4610 (gfc_namespace): Add field 'common_root'; change type of field
4611 'blank_common' to blank_common.
4612 (gfc_add_data): New prototype.
4613 (gfc_traverse_symtree): Expect a symtree as first argument
4614 instead of namespace.
4615 * match.c (gfc_get_common): New function.
4616 (match_common_name): Change to take char * as argument, adapt,
4617 fix bug with empty name.
4618 (gfc_match_common): Adapt to new data structures. Disallow
4619 redeclaration of USE-associated COMMON-block. Fix bug with
4621 (var_element): Adapt to new common structures.
4622 * match.h (gfc_get_common): Declare.
4623 * module.c: Add 2004 to copyright years, add commons to module
4624 file layout description.
4625 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4626 for removed attributes.
4627 (mio_symbol): Adapt to new way of storing common relations.
4628 (load_commons): New function.
4629 (read_module): Skip common list on first pass, load_commons at
4631 (write_commons): New function.
4632 (write_module): Call write_commons().
4633 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4634 functions related to removed attributes.
4635 (gfc_add_data): New function.
4636 (gfc_clear_attr): Don't set removed attributes.
4637 (gfc_copy_attr): Don't copy removed attributes.
4638 (traverse_symtree): Remove.
4639 (gfc_traverse_symtree): Don't traverse symbol
4640 tree of the passed namespace, but require a symtree to be passed
4641 instead. Unify with traverse_symtree.
4642 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4644 (save_symbol): Remove setting of removed attribute.
4645 * trans-common.c (gfc_sym_mangled_common_id): Change to
4646 take 'char *' argument instead of 'gfc_symbol'.
4647 (build_common_decl, new_segment, translate_common): Adapt to new
4648 data structures, add new
4650 (create_common): Adapt to new data structures, add new
4651 argument name. Fix typo in intialization of derived types.
4652 (finish_equivalences): Add second argument in call to
4654 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4655 (gfc_trans_common): Adapt to new data structures.
4656 * trans-decl.c (gfc_create_module_variables): Remove test for
4659 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4661 * io.c: Add 2004 to copyright years.
4663 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4664 Andrew Vaught <andyv@firstinter.net>
4666 * gfortran.h (gfc_gsymbol): New typedef.
4667 (gfc_gsym_root): New variable.
4668 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4669 * parse.c (global_used): New function.
4670 (parse_block_data): Check for double empty BLOCK DATA,
4671 use global symbol table.
4672 (parse_module): Use global symbol table.
4673 (add_global_procedure, add_global_program): New functions.
4674 (gfc_parse_file): Use global symbol table.
4675 * symbol.c (gfc_gsym_root): New variable.
4676 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4679 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4681 * module.c (mio_gmp_real): Correct writing of negative numbers.
4683 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4686 * expr.c (check_intrinsic_op): Allow comparison of characters.
4689 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4690 Andrew Vaught <andyv@firstinter.net>
4692 * decl.c (contained_procedure): New function.
4693 (match_end): Verify correctness of END STATEMENT in
4696 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4697 Andrew Vaught <andyv@firstinter.net>
4700 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4701 (decode_statement): Enforce required space in free-form.
4703 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4705 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4706 * trans-array.c (gfc_conv_descriptor_data): Add operand
4708 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4709 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4710 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4711 * trans-common.c (create_common): Likewise.
4712 * trans-expr.c (gfc_conv_component_ref): Likewise.
4713 * trans-io.c (set_parameter_value): Likewise.
4714 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4715 (transfer_expr): Likewise.
4716 * trans-decl.c (gfc_trans_auto_character_variable):
4717 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4718 (gfc_gimplify_function): New function.
4719 (gfc_generate_function-code): Properly handle nested functions.
4720 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4722 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4725 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4726 (gfc_resolve_inquire): Resolve the iolength tag. Return
4727 SUCCESS at end of function if no failure has occured.
4728 * resolve.c (resolve_code): Resolve if iolength is encountered.
4729 * trans-io.c: (ioparm_iolength, iocall_iolength,
4730 iocall_iolength_done): New variables.
4731 (last_dt): Add IOLENGTH.
4732 (gfc_build_io_library_fndecls ): Set iolength related variables.
4733 (gfc_trans_iolength): Implement.
4734 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4736 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4739 * scanner.c (load_line): Don't truncate preprocessor lines.
4740 Reformat error message.
4741 (preprocessor_line): Issue warning in case of malformed
4744 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4746 * resolve.c (resolve_symbol): Add comment in function body.
4747 (check_data_variable): Change type of mark to ar_type, adapt code
4750 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4752 * array.c (gfc_insert_constructor): Avoid redundant call to
4753 mpz_comp. Add 2004 to copyright years.
4755 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4757 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4759 2004-06-20 Steven G. Kargl <kargls@comcast.net>
4761 * arith.c (gfc_range_check): correct complex underflow.
4763 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4766 * match.c (match_case_selector): Call gfc_match_init_expr
4767 instead of gfc_match_expr.
4768 * resolve.c (validate_case_label_expr): No need to check for
4769 constant, since it wouldn't have been matched with the fix to
4772 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4775 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4778 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4781 * trans-deecl.c (generate_local_decl): Do not issue warning for
4782 unused variables if they're use associated.
4784 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4785 Andrew Vaught <andyv@firstinter.net>
4788 * gfortran.h (gfc_check_f): Add new field f3ml.
4789 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4790 of individual arguments, reorder if necessary.
4791 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4792 * intrinsic.c (add_sym_3ml): New function.
4793 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4794 (check_specific): Catch special case MINLOC, MAXLOC.
4796 2004-06-14 Paul Brook <paul@codesourcery.com>
4798 * intrinsic.c (add_sym_2s): Use correct function types.
4800 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4802 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
4803 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4805 2004-06-12 Steven G. Kargl <kargls@comcast.net>
4807 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4808 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4809 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4810 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4811 * trans-intrinsic.c: Use symbols.
4812 * intrinsic.c (add_sym_2s): New function.
4813 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4814 * intrinsic.h: Function prototypes.
4815 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4816 gfc_resolve_srand): New functions.
4818 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4821 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4822 contained procedure.
4824 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4827 * interface.c (compare_parameter, compare_actual_formal): Don't
4828 check types and array shapes for NULL()
4829 * trans-expr.c (conv_function_call): No double indirection for
4832 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
4834 * trans-expr.c (gfc_conv_cst_int_power): Compute
4835 x**(-n) by converting it to (1/x)**n instead of
4838 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4841 * module.c (write_symbol, write_symtree): Don't write symbols
4842 wrongly added to namespace.
4843 * trans-decl.c (gfc_create_module_variable): Don't create a
4844 backend decl for a symbol incorrectly added to namespace.
4846 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4849 * resolve.c (resolve_symbol): Verify that parameter array has an
4850 explicit shape. Fix typos and coding style issues in surrounding
4853 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4856 * gfortran.texi: The documentation doesn't contain infomration on
4857 how to report bugs, and shouldn't, so remove the line which
4860 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4862 * intrinsic.c (sort_actual): Keep track of type of missing
4863 arguments. (Missing from previous commit.)
4865 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4867 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4868 * interface.c (compare_actual_formal): Keep type of omitted
4870 * trans-expr.c (gfc_conv_function_call): Add string length
4871 argument for omitted string argument.
4873 2004-06-03 Paul Brook <paul@codesourcery.com>
4875 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4876 lists instead of compound expr chains.
4877 (gfc_trans_code): Annotate statement lists.
4879 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4881 * trans-array.c: Fix spelling in comments.
4883 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4886 * data.c (assign_substring_data_value): New function.
4887 (gfc_assign_data_value): Call the new function if we're dealing
4888 with a substring LHS.
4890 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4893 * gfortran.h (GFC_VERSION): Remove.
4894 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4897 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4899 * trans-types.c: Fix spelling & layout in comments.
4901 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4904 * trans-const.c (gfc_conv_string_init): Allow variable string
4905 length lower than initialization string length.
4907 2004-05-30 Paul Brook <paul@codesourcery.com>
4910 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4911 * trans-expr.c (gfc_trans_string_copy): New function.
4912 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
4914 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4915 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4916 * trans.h (struct gfc_saved_var): Define.
4917 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4919 2004-05-30 Steven G. Kargl <kargls@comcast.net>
4921 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4923 2004-05-29 Steven G. Kargl <kargls@comcast.net>
4925 * simplify.c (gfc_simplify_log): Remove useless line of code.
4927 2004-05-29 Paul Brook <paul@codesourcery.com>
4929 * trans-common.c (find_equivalence): Find multiple rules.
4931 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4933 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4934 (gfc_current_locus): Declare new global variable.
4935 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4936 (gfc_current_locus1): Rename ...
4937 (gfc_current_locus): ... to this.
4938 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4939 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4940 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4941 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4942 and gfc_current_locus(), respectively.
4943 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4944 match_array_cons_element, gfc_match_array_constructor):
4945 Read/modify gfc_current_locus instead of calling gfc_set_locus()
4946 and gfc_current_locus().
4947 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4948 match_attr_spec, gfc_match_function_decl, gfc_match_end,
4949 attr_decl1, gfc_match_save): Likewise.
4950 * error.c (error_print, gfc_internal_error): Likewise.
4951 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4952 * interface.c (gfc_add_interface): Likewise.
4953 * io.c (gfc_match_format, match_dt_format, match_dt_element,
4954 match_io_iterator, match_io): Likewise.
4955 * match.c (gfc_match_space, gfc_match_eos,
4956 gfc_match_small_literal_int, gfc_match_st_label,
4957 gfc_match_strings, gfc_match_name, gfc_match_iterator,
4958 gfc_match_char, gfc_match, gfc_match_assignment,
4959 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4960 gfc_match_nullify, gfc_match_call, match_implicit_range,
4961 gfc_match_implicit, gfc_match_data, match_case_selector,
4962 gfc_match_case, match_forall_iterator): Likewise.
4963 * matchexp.c (gfc_match_defined_op_name, next_operator,
4964 match_level_1, match_mult_operand, match_ext_mult_operand,
4965 match_add_operand, match_ext_add_operand, match_level_2,
4966 match_level_3, match_level_4, match_and_operand, match_or_operand,
4967 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4968 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4969 * parse.c (match_word, decode_statement, next_free, next_fixed,
4970 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4972 * primary.c (match_digits, match_integer_constant,
4973 match_boz_constant, match_real_constant, match_substring,
4974 next_string_char, match_charkind_name, match_string_constant,
4975 match_logical_constant, match_const_complex_part,
4976 match_complex_constant, match_actual_arg, match_keyword_arg,
4977 gfc_match_actual_arglist, gfc_match_structure_constructor,
4978 gfc_match_rvalue, gfc_match_variable): Likewise.
4979 * st.c (gfc_get_code): Likewise.
4980 * symbol.c (check_conflict, check_used, check_done,
4981 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4982 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4983 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4985 2004-05-26 Roger Sayle <roger@eyesopen.com>
4987 * io.c (format_asterisk): Silence compiler warnings by correcting
4988 the number of elements of a "locus" initializer.
4990 2004-05-25 Roger Sayle <roger@eyesopen.com>
4993 * matchexp.c: Allow unary operators after arithmetic operators
4995 (match_ext_mult_operand, match_ext_add_operand): New functions.
4996 (match_mult_operand): Tweak to call match_ext_mult_operand.
4997 (match_add_operand): Tweak to call match_ext_mult_operand.
4998 (match_level_2): Rearrange to call match_ext_add_operand.
5000 2004-05-25 Paul Brook <paul@codesourcery.com>
5002 * expr.c (check_inquiry): Remove bogus tests.
5004 2004-05-23 Paul Brook <paul@codesourcery.com>
5007 * expr.c (restricted_args): Remove redundant checks/argument.
5008 (external_spec_function): Update to match.
5009 (restricted_intrinsic): Rewrite.
5011 2004-05-23 Paul Brook <paul@codesourcery.com>
5012 Victor Leikehman <lei@haifasphere.co.il>
5014 * gfortran.h (struct gfc_symbol): Add equiv_built.
5015 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
5017 (current_length): Remove.
5018 (add_segments): New function.
5019 (build_equiv_decl): Create initialized common blocks.
5020 (build_common_decl): Always add decl to bindings.
5021 (create_common): Create initializers.
5022 (find_segment_info): Reformat to match coding conventions.
5023 (new_condition): Use add_segments.
5024 (add_condition, find_equivalence, add_equivalences): Move iteration
5025 inside functions. Only process each segment once.
5026 (new_segment, finish_equivalences, translate_common): Simplify.
5028 2004-05-23 Steven G. Kargl <kargls@comcast.net>
5030 * check.c (gfc_check_random_seed): Issue for too many arguments.
5032 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5034 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
5036 2004-05-22 Paul Brook <paul@codesourcery.com>
5038 * dump-parse-tree.c (gfc_show_equiv): New function.
5039 (gfc_show_namespace): Use it.
5041 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
5044 * symbol.c (gfc_add_common): Disable checks to work around other more
5045 fundamental inadequacies.
5047 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5049 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
5051 (gfc_build_function_decl): Likewise.
5053 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5055 * check.c (gfc_check_system_clock): New function.
5056 * intrinsic.c (add_sym_3s): New function.
5057 (add_subroutines): Use it.
5058 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
5060 * iresolve.c (gfc_resolve_system_clock): New function.
5062 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5064 * invoke.texi: Document -Wunderflow and spell check.
5065 * lang.opt: Add Wunderflow.
5066 * gfortran.h (gfc_option_t): Add warn_underflow option.
5067 * options.c (gfc_init_options, set_Wall): Use it.
5068 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
5069 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
5070 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
5071 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
5072 * arith.c (common_logarithm): Fix typo in comment.
5074 2004-05-21 Roger Sayle <roger@eyesopen.com>
5076 * io.c (check_format): As a GNU extension, allow the comma after a
5077 string literal to be optional in a format. Use gfc_notify_std to
5078 issue an error/warning as appropriate.
5080 2004-05-21 Roger Sayle <roger@eyesopen.com>
5082 * io.c (check_format): Use gfc_notify_std to determine whether to
5083 issue an error/warning for omitting the digits from the X format.
5085 2004-05-20 Roger Sayle <roger@eyesopen.com>
5087 * io.c (check_format): Allow the number before the X format to
5088 be optional when not -pedantic.
5090 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5091 Paul Brook <paul@codesourcery.com>
5093 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5094 Create decls for __builtin_pow{,f}.
5095 * gfortran.h (PREFIX_LEN): Define.
5096 * trans-decl.c (gfor_fndecl_math_powi): Add.
5097 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5098 (gfc_build_intrinsic_function_decls): Create decls for powi.
5099 * trans-expr.c (powi_table): Add.
5100 (gfc_conv_integer_power): Remove.
5101 (gfc_conv_powi): New function.
5102 (gfc_conv_cst_int_power): New function.
5103 (gfc_conv_power_op): Use new powi routines.
5104 * trans.h (struct gfc_powdecl_list): Add.
5105 (gfor_fndecl_math_powi): Add.
5106 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5108 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5110 * trans.c, trans-decl.c: Fix comment typos.
5112 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5114 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5116 2004-05-18 Steve Kargl <kargls@comcast.net>
5118 * arith.c (gfc_int2complex): Fix incorrect range checking.
5120 2004-05-18 Paul Brook <paul@codesourcery.com>
5123 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5124 (default_initializer): Move to expr.c.
5125 (variable_decl): Don't assign default initializer to variables.
5126 * expr.c (gfc_default_initializer): Move to here.
5127 * gfortran.h (gfc_default_initializer): Add prototype.
5128 * resolve.c (resolve_symbol): Check for illegal initializers.
5129 Assign default initializer.
5131 2004-05-17 Steve Kargl <kargls@comcast.net>
5133 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5135 2004-05-17 Steve Kargl <kargls@comcast.net>
5137 * arith.c (gfc_real2complex): Range checking wrong part of complex
5140 2004-05-16 Paul Brook <paul@codesourcery.com>
5142 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5144 2004-05-16 Paul Brook <paul@codesourcery.com>
5146 * arith.c (gfc_range_check): Fix logic error.
5148 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5150 * arith.c: Fix comment typos.
5152 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5155 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5156 not initialized in a disallowed fashion.
5157 * match.c (gfc_match_common): Likewise.
5158 (var_element): Verify that variable is not in the blank COMMON,
5159 if it is in a common.
5161 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5163 * Make-lang.in (f95.generated-manpages): Remove.
5164 (f95.srcextra): New.
5165 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5166 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5169 (f95.install-info): Remove.
5170 (install-info): New.
5172 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5174 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5176 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5178 * primary.c (match_boz_constant): Use gfc_notify_std() for
5179 issuing a warning or an error.
5181 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5184 * primary.c (match_structure_constructor): Rename ...
5185 (gfc_match_structure_constructor): ... to this. Make non-static.
5186 (gfc_match_rvalue): Call renamed function.
5187 * match.h (gfc_match_structure_constructor): Declare.
5188 * match.c (gfc_match_data_constant): Handle structure
5191 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5195 * gfortran.h (gfc_linebuf): New typedef.
5197 (gfc_file): Revamped, use new gfc_linebuf.
5198 (locus): Revamped, use new types.
5199 (gfc_current_file): Remove.
5200 (gfc_current_form, gfc_source_file): New global variables.
5201 * match.c (gfc_match_space, gfc_match_strings): Use
5202 gfc_current_form to find source form.
5203 * module.c (gfc_dump_module): Use gfc_source_file when printing
5205 * error.c (show_locus, show_loci) Use new data structures to print
5207 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5209 (file_head, current_file, gfc_current_form, line_head, line_tail,
5210 gfc_current_locus1, gfc_source_file): New global variables.
5211 (gfc_scanner_init1): Set new global variables.
5212 (gfc_scanner_done1): Free new data structures.
5213 (gfc_current_locus): Return pointer to gfc_current_locus1.
5214 (gfc_set_locus): Set gfc_current_locus1.
5215 (gfc_at_eof): Set new variables.
5216 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5217 to new locus structure.
5218 (gfc_check_include): Remove.
5219 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5220 (gfc_skip_comments): Use gfc_current_form, find locus with
5222 (gfc_next_char): Use gfc_current_form.
5223 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5224 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5226 (get_file): New function.
5227 (preprocessor_line, include_line): New functions.
5228 (load_file): Move down, rewrite to match new data structures.
5229 (gfc_new_file): Rewrite to match new data structures.
5230 * parse.c (next_statement): Remove code which is now useless. Use
5231 gfc_source_form and gfc_source_file where appropriate.
5232 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5233 when determining locus of frontend code.
5234 * trans-io.c (set_error_locus): Same.
5235 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5236 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5238 (all): Add missing initializers.
5240 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5242 * Make-lang.in (trans-common.o): Remove redundant dependency.
5243 (data.c): Replace object file name ...
5244 (data.o): ... by the correct one.
5246 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5248 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5249 for ranges when dumping array references.
5251 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5253 * decl.c (variable_decl): Always apply default initializer.
5255 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5258 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5259 handle zero correctly.
5261 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5263 * match.c (gfc_match): Eliminate dead code.
5265 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5267 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5268 Detect bad continuation line in fixed form sources.
5270 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5273 * iresolve.c (gfc_resolve_nearest): Add new function.
5274 * intrinsic.h: ... declare it here.
5275 * intrinsic.c (add_functions): ... add it as resolving function
5278 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5281 * match.c (gfc_match_do): Allow infinite loops with
5282 label-do-stmt. Do not enforce space after comma.
5284 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5287 * parse.c (parse_interface): Allow empty INTERFACE, remove
5290 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5292 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5293 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5294 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5295 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5296 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5297 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5298 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5299 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5300 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5301 trans-types.h, trans.c, trans.h: Update copyright years and
5303 * data.c: Likewise, also removed two whitespace-only lines.
5304 * gfortranspec.c, lang.opt: Update copyright years.
5306 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5309 * trans-decl.c (generate_local_decl): Don't warn for unused
5310 variables which are in common blocks.
5312 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5314 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5315 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5316 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5318 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5321 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5323 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5325 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5326 Remove "set DEVELOPMENT".
5327 (Compiling GFORTRAN): Remove.
5329 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5331 * array.c (match_subscript, match_array_ref): Add comments
5332 explaining argument 'init'.
5333 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5334 trans-expr.c, trans.c: Fix some typos in comments.
5335 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5336 * primary.c (match_digits, match_integer_constant): Add comment
5337 explaining signflag.
5339 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5342 * primary.c: Include system.h and flags.h, needed for pedantic.
5343 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5346 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5349 * match.c (match_data_constant): Handle case where
5350 gfc_find_symbol sets sym to NULL
5352 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5354 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5355 dependency on mathbuiltins.def
5357 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5359 * trans-io.c (transfer_expr): Implemented recursive printing
5362 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5364 * gfortranspec.c: Do not include multilib.h.
5366 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5368 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5369 2004 to copyright years.
5370 * trans-expr.c, trans-decl.c: Comment update, we now generate
5371 GENERIC, not SIMPLE. Add 2004 to copyright years.
5373 2004-04-24 Paul Brook <paul@codesourcery.com>
5375 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5377 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5380 * arith.c (gfc_arith_divide): Fix complex divide.
5382 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5384 * gfortranspec.c: Include the target headers.
5386 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5390 * arith.c (arctangent2): New function.
5391 * arith.h (arctangent2): Add function prototype.
5392 * simplify.c (gfc_simplify_atan2): Use it.
5393 (gfc_simplify_log): Use it.
5395 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5397 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5398 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5400 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5403 * trans-io.c (build_dt): Change REC to value.
5405 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5408 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5409 the real value when converting mpf to string.
5411 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5414 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5417 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5420 * simplify.c (simplify_min_max): Convert the type of the result.
5422 2004-04-11 Paul Brook <paul@codesourcery.com>
5424 * gfortran.texi: Use full target triplet.
5426 2004-04-11 Paul Brook <paul@codesourcery.com>
5428 * Make-lang.in (GFORTRAN_TEXI): Set it.
5429 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
5430 (fortran/gfortran.info): Ditto.
5431 * gfortran.texi: Major update.
5432 * invoke.texi: New file.
5434 2004-04-10 Paul Brook <paul@codesourcery.com>
5436 * trans-array.c (gfc_trans_allocate_temp_array,
5437 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5438 * trans-decl.c (gfc_build_dummy_array_decl,
5439 gfc_get_symbol_decl, gfc_build_function_decl,
5440 gfc_create_module_variable): Ditto.
5441 * trans-expr.c (gfc_conv_variable): Ditto.
5442 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5443 * trans.h (GFC_DECL_STRING): Remove.
5444 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5445 GFC_DECL_ASSIGN): Renumber flags.
5447 2004-04-05 Paul Brook <paul@codesourcery.com>
5451 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5453 * gfortran.h (struct gfc_charlen): Add backend_decl.
5454 * trans-array.c (gfc_trans_allocate_temp_array,
5455 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5456 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5457 Remove old, broken string handling.
5458 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5459 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5460 gfc_trans_deferred_array): Handle character arrays.
5461 * trans-const.c (gfc_conv_const_charlen): New function.
5462 * trans-const.h (gfc_conv_const_charlen): Add prototype.
5463 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5465 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5466 (gfc_create_string_length): New function.
5467 (gfc_get_symbol_decl): Create lengths for character variables.
5468 (gfc_get_fake_result_decl): Ditto.
5469 (gfc_build_function_decl): Only set length for assumed length
5470 character arguments.
5471 (gfc_trans_dummy_character): New function.
5472 (gfc_trans_auto_character_variable): Rewrite.
5473 (gfc_trans_deferred_vars): Handle more types of character variable.
5474 (gfc_create_module_variable): String lengths have moved.
5475 (gfc_generate_function_code): Initialize deferred var chain earlier.
5476 * trans-expr.c (gfc_conv_init_string_length): Rename ...
5477 (gfc_trans_init_string_length): ... to this.
5478 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5479 gfc_conv_function_call): Update to new format for character variables.
5480 (gfc_conv_string_length): Remove.
5481 (gfc_conv_string_parameter): Update assertion.
5482 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5483 * trans-io.c (set_string): Use new macro names.
5484 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5485 * trans-types.c (gfc_get_character_type): Use existing length expr.
5486 (gfc_is_nodesc_array): Make public.
5487 (gfc_get_dtype_cst): Rename ...
5488 (gfc_get_dtype): ... to this. Handle unknown size arrays.
5489 (gfc_get_nodesc_array_type): Use new name.
5490 (gfc_sym_type): New character variable code.
5491 (gfc_get_derived_type): Ditto.
5492 (gfc_get_function_type): Evaluate character variable lengths.
5493 * trans-types.h (gfc_strlen_kind): Define.
5494 (gfc_is_nodesc_array): Add prototype.
5495 * trans.h: Update prototypes.
5496 (struct lang_type): Update comments.
5497 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5498 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5500 2004-04-04 Paul Brook <paul@codesourcery.com>
5502 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5503 * options.c (gfc_init.options, gfc_handle_option): Ditto.
5504 * trans-expr.c (gfc_conv_function_call): Ditto.
5505 * trans-types.c (gfc_is_nodesc_array): Ditto
5506 * lang.opt (fg77-calls): Remove.
5508 2004-04-04 Paul Brook <paul@codesourcery.com>
5510 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5511 (gfc_conv_descriptor_base): Rename ...
5512 (gfc_conv_descriptor_offset): ... to this.
5513 (gfc_trans_allocate_array_storage): Set offset to zero.
5514 (gfc_conv_array_base): Rename ...
5515 (gfc_conv_array_offset): ... to this.
5516 (gfc_conv_array_index_ref): Add offset parameter.
5517 (gfc_conv_array_ref): Include offset.
5518 (gfc_trans_preloop_setup): Use existing offset.
5519 (gfc_trans_allocate_temp_array, gfc_array_allocate,
5520 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5521 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5522 gfc_conf_ss_descriptor): Set offset.
5523 * trans-array.h: Rename prototypes.
5524 * trans-const.h (gfc_index_zero_node): Define.
5525 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5526 * trans-types.c (gfc_get_array_type_bounds): Ditto.
5527 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5529 2004-03-25 Diego Novillo <dnovillo@redhat.com>
5531 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5533 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5536 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
5537 before conversion by gmp library call.
5539 2004-03-24 Bud Davis <bdavis9659@comcast.net>
5542 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5544 2004-02-24 Richard Henderson <rth@redhat.com>
5546 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5548 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
5550 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5551 (fortran/gfortran.info): ... to here.
5554 2004-02-16 Richard Henderson <rth@redhat.com>
5556 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5557 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5558 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5559 (gfc_expand_function): Rename from expand_function_body, make static,
5560 don't do anything except invoke tree_rest_of_compilation.
5561 (gfc_be_parse_file): Invoke cgraph.
5562 (gfc_expand_decl): Remove.
5563 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5564 __builtin_adjust_trampoline.
5565 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5566 (gfc_finalize): New.
5567 (gfc_generate_function_code): Use it. Lower nested functions.
5568 * trans-expr.c (gfc_conv_function_call): Add static chain operand
5570 * trans.c (gfc_build_function_call): Likewise.
5571 * trans.h (expand_function_body): Remove.
5573 2004-02-15 Victor Leikehman <lei@il.ibm.com>
5576 * trans-decl.c (gfc_build_function_decl) For functions
5577 returning CHARACTER pass an extra length argument,
5578 following g77 calling conventions.
5579 * trans-types.c (gfc_get_function_type) Ditto.
5580 * trans-expr.c (gfc_conv_function_call) Ditto.
5582 2004-02-14 Paul Brook <paul@codesourcery.com>
5584 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5586 2004-02-12 Paul Brook <paul@nowt.org>
5590 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
5592 * gfortran.texi: Fix typos.
5594 2004-02-07 Bud Davis <bdavis9659@comcast.net>
5597 * intrinsic.c (add_conversions) Use logical conversion instead
5599 * trans-types.c (gfc_get_logical_type) implemented logical*1
5602 2004-01-17 Paul Brook <paul@codesourcery.com>
5604 * lang-specs.h: Remove %<fixed-form.
5606 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
5608 * lang-specs.h: Enable preprocessing of source files
5609 ending in .F, .fpp, .FPP, .F90 and .F95.
5611 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
5614 * lang-specs.h: Enable compilation of files ending
5615 in .f, .for and .FOR.
5617 2004-01-11 Paul Brook <paul@codesourcery.com>
5619 * trans-stmt.c (gfc_trans_if_1): New function.
5620 (gfc_trans_if): Use it.
5622 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
5624 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5625 (gfc_option_t): Add max_identifier_length.
5626 * lang.opt: Add fmax-identifier-length.
5627 * match.c (parse_name): Use limit.
5628 * options.c (gfc_init_options): Set max_identifier_length.
5629 (gfc_handle_option): Ditto.
5631 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
5633 * intrinsic.c (add_functions): Add resolve function to dcmplx.
5634 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5635 * iresolve.c (gfc_resolve_dcmplx): New function.
5637 2004-01-10 Paul Brook <paul@codesourcery.com>
5639 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5640 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5641 (gfc_return_by_reference): Correct condition.
5642 (gfc_get_function_type): Ditto.
5644 2004-01-10 Paul Brook <paul@codesourcery.com>
5646 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5649 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5651 * iresolve.c: Use correct kind.
5653 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
5656 * trans-decl.c (gfc_create_module_variable): Output array valued
5659 2004-01-10 Paul Brook <paul@codesourcery.com>
5661 * resolve.c (resolve_branch): Get error message right way round.
5663 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
5665 * trans-array (gfc_conv_loop_setup): Adjust comment to track
5667 (gfc_array_allocate): Don't count size of element twice.
5669 2004-01-04 Paul Brook <paul@codesourcery.com>
5671 * lang.opt (i8, r8, std=*): Remove RejectNegative.
5673 2004-01-04 Paul Brook <paul@codesourcery.com>
5675 * error.c (gfc_notify_std): New function.
5676 * gfortran.h (gfc_notify_std): Declare.
5677 (GFC_STD_*): Define.
5678 (gfc_option_t): Add warn_std and allow_std.
5679 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5680 (gfc_intrinsic_func_interface): Use gfc_notify_std.
5681 * check.c (check_rest): Use gfc_notify_std.
5682 * match.c (gfc_match_pause): Ditto.
5683 (gfc_match_assign): Ditto.
5684 (gfc_match_goto): Ditto.
5685 * resolve.c (resolve_branch): Ditto.
5686 * lang.opt: Add std=<foo> and w.
5687 * options.c (gfc_init_options): Set allow_std and warn_std.
5688 (gfc_handle_option): Handle OPT_std_* and OPT_w.
5690 2004-01-01 Paul Brook <paul@codesourcery.com>
5692 * array.c (gfc_append_constructor): Take constructor, not expression.
5693 * data.c (struct gfc_expr_stack): Remove.
5694 (expr_stack): Remove.
5695 (find_con_by_offset): Rename from find_expr_in_con.
5696 (find_con_by_component): Rename from find_component_in_con.
5697 (gfc_get_expr_stack): Remove.
5698 (gfc_assign_data_value): Rewrite.
5699 (gfc_expr_push): Remove.
5700 (gfc_expr_pop): Remove.
5701 (gfc_advance_section): Rename from
5702 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
5703 (gfc_get_section_index): Handle unbounded sections.
5704 * gfortran.h: Update prototypes.
5705 * resolve.c (check_data_variable): Array section maight not be the
5708 2004-01-01 Paul Brook <paul@codesourcery.com>
5711 * resolve.c (resolve_symbol): Allow assumed length function results.
5713 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
5715 * match.c (gfc_match_pause): Fix spelling.
5717 2004-01-01 Steven Bosscher <stevenb@suse.de>
5720 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5721 reference from the expression.
5723 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
5725 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5727 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5728 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5729 (symbol_attribute):New variable attribute: assign.
5730 * io.c (resolve_tag):Integer variable is allowed.
5731 (match_dt_format): Add ASSIGN statement. Set assign flag.
5732 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5733 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5734 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5735 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5736 (next_statement): Add ST_LABEL_ASSIGNMENT.
5737 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5738 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5739 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5740 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5741 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5742 assign. Put them into the stuct lang_decl.
5743 * trans-io.c (set_string): Add the assign statement.
5744 * trans-stmt.c (gfc_trans_label_assign): New function.
5745 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5746 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5747 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5748 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5749 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5750 (GFC_DECL_ASSIGN(node)): New macro to access flag.
5752 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
5755 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5758 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
5760 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5761 that arguments to subroutines/functions can't alias themselves, nor global
5764 2003-12-20 Steven Bosscher <stevenb@suse.de>
5766 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5767 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5769 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
5771 * primary.c (match_substring): Fix substring bug for start point
5772 or end point is NULL.
5773 * trans-expr.c (gfc_conv_substring): Ditto
5774 * trans-types.c (gfc_sym_type): Get correct type of scalar
5775 character variables.
5776 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5779 2003-12-10 Richard Henderson <rth@redhat.com>
5781 * options.c (gfc_post_options): Don't ever use rtl inlining.
5783 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
5785 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5786 * trans-equivalence.c: Remove.
5787 * trans-decl.c (gfc_get_symbol_decl): Update to match.
5788 (gfc_generate_function_code): Ditto.
5789 * trans-array.c (gfc_conv_array_parameter): Ditto.
5790 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5791 (F95_ADDITIONAL_OBJS): Add stor-layout.o
5792 * trans.h (gfc_trans_equivalence): Remove.
5793 * gfortran.h (struct gfc_equiv): Add used field.
5794 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5795 equiv_offset fields.
5797 2003-12-05 Richard Henderson <rth@redhat.com>
5799 * trans.c (gfc_build_addr_expr): New.
5800 (gfc_build_indirect_ref, gfc_build_array_ref): New.
5801 * trans.h: Declare them.
5802 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5803 trans-stmt.c, trans.c (*): Use them.
5805 * f95-lang.c (gfc_post_options): Remove dead prototype.
5806 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5807 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5810 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
5812 * io.c (gfc_match_format): Check for missing format label.
5814 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
5817 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5818 from interfaces in modules.
5820 2003-11-30 Paul Brook <paul@nowt.org>
5822 * trans-array.c (gfc_trans_g77_array): Make non-static.
5823 (gfc_trans_assumed_size): Remove.
5824 (gfc_trans_dummy_array_bias): Explicitly free temporary.
5825 * trans-array.h (gfc_trans_g77_array): Add prototype.
5826 (gfc_trans_assumed_size): Remove.
5827 * trans-decls.c (gfor_fndecl_push_context): Remove.
5828 (gfor_fndecl_pop_context): Remove.
5829 (gfc_build_function)decls): Don't create them.
5830 (gfc_trans_deferred_vars): Update to match. Remove dead code.
5831 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5833 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
5835 * trans-array.c (gfc_conv_array_parameter): Simplify
5836 array argument passing for array name actual argument.
5837 * trans-expr.c (gfc_conv_function_call): Ditto
5838 * trans-types.c (gfc_is_nodesc_array):Ditto.
5840 2003-11-30 Paul Brook <paul@nowt.org>
5842 * f95-lang.c (gfc_post_options): Move ...
5843 * options.c (gfc_post_options): .. to here. Handle inlining options.
5844 * gfortran.h (gfc_post_options): Add prototype.
5846 2003-11-28 Richard Henderson <rth@redhat.com>
5848 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5850 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
5852 * trans.h (has_alternate_specifier): New global variable.
5853 * match.c (gfc_match_call): Handle actual arguments associated with
5854 alternate return indicators.
5855 * trans-expr.c (gfc_conv_function_call): Ditto
5856 * trans-stmt.c (gfc_trans_call): Ditto
5857 (gfc_trans_return): Handle return statement with value.
5858 * trans-decl.c (gfc_generate_function_code): Handle functions with
5860 (gfc_get_fake_result_decl): Ditto
5861 * trans-types.c (gfc_get_function_type): Ditto
5862 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5863 (resolve_formal_arglist): Check asterisk dummy.
5865 2003-11-27 Paul Brook <paul@nowt.org>
5867 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5868 allocation interface.
5869 (gfc_conv_ array_parameter): Ditto.
5870 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5871 * trans-array.c: Update prototype.
5872 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5873 (gfc_trans_auto_character_variable): Use new memory alloc interface.
5874 * trans-expr.c (gfc_conv_string_tmp): Ditto.
5875 (gfc_conv_function_call): Use gfc_conv_string_tmp.
5876 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
5877 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5878 * trans.h (gfc_ss_info): Remove unused pdata field.
5879 * trans.c (gfc_create_var_np): Change T to V.
5881 2003-11-26 Richard Henderson <rth@redhat.com>
5883 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5884 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
5885 FRACTION, NEAREST, SET_EXPONENT.
5886 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5887 Fix GTY marking. Remove unnecessary const's.
5888 (LIBM_FUNCTION): Rename from I_LIB.
5889 (LIBF_FUNCTION): New.
5890 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5891 conventions. Assume the expr signature is correct. Mark const.
5892 (gfc_conv_intrinsic_exponent): Use library functions.
5893 (gfc_conv_intrinsic_set_exponent): Remove.
5894 (gfc_conv_intrinsic_scale): Remove.
5895 (gfc_conv_intrinsic_nearest): Remove.
5896 (gfc_conv_intrinsic_fraction): Remove.
5897 (gfc_conv_intrinsic_function): Update.
5898 * trans-decl.c (gfor_fndecl_math_exponent4): New.
5899 (gfor_fndecl_math_exponent8): New.
5900 (gfc_build_intrinsic_function_decls): Set them.
5901 * trans.h: Declare them.
5903 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
5905 * trans-common.c (gfc_layout_global_equiv): Locate the error for
5906 underflow COMMON block.
5907 (gfc_trans_one_common): Fix bug for size of COMMON block containing
5908 EQUIVALENCE object. Also fix typo in an error message.
5910 2003-11-25 Diego Novillo <dnovillo@redhat.com>
5912 * Make-lang.in: Add check-gfortran to lang_checks.
5913 (check-f95): Alias for check-gfortran.
5915 2003-11-25 Jason Merrill <jason@redhat.com>
5917 * Make-lang.in (f95.tags): Create TAGS.sub files in each
5918 directory and TAGS files that include them for each front end.
5920 2003-11-24 Paul Brook <paul@nowt.org>
5923 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5925 2003-11-24 Paul Brook <paul@nowt.org>
5927 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5929 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5931 2003-11-24 Paul Brook <paul@nowt.org>
5934 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5935 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5937 2003-11-20 Richard Henderson <rth@redhat.com>
5939 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5940 (gfc_conv_array_base): Likewise.
5941 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5942 * trans-expr.c (gfc_conv_string_tmp): Likewise.
5943 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5944 * trans-stmt.c (gfc_trans_character_select): Likewise.
5946 2003-11-13 Paul Brook <paul@nowt.org>
5948 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5950 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
5952 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5953 (resolve_equivalence): New function.
5954 (resolve_equivalence_derived): New function.
5956 2003-11-12 Richard Henderson <rth@redhat.com>
5958 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5959 annotate_all_with_locus.
5961 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
5963 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5964 * trans-decl.c (gfc_finish_var_decl): Modified.
5966 2003-11-08 Paul Brook <paul@nowt.org>
5969 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5972 2003-11-06 Paul Brook <paul@nowt.org>
5974 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5976 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
5978 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5980 2003-10-27 Anthony Green <green@redhat.com>
5982 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5983 (f95.stagefeedback): Ditto.
5985 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
5988 * Make-lang.in (f95.stageprofile): Add.
5989 (f95.stagefeedback): Add.
5991 2003-10-23 Richard Henderson <rth@redhat.com>
5993 * f96-lang.c (gfc_gimplify_expr): Remove.
5994 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5995 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5997 2003-10-23 Richard Henderson <rth@redhat.com>
5999 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
6001 2003-10-20 Paul Brook <paul@nowt.org>
6003 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
6004 * trans-stmt.c (gfc_trans_do_while): Ditto.
6006 2003-10-17 Paul Brook <paul@nowt.org>
6008 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
6010 2003-10-17 Paul Brook <paul@nowt.org>
6012 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
6014 2003-10-17 Feng Wang <wf_cs@yahoo.com>
6016 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
6017 (gfc_resolve_minloc): Ditto.
6018 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
6019 Return the value after subtracting the lower bound.
6021 2003-10-16 Richard Henderson <rth@redhat.com>
6023 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
6025 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
6027 * lang.c: Remove -M option for now, it's in the way for C.
6029 2003-10-14 Jason Merrill <jason@redhat.com>
6031 * Make-lang.in (f95.tags): New rule.
6033 2003-10-13 Richard Henderson <rth@redhat.com>
6035 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
6037 2003-10-13 Paul Brook <paul@nowt.org>
6039 * trans-decl.c (generate_local_decl): Don't create junk variables.
6041 2003-10-13 Paul Brook <paul@nowt.org>
6043 * resolve.c (resolve_formal_arglist): Use function result decl in
6044 preference to function decl.
6046 2003-10-12 Richard Henderson <rth@redhat.com>
6048 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
6049 TREE_READONLY. Update all callers.
6051 2003-10-12 Feng Wang <wf_cs@yahoo.com>
6053 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
6054 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
6055 (gfc_is_intrinsic_libcall): Add CSHIFT.
6057 2003-10-12 Richard Henderson <rth@redhat.com>
6059 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
6060 (gfc_trans_array_constructor_value): Likewise.
6061 (gfc_conv_array_initializer): Likewise.
6062 * trans-stmt.c (gfc_trans_character_select): Likewise.
6064 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
6066 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
6068 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6070 * check.c (gfc_check_repeat): Check arguments are scalar.
6071 (gfc_check_trim): New function.
6072 * intrinsic.h (gfc_check_trim): Add prototype.
6073 * intrinsic.c (add_functions): Use it.
6074 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
6076 * trans-decl.c: Ditto.
6077 (gfc_build_intrinsic_fucntion_decls): Set them.
6078 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
6079 (gfc_conv_intrinsic_trim): New function.
6080 (gfc_conv_intrinsic_repeat): New function.
6081 (gfc_conv_intrinsic_function): Use them.
6083 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6085 * trans-types.c (gfc_sym_type): Handle result variables.
6087 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6089 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6090 gfc_get_character_type.
6092 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6094 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6096 2003-10-11 Paul Brook <paul@nowt.org>
6098 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6099 (gfc_resolve_dprod): New function.
6100 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6101 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6102 (gfc_resolve_dprod): Declare.
6103 * intrinsic.c (add_functions): Use them.
6104 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6106 2003-10-06 Richard Henderson <rth@redhat.com>
6108 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6109 * trans-intrinsic.c (call_builtin_clz): Use it.
6111 2003-10-05 Paul Brook <paul@nowt.org>
6113 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6114 * trans-decl.c (gfc_generate_function_code): Set
6115 cfun->function_end_locus.
6117 2003-09-24 Jason Merrill <jason@redhat.com>
6119 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6122 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6123 Paul Brook <paul@nowt.org>
6125 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6126 * array.c (gfc_inser_constructor): New function.
6127 (gfc_get_constructor): New function.
6128 (gfc_free_constructor): Initialize offset and repeat.
6129 (iterator_stack): Remove.
6130 (expand_info): Add offset, component and repeat fields.
6131 (expand_constructor): Set them.
6132 (expand): Set new fields.
6133 (gfc_copy_constructor): Ditto. Avoid recursion.
6134 * gfortran.h: Add prototypes for new functions.
6135 (gfc_constructor): Add offset, component and repeat.
6136 (iteratio_stack): Move to here.
6137 * resolve.c (check_data_variable): Convert data values into variable
6139 (traverse_data_list): Build implicit loop chain.
6140 (gfc_resolve): Ditto.
6141 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6142 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6143 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6144 (gfc_conv_expr): Update to match.
6145 * trans.h (gfc_conv_structure): Declare.
6148 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6150 * trans.h: Add declarations for gfor_fndecl_si_kind and
6151 gfor_fndecl_sr_kind.
6152 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6153 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6154 (g95_conv_intrinsic_sr_kind): New function.
6155 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6158 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6160 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6161 instead of _4 and _8 as postfix for libgfortran calls.
6163 2003-09-16 Paul Brook <paul@nowt.org>
6165 * array.c (compare_bounds): New function.
6166 (gfc_compare_array_spec): Use it.
6168 2003-09-14 Paul Brook <paul@nowt.org>
6170 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6171 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6173 2003-09-14 Paul Brook <paul@nowt.org>
6175 * check.c (dim_rank_check): Allow assumed bounds if requested.
6176 (gfc_check_lbound): Call it.
6177 (gfc_check_ubound): Ditto.
6178 (gfc_check_size): Change to match.
6179 * simplify.c (gfc_simplify_bound): New function.
6180 (gfc_simplify_lbound): New function.
6181 (gfc_simplify_ubound): New function.
6182 * intrinsic.h: Declare them.
6183 * intrinsic.c (add_functions): Use them.
6185 2003-09-14 Paul Brook <paul@nowt.org>
6187 * io.c (format_lex): Initialize negative_flag.
6188 (check_format): Intialize repeat.
6189 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6190 (gfc_new_var_expr): Ditto.
6192 2003-09-14 Paul Brook <paul@nowt.org>
6194 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6195 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6197 2003-09-12 Paul Brook <paul@nowt.org>
6199 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6201 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6203 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6204 for a correct expression.
6206 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6208 * trans-intrinsic.c (real_compnt_info): New struct.
6209 (prepare_arg_info): New function.
6210 (gfc_conv_intrinsic_set_exponent): New function.
6211 (gfc_conv_intrinsic_scale): New function.
6212 (gfc_conv_intrinsic_nearest): New function.
6213 (gfc_conv_intrinsic_fraction): New function.
6214 (gfc_conv_intrinsic_exponent): New function.
6215 (gfc_conv_intrinsic_spacing): New function.
6216 (gfc_conv_intrinsic_rrspacing): New function.
6217 (gfc_conv_intrinsic_function): Use them.
6219 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6221 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6222 build_int_2 changed from (high, low) to (low, high).
6223 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6224 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6225 iocall_set_nml_val_float, iocall_set_nml_val_char,
6226 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6227 (gfc_build_io_library_fndecls): Add variable initialization.
6228 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6229 (build_dt): Add namelist support.
6230 * io.c (value): New variable.
6231 (check_format): Support FMT_H now.
6233 2003-09-07 Paul Brook <paul@nowt.org>
6235 * io.c (gfc_resolve_dt): Error if format label is not defined.
6237 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6239 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6240 about case_switch's break. The other is about building the condition
6241 statement tree, which judges the argument in the range of the
6242 corresponding integer type.
6243 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6244 for the large values.
6246 2003-09-05 Paul Brook <paul@nowt.org>
6248 * f95-lang.c (expand_function_body): Gimplify the function.
6250 2003-09-04 Jeff Law <law@redhat.com>
6252 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6255 2003-09-04 Paul Brook <paul@nowt.org>
6257 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6258 (gfc_expand_stmt): New function.
6259 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6260 (expand_function_body): Use tree_rest_of_compilation.
6261 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6263 2003-09-03 Jeff Law <law@redhat.com>
6265 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6268 2003-08-30 Paul Brook <paul@nowt.org>
6270 * f95-lang.c (builtin_function): Remove #if 0 code.
6271 (gfc_define_builtin): New function.
6272 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6273 * mathbuiltins.def: New file.
6274 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6275 (gfc_intrinsic_map): Use mathbuiltins.def.
6276 (gfc_intrinsic_builtin_t): Remove.
6277 (gfc_build_intrinsic_lib_fndecls): Update.
6278 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6279 signed_size_type_node.
6281 2003-08-29 Paul Brook <paul@nowt.org>
6283 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6285 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6287 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6288 (gfc_conv_intrinsic_function): Add MODULO.
6290 2003-08-22 Jason Merrill <jason@redhat.com>
6292 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6294 2003-08-22 Andreas Jaeger <aj@suse.de>
6296 * Make-lang.in (f95.install-common): Add DESTDIR support.
6297 * (f95.install-info): Likewise.
6298 (f95.uninstall): Likewise.
6300 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6302 * trans-types.c (gfc_init_types): Initialize
6303 signed_size_type_node with size_type_node.
6305 2003-08-18 Paul Brook <paul@nowt.org>
6307 * dependency.c (gfc_dependency): New enum.
6308 (check_another_array_ref): Remove.
6309 (gfc_get_array_from_component): Remove.
6311 (get_range): Remove.
6312 (get_no_of_elements): Use mpz_t, not mpf_t.
6313 (transform_sections): New function.
6314 (gfc_check_range_range): Rename ...
6315 (gfc_check_section_vs_section): ... to this. Use new function.
6316 (gfc_is_inside_range): Rewrite to match.
6317 (gfc_check_element_vs_section): Ditto.
6318 (gfc_check_element_vs_element): Ditto.
6320 (gfc_dep_resolver): Ditto. Remove unused parameter.
6321 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6322 gfc_check_element_vs_element, gfc_is_inside_range,
6323 gfc_get_array_from_component): Remove prototypes for static functions.
6324 (gfc_dep_resolver): Update prototype.
6325 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6327 2003-08-15 Paul Brook <paul@nowt.org>
6329 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6330 return values to parent scope.
6331 (gfc_build_dummy_array_decl): Ditto.
6333 2003-08-14 Paul Brook <paul@nowt.org>
6335 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6336 size of the type, not the pointer.
6337 * resolve.c (resolve_symbol): Give more accurate error message.
6339 2003-08-10 Paul Brook <paul@nowt.org>
6341 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6343 2003-08-10 Paul Brook <paul@nowt.org>
6345 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6348 2003-08-10 Chun Huang <compiler@sohu.com>
6350 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6351 (resolve_symbol): Ditto.
6352 * trans-expr.c (gfc_conv_statement_function): New function.
6353 (gfc_conv_function_expr): Use it.
6355 2003-08-10 Paul Brook <paul@nowt.org>
6357 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6358 (walk_function_expr): Set section rank.
6359 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6361 2003-08-10 Paul Brook <paul@nowt.org>
6363 * intrinsic.c (add_sym): Prefix names with correct string.
6364 (add_sym_0s): New function.
6365 (add_subroutines): Register abort.
6367 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6369 * gfortran.h: Introduce options to control the mangling.
6370 * lang.opt: Likewise.
6371 * options.c (gfc_init_options): Handle the options.
6372 * trans-common.c (gfc_sym_mangled_common_id): New function.
6373 (gfc_build_common_decl): Call it.
6374 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6375 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6377 2003-08-09 Paul Brook <paul@nowt.org>
6379 * module.c (mio_symbol): Always ouput a namespace for formal args.
6380 (load_needed): Namespace now belong to their proper symbol.
6381 (gfc_dump_module): Change G95=>GFORTRAN.
6383 2003-08-05 Paul Brook <paul@nowt.org>
6385 * options.c: Force -fg77-calls.
6387 2003-08-02 Paul Brook <paul@nowt.org>
6389 * Makelang.in: Rename G95_* to GFORTRAN_*.
6390 * All sources: Rename G95_* to GFC_*.
6392 2003-08-01 Paul Brook <paul@nowt.org>
6394 * fortran/Make-lang.in: Use GMPLIBS.
6395 * fortran/config-lang.in: Set need_gmp.
6396 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6398 2003-07-27 Andreas Jaeger <aj@suse.de>
6400 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6402 * trans-const.c (gfc_init_constants): Likewise.
6403 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6405 * gfortranspec.c: Convert to ISO C90.
6406 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6408 2003-07-26 Paul Brook <paul@nowt.org>
6410 * lang.opt: Add -fdump-parse-tree.
6411 * options.c (gfc_handle_option): Ditto.
6412 * resolve.c (resolve_forall_iterators): Convert to proper type.
6413 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6415 2003-07-26 Paul Brook <paul@nowt.org>
6417 * Makefile.in: Add build dependencies on files common with rest of gcc.
6419 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6421 * trans.h: Declare g95_trans_pointer_assignment.
6422 * trans-expr.c (g95_trans_pointer_assignment): New function.
6423 (g95_trans_pointer_assign): Use it.
6424 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6425 (g95_trans_pointer_assign_need_temp): New function.
6427 2003-07-26 Paul Brook <paul@nowt.org>
6429 * gfortran.texi: Replace references to g95.
6431 2003-07-26 Paul Brook <paul@nowt.org>
6433 Rename g95_* to gfc_*.
6435 2003-07-25 Paul Brook <paul@nowt.org>
6437 * gfortran.h: Rename from g95.h.
6438 * trans-types.c (boolean_type_node, booelan_true_node,
6439 boolean_false_node): Remove.
6440 * trans-types.h: Ditto.
6442 2003-07-25 Chun Huang <compiler@sohu.com>
6444 * parse.c (accept_statement): Implement BLOCK DATA statement.
6445 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6448 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
6450 * trans-stmt.c (temporary_list): Define.
6451 (g95_trans_assign_need_temp): New function.
6452 (g95_trans_forall_1): Modified for WHERE.
6453 (g95_trans_where_assign): Modified.
6454 (g95_trans_where_2): Modified.
6455 (g95_evaluate_where_mask): Modified.
6456 (g95_trans_where): Modified.
6457 (g95_get_temp_expr): Removed.
6458 (g95_add_to_where_stmt_list): Removed.
6459 (compute_overall_iter_number): Modified for WHERE.
6460 * trans.h: Remove where_stmt_list.
6462 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6464 * lang.opt: Correct description of options -J and -M.
6466 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
6468 * lang.opt: Move help text to here.
6469 * lang-options.h: Remove.
6471 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6472 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6473 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6476 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
6477 Paul Brook <paul@nowt.org>
6479 * check.c (check_rest): Use global pedantic flag.
6480 * io.c (data_desc): Ditto.
6481 * error.c (g95_warning, g95_warning_now): Use global flag.
6482 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6483 (expand_function_body): Update to new prototypes.
6484 (g95_init): Use new option names.
6485 * g95.h (g95_option_t): Standardize names.
6486 (g95_init_options, g95_handle_option): Update prototypes.
6487 * interface.c: Use new option names.
6494 * simplify.c: Ditto.
6496 * trans-array.c: Ditto.
6497 * trans-expr.c: Ditto.
6498 * trans-types.c: Ditto.
6499 * trans-decl.c: Ditto.
6500 (g95_build_library_function_decl): Remove obsolete VPARAMS.
6502 * options.c (g95_display_help): Remove.
6503 (g95_init_options): Convert to new scheme.
6505 (g95module_option): Ditto, rename from g95_parse_arg.
6506 (g95_handle_module_path_options): New function.
6507 * trans-equivalence.c: Fix error message.
6508 * lang.opt: Corrections.
6510 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
6512 * lang.opt: New file.
6514 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6516 * decl.c (match_attr_spec): Set colon_seen.
6518 2003-07-14 Paul Brook <paul@nowt.org>
6520 * trans-array.c: Update comment.
6521 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6522 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6523 minmaxloc,minmaxval): Ditto.
6524 * trans-io.c (g95_trans_transfer): Ditto.
6525 * trans-stmt.c: Remove unneeded prototypes.
6526 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6527 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6528 (compute_inner_temp_size): Remove bits of dead code. Add comments.
6529 Don't share loopinfo.
6530 (compute_overall_iter_number): Declare as static.
6531 (allocate_temp_for_forall_nest): Ditto.
6532 (g95_trans_forall_1): Don't pass shared loopinfo.
6533 * trans.c (g95_start_block): Expand comment.
6535 2003-07-12 Paul Brook <paul@nowt.org>
6537 * arith.c (g95_index_integer_kind): Remove unused initializer.
6538 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6539 index by size of element.
6540 (generate_loop_for_rhs_to_temp): Ditto.
6541 (allocate_temp_for_forall_nest): Use element size, not index size.
6543 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6545 * arith.c (g95_index_integer_kind): Add a TODO.
6546 * simplify.c (g95_simplify_nearest): Add a TODO.
6548 2003-07-09 Chun Huang <compiler@sohu.com>
6550 * trans.h: Add declarations for gfor_fndecl_string_scan and
6551 gfor_fndecl_string_verify.
6552 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6553 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6554 (g95_conv_intrinsic_verify): New function.
6555 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6556 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6557 of parameter 'BACK=.TRUE.'
6559 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
6561 * trans-stmt.c (iter_info, forall_info): Define.
6562 (g95_trans_forall_block): Remove.
6563 (g95_trans_forall_loop): Use forall info blocks.
6564 (g95_trans_nested_forall_loop): New function.
6565 (g95_do_allocate): Handle things other than logical masks.
6566 (generate_loop_for_temp_to_lhs): New function.
6567 (generate_loop_for_rsh_to_temp): New function.
6568 (compute_inner_temp_size): New function.
6569 (compute_overall_iter_number): New function.
6570 (allocate_temp_for_forall_nest): New function.
6571 (g95_trans_forall): Move body ...
6572 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
6574 2003-07-02 Paul Brook <paul@nowt.org>
6576 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6577 in correct scope. Change callers to match.
6578 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6579 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6581 2003-07-02 Paul Brook <paul@nowt.org>
6583 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
6584 expression shape for all expressions.
6585 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6587 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6589 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6590 g95_parse_arg), intrinsic.c (g95_convert_type): support of
6592 * intrinsic.c, g95.h: Add g95_convert_type_warn,
6593 * resolve.c (g95_resolve_index): Call it.
6595 2003-07-02 Paul Brook <paul@nowt.org>
6597 * iresolve.c (g95_resolve_reshape): Set expression shape.
6598 (g95_resolve_shape): Ditto.
6599 * simplify.c (g95_simplify_shape): Move common code outside condition.
6600 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6602 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6604 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6607 2003-06-29 Paul Brook <paul@nowt.org>
6609 * array.c (g95_simplify_iterator_var): Don't bother with return value.
6610 * expr.c (find_array_element, find_component_ref): New functions.
6611 (remove_subobject_ref): New function.
6612 (simplify_const_ref): Use them. Rename from simplify_component_ref.
6613 (simplify_ref_chain): New function.
6614 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
6615 (g95_specification_expr): Simplify the expression.
6616 * resolve.c (resolve_operator): Check simplifications return code.
6617 (g95_resolve_expr): Ditto.
6619 2003-06-26 Paul Brook <paul@nowt.org>
6621 * expr.c (simplify_component_ref): New function.
6622 (g95_simplify_expr): Use it.
6623 * resolve.c (resolve_structure_cons): Handle references.
6625 2003-06-25 Paul Brook <paul@nowt.org>
6627 * trans-io.c (build_dt): Handle internal units.
6629 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
6631 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6632 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6633 Use g95_array_index_type instead of integer_type_node.
6634 (g95_build_common_decl, g95_set_common_master_type): Use
6635 g95_character1_type_node instead of char_type_node.
6636 * trans-equivalence.c (g95_layout_local_equiv): As above.
6638 2003-06-24 Steven G. Kargl <kargls@attbi.com>
6640 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6641 remove last remains of -fquiet.
6643 2003-06-22 Paul Brook <paul@nowt.org>
6645 * resolve.c (resolve_operator): Don't fail if we can't simplify.
6646 (g95_resolve_expr): Ditto.
6647 (resolce_code): Mark as static.
6648 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6649 gimplifer doesn't (yet).
6651 2003-06-20 Paul Brook <paul@nowt.org>
6653 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6654 * match.c (g95_match_if): Add ST_PAUSE.
6655 (g95_match_stopcode): New function.
6656 (g95_match_pause, g95_match_stop): Use it.
6657 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6658 (decode_stmt, next_statement, parse_executable): Ditto.
6659 * resolve.c (resolve_code): Ditto.
6660 * st.c (g95_free_statement): Ditto.
6661 * trans-stmt.c (g95_trans_pause): New function.
6662 * trans-stmt.h: Declare it.
6663 * trans.c (g95_trans_code): Use it.
6664 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6666 (g95_build_builtin_function_decls): Initialize them.
6668 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6670 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6672 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6673 match_filepos): Fix error handling.
6675 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6677 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6678 Add assertions on arguments.
6679 * resolve.c (expression_shape): Remove useless &.
6680 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6681 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6682 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6683 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6684 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6685 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6686 (g95_simplify_not, g95_simplify_scale): Add assertions.
6688 2003-06-15 Paul Brook <paul@nowt.org>
6690 Clean up stuff to work with the ssa optimizers.
6691 * convert.c (convert): Handle BOOLEAN_TYPEs.
6692 * f95-lang.c (g95_truthvalue_conversion): Implement.
6693 * trans-array.c (g95_trans_array_constructor_value): Group multiple
6695 * trans.h (g95_truthvalue_conversion): Declare.
6696 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6697 * trans-stmt.c (g95_trans_character_select): Don't create array
6698 assignments. Mark labels as indirect jump targets.
6699 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6700 (g95_get_dtype_cst): Handle LOGICAL types.
6702 2003-06-14 Paul Brook <paul@nowt.org>
6704 * f95-lang.c (g95_gimplify_expr): New function.
6705 * trans-array.c (g95_trans_array_constructor_value): Don't create
6707 (g95_conv_expr_descriptor): Rename simple->gimple.
6708 * trans-expr.c (conv_expr_op): Use proper logical operators.
6709 * trans-intrinsic.c (build_fixbound_expr): New function.
6710 (build_fix_expr): Ditto.
6711 (g95_conv_intinsic_aint): Use them. Use builtin functions.
6712 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6714 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6716 * array.c (g95_compare_array_spec): Remove unreachable code.
6717 * expr.c (g95_copy_expr): Likewise.
6718 * intrinsic.c (g95_convert_type): Likewise.
6719 * misc.c (g95_code2string): Likewise.
6720 * simplify.c (g95_simplify_ishft, g95_simplify_real,
6721 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6722 * trans-stmt.c (g95_trans_select): Likewise.
6723 * primary.c (extend_ref): Add an assertion.
6724 * simplify.c (g95_convert_constant): Add const.
6725 * intrinsic.h: Remove g95_check_x_ni.
6726 * f95-lang.c (g95_finish): Call g95_release_include_path.
6728 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6730 * resolve.c (resolve_contained_functions): Fix typo introduced on
6733 2003-06-09 Paul Brook <paul@nowt.org>
6735 * g95.h: Include system.h not hwint.h.
6736 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
6737 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6739 2003-06-09 Paul Brook <paul@nowt.org>
6741 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6742 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6743 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6744 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6745 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6747 * trans.h (g95_trans_equivalence, g95_trans_common,
6748 g95_add_decl_to_function): Declare.
6749 * trans-common.c, trans-equivalence.c: New files.
6751 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
6753 * intrinsic.c (g95_intrinsic_extension): Remove.
6754 (add_functions): Substitute g95_check_x for g95_check_x_ni
6756 (g95_init_expr_extensions): New function.
6757 (g95_intrinsic_func_interface): Use it.
6758 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6759 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6760 g95_check_precision, g95_check_present, g95_check_radix,
6761 g95_check_range, g95_check_selected_real_kind): Do not set
6762 g95_intrinsic_extension.
6763 (g95_check_x_ni): Remove now duplicate of g95_check_x.
6765 * expr.c (check_inquiry): Add FIXME, fixup some code style.
6767 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6769 * g95.h (ref_type): Name this type explicitly.
6770 * module.c (MIO_NAME): Add specialisations of mio_name.
6771 (mio_symbol_attribute, mio_typespec, mio_array_ref,
6772 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6773 (ab_attribute): Name this type explicitly.
6774 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6776 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
6778 * trans-intrinsic.c (g95_conv_allocated): New function.
6779 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6781 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6783 * f95-lang.c: Don't include g95-support.h
6784 (g95_mark_addressable): Add prototype.
6785 (g95_init_decl_processing): Remove C front end hack.
6786 * f95-tree.c: Remove file.
6787 * support.c: Remove file.
6788 * g95-support.h: Remove file.
6789 * trans-types.c (g95_init_types): Set up boolean
6790 type related tree nodes.
6791 * Make-lang.in: Remove rules for dead files and
6792 dependencies on them.
6794 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
6796 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6797 C front end dependency. Also, convert.c does not depend on
6798 g95-support.h anymore.
6799 * convert.c: Don't include c-common.h and g95-support.h
6800 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6801 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6802 stmts_are_full_exprs_p, current_stmt_tree,
6803 current_scope_stmt_stack): Remove.
6804 * g95-support.h (unsigned_conversion_warning): Kill proto.
6805 (boolean_type_node, boolean_true_node, boolean_false_node):
6806 Don't define here. Instead, make then true tree nodes in
6808 * support.c (c_global_trees): Die, C front end, die!!!
6809 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6810 uintmax_type_node, string_type_node and const_string_type_node.
6811 (decl_constant_value, overflow_warning): Make static functions.
6812 They are in death row too, though.
6813 (default_conversion, c_expand_asm_operands): Remove.
6814 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6815 trans.c: Don't include c-common.h.
6816 * trans-types.c (boolean_type_node, boolean_true_node,
6817 boolean_false_node): Make them real tree nodes.
6818 * trans-types.h (intmax_type_node, string_type_node,
6819 const_string_type_node): Hack to work around C dependencies
6820 in builtin-types.def.
6822 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6824 * decl.c (decl_types): Add some iterators-like sentinels.
6825 * decl.c (match_attr_spec): Use them.
6826 Use "decl_types" instead of "int".
6827 Add cast in call to g95_match_strings.
6828 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
6830 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6831 (g95_interface_info): Use "g95_intrinsic_op".
6832 * dump-parse-tree.c (g95_show_namespace): Use them.
6833 * interface.c (g95_check_interfaces): Use them.
6834 * module.c (read_module, write_module): Use them.
6835 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6836 Use "g95_intrinsic_op".
6837 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6838 Add a default case in switch statement.
6839 * intrinsic.h (g95_generic_isym_id): Moved to...
6840 * g95.h (g95_generic_isym_id): here.
6841 (g95_intrinsic_sym): Use "g95_generic_isym_id".
6842 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6843 * trans-intrinsic.c (g95_intrinsic_map_t,
6844 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6845 * match.c (g95_match_intrinsic_op): Add cast in call to
6848 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
6850 * support.c (skip_evaluation, warn_conversion, lvalue_p,
6851 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6852 constant_fits_type_p, convert_and_check,
6853 unsigned_conversion_warning): Remove these ugly remnants
6854 we inherited from the C front end.
6855 (function_types_compatible): Remove '#if 0'-edcode.
6856 (build_modify_expr): Likewise.
6857 (convert_for_assignment): Don't use the deceased functions.
6858 The parameter fundecl is now unused.
6859 (decl_constant_value): Always just return decl. In fact
6860 this function is not used at present, but it might be in
6861 the future, when we start using the tree inliner.
6862 (overflow_warning, default_conversion, c_expand_asm_operands):
6863 Abort when these are called, they are part of the C type
6864 checking implementation and therefore poison to Fortran.
6866 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
6868 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6869 c-pretty-print.o and c-dump.o. Add a comment on why we
6870 depend on c-semantics.c.
6871 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6872 Don't use the C front end tree dumper hook to dump the
6873 language specific tree representation -- we don't have
6874 one. So instead, inherit the default langhook.
6876 2003-06-02 Paul Brook <paul@nowt.org>
6878 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6880 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6882 * check.c (g95_check_associated): Use proper types. Remove
6883 extraneous argument in call to g95_error().
6885 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6887 * resolve.c (resolve_operator): Make logical operands convert to the
6888 type with higher kind.
6890 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6892 * check.c (g95_check_associated): Make sure both pointer and target has
6893 the same type and rank. Null pointer or array section with vector
6894 subscript as target are not allowed.
6895 * trans.h: Declare gfor_fndecl_associated.
6896 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6897 gfor_fndecl_associated.
6898 * trans-intrinsic.c (g95_conv_associated): New function.
6899 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6901 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
6903 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6904 according to POINTER itself rather than TARGET.
6905 (g95_conv_expr_descriptor): Make lbound start at 1.
6906 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6908 2003-06-01 Paul Brook <paul@nowt.org>
6910 * expr.c (g95_type_convert_binary): Make it match the standard.
6911 * g95.texi: Remove dead link.
6913 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
6915 * g95.texi: Cleanup somewhat in preparation for inclusion
6918 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6919 Canqun Yang <canqun@yahoo.com.cn>
6921 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6923 (g95_find_forall_index): Return proper value.
6924 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6925 compare the return value from g95_find_forall_index.
6927 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6928 * g95.h, io.c (g95_st_label): Remove "length".
6929 (g95_symtree): Remove "link".
6930 (g95_case): Remove "code".
6931 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6932 g95_convert_real): Make an argument pointer to const.
6933 * decl.c (colon_seen): Add a TODO.
6934 * interface.c (g95_compare_types): Fix typo.
6935 * interface.c (compare_interfaces): Preserve value of "p".
6936 * intrinsic.c (sort_actual): Remove "i".
6937 * match.c (g95_match_assign): Proper type in call to g95_match().
6938 * parse.c (next_free): Avoid duplicate call due to macro.
6939 * parse.c (check_statement_label): wrong type in call to g95_error.
6940 * primary.c (match_real_constant): Add a TODO.
6941 * resolve.c (resolve_select): Remove useless conditional.
6942 * simplify.c (g95_simplify_repeat): Proper assignment to
6943 "value.character.string".
6944 * simplify.c (g95_simplify_reshape): Wrong variable in call to
6947 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
6949 * trans-stmt.c: Remove unnecessary include file defaults.h.
6951 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
6953 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6955 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6956 actual variables used as FORALL indexes.
6958 2003-05-15 Paul Brook <paul@nowt.org>
6960 * trans-array.c (g95_trans_static_array_pointer): Use
6962 (g95_trans_deferred_array): Initialize static array pointers.
6963 * trans-expr.c (g95_conv_function_call): Use formal arglist to
6964 correctly pass POINTER and absent CHARACTER arguments.
6966 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
6968 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6969 (g95_resolve_forall_body): Resolve FORALL body.
6970 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6971 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6972 (g95_find_forall_index): Check whether the FORALL index appears in
6973 the expression or not.
6974 (resolve_code): Modified.
6976 2003-05-14 Paul Brook <paul@nowt.org>
6978 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6980 2003-05-13 Paul Brook <paul@nowt.org>
6982 * trans-types.c (g95_max_array_element_size): Now a tree node.
6983 (g95_init_types): Work out max size properly.
6984 (g95_get_dtype_cst): Modify to match.
6986 2003-05-11 Paul Brook <paul@nowt.org>
6988 * trans-io.c (add_case): Create a label decl for case labels.
6990 2003-05-11 Paul Brook <paul@nowt.org>
6992 * arith.c (g95_integer_index_kind): New variable.
6993 * f95-lang.c (g95_init): Move frontend initialization here ...
6994 (g95_post_options): ... from here.
6995 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6996 * intrinsic.c (add_functions): Use index kinds.
6997 * iresolve.c: Convert to index_kind where needed.
6998 * resolve.c (g95_resolve_index): Make public, use index_kind.
6999 (resolve_array_ref): Adjust to match.
7000 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
7001 * trans-stmt.c: Ditto.
7002 * trans-types.c: Ditto.
7003 * trans-types.h (g95_array_index_kind): Remove declaration.
7004 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
7006 2003-05-07 Paul Brook <paul@nowt.org>
7008 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
7009 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
7012 2003-05-07 Paul Brook <paul@nowt.org>
7014 * trans-array.c (trans_static_array_pointer,
7015 g95_trans_array_constructor_value, g95_conv_array_initializer,
7016 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
7017 (g95_add_loop_ss_code): Convert subscripts to the correct type.
7018 * trans-stmt.c (g95_trans_character_select): Ditto.
7019 * trans-types.c (g95_init_types): Ditto.
7021 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
7023 * f95-lang.c (expand_function_body): Use input_line, not lineno.
7024 * trans-decl.c (g95_generate_function_code,
7025 g95_generate_constructors): Likewise.
7026 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
7027 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
7030 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7031 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
7032 with components point to the DERIVED type itself, and two DERIVED
7033 type with components point to each other.
7034 * trans-expr.c (g95_conv_componet_ref): Modified
7036 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7037 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
7039 (g95_trans_pointer_assign): Implement Nullify.
7041 2003-05-01 Paul Brook <paul@nowt.org>
7043 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
7044 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
7046 2003-05-01 Paul Brook <paul@nowr.org>
7048 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
7049 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
7052 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
7054 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
7057 2003-04-28 Paul Brook <paul@nowt.org>
7059 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
7060 as their kind suggests.
7061 (g95_resolve_reshape): Ditto.
7063 2003-04-28 Chun Huang <compiler@sohu.com>
7065 * trans-expr.c (g95_conv_substring_expr): New function.
7066 (g95_conv_expr): Use it.
7068 2003-04-28 Paul Brook <paul@nowt.org>
7070 * iresolve.c (g95_resolve_transpose): Make it match the
7072 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
7074 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7076 * trans-types.c (g95_add_field_to_struct): New function to
7077 add a field to a UNION_TYPE or RECORD_TYPE.
7078 * trans-types.h (g95_add_field_to_struct): Prototype.
7079 (g95_get_derived_type): Use g95_add_field_to_struct to add
7081 * trans-io.c (g95_add_field): Remove.
7082 (ADD_FIELD): Use new g95_add_field_to_struct function.
7083 (ADD_STRING): Likewise.
7084 * trans-stmt.c (g95_trans_select): Likewise.
7085 (g95_add_field): Remove duplicated function.
7087 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7089 Port implementation for CHARACTER SELECT from Andy's tree.
7090 * trans-stmt.c (g95_trans_character_select): Implement character
7091 select. (g95_add_field): New function.
7092 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7093 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7094 * g95.h (struct g95_case): Add field 'int n'.
7095 * trans.h: Declare 'gfor_fndecl_select_string'.
7097 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7099 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7100 (g95_insert_bbd): Die on duplicates.
7101 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7103 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7105 * g95.texi: Require GMP 4.0 -- like we actually
7106 do. Explain the testsuite and what-goes-where.
7107 Don't use undefined texinfo symbol. Break very
7108 long line. Remove finished item from the list
7111 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7113 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7116 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7118 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7119 (g95_trans_forall_body): New function.
7121 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7123 * resolve.c (resove_where): New function.
7124 (resolve_where_shape): New function.
7125 (resolve_code): Add call to 'resolve_where'
7126 * trans-stmt.c (g95_trans_where): Modified.
7127 (g95_trans_where_2): New function.
7128 (g95_trans_where_assign): New function.
7129 (g95_evaluate_where_mask): New function.
7130 (g95_add_to_stmt_list): New function.
7131 (g95_get_temp_expr): New function.
7132 * trans.h (where_stmt_list): New structure.
7134 2003-04-10 Paul Brook <paul@nowt.org>
7136 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7137 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7139 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7141 Update after mainline -> tree-ssa-branch merge.
7142 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7144 (g95_init): Update for new lang_hooks definition.
7145 (g95_post_options): New langhook.
7146 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7147 * scanner.c (g95_new_file): Comment update.
7149 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7151 * g95.h, lang-options.h: Add -Wimplicit-interface.
7152 * options.c (g95_init_options, g95_parse_arg): Set it.
7153 * interface.c (check_intents): Warn about call with implicit
7155 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7158 2003-04-05 Paul Brook <paul@nowt.org>
7160 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7161 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7163 2003-03-29 Paul Brook <paul@nowt.org>
7165 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7166 (g95_resolve_unpack): Ditto.
7167 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7168 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7169 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7171 2003-03-25 Paul Brook <paul@nowt.org>
7173 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7175 * array.c (g95_free_array_ref): Ditto.
7177 * symbol.c (g95_use_derived_tree): Ditto.
7178 * intrinsic.c (add_functions): Use simplification for SCALE.
7179 * primary.c (g95_match_rvalue): Test sym, not symtree.
7181 2003-03-25 Paul Brook <paul@nowt.org>
7183 * trans-decl.c (build_function_decl): Add parameter before it gets
7184 turned into a constant.
7185 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7186 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7187 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7189 2003-03-22 Paul Brook <paul@nowt.org>
7191 * trans-array.c (g95_conv_array_initializer): Allow scalar
7193 * trans-decl.c (g95_finish_var_decl): Result variables are not
7195 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7196 (g95_conv_intrinsic_function): Use it.
7197 * trans-types.h (g95_type_spec): Remove dead declaration.
7199 2003-03-21 Paul Brook <paul@nowt.org>
7201 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7203 2003-03-20 Paul Brook <paul@nowt.org>
7205 * trans-decl.c (g95_build_function_decl): Put character length
7206 parameters at the end of the function declaration.
7207 * trans-expr.c (g95_conv_function_call): Ditto.
7208 * trans-types.c (g95_get_function_type): Ditto.
7210 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7212 * resolve.c (resolve_formal_arglist): Don't impose intent for
7213 procedure arguments of pure functions.
7214 (resolve_select): Remove redundant assignment.
7216 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7218 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7220 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7221 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7223 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7225 * symbol.c (g95_add_type): Fix typo in comment.
7228 2003-03-16 Paul Brook <paul@nowt.org>
7230 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7231 * expr.c (g95_build_call): Remove.
7232 * f95-lang.c (puchdecl_top_level): New function.
7233 * g95.h (g95_code): Store resolved symbol, not just the name.
7234 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7235 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7236 (g95_get_intrinsic_sub_symbol): New function.
7237 * iresolve.c (g95_resolve_cpu_time): Use it.
7238 (g95_resolve_random_number): Ditto.
7239 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7240 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7241 the correct DECL_CONTEXT. Add global symbold to the global scope.
7242 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7245 2003-03-16 Paul Brook <paul@nowt.org>
7247 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7248 * options.c (g95_parse_arg): Ditto.
7249 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7250 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7251 for the procedure, not the parameter.
7252 * trans-array.c (g95_trans_g77_array): New function.
7253 (g95_trans_assumed_size): Use it.
7254 (g95_trans_dummy_array_bias): Ditto.
7255 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7256 (g95_conv_expr_descriptor): ... to here. Update callers.
7257 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7258 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7259 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7260 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7261 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7262 (g95_sym_type): Ditto.
7264 2003-03-15 Paul Brook <paul@nowt.org>
7266 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7268 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7270 2003-03-14 Paul Brook <paul@nowt.org>
7272 * trans-array.c (g95_array_is_packed): Remove.
7273 (g95_conv_array_base): Correctly handle all descriptorless cases.
7274 (g95_conv_array_stride): Use descriptorless strides.
7275 (g95_trans_dummy_array_bias): Don't always repack the array.
7276 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7278 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7279 dummy and non-dummy arrays...
7280 (g95_sym_type, g95_get_derived_type): ... like these.
7281 (g95_get_array_type_bounds): Allow discontiguous arrays.
7283 2003-03-12 Paul Brook <paul@nowt.org>
7285 * array.c (g95_resolve_array_spec): Fix comment.
7286 * g95.h (symbol_attributes): New flag always_explicit.
7287 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7288 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7289 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7290 (g95_trans_array_bounds): Allow assumed shape arrays.
7291 (g95_trans_repack_array): Remove.
7292 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7293 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7294 bounds for assumed size arrays.
7295 (g95_build_dummy_array_decl): Use descriptorless arrays.
7296 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7297 (g95_trans_pointer_assign): Fix typo.
7298 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7300 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7301 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7302 Also modify callers.
7303 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7305 2003-03-08 Paul Brook <paul@nowt.org>
7307 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7308 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7309 * resolve.c (compare_spec_to_ref): Allow full array sections.
7311 2003-03-08 Paul Brook <paul@nowt.org>
7313 * expr.c (g95_simplify_expr): Also simplify array index and
7314 substring expressions.
7315 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7316 * trans-array.c (g95_trans_array_bounds): New function.
7317 (g95_trans_auto_array_allocation): Use it.
7318 (g95_trans_assumed_size): Rewrite.
7319 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7320 (gfor_fndecl_repack): Remove.
7321 (g95_build_qualified_array): Handle absent upper bounds.
7322 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7323 (g95_get_symbol_decl): Update.
7324 (g95_build_intrinsic_function_decls): Initialize new decls.
7325 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7326 (gfor_fndecl_repack): Remove.
7327 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7328 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7329 (g95_get_nodesc_array_type): Handle absent bounds.
7330 * trans-types.h (g95_get_nodesc_array_type): Declare.
7332 2003-03-04 Paul Brook <paul@nowt.org>
7334 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7337 2003-03-02 Paul Brook <paul@nowt.org>
7339 * options.c (g95_init_options): Drfault to 1.
7340 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7341 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7342 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7343 Handle non-constant size automatic arrays.
7344 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7345 generic bound functions.
7346 (g95_trans_auto_array_allocation): Don't create a descriptor.
7347 (g95_trans_assumed_size): New function (broken).
7348 (g95_trans_dummy_array_bias): Remove unused var.
7349 * trans-array.h (g95_trans_assumed_size): Declare.
7350 * trans-decl.c (create_index_var): New fuction.
7351 (g95_build_qualified_array): New function.
7352 (g95_get_symbol_decl): Use it.
7353 (g95_trans_deferred_vars): Handle assumed shape seperately.
7354 * trans-types.c (get_element_type): Handle heap allocated arrays.
7355 (g95_is_nodesc_array): Include non-const size arrays.
7356 (g95_get_nodesc_array_type): Ditto.
7358 2003-02-23 Paul Brook <paul@nowt.org>
7360 * trans-array.c (g95_array_init_size): Should use stride, not size of
7363 2003-02-18 Paul Brook <paul@nowt.org>
7365 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7366 after intrinsic function check.
7368 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7370 * io.c (match_io): Fix missing return value and remove useless
7372 * match.c (g95_match): Remove useless assignment.
7373 * module.c (parse_string): Remove useless post increment.
7374 * simplify.c (g95_simplify_verify): Remove useless assignment.
7376 2003-02-15 Paul Brook <paul@nowt.org>
7378 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7379 * g95.h (symbol_attribute): Add referenced member.
7380 (g95_symbol): Add dummy_order member.
7381 (g95_set_sym_referenced): Declare.
7382 * match.c (g95_match_assignment, g95_match_call): Use it
7383 * primary.c (match_actual_arg, g95_match_rvalue,
7384 g95_match_variable): Ditto.
7385 * symbol.c (next_dummy_order): New variable.
7386 (g95_set_sym_referenced): New function.
7387 (check_done): New function.
7388 (g95_add_*): Use it.
7389 * trans-decl.c: Make formatting conform to GCC standards.
7390 (g95_defer_symbol_init): Add dummy variables in the right order.
7391 (g95_get_symbol_decl): Only accept referenced variables.
7392 (g95_create_module_variable): Module variables are always required.
7393 (generatr_local_decls): New function.
7394 (generate_local_vars): New function.
7395 (g95_generate_function_code): Use it.
7397 2003-02-13 Paul Brook <paul@nowt.org>
7399 * trans-decl.c (g95_conv_struct_cons): Remove.
7400 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7401 * trans-expr.c (g95_conv_structure): New function.
7402 (g95_conv_expr): Use it.
7404 2003-02-09 Paul Brook <paul@nowt.org>
7406 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7407 expressions multiple times.
7408 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7410 2003-02-08 Paul Brook <paul@nowt.org>
7412 * module.c (mio_symtree_ref): Declare as static.
7413 (mio_expr): Remove dead code.
7414 (read_module): Set the symtree link for fixups.
7415 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7416 (build_round_expr): ... to this.
7417 (g95_conv_intrinsic_aint): New function.
7418 (g95_conv_intrinsic_function): Use it.
7420 2003-02-08 Paul Brook <paul@nowt.org>
7422 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7423 offset after modificaton, not the increment expression.
7424 * dependency.c: Kill excess whitespace.
7426 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
7428 * dependency.h: Remove some function declarations.
7429 * dependency.c (get_no_of_elements): Change this function not to
7431 * other: Add comments for all modified functions.
7433 2003-02-06 Paul Brook <paul@nowt.org>
7435 * g95spec.c (lang_specific_functions): Fix initializer warning.
7436 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7437 for structure type names.
7438 * trans-decl.c (g95_cons_structure_cons): New function.
7439 (g95_get_symbol_decl): Use it.
7440 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7443 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7445 * resolve.c (compare_cases): Add const to casts.
7447 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7449 * g95.h (g95_check_f): Change a1 to f1m.
7450 * intrinsic.c (add_sym_1m, check_specific,
7451 g95_intrinsic_func_interface): Use it.
7453 * module.c (init_pi_tree): Remove useless cast.
7454 (fp2): Fix argument type.
7456 * parse.c (parse_select_block): Add comment.
7458 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
7460 * lang-options.h: Fix warning involving C90 concatenated
7463 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
7464 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7466 * io.c (format_asterisk): Complete initializer to kill warning.
7467 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7468 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7469 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7470 new defines to complete initializers. Kills all warnings.
7472 * Make-lang.in: Comment cleanup.
7474 2003-02-05 Paul Brook <paul@nowt.org>
7476 * array.c (g95_free_constructor): Handle NULL expressions.
7477 * resolve.c (resolve_structure_cons): Ditto.
7478 * decl.c (g95_match_null): New Function.
7479 (variable_decl): Use it.
7480 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7481 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7482 * trans-types.c (g95_set_decl_attributes): Remove empty function.
7484 2003-02-05 Paul Brook <paul@nowt.org>
7486 * trans.h (build1_v): New macro.
7487 (build_v): Remove pointless and incorrect prototype.
7488 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7489 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7491 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
7493 * Make-lang.in (F95_OBJS): Remove one more dead file.
7495 2003-02-01 Paul Brook <paul@nowt.org>
7497 * lang-specs.h: Don't pass -ffixed-form to the linker.
7498 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7500 2003-02-01 Paul Brook <paul@nowt.org>
7502 * Make-lang.in (F95_OBJS): Remove dead files.
7503 * trans-array.c (g95_array_init_size): Do the right thing when
7505 * trans-decl.c (g95_generate_function_code): Initialize deffered
7506 symbol list before translating contained subroutines.
7507 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7508 scalar invariant values here...
7509 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7510 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7512 2003-01-29 Paul Brook <paul@nowt.org>
7514 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7515 (g95_walk_elemental_function_args): Reverse chains before adding.
7516 (g95_reverse_ss): Move about a bit.
7517 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7520 2003-01-28 Paul Brook <paul@nowt.org>
7522 * intrinsic.c (resolve_intrinsic): Use correct union member.
7523 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7525 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7526 use associated variables.
7527 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7528 * trans-expr.c (g95_conv_expr_present): ... to here.
7529 * trans.h: Declare it.
7530 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7532 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7534 * array.c (expand_iterator): Suppress useless assignment.
7535 * decl.c (match_char_spec): Ditto.
7536 * io.c (match_io_iterator): Ditto.
7537 * primary.c (match_real_constant): Ditto.
7538 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7539 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
7540 * matchexp.c (match_add_operand, match_level_5): Likewise.
7541 * module.c (parse_atom, find_enum): Likewise.
7542 * resolve.c: move #include <string.h>
7543 (resolve_select): Fix serious typo.
7545 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
7547 * Make-lang.in: Don't build with broken tree-ssa-pre.
7549 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
7551 * resolve.c (resolve_index): Add a TODO.
7552 * symbol.c: Remove useless "#include <ctype.h>".
7554 2003-01-27 Paul Brook <paul@nowt.org>
7556 * check.c (check_rest): Allow different type kinds as an extension.
7557 * g95.h (g95_resolve_f): Add f1m.
7558 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7559 * intrinsic.h: Chenge prototypes for MIN and MAX.
7560 * iresolve.c (g95_resolve_minmax): New function.
7561 (g95_resolve_min, g95_resolve_max): Use it.
7562 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7564 (g95_conv_intrinsic_present): Fix logic.
7566 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
7568 * g95.h (g95_case): Don't be a tree, be a double linked list.
7569 * match.c (match_case_selector): Remove redundant semantics check.
7570 Clean up a few goto's to make it a tiny little bit faster.
7571 * resolve.c (case_tree): Die.
7572 (compare_cases): Accept and compare unbounded cases too.
7573 (check_case_overlap): Don't build a tree. Instead, merge-sort the
7574 whole list of g95_cases passed from resolve_select.
7575 (sane_logical_select): Die.
7576 (check_case_expr): Return FAILURE if a CASE label is of the wrong
7578 (resolve_select): Fixup case expression for computed GOTOs, put it
7579 in expr, not expr2, for easier handing in the parse tree dumper and
7580 the code generator. Rewrite the rest of the function: Kill
7581 unreachable case labels and unreachable case blocks.
7582 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7583 an EXEC_SELECT, not case2 anymore.
7584 * trans-const.c (g95_conv_constant_to_tree): New function.
7585 (g95_conv_constant): Use it.
7586 * trans-const.h: Declare prototype for the new function.
7587 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7588 g95_trans_character_select): New static functions.
7589 (g95_trans_select): Rewrite.
7591 2003-01-26 Paul Brook <paul@nowt.org>
7593 * intrinsic.c (add_fnctions): Properly add dreal.
7594 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7595 (g95_conv_intrinsic_function): Use it.
7596 * trans-io.c (build_dt): Abort on internal files (unimplemented).
7598 2003-01-26 Paul Brook <paul@nowt.org>
7600 Widespread changes to the handling of symbols in expressions. These
7601 are now linked via g95_symtree nodes.
7602 * parse.c (g95_fixup_sibling symbols): New function.
7603 (parse_contained): Use it.
7604 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
7605 contained procedure that has bee correctly fixed up.
7606 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7608 2003-01-24 Paul Brook <paul@nowt.org>
7610 * trans-array.c (g95_walk_expr): Function result attributes are in
7612 * trans-expr.c (g95_conv_function_call,
7613 g95_trans_arrayfunc_assign): Ditto.
7614 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7616 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
7618 * expr.c (check_restricted): Fix error message.
7619 * symbol.c (free_st_labels): Plug memleak.
7621 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7623 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7624 reduce_binary_aa, reduce_binary, eval_intrinsic,
7625 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7626 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7627 for typesafe intrinsics helper functions.
7628 (g95_intrinsic_sym): Use them.
7629 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7630 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7631 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7632 check_specific, g95_intrinsic_func_interface,
7633 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7635 * trans-decl.c (g95_get_extern_function_decl): Likewise.
7636 * Make-lang.in: Don't disable warnings for strict prototypes
7637 any longer, everything is typesafe now.
7639 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
7641 * bbt.c (duplicate_node): Make static.
7642 * module.c (module_name): Make static.
7643 * scanner.c (include_dirs): Make static.
7645 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7647 Hard coded _gfor_'s should not show up anymore.
7648 * g95.h (PREFIX): New macro.
7649 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7651 (g95_resolve_random_number): Likewise.
7652 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7653 * trans-io.c: Remove 'prefix' macro. Replace all uses with
7654 the new PREFIX macro from g95.h.
7656 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7658 The troubles of forking... Andy implemented this just now too.
7659 Let's stick to that and keep the trees close.
7660 * g95.h (g95_st_label): 'format' member is now a g95_expr.
7661 * io.c: Revert previous changes.
7662 (g95_match_format): Match the format string as a character
7664 * match.h (g95_statement_label): Declare external.
7665 * parse.c: Revert previous changes.
7666 * symbol.c (g95_free_st_label): Free a g95_expr instead
7668 * trans-io.c: Revert previous changes.
7669 (build_dt): Use set_string to set the format string.
7671 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7673 * io.c (format_string): Make non-static.
7674 (g95_match_format): Remember the format string.
7675 (terminate_io): Add I/O termination for empty I/O lists.
7676 * match.h: Declare external format_string.
7677 * parse.c (check_statement_label): Attack the format string
7678 to a format label for FORMAT statements.
7679 * trans-io.c (g95_add_field): Define prefix macro. Replace
7680 all uses of PREFIX define with a use of this macro.
7681 (build_dt): Implement formatted I/O for format labels.
7683 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
7685 * lang-options.h: Kill "-std=F".
7686 * options.c: Remove unimplemented "-std=F". Modify
7688 * misc.c (g95_terminal_width): New function.
7689 * error.c (g95_error_init_1): Use g95_terminal_width.
7690 * g95.h: Add prototype for g95_terminal_width, remove
7693 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
7695 * Make-lang.in: Fix typo.
7697 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7699 * g95.h (struct g95_case): Remove unused cruft, new member
7700 'where' to keep track of the locus of the default case.
7701 * match.c (g95_match_case): Add locus to the current case.
7702 (match_case_selector): Likewise.
7703 * parse.c (parse_select_block): Move semantics check for
7704 multiple DEFAULT cases out of here to...
7705 * resolve.c (check_case_overlap): ...here. Return sooner
7707 (check_case_expr): Take two g95_cases now, use to sure the
7708 expression kinds are the same.
7709 (resolve_select): Cleanup.
7711 2003-01-18 Paul Brook <paul@nowt.org>
7713 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7714 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7716 (g95_get_extern_function_decl): Put decls in the correct context.
7718 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
7720 * trans-io.c: Port changes from Andy to set ERR flag.
7722 2003-01-17 Paul Brook <paul@nowt.org>
7724 * trans-array.c: Add various comments.
7725 (g95_ss_terminator): Declare as const.
7726 (g95_walk_expr): Remove first parameter and update all callers.
7727 (g95_walk_op_expr): Initialize scalar SS properly.
7728 * trans-array.h (g95_walk_expr): Update prototype.
7729 * trans-expr.c: Update for new g95_walk_expr.
7730 * trans-intrinsic.c: Ditto.
7731 * trans-io.c: Ditto.
7732 * trans.h: Various comments for SS chains.
7734 2003-01-17 Paul Brook <paul@nowt.org>
7736 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7738 * intrinsic.c (add_functions): Use them.
7739 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7740 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7742 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7744 Fallout of a small merge conflict:
7745 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7747 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7749 * initrinsic.c: New add_sym_* functions for strong typing.
7750 (add_conv): Make prototype strict.
7751 * dump-parse-tree.c, dependency.c: Include config.h
7752 * resolve.c, trans-io.c: Fix typos.
7754 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7756 * dump-parse-tree.c (g95_show_code_node): Show the
7757 condition for a computed GOTO that was transformed
7758 to a SELECT CASE construct.
7759 * resolve.c (check_case_overlap): Revert previous switch
7760 to treaps, it was too slow and didn't catch all trouble.
7761 (resolve_symbol): Be more flexible about module procedures.
7762 * symbol.c (check_conflict): Point to relevant section in
7763 the standard for dubious conflict. Allow procedure
7764 dummy arguments to be optional again.
7765 * trans-io (add_field): Rename to g95_add_field. Change
7767 * trans-stmt (trans_select): Handle unbounded cases for
7768 integer SELECT CASE constructs. Fix/add more comment.
7770 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
7772 * g95.h: Uses GCC's function attribute macros.
7773 * error.c, module.c, parse.c, g95.h: More function attributes.
7775 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7777 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7778 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7781 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
7783 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7785 * trans.c (g95_trans_code): Use annotate_all_with_file_line
7786 instead of nowdead wrap_all_with_wfl.
7788 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7790 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7791 before generating code, so we can still see it even if the code
7792 generation phase dies.
7794 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7796 * decl.c (build_sym): Split out initialization expression parts...
7797 (add_init_expr_to_sym): ...to here.
7798 (variable_decl): Add the symbol following an attribute list to the
7799 symbol tree before parsing the optional initialization expression
7800 if the symbol is not of a derived type.
7801 * primary.c (g95_match_rvalue): Don't assume a symbol always has
7802 a value if it is a PARAMETER.
7804 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7806 * misc.c: Don't #include <mcheck.h>
7807 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
7808 ever was a glibc bug, then either this was never reported to
7809 glibc people, or it has been fixed for so long that there's
7810 no information you can find about it, anywhere.
7812 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
7815 * module.c (attr_bits, bt_types, array_spec_types):
7816 Switch 'const' and 'static'.
7817 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7819 GNU'ify source code:
7820 * trans-io.c: Numerous fixes, one fixed warning and a few
7821 TODO markers so that we don't forget about them.
7823 2003-01-13 Paul Brook <paul@nowt.org>
7825 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7826 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7828 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7829 * match.c (g95_match_stop): Fix dumb == -> != error.
7831 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7833 * dump-parse-tree.c (show_indent): Add line breaks. This
7834 whole dumping process needs cleanups.
7835 * f95-lang.c (g95_mark_addressable): Fix prototype to match
7836 the langhook. Fix 'return's accordingly.
7837 * g95-support.h: Adjust prototype.
7838 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7839 * lang-options.h: Add '-fsyntax-only'.
7840 * options.c (g95_init_options): Init 'no_backend'.
7841 (g95_parse_arg): Deal with '-fsyntax-only'.
7842 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7845 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7847 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7848 arguments. Also make sure that if a symbol is marked INTRINSIC,
7849 an intrinsic with the symbol's name actually exists.
7850 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7851 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7852 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7854 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
7856 * resolve.c (resolve_contained_functions): Fix condition, don't
7857 throw internal_error if a child namespace has no name. Apparently
7858 this can be the case?
7860 2003-01-11 Paul Brook <paul@nowt.org>
7862 Port changes from Andy's tree:
7863 * g95.h (g95_code): Add stop_code.
7864 * match.c (g95_match_stop): Detter syntax checking.
7865 * resolve.c (resolve_generic_f0): Return match type.
7866 (resolve_generic_f): Remove dead/duplicated code.
7867 (resolve_specific_f): Ditto.
7868 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7869 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7870 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7872 2003-01-11 Paul Brook <paul@nowt.org>
7874 * trans-array.c: Various documentation/comment changes.
7875 * trans-stmt.c: Ditto.
7878 2003-01-10 Paul Brook <paul@nowt.org>
7880 * options.c/h: Add -fdump-parse-tree as alias of -v.
7882 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7884 * dump-parse-tree.c (g95_show_namespace): Fixed another
7885 typo. Sorry, it's Friday...
7887 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7890 * trans-array.c, trans-array.h, trans.c, trans-const.c,
7891 trans-const.h, trans-decl.c, trans-expr.c, trans.h
7892 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7893 trans-types.c: Fix bogus copyright years, add 2003.
7894 * trans-types.h: Give copyright header.
7896 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7898 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7899 * expr.c, options.c, scanner.c: Add some more 'const' markers.
7900 * intrinsic.c: Some constant strings moved to read-only memory.
7901 * io.c (format_asterisk): Move to...
7904 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7906 * dump-parse-tree.c (g95_show_namespace): Dump implicit
7907 types for ranges instead of per-letter. Indent the
7908 'CONTAINS' just like everything else.
7909 * resolve.c (resolve_contained_functions): Clarify comment.
7910 Explain non-obvious conditional expression. Improve
7911 diagnostics if tyoe cannot be resolved.
7912 Port semi-fix from Andy's tree:
7913 (was_declared): Move up before first use.
7914 (generic_sym, specific_sym): New functions. Code moved
7915 out if procedure_kind.
7916 (procedure_kind): Simplify using new functions.
7917 (resolve_generic_f): Make sure the functions we find in
7918 a parent namespace is generic.
7919 (resolve_specific_f): Ditto for specific functions.
7921 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7923 * trans-stmt.c, trans.c: Fix some code style issues. Add
7924 some more comment (but still not enough!).
7926 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
7928 * symbol.c (flavors, procedures, intents, acces_types,
7929 access_types, ifsrc_types): Make const.
7930 * misc.c (g95_string2code): Make 'm' param 'const'.
7931 * module.c (find_enum, write_atom, mio_name): Make
7933 (attr_bits, bt_types, array_spec_types, array_ref_types,
7934 ref_types, expr_types): Make const.
7935 * g95.h: Adjust external decls.
7937 2003-01-09 Paul Brook <paul@nowt.org>
7939 * Testsuite: Add a load of new cases.
7941 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7943 * Make-file.in: Add dependency on back end header files;
7944 a parallel build should work now.
7945 * f95-lang-c (lang_identifier): Remove bogus comment.
7946 (g95_be_parse_file): Fix prototype.
7947 (g95_init): Make static.
7948 (g95_finish): Make static.
7949 * error.c (g95_syntax_error): Kill. Make define in...
7950 * g95.h (g95_syntax_error): Define.
7951 (g95.options): Make 'source' member 'const'.
7952 * interface.c (g95_match_interface): Explain
7953 hard-to-read condition.
7954 (g95_match_end_interface): Ditto.
7955 * trans_const.c (g95_build_string_const): Make 's' parameter
7957 * trans_const.h: Adjust protoype accordingly.
7958 * trans-decl.c: Include tree-dump.h
7959 (g95_generate_function_code): Build fixes for recent changes
7960 in the tree-ssa branch.
7962 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7964 * format.c: Kill, move code from here...
7966 * Make-lang.in: Adjust.
7969 * BUGS: Mention where to submit bugs. Move old content...
7970 * TODO: ...to here. New file.
7972 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
7973 Fix most warnings, and suppress the ones we can't fix for now.
7974 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7975 these warnings just clutter the screen and there's not much
7976 we can do about them for now anyway.
7977 * check.c, iresolve.c: Mark unused function parameters.
7978 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7979 they should be resolved before they get here.
7980 * error.c: Remove unused FILE *status_out.
7981 * f95-lang.c (g95_init): Remove bogus cast.
7982 * Many files: Make things 'const' where required.
7983 * g95.h: Fix prototypes for all modified functions above.
7984 (g95_options): Remove 'object' member.
7986 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
7988 * Make-file.in: Cleanup bogus targets. Add more comment.
7989 * lang-options.h: New option '-w'.
7990 * g95.h: add no_options field to struct g95_options.
7991 * options.c (g95_init_options): Default no_warnings to off.
7992 (g95_parse_arg): Recognise the '-w' switch and its alias,
7994 * error.c (g95_warning, g95_warning_now): Don't emit warning if
7995 no_warning option is set.
7996 * iresolve.c (g95_resolve_shape): Fix warning.
7998 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8000 * primary.c (g95_next_string_char): Rename next_string_char, and
8001 make static. Adjust callers accordingly.
8002 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
8003 callers accordingly.
8004 * g95.h: Split out all g95_match* functions to...
8005 * match.h: ...here. New file.
8006 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
8007 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
8009 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8011 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
8012 g95_merge_new_implicit): New functions.
8013 (g95_match_implicit_none, g95_match_implicit): Move from here...
8014 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
8015 Modify to use the new functions in symbol.c.
8016 * g95.h: Add and move prototypes.
8018 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8020 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
8021 node compare function.
8022 (g95_insert_bbt): Likewise.
8023 (g95_insert_bbt_with_overlap): Likewise.
8024 (g95_delete_bbt): Likewise.
8025 (delete_treap): Likewise. Also fix a potential bug when calling it.
8026 * module.c (compare_pointers): Change proto to compare_fn.
8027 (compare_integers): Likewise.
8028 (compare_true_names): Likewise.
8029 (find_true_name): Adjust call to compare_true_names to match proto.
8030 (require_atom, write_atom, mio_name): Fix 'const' warnings.
8031 (init_pi_tree): Make compare a compare_fn instead of (int *).
8032 * resolve.c (compare_cases): Change proto to compare_fn.
8033 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
8034 it static, and rename to compare_symtree.
8035 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
8037 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
8038 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
8040 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8041 * Make-lang.in: Fix spaces/tabs issues from previous patch.
8042 * patch.options: Blow away Paul's checkin mistake :-)
8043 * io.c (terminate_io): Fix memory leak (Arnaud).
8045 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8047 * Make-lang.in: Teach about building DVI, info manual.
8048 * g95.texi: New file.
8050 2003-01-02 Paul Brook <paul@nowt.org>
8052 * trans-array.c (g95_reverse_ss): Make static and don't use.
8053 (g95_conv_ss_descriptor): Don't use g95_loopinfo
8054 (g95_conv_array_parameters): Modify for pointer assignments.
8055 (g95_walk_subexpr): New function.
8056 (g95_walk_expr*): Use it.
8057 * trans-array.h (g95_reverse_ss): Remove prototype.
8058 * trans-expr.c (g95_trans_pointer_assign): Implement.
8059 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
8060 * trans-intrinsic.c: Sync with scalarizer changes.
8061 * trans-io.c: Ditto.
8063 2002-12-29 Paul Brook <paul@nowt.org>
8065 * trans-array.c: Document calling convention for arrays.
8067 2002-12-19 Paul Brook <paul@nowt.org>
8069 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
8070 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
8071 optional parameters for some intrinsics.
8072 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
8073 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
8074 optional parameters.
8075 * trans.h (g95_se): Add ignore_optional flag.
8077 2002-12-15 Paul Brook <paul@nowt.org>
8079 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
8080 * trans-decl.c (g95_generate_function_code): Use TDI_original.
8082 2002-12-14 Paul Brook <paul@nowt.org>
8084 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8086 2002-12-12 Paul Brook <paul@nowt.org>
8088 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8089 initialize the scalarizer.
8090 (various): Update to new format of g95_expr->value.constructor.
8092 2002-12-08 Paul Brook <paul@nowt.org>
8094 * trans-array.c (g95_put_offset_into_var): New function.
8095 (g95_trans_array_constructor_subarray): New function.
8096 (g95_trans_array_constructor_value): Use it.
8097 (g95_array_cons_size): Don't abort() on array components.
8099 2002-12-08 Paul Brook <paul@nowt.org>
8101 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8102 * support.c: Update #includes.
8103 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8104 * trans-array.c: Update #includes.
8106 * trans-const.c: Ditto.
8107 * trans-io.c: Ditto.
8108 * trans-types.c: Ditto.
8109 (g95_init_types): Set size_type_node.
8110 * trans-decl.c: Update #includes.
8111 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8112 * trans-stmt.c: Update #includes.
8113 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8114 (g95_trans_select): Fix check for unbounded ranges.
8115 * trans-expr.c: Update #includes.
8116 (g95_conv_string_tmp): New function.
8117 (g95_conv_concat_op): Use it.
8118 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8119 * Trans-intrisic.c: Update #includes.
8120 (g95_conv_intrinsic_strcmp): New function.
8121 (g95_conv_intrinsic_adjust): Ditto.
8122 (g95_conv_intrinsic_function: Use them.
8124 2002-11-30 Paul Brook <paul@nowt.org>
8126 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8128 * trans-dec.c (g95_build_function_decl): Handle character return
8130 (g95_get_fake_result_decl): Ditto.
8131 (g95_trans_deferred_vars): Ditto.
8132 * trans-expr.c (g95_conv_function_call): Ditto.
8133 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8134 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8135 (g95_conv_intrinsic_function): Use it.
8136 * trans-types.c (g95_sym_type): Handle functions returning strings.
8137 (g95_return_by_reference): Ditto.
8138 (g95_get_function_type): Ditto.
8140 2002-11-18 Paul Brook <paul@nowt.org>
8142 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8143 requires a temporary.
8144 (g95_trans_select): Handle computed gotos.
8145 * trans-types.c (g95_build_array_type): Warn about non-functional
8146 assumed shape arrays.
8147 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8149 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8150 (g95_conv_intrinsic_int): New function.
8151 (g95_conv_intrinsic_mod): New function.
8152 (g95_conv_intrinsic_ichar): New function.
8153 (g95_conv_intrinsic_function): Use them.
8154 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8156 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8158 * trans-types.c (g95_build_array_type): Assumed
8159 sized arrays can have rank > 1.
8160 * trans.c (g95_trans_code): Remove erroneous
8161 warning about CONTINUE.
8162 * trans-expr.c (g95_conv_variable): Remove
8165 2002-11-15 Paul Brook <paul@nowt.org>
8167 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8169 2002-10-31 Paul Brook <paul@nowt.org>
8171 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8172 * trans-expr.c (g95_conv_component_ref): Handle character string
8174 (g95_conv_string_parameter): Ditto.
8175 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8178 2002-10-10 Paul Brook <paul@nowt.org>
8180 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8181 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8183 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8184 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8185 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8186 * trans-types.c (pvoid_type_node): Declare and initialize.
8187 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8188 (g95_array_allocate): Fix when base==data.
8189 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8190 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8192 2002-10-09 Paul Brook <paul@nowt.org>
8194 * (g95_conv_expr_reference): Handle character strings correctly.
8196 2002-10-07 Paul Brook <paul@nowt.org>
8198 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8200 * trans-array.c (g95_build_array_initializer): Remove.
8201 (g95_conv_array_initializer): New Function.
8202 (g95_trans_auto_arry_allocation): Cleanup.
8203 (g95_trans_init_character_array): Remove.
8204 * g95spec.c: Link in libgforbegin.
8205 * trans.c (g95_generate_code): Rename main function to MAIN__.
8206 (g95_create_var): New function.
8207 (g95_create_var_np): New function.
8208 (g95_evaluate_now): New function.
8209 (g95_start_block): New function.
8210 (g95_finish_block): New function.
8211 (g95_add_expr_to_block): New function.
8212 (g95_add_block_to_block): New function.
8213 * trans-expr.c (g95_conv_componen_ref): New function.
8214 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8215 (F95_OBJS): Add dependency.o.
8216 * f95-lang.c (g95_is_simple_stmt): Remove.
8217 * f95-tree.c (mark_not_simple): New function.
8218 (unshare_all_trees): New function.
8219 (create_tmp_var, create_tmp_alias_var): Remove.
8220 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8221 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8222 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8224 2002-10-01 Paul Brook <paul@nowt.org>
8226 * trans-array.c: Add support for descriptorless arrays.
8227 (g95_conv_array_data): New function.
8228 (g95_conv_array_base): New function.
8229 * trans-array.h: Declare these here.
8230 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8231 initialization and creation here.
8232 (g95_create_module_vars): Instead of here.
8233 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8234 * trans-intrinsic.c: Ditto.
8235 * trans-types.c (g95_is_nodesc_array): New function.
8236 (g95_get_nodesc_array_type): New function.
8237 (g95_sym_type, g95_get_derived_type): Use them.
8238 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8240 2002-09-28 Paul Brook <paul@nowt.org>
8242 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8243 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8246 2002-09-24 Paul Brook <paul@nowt.org>
8248 * f95-lang.c (listify): Remove declaration.
8249 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8251 * f95-tree.c (get_name): New function.
8252 * trans.c (module_namespace): Remove.
8253 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8254 * trans-types.c: Ditto.
8256 2002-09-19 Paul Brook <paul@nowt.org>
8258 * trans-array.c (g95_get_array_cons_size): New Function.
8259 (g95_con_ss_startstride): Handle Array constructors.
8260 (g95_conv_loop_setup): Ditto.
8261 (g95_conv_array_parameter): Ditto.
8262 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8265 2002-09-19 Paul Brook <paul@nowt.org>
8267 * trans.c (g95_simple_fold_tmp): Detect variables inside
8269 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8271 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8273 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8275 2002-09-14 Paul Brook <paul@nowt.org>
8277 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8278 * trans-const.c (g95_conv_string_init): New Function.
8279 * trans-const.h: Declare it.
8280 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8281 variables. Don't bail on intrinsic symbols.
8282 (get_extern_function_decl): Handle specific intrinsic functions.
8283 * trans-types.c (g95_sym_type): Dummy functions don't return
8285 * trans-array.c (g95_build_array_initializer): New Function.
8286 (g95_trans_auto_array_allocation): Build initializer for static decls.
8287 Don't use mpz_addmul, it's GMP4 only.
8289 2002-09-12 Paul Brook <paul@nowt.org>
8291 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8292 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8293 assembler names for module procedures.
8295 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8297 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8300 2002-09-10 Paul Brook <paul@nowt.org>
8302 * trans-array.c: Change format of G95_SS_TEMP strictures.
8303 (g95_check_fncall_dependancy): New function.
8304 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8306 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8308 (g95_build_function_decl): Don't assume result arrays are packed.
8309 (g95_trans-deferred-vars): Handle array result variables.
8310 (g95_generate_fuction_code): Clear saved_function_decls.
8311 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8313 (g95_trans_arrayfunc_assign): New function.
8314 (g95_trans_assignment): Use it.
8315 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8316 (g95_se): Add direct_byref.
8317 * trans-types.c: Use sym->result rather than sym where appropriate.
8318 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8319 Update other functions to use this.
8320 (g95_is_intrinsic_libcall): New function.
8321 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8322 (g95_walk_intrinsic_function): Ditto.
8324 2002-09-08 Paul Brook <paul@nowt.org>
8326 * trans-types.c: Change rank field to dtype field in array descriptor.
8327 * trans-array.c: Implement filling of dtype array descriptor field.
8328 * trans-intrinsic.c: Fix broken LEN intrinsic.
8330 2002-09-07 Paul Brook <paul@nowt.org>
8332 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8333 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8334 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8336 2002-09-06 Paul Brook <paul@nowt.org>
8338 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8339 (gt-f95-trans-types.h): Add dependancy information.
8340 * config-lang.in (gtfiles): Add trans-types.c
8341 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8342 back to top-level code.
8343 * trans-array.c, trans-types.c: Change format of array descriptor.
8344 (g95_conv_descriptor_dimension): New function.
8345 * trans-types.h (g95_conv_descriptor_rank): define.
8346 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8349 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8351 * trans-array.c, trans-types.c: Add rank information to descriptor.
8353 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8355 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8357 2002-09-04 Paul Brook <paul@nowt.org>
8359 * f95-lang.c (g95_create_decls): New function.
8360 (g95_init): Move initialization of external decls to above, and call
8361 from g95_be_parse_file.
8362 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8363 * trans-types.c (g95_init_types): Always name integer and char types.
8364 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8366 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8368 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8370 2002-09-02 Paul Brook <paul@nowt.org>
8372 * g95_generate_code: Clear the attr for __fortran_main.
8373 * trans-types.c (g95_finish_type): New function.
8374 * g95_init_io_state_type: Use g95_finish_type.
8375 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8377 2002-09-01 Paul Brook <paul@nowt.org>
8379 * README.backend: Warn about the dangers of extra config.h files.
8380 Remove obsolete libgfor stuff.
8381 * config-lang.in: Add target-libgfor dependancy.
8382 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8384 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8386 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8389 2002-08-30 Paul Brook <paul@nowt.org>
8391 * trans-intrinsic.c (g95_conv_intrinsic_function,
8392 g95_walk_intrinsic_function): Added ANY and ALL.
8393 (g95_conv_intrinsic_anyall): New function.
8394 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in