1 2005-12-16 Richard Guenther <rguenther@suse.de>
3 * trans-array.c (gfc_conv_descriptor_data_addr): Use
4 build_fold_addr_expr where appropriate.
5 (gfc_trans_allocate_array_storage): Likewise.
6 (gfc_trans_array_constructor_value): Likewise.
7 (gfc_conv_array_data): Likewise.
8 (gfc_conv_expr_descriptor): Likewise.
9 (gfc_conv_array_parameter): Likewise.
10 * trans-expr.c (gfc_conv_variable): Likewise.
11 (gfc_conv_function_val): Likewise.
12 (gfc_conv_function_call): Likewise.
13 (gfc_conv_expr_reference): Likewise.
14 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Likewise.
15 (gfc_conv_intrinsic_fdate): Likewise.
16 (gfc_conv_intrinsic_ttynam): Likewise.
17 (gfc_conv_intrinsic_si_kind): Likewise.
18 (gfc_conv_intrinsic_trim): Likewise.
19 * trans-io.c (set_parameter_ref): Likewise.
20 (gfc_convert_array_to_string): Likewise.
21 (gfc_trans_open): Likewise.
22 (gfc_trans_close): Likewise.
23 (build_filepos): Likewise.
24 (gfc_trans_inquire): Likewise.
25 (nml_get_addr_expr): Likewise.
26 (transfer_namelist_element): Likewise.
28 (gfc_trans_dt_end): Likewise.
29 (transfer_array_component): Likewise.
30 (transfer_expr): Likewise.
31 (transfer_array_desc): Likewise.
32 (gfc_trans_transfer): Likewise.
33 * trans-stmt.c (gfc_trans_allocate): Likewise.
34 (gfc_trans_deallocate): Likewise.
36 2005-12-16 Kazu Hirata <kazu@codesourcery.com>
38 * dependency.c, resolve.c, trans-array.c: Fix comment typos.
39 * gfortran.texi: Fix typos.
41 2005-12-14 Erik Edelmann <eedelman@gcc.gnu.org>
44 * resolve.c (resolve_formal_arglist): Remove code to set
45 the type of a function symbol from it's result symbol.
47 2005-12-13 Richard Guenther <rguenther@suse.de>
49 * trans-expr.c (gfc_conv_substring): Use fold_build2 and
52 2005-12-13 Richard Sandiford <richard@codesourcery.com>
54 * Make-lang.in (fortran/trans-resolve.o): Depend on
56 * gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag.
57 * dependency.h (gfc_get_noncopying_intrinsic_argument): Declare.
58 (gfc_check_fncall_dependency): Change prototype.
59 * dependency.c (gfc_get_noncopying_intrinsic_argument): New function.
60 (gfc_check_argument_var_dependency): New function, split from
61 gfc_check_fncall_dependency.
62 (gfc_check_argument_dependency): New function.
63 (gfc_check_fncall_dependency): Replace the expression parameter with
64 separate symbol and argument list parameters. Generalize the function
65 to handle dependencies for any type of expression, not just variables.
66 Accept a further argument giving the intent of the expression being
67 tested. Ignore intent(in) arguments if that expression is also
69 * resolve.c: Include dependency.h.
70 (find_noncopying_intrinsics): New function.
71 (resolve_function, resolve_call): Call it on success.
72 * trans-array.h (gfc_conv_array_transpose): Declare.
73 (gfc_check_fncall_dependency): Remove prototype.
74 * trans-array.c (gfc_conv_array_transpose): New function.
75 * trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the
76 libcall handling if the expression is to be evaluated inline.
77 Add a case for handling inline transpose()s.
78 * trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new
79 interface provided by gfc_check_fncall_dependency.
81 2005-12-12 Steven G. Kargl <kargls@comcast.net>
84 * match.c (gfc_match_equivalence): Count number of objects.
86 2005-12-11 Aldy Hernandez <aldyh@redhat.com>
88 * lang.opt: Add RejectNegative to ffixed-form and ffree-form.
90 2005-12-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
93 * io.c (resolve_tag): Add correct diagnostic for F2003 feature.
95 2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
98 * io.c (top level): Add convert to io_tag.
99 (resolve_tag): convert is GFC_STD_GNU.
100 (match_open_element): Add convert.
101 (gfc_free_open): Likewise.
102 (gfc_resolve_open): Likewise.
103 (gfc_free_inquire): Likewise.
104 (match_inquire_element): Likewise.
105 * dump-parse-tree.c (gfc_show_code_node): Add
106 convet for open and inquire.
107 gfortran.h: Add convert to gfc_open and gfc_inquire.
108 * trans-io.c (gfc_trans_open): Add convert.
109 (gfc_trans_inquire): Likewise.
110 * ioparm.def: Add convert to open and inquire.
111 * gfortran.texi: Document CONVERT.
113 2005-12-09 Roger Sayle <roger@eyesopen.com>
116 * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
117 integer type when building an inequality.
119 2005-12-09 Richard Guenther <rguenther@suse.de>
121 * f95-lang.c (build_builtin_fntypes): Use correct
122 return types, as indicated by comments.
124 2005-12-08 Erik Edelmann <eedelman@gcc.gnu.org>
127 * check.c (gfc_check_associated): Allow function results
128 as actual arguments to ASSOCIATED. Moved a misplaced
131 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
133 * Make-lang.in (fortran.all.build, fortran.install-normal): Remove.
135 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
137 * Make-lang.in: Remove all dependencies on s-gtype, except for
140 2005-12-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
143 * parse.c (next_free): Use new prototype for gfc_match_st_label.
144 Correctly emit hard error if a label is zero.
145 * match.c (gfc_match_st_label): Never allow zero as a valid
147 (gfc_match, gfc_match_do, gfc_match_goto): Use new prototype for
149 * primary.c (): Use new prototype for gfc_match_st_label.
153 2005-12-02 Richard Guenther <rguenther@suse.de>
155 * trans.h (build1_v): Use build1, not build to build the
158 2005-12-01 Erik Schnetter <schnetter@aei.mpg.de>
160 * decl.c (gfc_match_old_kind_spec): Improve handling of old style
163 2005-12-01 Paul Thomas <pault@gcc.gnu.org>
166 * trans-decl.c (gfc_get_symbol_decl): Move the expression for
167 unit size of automatic character length, dummy pointer array
168 elements down a few lines from the version that fixed PR15809.
170 2005-11-30 Bernhard Fischer <rep.nop@aon.at>
173 * lang.opt: New options -ffree-line-length- and -ffree-line-length-none.
174 * gfortran.h: Add free_line_length and add description of
175 free_line_length and fixed_line_length.
176 * options.c (gfc_init_options, gfc_handle_option): Initialize
177 and set free_line_length and fixed_line_length.
178 * scanner.c (load_line): Set free_line_length to 132 and
179 fixed_line_length to 72 or user requested values.
180 * scanner.c: Typo in comment.
181 * invoke.texi: Document -ffree-line-length- and
182 -ffree-line-length-none
184 2005-11-30 Paul Thomas <pault@gcc.gnu.org>
187 * trans-decl.c (gfc_get_symbol_decl): In the case of automatic
188 character length, dummy pointer arrays, build an expression for
189 unit size of the array elements, to be picked up and used in the
191 * trans-io.c (gfc_trans_transfer): Modify the detection of
192 components of derived type arrays to use the gfc_expr references
193 instead of the array descriptor dtype. This allows the latter
194 to contain expressions.
196 2005-11-30 Erik Edelmann <erik.edelmann@iki.fi>
199 * trans-array.c (gfc_trans_deferred_array): Allow PARM_DECLs past
200 in addition to VAR_DECLs.
202 2005-11-29 Jakub Jelinek <jakub@redhat.com>
204 * io.c (gfc_resolve_open): RESOLVE_TAG access field as well.
206 2005-11-27 Bernhard Fischer <rep.nop@aon.at>
208 * gfortran.h: remove superfluous whitespace and use GNU
209 comment-style for the documentation of backend_decl.
211 2005-11-27 Steven G. Kargl <kargls@comcast.net>
214 * primary.c (match_boz_constant): Implement postfix BOZ constants;
215 (match_string_constant): Peek for b, o, z, and x
217 2005-11-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
220 * iresolve.c (gfc_resolve_dim, gfc_resolve_mod,
221 gfc_resolve_modulo): When arguments have different kinds, fold
222 the lower one to the largest kind.
223 * check.c (gfc_check_a_p): Arguments of different kinds is not
224 a hard error, but an extension.
225 * simplify.c (gfc_simplify_dim, gfc_simplify_mod,
226 gfc_simplify_modulo): When arguments have different kinds, fold
227 the lower one to the largest kind.
229 2005-11-21 Jakub Jelinek <jakub@redhat.com>
233 * Make-lang.in (fortran/trans-io.o): Depend on fortran/ioparm.def.
234 * dump-parse-tree.c (gfc_show_code_node): Dump c->block for
235 EXEC_{READ,WRITE,IOLENGTH} nodes.
236 * io.c (terminate_io, match_io, gfc_match_inquire): Put data
237 transfer commands into EXEC_{READ,WRITE,IOLENGTH}'s code->block.
238 * resolve.c (resolve_blocks): Handle EXEC_{READ,WRITE,IOLENGTH}.
239 * trans-io.c (ioparm_unit, ioparm_err, ioparm_end, ioparm_eor,
240 ioparm_list_format, ioparm_library_return, ioparm_iostat,
241 ioparm_exist, ioparm_opened, ioparm_number, ioparm_named,
242 ioparm_rec, ioparm_nextrec, ioparm_size, ioparm_recl_in,
243 ioparm_recl_out, ioparm_iolength, ioparm_file, ioparm_file_len,
244 ioparm_status, ioparm_status_len, ioparm_access, ioparm_access_len,
245 ioparm_form, ioparm_form_len, ioparm_blank, ioparm_blank_len,
246 ioparm_position, ioparm_position_len, ioparm_action,
247 ioparm_action_len, ioparm_delim, ioparm_delim_len, ioparm_pad,
248 ioparm_pad_len, ioparm_format, ioparm_format_len, ioparm_advance,
249 ioparm_advance_len, ioparm_name, ioparm_name_len,
250 ioparm_internal_unit, ioparm_internal_unit_len,
251 ioparm_internal_unit_desc, ioparm_sequential, ioparm_sequential_len,
252 ioparm_direct, ioparm_direct_len, ioparm_formatted,
253 ioparm_formatted_len, ioparm_unformatted, ioparm_unformatted_len,
254 ioparm_read, ioparm_read_len, ioparm_write, ioparm_write_len,
255 ioparm_readwrite, ioparm_readwrite_len, ioparm_namelist_name,
256 ioparm_namelist_name_len, ioparm_namelist_read_mode, ioparm_iomsg,
257 ioparm_iomsg_len, ioparm_var): Remove.
258 (enum ioparam_type, enum iofield_type, enum iofield,
259 enum iocall): New enums.
260 (gfc_st_parameter_field, gfc_st_parameter): New typedefs.
261 (st_parameter, st_parameter_field, iocall): New variables.
262 (ADD_FIELD, ADD_STRING): Remove.
263 (dt_parm, dt_post_end_block): New variables.
264 (gfc_build_st_parameter): New function.
265 (gfc_build_io_library_fndecls): Use it. Initialize iocall
266 array rather than ioparm_*, add extra first arguments to
268 (set_parameter_const): New function.
269 (set_parameter_value): Add type argument, return a bitmask.
270 Changed to set a field in automatic structure variable rather
271 than set a field in a global _gfortran_ioparm variable.
272 (set_parameter_ref): Likewise. If requested var has different
273 size than what field should point to, call with a temporary and
274 then copy into the user variable. Add postblock argument.
275 (set_string): Remove var_len argument, add type argument, return
276 a bitmask. Changed to set fields in automatic structure variable
277 rather than set a field in a global _gfortran_ioparm variable.
278 (set_internal_unit): Remove iunit, iunit_len, iunit_desc arguments,
279 add var argument. Return a bitmask. Changed to set fields in
280 automatic structure variable rather than set a field in a global
281 _gfortran_ioparm variable.
283 (io_result): Add var argument. Changed to read common.flags field
284 from automatic structure variable and bitwise AND it with 3.
285 (set_error_locus): Add var argument. Changed to set fields in
286 automatic structure variable rather than set a field in a global
287 _gfortran_{filename,line} variables.
288 (gfc_trans_open): Use gfc_start_block rather than gfc_init_block.
289 Create a temporary st_parameter_* structure. Adjust callers of
290 all above mentioned functions. Pass address of the temporary
291 variable as first argument to the generated function call.
292 Use iocall array rather than ioparm_* separate variables.
293 (gfc_trans_close, build_filepos, gfc_trans_inquire): Likewise.
294 (build_dt): Likewise. Change first argument to tree from tree *.
295 Don't dereference code->ext.dt if last_dt == INQUIRE. Emit
296 IOLENGTH argument setup here. Set dt_parm/dt_post_end_block
297 variables and gfc_trans_code the nested data transfer commands
299 (gfc_trans_iolength): Just set last_dt and call build_dt immediately.
300 (transfer_namelist_element): Pass address of dt_parm variable
301 to generated functions. Use iocall array rather than ioparm_*
303 (gfc_trans_backspace, gfc_trans_endfile, gfc_trans_rewind,
304 gfc_trans_flush, gfc_trans_read, gfc_trans_write): Use iocall array
305 rather than ioparm_* separate variables.
306 (gfc_trans_dt_end): Likewise. Pass address of dt_parm variable
307 as first argument to generated function. Adjust io_result caller.
308 Prepend dt_post_end_block before io_result code.
309 (transfer_expr): Use iocall array rather than ioparm_* separate
310 variables. Pass address of dt_parm variables as first argument
311 to generated functions.
312 * ioparm.def: New file.
314 2005-11-21 Paul Thomas <pault@gcc.gnu.org>
317 * resolve.c (resolve_contained_fntype) Error if an internal
318 function is assumed character length.
321 * trans-decl.c (gfc_create_module_variable) Skip ICE in
322 when backend decl has been built and the symbol is marked
323 as being in an equivalence statement.
325 2005-11-20 Toon Moene <toon@moene.indiv.nluug.nl>
327 * invoke.texi: Remove superfluous @item.
329 2005-11-19 Janne Blomqvist <jb@gcc.gnu.org>
332 * trans-io.c (gfc_trans_transfer): Handle arrays of derived type.
334 2005-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
337 * scanner.c (gfc_open_included_file): Add an extra include_cwd
338 argument. Only include files in the current working directory if
340 * gfortran.h: Change prototype for gfc_open_included_file.
341 (load_file): Don't search for include files in the current working
343 * options.c (gfc_post_options): Add the directory of the source file
344 to the list of paths for included files.
345 * module.c (gfc_use_module): Look for module files in the current
348 2005-11-16 Alan Modra <amodra@bigpond.net.au>
351 * trans-types.c (gfc_init_kinds): Use one less for max_exponent
352 of IBM extended double format.
354 2005-11-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
356 * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET,
357 FPUTC, FPUT, AND, XOR and OR intrinsic functions.
358 (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic
360 * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET,
361 GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL,
362 GFC_ISYM_OR, GFC_ISYM_XOR.
363 * iresolve.c (gfc_resolve_and, gfc_resolve_complex,
364 gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget,
365 gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell,
366 gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub,
367 gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub):
369 * check.c (gfc_check_complex, gfc_check_fgetputc_sub,
370 gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput,
371 gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions.
372 * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or,
373 gfc_simplify_xor): New functions.
374 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
375 GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC,
376 GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and
378 * intrinsic.h: Add prototypes for all functions added to iresolve.c,
379 simplify.c and check.c.
381 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
382 Steven G. Kargl <kargls@comcast.net>
385 * resolve.c (resolve_symbol): Disallow automatic arrays in module scope.
387 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
391 * match.c (recursive_stmt_fcn): Add checks that symtree exists
392 for the expression to weed out inline intrinsic functions and
396 * module.c (mio_symtree_ref): Correct the patch of 0923 so that
397 a symbol is not substituted for by a the symbol for the module
398 itself and to prevent the promotion of a formal argument.
400 2005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
403 * primary.c (match_varspec): Check for implicitly typed CHARACTER
404 variables before matching substrings.
406 2005-11-09 Steven G. Kargl <kargls@comcast.net>
408 * trans-intrinsic.c: Typo in comment.
410 2005-11-09 Erik Edelmann <eedelman@gcc.gnu.org>
413 * trans-decl.c(build_function_decl): Don't set
414 DECL_IS_PURE (fndecl) = 1 for return-by-reference
417 2005-11-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
419 * dump-parse-tree.c: Fix comment typo, add a few blank lines.
421 2005-11-07 Steven G. Kargl <kargls@comcast.net>
423 * error.c: Use flag_fatal_error.
424 * invoke.texi: Remove -Werror from list of options.
426 2005-11-06 Paul Thomas <pault@gcc.gnu.org>
429 * resolve.c (resolve_symbol): Exclude case of PRIVATE declared
430 within derived type from error associated with PRIVATE type
431 components within derived type.
435 * gfortran.h: Add prototype for gfc_has_vector_index.
436 * io.c (gfc_resolve_dt): Error if internal unit has a vector index.
437 * expr.c (gfc_has_vector_index): New function to check if any of
438 the array references of an expression have vector inidices.
439 (gfc_check_pointer_assign): Error if internal unit has a vector index.
442 * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
443 and replace by a standard dependent warning/error if overwriting an
444 existing initialization.
445 * decl.c (gfc_data_variable): Remove old error for already initialized
446 variable and the unused error check for common block variables. Add
447 error for hots associated variable and standard dependent error for
448 common block variables, outside of blockdata.
449 * symbol.c (check_conflict): Add constraints for DATA statement.
451 2005-11-06 Janne Blomqvist <jb@gcc.gnu.org>
455 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind
456 argument to transfer_array.
457 (transfer_array_desc): Add kind argument.
459 2005-11-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
461 * intrinsic.c (add_functions): Add ctime and fdate intrinsics.
462 (add_subroutines): Likewise.
463 * intrinsic.h: Prototypes for gfc_check_ctime,
464 gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime,
465 gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub.
466 * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE.
467 * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate,
468 gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions.
469 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
470 gfor_fndecl_fdate and gfor_fndecl_ctime.
471 * check.c (gfc_check_ctime, gfc_check_ctime_sub,
472 gfc_check_fdate_sub): New functions.
473 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
474 gfc_conv_intrinsic_fdate): New functions.
475 (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME
477 * intrinsic.texi: Documentation for the new CTIME and FDATE
479 * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate.
481 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
483 * decl.c, trans-decl.c: Fix comment typos.
484 * gfortran.texi: Fix a typo.
486 2005-11-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
488 * intrinsic.c (add_functions): Add function version of TTYNAM.
489 * intrinsic.h: Add prototypes for gfc_check_ttynam and
491 * gfortran.h: Add case for GFC_ISYM_TTYNAM.
492 * iresolve.c (gfc_resolve_ttynam): New function.
493 * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree
494 for function call to library ttynam.
495 * check.c (gfc_check_ttynam): New function.
496 * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function.
497 (): Call gfc_conv_intrinsic_ttynam.
498 * trans.h: Add prototype for gfor_fndecl_ttynam.
500 2005-11-04 Steven G. Kargl <kargls@comcast.net>
503 * match.c (gfc_match_stopcode): Set stop_code = -1.
505 2005-11-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
508 * lang-specs.h: Pass -lang-fortran to the preprocessor.
510 2005-11-02 Andrew Pinski <pinskia@physics.uc.edu>
513 * trans-array.c (gfc_conv_resolve_dependencies): Use the correct
514 type for the temporary array.
515 * trans-expr.c (gfc_trans_assignment): Pass lss
516 instead of lss_section
517 to gfc_conv_resolve_dependencies to get the
520 2005-11-02 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
522 * decl.c (gfc_match_entry): Function entries don't need an argument
523 list if there's no RESULT clause.
525 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
528 * decl.c (gfc_match_entry): Function entries need an argument list.
530 2005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
533 * trans.c (gfc_generate_code): Move code to create a main
534 program symbol from here ...
535 * parse.c (main_program_symbol): ... to this new
536 function, setting the locus from gfc_current_locus
537 instead of ns->code->loc.
538 (gfc_parse_file): Call main_program_symbol for main programs.
540 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
543 * resolve.c (resolve_symbol): Output symbol names in more error
544 messages, clarify error message.
546 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
548 * dump-parse-tree.c (show_symtree): Revert change unintentionally
549 committed in r106246.
551 2005-11-01 Paul Thomas <pault@gcc.gnu.org>
554 * symbol.c (check_conflict): An object cannot be in a namelist and in
558 * resolve.c (resolve_symbol): Set the error flag to
559 gfc_set_default_type, in the case of an external symbol, so that
560 an error message is emitted if IMPLICIT NONE is set.
563 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
564 * check.c (gfc_check_secnds): New function.
565 * intrinsic.c (add_functions): Add call to secnds.
566 * iresolve.c (gfc_resolve_secnds): New function.
567 * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
568 secnds via case GFC_ISYM_SECNDS.
569 * intrinsic.texi: Add documentation for secnds.
571 2005-10-31 Andreas Schwab <schwab@suse.de>
573 * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define.
574 (GFORTRAN_CROSS_NAME): Remove.
575 (fortran.install-common): Correctly install a cross compiler.
576 (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of
579 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
581 * gfortran.texi: Update contributors.
583 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
586 * trans-decl.c (gfc_finish_var_decl): Add decl to the
587 current function, rather than the parent. Make
588 assertion accept fake result variables.
589 * trans-expr.c (gfc_conv_variable): If the character
590 length of an ENTRY isn't set, get the length from
591 the master function instead.
593 2005-10-30 Thomas Koenig <Thomas.Koenig@online.de>
595 * gfortran.texi: Remove reservations about I/O usability. Document
596 that array intrinsics mostly work.
598 2005-10-30 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
600 * gfortran.texi: Move license stuff to back. Add information
601 on ENUM and ENUMERATOR.
602 * invoke.texi: Document -fshort-enums.
604 2005-10-30 Gaurav Gautam <gauravga@noida.hcltech.com>
605 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
607 * arith.c (gfc_enum_initializer): New function.
608 (gfc_check_integer_range): Made extern.
609 * decl.c (enumerator_history): New typedef.
610 (last_initializer, enum_history, max_enum): New variables.
611 (create_enum_history, gfc_free_enum_history): New functions.
612 (add_init_expr_to_sym): Call create_enum_history if parsing ENUM.
613 (variable_decl): Modified to parse enumerator definition.
614 (match_attr_spec): Add PARAMETER attribute to ENUMERATORs.
615 (gfc_match_data_decl): Issues error, if match_type_spec do not
616 return desired return values.
617 (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New
619 (gfc_match_end): Deal with END ENUM.
620 * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM
622 (symbol_attribute): Bit field for enumerator added.
623 (gfc_options): Add fshort_enums.
624 (gfc_enum_initializer, gfc_check_integer_range): Add prototypes.
625 * options.c: Include target.h
626 (gfc_init_options): Initialize fshort_enums.
627 (gfc_handle_option): Deal with fshort_enums.
628 * parse.c (decode_statement): Match ENUM and ENUMERATOR statement.
629 (gfc_ascii_statement): Deal with the enumerator statements.
630 (parse_enum): New function to parse enum construct.
631 (parse_spec): Added case ST_ENUM.
632 * parse.h (gfc_compile_state): COMP_ENUM added.
633 (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history):
635 * symbol.c (gfc_copy_attr): Copy enumeration attribute.
636 * lang.opt (fshort-enums): Option added.
638 2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
640 * check.c (gfc_check_malloc, gfc_check_free): New functions.
641 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC.
642 * intrinsic.c (add_functions): Add symbols for MALLOC function.
643 (add_subroutines): Add symbol for FREE subroutine.
644 * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free,
645 gfc_resolve_malloc and gfc_resolve_free.
646 * intrinsic.texi: Add doc for FREE and MALLOC intrinsics.
647 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New
649 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for
652 2005-10-30 Steven Bosscher <stevenb@suse.de>
654 * gfortran.texi: Update contributors.
656 2005-10-29 Steven Bosscher <stevenb@suse.de>
658 * interface.c: Fix previous checkin (an incomplete patch
659 was commited for me).
661 2005-10-29 Joseph S. Myers <joseph@codesourcery.com>
663 * intrinsic.texi: Remove empty @cindex line.
665 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
667 * check.c (gfc_check_alarm_sub, gfc_check_signal,
668 gfc_check_signal_sub): New functions.
669 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
670 * intrinsic.c (add_functions): Add signal intrinsic.
671 (add_subroutines): Add signal and alarm intrinsics.
672 * intrinsic.texi: Document the new intrinsics.
673 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
674 gfc_resolve_signal_sub): New functions.
675 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
677 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
678 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
679 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
681 2005-10-28 Steven Bosscher <stevenb@suse.de>
684 * interface.c (gfc_match_end_interface): Fix typo in
685 INTERFACE_USER_OP case.
687 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
690 * resolve.c (resolve_symbol): Remove the use of whynot, so that
691 error messages are not built from pieces.
693 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
696 * decl.c (gfc_match_data_decl): Correct broken bit of code
697 that prevents undefined derived types from being used as
698 components of another derived type.
699 * resolve.c (resolve_symbol): Add backstop error when derived
700 type variables arrive here with a type that has no components.
702 2005-10-25 Jakub Jelinek <jakub@redhat.com>
704 * trans.h (gfc_conv_cray_pointee): Remove.
705 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
706 * trans-array.c (gfc_conv_array_parameter): Likewise.
707 * trans-decl.c (gfc_conv_cray_pointee): Remove.
708 (gfc_finish_cray_pointee): New function.
709 (gfc_finish_var_decl): Use it. Don't return early for Cray
711 (gfc_create_module_variable): Revert 2005-10-24 change.
712 * decl.c (cray_pointer_decl): Update comment.
713 * gfortran.texi: Don't mention Cray pointees aren't visible in the
716 * symbol.c (check_conflict): Add conflict between cray_pointee
717 and in_common resp. in_equivalence.
718 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
720 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
721 (attr_bits): Likewise.
722 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
723 (mio_symbol): For cray_pointee write/read cp_pointer reference.
725 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
728 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
730 (gfc_get_symbol_decl): Use it when a variable, including dummy
731 argument, is assigned a label.
732 (gfc_trans_assign_aux_var): New function. Set initial value of
733 the auxiliary variable explicitly.
734 (gfc_trans_deferred_vars): Use it.
735 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
737 2005-10-24 Asher Langton <langton2@llnl.gov>
741 * check.c (gfc_check_loc): New function.
742 * decl.c (variable_decl): New variables cp_as and sym. Added a
743 check for variables that have already been declared as Cray
744 Pointers, so we can get the necessary attributes without adding
746 (attr_decl1): Added code to catch pointee symbols and "fix"
748 (cray_pointer_decl): New method.
749 (gfc_match_pointer): Added Cray pointer parsing code.
750 (gfc_mod_pointee_as): New method.
751 * expr.c (gfc_check_assign): Added a check to catch vector-type
752 assignments to pointees with an unspecified final dimension.
753 * gfortran.h: (GFC_ISYM_LOC): New.
754 (symbol_attribute): Added cray_pointer and cray_pointee bits.
755 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
756 (gfc_symbol): Added gfc_symbol *cp_pointer.
757 (gfc_option): Added flag_cray_pointer.
758 (gfc_add_cray_pointee): Declare.
759 (gfc_add_cray_pointer ): Declare.
760 (gfc_mod_pointee_as): Declare.
761 * intrinsic.c (add_functions): Add code for loc() intrinsic.
762 * intrinsic.h (gfc_check_loc): Declare.
763 (gfc_resolve_loc): Declare.
764 * iresolve.c (gfc_resolve_loc): New.
765 * lang.opt: Added fcray-pointer flag.
766 * options.c (gfc_init_options): Initialized.
767 gfc_match_option.flag_cray_pointer.
768 (gfc_handle_option): Deal with -fcray-pointer.
769 * parse.c:(resolve_equivalence): Added code prohibiting Cray
770 pointees in equivalence statements.
771 * resolve.c (resolve_array_ref): Added code to prevent bounds
772 checking for Cray Pointee arrays.
773 (resolve_equivalence): Prohibited pointees in equivalence
775 * symbol.c (check_conflict): Added Cray pointer/pointee
777 (gfc_add_cray_pointer): New.
778 (gfc_add_cray_pointee): New.
779 (gfc_copy_attr): New code for Cray pointers and pointees.
780 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
781 prevent space from being allocated for pointees.
782 (gfc_conv_array_parameter): Added code to catch pointees and
783 correctly set their base address.
784 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
785 pointee declarations from making it to the back end.
786 (gfc_create_module_variable): Same.
787 * trans-expr.c (gfc_conv_variable): Added code to detect and
789 (gfc_conv_cray_pointee): New.
790 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
791 (gfc_conv_intrinsic_function): Added entry point for loc
793 * trans.h (gfc_conv_cray_pointee): Declare.
795 * gfortran.texi: Added section on Cray pointers, removed Cray
796 pointers from list of proposed extensions.
797 * intrinsic.texi: Added documentation for loc intrinsic.
798 * invoke.texi: Documented -fcray-pointer flag.
800 2005-10-24 Asher Langton <langton2@llnl.gov>
802 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
803 warnings in the absence of strict standard conformance
804 * symbol.c (gfc_add_save): Same.
806 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
809 * arith.c (gfc_arith_error): Change message to include locus.
810 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
811 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
812 the new gfc_arith_error.
813 (arith_error): Rewrite full error messages instead of building
815 * check.c (must_be): Removed.
816 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
817 kind_check, double_check, logical_array_check, array_check,
818 scalar_check, same_type_check, rank_check, kind_value_check,
819 variable_check, gfc_check_allocated, gfc_check_associated,
820 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
821 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
822 gfc_check_pack, gfc_check_precision, gfc_check_present,
823 gfc_check_spread): Rewrite full error messages instead of
824 building them from pieces.
825 * decl.c (gfc_match_entry): Rewrite full error messages instead
826 of building them from pieces.
827 * parse.c (gfc_state_name): Remove.
828 * parse.h: Remove prototype for gfc_state_name.
830 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
833 * check.c (gfc_check_ichar_iachar): Move the code around so
834 that the check on the length is after check for
837 2005-10-23 Asher Langton <langton2@llnl.gov>
839 * decl.c (match_type_spec): Add a BYTE type as an extension.
841 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
844 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
845 if there is a component ref during an array ref to force
846 use of temporary in assignment.
850 * fortran/iresolve.c (check_charlen_present): New function to
851 add a charlen to the typespec, in the case of constant
853 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
854 (gfc_resolve_spread): Make calls to library functions that
855 handle the case of the spread intrinsic with a scalar source.
857 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
860 * decl.c (variable_decl): Don't assign default initializers to
863 2005-10-21 Jakub Jelinek <jakub@redhat.com>
865 * interface.c (compare_actual_formal): Issue error when attempting
866 to pass an assumed-size array as assumed-shape array argument.
868 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
871 * resolve.c (expr_to_initialize): New function.
872 (resolve_allocate_expr): Take current statement as new
873 argument. Add default initializers to variables of
874 derived types, if they need it.
875 (resolve_code): Provide current statement as argument to
876 resolve_allocate_expr().
878 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
881 * resolve.c (resolve_symbol): Correct error in check for
882 assumed size array with default initializer by testing
883 for arrayspec before dereferencing it.
885 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
888 * gfortran.h: Primitive for gfc_is_formal_arg.
889 * resolve.c(gfc_is_formal_arg): New function to signal across
890 several function calls that formal argument lists are being
892 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
893 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
894 symbol is part of an formal argument declaration.
897 * decl.c (add_init_expr_to_sym): Make a new character
898 length for each variable, when the expression is NULL
902 * match.c (recursive_stmt_fcn): New function that tests if
903 a statement function resurses through itself or other other
905 (gfc_match_st_function): Call recursive_stmt_fcn to check
906 if this is recursive and to raise error if so.
910 * resolve.c (resolve_symbol): Errors for assumed size arrays
911 with default initializer and for external objects with an
915 * decl.c (match_attr_spec): Prevent PUBLIC from being used
918 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
921 * expr.c (check_inquiry): Add "len" to inquiry_function.
923 2005-10-14 Jakub Jelinek <jakub@redhat.com>
925 * primary.c (match_boz_constant): Add missing break after gfc_error.
927 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
930 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
931 declaration for derived types, building if necessary. Return the
932 derived type if the fields have been built by this process. Otherwise,
933 continue as before but using the already obtained backend_decls for the
934 derived type components. Change the gcc_assert to act on the field.
936 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
939 * decl.c (variable_decl): Make a new copy of the character
940 length for each variable, when the expression is not a
943 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
945 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
947 * invoke.texi: Document the new -ffpe-trap option.
948 * lang.opt: Add -ffpe-trap option.
949 * options.c (gfc_init_options): Initialize the FPE option.
950 (gfc_handle_fpe_trap_option): New function to parse the argument
951 of the -ffpe-trap option.
952 (gfc_handle_option): Add case for -ffpe-trap.
953 * trans-decl.c: Declare a tree for the set_fpe library function.
954 (gfc_build_builtin_function_decls): Build this tree.
955 (gfc_generate_function_code): Generate a call to set_fpe at
956 the beginning of the main program.
957 * trans.h: New tree for the set_fpe library function.
959 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
963 * symbol.c (check_conflict): Prevent common variables and
964 function results from having the SAVE attribute,as required
967 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
970 * resolve.c (resolve_symbol): Exclude use and host associated
971 symbols from the test for private objects in a public namelist.
973 2005-10-12 Jakub Jelinek <jakub@redhat.com>
975 * trans-common.c (build_field): Fix comment typo.
976 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
977 variables to a VAR_DECL with the COMPONENT_REF in
978 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
979 * f95-lang.c (gfc_expand_function): Emit debug info for
980 EQUIVALENCEd variables if the equiv union is going to be output.
982 2005-10-11 Steven G. Kargl <kargls@comcast.net>
985 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
988 2005-10-11 Jakub Jelinek <jakub@redhat.com>
990 * f95-lang.c (gfc_init_decl_processing): Initialize
993 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
996 * resolve.c (find_array_spec): Search through the list of
997 components in the symbol of the type instead of the symbol of the
1000 2005-10-05 Richard Guenther <rguenther@suse.de>
1003 * parse.c (gfc_parse_file): Exit early for empty files.
1005 2005-10-03 Steve Ellcey <sje@cup.hp.com>
1007 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
1008 and long double floating point types through to Fortran compiler.
1010 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1013 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
1014 double builtin function.
1015 (gfc_init_builtin_functions): Add mfunc_longdouble,
1016 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
1017 them for round, trunc, cabs, copysign and pow functions.
1018 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
1019 case for kind 10 and 16.
1020 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
1021 exponent10 and exponent16.
1022 (gfc_build_intrinsic_function_decls): Build nodes for int16,
1023 real10, real16, complex10 and complex16 types. Build all possible
1024 combinations for function _gfortran_pow_?n_?n. Build function
1025 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
1026 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
1027 real(10) and real(16).
1028 * trans-intrinsic.c: Add suppport for long double builtin
1029 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
1031 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
1033 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
1034 and real16_decl in library functions.
1035 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
1037 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
1039 (gfc_conv_intrinsic_sign): Likewise.
1040 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
1041 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
1042 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
1043 the case of kinds not available.
1044 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
1045 exponent10 and exponent16.
1047 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
1056 * gfortran.h: Prototype for gfc_add_in_equivalence.
1057 * match.c (gfc_match_equivalence): Make a structure component
1058 an explicit,rather than a syntax, error in an equivalence
1059 group. Call gfc_add_in_equivalence to add the constraints
1060 imposed in check_conflict.
1061 * resolve.c (resolve_symbol): Add constraints: No public
1062 structures with private-type components and no public
1063 procedures with private-type dummy arguments.
1064 (resolve_equivalence_derived): Add constraint that prevents
1065 a structure equivalence member from having a default
1067 (sequence_type): New static function to determine whether an
1068 object is default numeric, default character, non-default
1069 or mixed sequence. Add corresponding enum typespec.
1070 (resolve_equivalence): Add constraints to equivalence groups
1071 or their members: No more than one initialized member and
1072 that different types are not equivalenced for std=f95. All
1073 the simple constraints have been moved to check_conflict.
1074 * symbol.c (check_conflict): Simple equivalence constraints
1075 added, including those removed from resolve_symbol.
1076 (gfc_add_in_equivalence): New function to interface calls
1077 match_equivalence to check_conflict.
1079 2005-09-27 Jakub Jelinek <jakub@redhat.com>
1082 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
1083 If it is true, set TREE_STATIC on the decl.
1084 (create_common): If any symbol in equivalence has SAVE attribute,
1085 pass true as last argument to build_equiv_decl.
1087 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
1089 * trans-io.c (gfc_build_io_library_fndecls): Add entry
1090 iocall_x_array for transfer_array.
1091 (transfer_array_desc): New function.
1092 (gfc_trans_transfer): Add code to call transfer_array_desc.
1094 2005-09-26 Jakub Jelinek <jakub@redhat.com>
1097 * symbol.c (gfc_is_var_automatic): Return true if character length
1098 is non-constant rather than constant.
1099 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
1101 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
1102 to 0 for -fno-automatic.
1104 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
1107 * module.c (mio_component_ref): Return if the symbol is NULL
1108 and wait for another iteration during module reads.
1109 (mio_symtree_ref): Suppress the writing of contained symbols,
1110 when a symbol is available in the main namespace.
1111 (read_module): Restrict scope of special treatment of contained
1112 symbols to variables only and suppress redundant call to
1115 2005-09-22 Steven G. Kargl <kargls@comcast.net>
1118 * interface.c (check_interface1): Fix NULL dereference.
1120 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
1123 * resolve.c (derived_inaccessible): New function.
1124 (resolve_transfer): Use it to check for private
1127 2005-09-22 Steven G. Kargl <kargls@comcast.net>
1130 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
1132 * intrinsic.h: Prototypes for gfc_simplify_realpart and
1133 gfc_resolve_realpart.
1134 * intrinsic.texi: Document intrinsic procedures.
1135 * simplify.c (gfc_simplify_realpart): New function.
1136 * irseolve.c (gfc_resolve_realpart): New function.
1138 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
1141 * trans-stmt.c (gfc_trans_deallocate): Check if the
1142 object to be deallocated is an array by looking at
1143 expr->rank instead of expr->symtree->n.sym->attr.dimension.
1145 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1148 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
1149 (match_io): Fix usage of gfc_find_symbol.
1151 2005-09-20 Jakub Jelinek <jakub@redhat.com>
1154 * primary.c (match_actual_arg): Handle ENTRY the same way
1157 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1159 * Make-lang.in: Make check-fortran alias for check-gfortran.
1161 2005-09-18 Andreas Jaeger <aj@suse.de>
1163 * module.c (read_module): Add missed line from last patch.
1165 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
1168 * resolve.c (resolve_symbol): Don't assign default
1169 initializer to pointers.
1171 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
1174 * module.c (read_module): Give symbols from module procedures
1175 different true_name entries to those from the module proper.
1177 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1180 * arith.c (gfc_arith_error): Add translation support for error
1182 * array.c (gfc_match_array_ref): Likewise.
1183 (gfc_match_array_spec): Likewise.
1184 * check.c (must_be): Add msgid convention to third argument.
1185 (same_type_check): Add translation support for error message.
1186 (rank_check): Likewise.
1187 (kind_value_check): Likewise.
1188 (gfc_check_associated): Correct typo.
1189 (gfc_check_reshape): Add translation support for error message.
1190 (gfc_check_spread): Likewise.
1191 * error.c (error_printf): Add nocmsgid convention to argument.
1192 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
1193 (gfc_error, gfc_error_now): Likewise.
1194 (gfc_status): Add cmsgid convention to argument.
1195 * expr.c (gfc_extract_int): Add translation support for error
1197 (gfc_check_conformance): Add msgid convention to argument.
1198 (gfc_check_pointer_assign): Correct tabbing.
1199 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
1200 * gfortranspec.c: Include intl.h header.
1201 (lang_specific_driver): Add translation support for --version.
1202 * io.c (check_format): Add translation support for error message.
1203 (format_item_1): Likewise.
1204 (data_desc): Likewise.
1205 * matchexp.c: Likewise.
1206 * misc.c (gfc_article): Remove function.
1207 * module.c (bad_module): Use msgid convention. Add translation support
1209 (require_atom): Add translation support for error messages.
1210 * parse.c (gfc_ascii_statement): Likewise.
1211 (gfc_state_name): Likewise.
1212 * primary.c (match_boz_constant): Reorganise error messages for
1214 * resolve.c (resolve_entries): Likewise.
1215 (resolve_operator): Add translation support for error messages.
1216 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
1218 (resolve_symbol): Add translation support for error messages.
1219 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
1220 * trans-const.c (gfc_build_string_const): Use msgid convention.
1222 2005-09-16 Paul Brook <paul@codesourcery.com>
1225 * dependency.c (transform_sections): Divide by correct value.
1228 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
1230 PR fortran/21875 Internal Unit Array I/O, NIST
1231 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
1232 array descriptor to IOPARM structure.
1233 * fortran/trans-io.c (set_internal_unit): New function to generate code
1234 to store the character (array) and the character length for an internal
1236 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
1238 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
1241 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
1242 which uses dim[i].upper for lbound, rather than dim[i].lower.
1244 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
1247 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
1248 of attr.elemental for specific function instead of generic name.
1250 2005-09-13 Richard Sandiford <richard@codesourcery.com>
1253 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
1254 of argse. Remove now-redundant want_pointer assignment.
1255 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
1256 a pointer, keep the original bounds of a full array reference.
1258 2005-09-13 Richard Sandiford <richard@codesourcery.com>
1261 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
1262 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
1263 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
1264 for character-based operations.
1265 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
1266 (gfc_resolve_unpack): Copy the whole typespec from the vector.
1267 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
1268 case, get the string length from the scalarization state.
1270 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1272 * Make-lang.in: Change targets prefixes from f95 to fortran.
1273 * config-lang.in: Change language name to "fortran".
1274 * lang.opt: Change language name to "fortran".
1275 * options.c: Change CL_F95 to CL_Fortran.
1277 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
1279 gfortran.texi: Document IOSTAT= specifier.
1281 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
1283 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
1284 gfc_inquire and gfc_dt.
1285 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
1286 for open, close, file positioning, inquire and namelist.
1287 * io.c (io_tag): Add tag_iomsg.
1288 (resolve_tag): Add standards warning for iomsg.
1289 (match_open_element): Add iomsg.
1290 (gfc_free_open): Add iomsg.
1291 (gfc_resolve_open): Add iomsg.
1292 (gfc_free_close): Add iomsg.
1293 (match_close_element): Add iomsg.
1294 (gfc_resolve_close): Add iomsg.
1295 (gfc_free_filepos): Add iomsg.
1296 (match_file_element): Add iomsg.
1297 (gfc_resolve_filepos): Add iostat and iomsg.
1298 (match-dt_element): Add iomsg.
1299 (gfc_free_dt): Add iomsg.
1300 (gfc_resolve_dt): Add iomsg.
1301 (gfc_free_inquire): Add iomsg.
1302 (match_inquire_element): Add iomsg.
1303 (gfc_resolve_inquire): Add iomsg.
1304 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
1305 (gfc_build_io_library_fndecls): Add iomsg as last field.
1306 (gfc_trans_open): Add iomsg.
1307 (gfc_trans_close): Add iomsg.
1308 (build_fileos): Call set_string for iomsg.
1309 (gfc_trans_inquire): Add iomsg.
1310 (build_dt): Add iomsg.
1312 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1314 * match.h (gfc_match_equiv_variable): Declare.
1316 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1319 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
1320 * dependency.h (gfc_ref_needs_temporary_p): Declare.
1321 * dependency.c (gfc_ref_needs_temporary_p): New function.
1322 (gfc_check_fncall_dependency): Use it instead of inlined check.
1323 By so doing, take advantage of the fact that character substrings
1324 within an array reference also need a temporary.
1325 * trans.h (GFC_SS_VECTOR): Adjust comment.
1326 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
1327 (gfc_set_vector_loop_bounds): New function.
1328 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
1329 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
1330 the vector expression and caching its descriptor for use within
1332 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
1333 (gfc_conv_array_index_offset): Handle scalar, vector and range
1334 dimensions as separate cases of a switch statement. In the vector
1335 case, use the loop variable to calculate a vector index and use the
1336 referenced element as the dimension's index. Perform bounds checking
1337 on this final index.
1338 (gfc_conv_section_upper_bound): Return null for vector indexes.
1339 (gfc_conv_section_startstride): Give vector indexes a start value
1340 of 0 and a stride of 1.
1341 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
1342 (gfc_conv_expr_descriptor): Expand comments. Generalize the
1343 handling of the !want_pointer && !direct_byref case. Use
1344 gfc_ref_needs_temporary_p to decide whether the variable case
1346 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
1347 GFC_SS_VECTOR index.
1348 * trans-expr.c: Include dependency.h.
1349 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
1351 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1354 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
1356 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1357 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1358 (gfc_apply_interface_mapping): Declare.
1359 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
1360 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1361 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
1362 (gfc_trans_allocate_array_storage): Replace loop argument with
1363 separate pre and post blocks.
1364 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1365 Update call to gfc_trans_allocate_array_storage.
1366 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
1367 interface to gfc_trans_allocate_temp_array.
1368 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
1370 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1371 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1372 (gfc_apply_interface_mapping): Make extern.
1373 (gfc_conv_function_call): Build an interface mapping for array
1374 return values too. Call gfc_set_loop_bounds_from_array_spec.
1375 Adjust call to gfc_trans_allocate_temp_array so that code is
1376 added to SE rather than LOOP.
1378 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1381 * trans.h (gfor_fndecl_internal_realloc): Declare.
1382 (gfor_fndecl_internal_realloc64): Declare.
1383 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
1384 (gfor_fndecl_internal_realloc64): New variable.
1385 (gfc_build_builtin_function_decls): Initialize them.
1386 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
1387 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
1388 to say whether the array can grow later. Don't allocate the array
1389 on the stack if so. Don't call malloc for zero-sized arrays.
1390 (gfc_trans_allocate_temp_array): Add a similar argument here.
1391 Pass it along to gfc_trans_allocate_array_storage.
1392 (gfc_get_iteration_count, gfc_grow_array): New functions.
1393 (gfc_iterator_has_dynamic_bounds): New function.
1394 (gfc_get_array_constructor_element_size): New function.
1395 (gfc_get_array_constructor_size): New function.
1396 (gfc_trans_array_ctor_element): Replace pointer argument with
1398 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
1399 argument to say whether the variable-sized part of the constructor
1400 must be allocated using realloc. Grow the array when this
1402 (gfc_trans_array_constructor_value): Likewise.
1403 (gfc_get_array_cons_size): Delete.
1404 (gfc_trans_array_constructor): If the loop bound has not been set,
1405 split the allocation into a static part and a dynamic part. Set
1406 loop->to to the bounds for static part before allocating the
1407 temporary. Adjust call to gfc_trans_array_constructor_value.
1408 (gfc_conv_loop_setup): Allow any constructor to determine the
1409 loop bounds. Check whether the constructor has a dynamic size
1410 and prefer to use something else if so. Expect the loop bound
1411 to be set later. Adjust call to gfc_trans_allocate_temp_array.
1412 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
1414 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1417 * module.c (find_use_name_n): Based on original
1418 find_use_name. Either counts number of use names for a
1419 given real name or returns use name n.
1420 (find_use_name, number_use_names): Interfaces to the
1421 function find_use_name_n.
1422 (read_module): Add the logic and calls to these functions,
1423 so that mutiple reuses of the same real name are loaded.
1425 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1432 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
1433 common.c so that it is accessible to module.c. Add common_head
1434 field to gfc_symbol structure. Add field for the equivalence
1435 name AND new attr field, in_equivalence.
1436 * match.c (gfc_match_common, gfc_match_equivalence): In loops
1437 that flag common block equivalences, emit an error if the
1438 common blocks are different, using sym->common_head as the
1439 common block identifier. Ensure that symbols that are equivalence
1440 associated with a common block are marked as being in_common.
1441 * module.c (write_blank_common): New.
1442 (write_common): Use unmangled common block name.
1443 (load_equiv): New function ported from g95.
1444 (read_module): Call load_equiv.
1445 (write_equiv): New function ported from g95. Correct
1446 string referencing for gfc functions. Give module
1447 equivalences a unique name.
1448 (write_module): Call write_equiv and write_blank_common.
1449 * primary.c (match_variable) Old gfc_match_variable, made
1450 static and third argument provided to indicate if parent
1451 namespace to be visited or not.
1452 (gfc_match_variable) New. Interface to match_variable.
1453 (gfc_match_equiv_variable) New. Interface to match_variable.
1454 * trans-common.c (finish_equivalences): Provide the call
1455 to create_common with a gfc_common_header so that
1456 module equivalences are made external, rather than local.
1457 (find_equivalences): Ensure that all members in common block
1458 equivalences are marked as used. This prevents the subsequent
1459 call to this function from making local unions.
1460 * trans-decl.c (gfc_generate_function_code): Move the call to
1461 gfc_generate_contained_functions to after the call to
1462 gfc_trans_common so the use-associated, contained common
1463 blocks produce the correct references.
1464 (gfc_create_module_variable): Return for equivalenced symbols
1465 with existing backend declaration.
1467 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1470 * match.c (gfc_match_common): Remove unnecessary / wrong special
1471 cases for end-of-statement.
1473 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
1475 * gfortran.texi: Add section about implemented F2003 features.
1477 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1480 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
1481 the GFC_SS_FUNCTION case too.
1482 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
1483 to function pointers as well as function decls.
1484 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
1485 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1486 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
1487 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
1488 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
1489 (gfc_apply_interface_mapping_to_ref)
1490 (gfc_apply_interface_mapping_to_expr)
1491 (gfc_apply_interface_mapping): New functions.
1492 (gfc_conv_function_call): Evaluate the arguments before working
1493 out where the result should go. Make the null pointer case provide
1494 the string length in parmse.string_length. Cope with non-constant
1495 string lengths, using the above functions to evaluate such lengths.
1496 Use a temporary typespec; don't assign to sym->cl->backend_decl.
1497 Don't assign to se->string_length when returning a cached array
1500 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1503 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
1504 after handling scalarized references. Make "indexse" inherit from
1505 "se" when handling AR_ELEMENTs.
1506 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
1507 substring or scalar reference that follows an array section.
1508 * trans-expr.c (gfc_conv_variable): When called from within a
1509 scalarization loop, start out with "ref" pointing to the scalarized
1510 part of the reference. Don't call gfc_advance_se_ss_chain here.
1512 2005-09-07 Richard Sandiford <richard@codesourcery.com>
1515 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
1516 descriptor if the rhs is not a null pointer or variable.
1518 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
1521 * symbol.c(check_conflict): Add conflict for parameter/save,
1523 2005-09-06 Richard Sandiford <richard@codesourcery.com>
1526 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
1527 the source, not the first element of the return value.
1529 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1532 * io.c (match_io): Correctly backup if PRINT followed by
1533 symbol which is not a namelist. Force blank between PRINT
1534 and namelist in free form.
1536 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1539 * gfortran.h (gfc_option_t): Add flag_automatic.
1540 * invoke.texi: Document the -fno-automatic option.
1541 * lang.opt: Add a -fautomatic option.
1542 * options.c (gfc_init_options): Default for -fautomatic is on.
1543 (gfc_handle_option): Add handling of -fautomatic option.
1544 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
1545 needed variables as SAVE.
1547 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
1549 * trans-array.c (gfc_trans_deferred_array): Fix comments.
1551 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
1553 * primary.c (match_charkind_name): Fix typo in comment leading to
1556 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
1559 * symbol.c (find_special): Remove.
1560 (build_sym, add_init_expr, attr_decl1): Remove calls to
1561 find_special in favor of calls to gfc_get_symbol.
1563 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
1566 * gfortran.h (symbol_attribute): Add noreturn to the structure.
1567 (gfc_intrinsic_sym): Add noreturn to the structure.
1568 * intrinsic.c (make_noreturn): New function.
1569 (add_subroutines): Mark subroutines abort and exit as noreturn.
1570 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
1571 isym to the resolved symbol.
1572 * trans-decl.c (gfc_get_extern_function_decl): Set function
1573 as VOLATILE (== noreturn) if the noreturn attribute is set.
1575 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1577 * decl.c: Typo in comment.
1579 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1581 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
1583 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1585 * gfortran.h (gfc_option_t): Remove source field. Add
1587 (gfc_new_file): Remove arguments in prototype.
1588 (gfc_source_file): Make 'const char *'.
1589 * f95-lang.c (gfc_init): Use gfc_source_file instead of
1590 gfc_option.source. Call gfc_new_file without arguments.
1591 * invoke.texi: Document new options '-fd-lines-as-code' and
1592 '-fd-lines-as-comment'.
1593 * lang.opt: Add new options. Alphabetize.
1594 * options.c (gfc_init_options): Initialize gfc_source_file instead
1595 of gfc_option.source. Initialize gfc_option.flag_d_lines.
1596 (form_from_filename): Move here from scanner.c. Make
1597 'filename' argument 'const'.
1598 (gfc_post_options): Set gfc_source_file. Determine source form.
1599 Warn if 'd-lines*' are used in free form.
1600 * scanner.c (gfc_source_file): Constify.
1601 (skip_fixed_comments): Deal with d-lines.
1602 (get_file): Constify argument 'name'.
1603 (load_file): Constify argument 'filename'.
1604 (form_from_filename): Moved to options.c.
1605 (gfc_new_file): Remove arguments. Don't initialize
1606 gfc_source_file, don't determine source form.
1607 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
1608 of gfc_option.source.
1610 2005-08-19 Steven G. Kargl <kargls@comcast.net>
1613 * gfortran.h: Remove PATH_MAX definition.
1614 * module.c (write_module, gfc_dump_module): Use alloca to allocate
1616 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
1618 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
1620 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
1623 2005-08-14 Asher Langton <langton2@llnl.gov>
1625 * parse.c (match): Enclose macro in do...while(0) and braces.
1627 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1630 * gfortran.texi: Document PRINT namelist.
1632 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1635 * io.c (match_io): Add code to implement PRINT namelist.
1637 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
1639 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
1642 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1643 Steven Bosscher <stevenb@suse.de>
1646 * gfortran.h: Add is_main_program member to symbol_attribute.
1647 * trans-decl: Add a gfor_fndecl_set_std tree.
1648 (gfc_build_builtin_function_decls): Create it.
1649 (gfc_generate_function_code): Add this call at the beginning of
1651 * trans.c (gfc_generate_code): Move main_program and attr.
1652 * trans.h: Add declaration for gfor_fndecl_set_std.
1654 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1657 gfortran.h: Declare new function gfc_resolve_dim_arg.
1658 resolve.c: New function gfc_resolve_dim_arg.
1659 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1660 (gfc_resolve_any): Likewise.
1661 (gfc_resolve_count): Likewise.
1662 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1663 gfc_default_integer_kind, convert it to default integer type.
1664 (gfc_resolve_eoshift): Likewise.
1665 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1666 (gfc_resolve_maxval): Likewise.
1667 (gfc_resolve_minloc): Likewise.
1668 (gfc_resolve_minval): Likewise.
1669 (gfc_resolve_product): Likewise.
1670 (gfc_resolve_spread): Likewise.
1671 (gfc_resolve_sum): Likewise.
1673 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1675 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1676 functions for new intrinsics TTYNAM and ISATTY.
1677 * intrinsic.c (add_functions, add_subroutines): Add new
1679 * intrinsic.h: Add prototypes for new check and resolve
1681 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1682 resolve functions for intrinsics TTYNAM and ISATTY.
1683 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1684 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1686 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1688 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1691 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1694 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1695 * gfortran.h: Add enums for FLUSH.
1696 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1697 comment appropriately. (gfc_match_flush): New function.
1698 * match.c (gfc_match_if): Add match for flush.
1699 * match.h: Add prototype.
1700 * parse.c (decode_statement): Add flush to 'f' case.
1701 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1702 * resolve.c (resolve_code): Add flush case.
1703 * st.c (gfc_free_statement): Add flush case.
1704 * trans-io.c: Add prototype for flush.
1705 (gfc_build_io_library_fndecls): Build fndecl for flush.
1706 (gfc_trans_flush): New function.
1707 * trans-stmt.h: Add prototype.
1708 * trans.c (gfc_trans_code): Add case for flush.
1710 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1712 * primary.c (match_hollerith_constant): Fix typo.
1714 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1716 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1717 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1718 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1719 comment/doc typos. Follow spelling conventions.
1721 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1725 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1726 attributes, call gfc_match_array_ref up to twice and don't do any
1727 substring or component processing.
1728 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1729 REF_SUBSTRING or nothing if needed. Check that substrings
1730 don't have zero length.
1732 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1734 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1735 stop_numeric and stop_string as non-returning.
1737 2005-08-04 Paul Brook <paul@codesourcery.com>
1739 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1740 (gfc_conv_expr_lhs): Fix assertion.
1741 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1743 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1746 * expr.c (simplify_parameter_variable): Do not copy the subobject
1747 references if the expression value is a constant.
1749 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1751 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1753 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1754 fix description of ceiling in index.
1756 2005-07-31 Steven Bosscher <stevenb@suse.de>
1758 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1759 malloc functions the 'malloc' attribute. Give runtime_error the
1760 'noreturn' attribute.
1762 2005-07-31 Steven Bosscher <stevenb@suse.de>
1764 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1765 of the assigned goto variable.
1767 2005-07-29 Steven Bosscher <stevenb@suse.de>
1769 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1771 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1773 * fortran/f95-lang.c (language_function): Remove
1774 named_labels, shadowed_labels, returns_value, returns_abnormally,
1775 warn_about_return_type, and extern_inline fields.
1776 (named_labels): Remove variable.
1777 (gfc_init_decl_processing): Remove setting of named_labels.
1779 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1782 * resolve.c (resolve_operator): Improve diagnostic for comparison
1783 of logicals with invalid operator.
1785 2005-07-25 Jakub Jelinek <jakub@redhat.com>
1788 * data.c (gfc_assign_data_value_range): Call
1789 create_character_initializer if last_ts is a character type.
1791 2005-07-22 Manfred Hollstein <mh@suse.com>
1793 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1794 * matchexp.c (gfc_match_expr): Likewise.
1796 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1798 Make CONSTRUCTOR use VEC to store initializers.
1799 * trans-array.c (gfc_build_null_descriptor,
1800 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1801 Update to cope with VEC in CONSTRUCTOR_ELTS.
1802 * trans-common.c (create_common): Likewise.
1803 * trans-expr.c (gfc_conv_structure): Likewise.
1804 * trans-stmt.c (gfc_trans_character_select): Use
1805 build_constructor_from_list instead of build_constructor.
1807 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
1810 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1811 is matched against interfaces in parent namespaces. If there
1812 the symtree is set to point to the interface.
1814 2005-07-16 David Edelsohn <edelsohn@gnu.org>
1817 * decl.c (do_parm): Adjust character initializer to character length
1818 of symbol before assigning.
1820 2005-07-14 Steve Ellcey <sje@cup.hp.com>
1822 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1824 2005-07-14 Jakub Jelinek <jakub@redhat.com>
1826 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1827 (gfc_error_buf): Add allocated and index fields. Change message
1828 field from array to a pointer.
1829 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1830 (cur_error_buffer): New variable.
1831 (error_char): Use cur_error_buffer->{message,index} instead of
1832 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1834 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1835 cur_error_buffer and its index rather than {warning,error}_ptr
1836 and use_warning_buffer.
1837 (gfc_warning_check, gfc_error_check): Don't print anything if
1839 (gfc_push_error): Allocate saved message with xstrdup.
1840 (gfc_pop_error): Free saved message with gfc_free.
1841 (gfc_free_error): New function.
1842 * primary.c (match_complex_constant): Call gfc_free_error if
1843 gfc_pop_error will not be called.
1844 * match.c (gfc_match_st_function): Likewise.
1847 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1848 file. Fix file left but not entered warning.
1850 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1851 Steven G. Kargl <kargls@comcast.net>
1853 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1854 for the array and attach to namespace list for automatic deallocation.
1856 2005-07-13 Andreas Schwab <schwab@suse.de>
1858 * Make-lang.in (fortran/dependency.o): Depend on
1859 $(GFORTRAN_TRANS_DEPS).
1861 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1863 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1865 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1866 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1867 Don't clear maskindexes here.
1869 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
1871 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1874 2005-07-08 Jakub Jelinek <jakub@redhat.com>
1876 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1879 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1881 * scanner.c (load_line): Add pbuflen argument, don't make
1882 buflen static. If maxlen == 0 or preprocessor_flag,
1883 don't truncate at buflen, but at maxlen. In xrealloc add
1884 1 byte at the end for the terminating '\0'. Don't fill
1885 with spaces up to buflen, but gfc_option.fixed_line_length.
1886 (load_file): Adjust load_line caller. Add line_len variable.
1888 * scanner.c (preprocessor_line): Only set current_file->line when errors
1889 have not been encountered. Warn and don't crash if a file leave
1890 preprocessor line has no corresponding entering line. Formatting.
1892 2005-07-07 Steven Bosscher <stevenb@suse.de>
1894 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1895 for the hollerith length. Fix indentation.
1897 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1902 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1903 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1905 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1906 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1907 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1909 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1910 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1911 (gfc_check_assign): Enable conversion from Hollerith to other.
1912 * gfortran.h (bt): Add BT_HOLLERITH.
1913 (gfc_expr): Add from_H flag.
1914 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1915 (add_conversions): Add conversions from Hollerith constant to other.
1916 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1917 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1918 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1919 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1920 * primary.c (match_hollerith_constant): New function.
1921 (gfc_match_literal_constant): Add match Hollerith before Integer.
1922 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1924 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1925 convert Hollerith constant to tree.
1926 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1927 length to set string expr.
1928 (set_string): Deal with array assigned Hollerith constant and character
1930 * gfortran.texi: Document Hollerith constants as extention support.
1932 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1935 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1937 2005-07-07 Jakub Jelinek <jakub@redhat.com>
1939 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1942 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
1944 * gfortran.texi, intrinsic.texi: Fix typos.
1945 * symbol.c: Fix a comment typo.
1947 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1949 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1950 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1951 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1952 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1955 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1958 * io.c (match_dt_element): Do not allow END tag in PRINT or
1961 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1963 * lang.opt: Remove "." from end of help texts.
1965 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1967 * gfortran.texi: Fix typos and grammar.
1968 * invoke.texi: Fix typos and grammar.
1969 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1970 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1973 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1975 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1976 type than boolean_type_node.
1978 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1980 * all files: Update FSF address in copyright headers.
1982 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1985 * gfortran.h: Add symbols for new intrinsic functions.
1986 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1987 * intrinsic.h: Add prototypes for the new functions.
1988 * iresolve.c (gfc_resolve_acosh): New function.
1989 (gfc_resolve_asinh): New function.
1990 (gfc_resolve_atanh): New function.
1991 * mathbuiltins.def: Add defines.
1992 * simplify.c (gfc_simplify_acosh): New function.
1993 (gfc_simplify_asinh): New function.
1994 (gfc_simplify_atanh): New function.
1996 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1998 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
2000 2005-06-22 Paul Brook <paul@codesourcery.com>
2003 * symbol.c (gfc_is_var_automatic): New function.
2004 (save_symbol): Use it.
2006 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2007 Paul Thomas <pault@gcc.gnu.org>
2011 * module.c (mio_namelist): New function. Correct to set
2012 namelist_tail and to give error on renaming namelist by use
2014 (mio_symbol): Call mio_namelist.
2016 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2018 * gfortran.h: Add flag_backslash compile-time option.
2019 * lang.opt: Add support for -fbackslash option.
2020 * options.c: Likewise.
2021 * primary.c: Implement behavior for -fno-backslash.
2022 * invoke.texi: Add doc for -fbackslash option.
2023 * gfortran.texi: Remove mention of -fno-backslash as a
2026 2005-06-20 Steven G. Kargl <kargls@comcast.net>
2030 * match.c (gfc_match_label): Detect duplicate labels.
2033 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
2035 * intrinsic.c (check_intrinsic_standard): Fix spelling error
2036 in a warning message.
2038 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
2039 Steven G. Kargl <kargls@comast.net>
2042 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
2043 for an array; check that sym->as is NULL.
2046 2005-06-18 Steven G. Kargl <kargls@comcast.net>
2048 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
2049 functions whose simplification routine return FAILURE.
2051 2005-06-13 Geoffrey Keating <geoffk@apple.com>
2053 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
2054 (rule for installing f95.1 manpage): Does depend on installdirs.
2056 2005-06-13 Jakub Jelinek <jakub@redhat.com>
2059 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
2060 in the innermost loop.
2062 * trans-expr.c (gfc_conv_function_call): Return int instead of
2063 void. Use a local variable for has_alternate_specifier and
2064 return it. Avoid modification of function type's return value
2065 in place, since it may be shared.
2066 * trans.h (has_alternate_specifier): Remove.
2067 (gfc_conv_function_call): Change return type.
2068 * trans-stmt.c (has_alternate_specifier): Remove.
2069 (gfc_trans_call): Add a local has_alternate_specifier variable,
2070 set it from gfc_conv_function_call return value.
2072 2005-06-12 Richard Henderson <rth@redhat.com>
2074 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
2075 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
2076 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
2077 (gfc_trans_allocate_array_storage): Use them.
2078 (gfc_array_allocate, gfc_array_deallocate): Likewise.
2079 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
2080 (gfc_trans_deferred_array): Likewise.
2081 * trans-expr.c (gfc_conv_function_call): Likewise.
2082 (gfc_trans_subcomponent_assign): Likewise.
2083 (gfc_trans_pointer_assignment): Likewise.
2084 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
2085 * trans-types.c (gfc_array_descriptor_base): New.
2086 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
2087 (gfc_get_array_descriptor_base): Break out from ...
2088 (gfc_get_array_type_bounds): ... here. Create type variants.
2089 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
2090 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
2092 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2094 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
2095 calling conventions. Look at sym instead of sym->result.
2096 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
2097 Remove condition which is always false with workaround removed.
2098 (gfc_return_by_reference): Always look at sym, never at sym->result.
2100 2005-06-11 Steven G. Kargl <kargls@comcast.net>
2104 * trans-array.c (gfc_array_deallocate): pstat is new argument
2105 (gfc_array_allocate): update gfc_array_deallocate() call.
2106 (gfc_trans_deferred_array): ditto.
2107 * trans-array.h: update gfc_array_deallocate() prototype.
2108 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
2109 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
2111 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
2113 * intrinsic.texi: Add documentation for dcmplx, digits,
2114 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
2116 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2119 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
2120 Generate correct exit condition in case of negative steps in
2123 * invoke.texi: Fix description of flags required for compatibility
2126 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2127 Erik Schnetter <schnetter@aei.mpg.de>
2130 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
2131 remove FIXME comment.
2133 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2135 * match.c (match_forall_iterator): Don't immediately give error if '='
2136 is not followed by an expression.
2138 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2139 Erik Edelmann <erik.edelmann@iki.fi>
2141 * array.c (gfc_match_array_constructor): Disallow empty array
2144 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
2146 * fortran/intrinsic.texi: Add documentation for
2147 command_argument_count, conjg, dconjg, count,
2148 cpu_time, cshift, date_and_time, dble, dfloat.
2150 2005-06-01 Roger Sayle <roger@eyesopen.com>
2152 * intrinsic.c (add_conv): No longer take a "simplify" argument as
2153 its always gfc_convert_constant, instead take a "standard" argument.
2154 (add_conversions): Change all existing calls of add_conv to pass
2155 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
2156 extensions support integer-logical and logical-integer conversions.
2157 (gfc_convert_type_warn): Warn about use the use of these conversions
2158 as a extension when appropriate, i.e. with -pedantic.
2159 * simplify.c (gfc_convert_constant): Add support for integer to
2160 logical and logical to integer conversions, using gfc_int2log and
2162 * arith.c (gfc_log2int, gfc_int2log): New functions.
2163 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
2164 * gfortran.texi: Document this new GNU extension.
2166 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
2168 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
2169 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
2170 Correct comments and replace convert of integer_one_node with
2173 2005-06-01 Jakub Jelinek <jakub@redhat.com>
2176 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
2177 to avoid giving error multiple times.
2178 (resolve_entries): Don't error about BT_UNKNOWN here.
2179 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
2180 (resolve_fntype): New function.
2181 (gfc_resolve): Call resolve_fntype.
2183 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
2186 * fortran/io.c (resolve_tag): Fix error message.
2188 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2190 * fortran/trans-decl.c: Don't include errors.h.
2191 * fortran/Make-lang.in: Updates dependencies.
2193 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
2198 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
2199 string length from the expression typespec character length value
2200 and set temp_ss->stringlength and backend_decl. Obtain the
2201 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
2202 Dereference the expression to obtain the character.
2203 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
2204 dereference of scalar character pointer structure components.
2205 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
2206 string length for the structure component from the component
2209 2005-05-30 Roger Sayle <roger@eyesopen.com>
2211 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
2212 * options.c (gfc_init_options): By default, allow legacy extensions
2213 but warn about them.
2214 (gfc_post_options): Make -pedantic warn about legacy extensions
2215 even with -std=legacy.
2216 (gfc_handle_option): Make -std=gnu follow the default behaviour
2217 of warning about legacy extensions, but allowing them. Make the
2218 new -std=legacy accept everything and warn about nothing.
2219 * lang.opt (std=legacy): New F95 command line option.
2220 * invoke.texi: Document both -std=f2003 and -std=legacy.
2221 * gfortran.texi: Explain the two types of extensions and document
2222 how they are affected by the various -std= command line options.
2224 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
2226 * trans-expr.c: Remove trailing ^M.
2228 * trans-expr.c: Fix comment typos.
2230 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
2238 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
2239 length to temp_ss for character pointer array assignments.
2240 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
2241 dereferencing of characters and character pointers.
2242 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
2243 length as return argument for various kinds of handling of return.
2244 Return a char[]* temporary for character pointer functions and
2245 dereference the temporary upon return.
2247 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
2248 Steven G. Kargl <kargls@comcast.net>
2251 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
2253 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2256 * io.c (format_item_1): Add check and extension warning for
2259 2005-05-28 Steven G. Kargl <kargls@comcast.net>
2261 * arith.c (gfc_arith_init_1): Fix off by one problem;
2262 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
2264 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
2265 Steven G. Kargl <kargls@comcast.net>
2267 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
2270 2005-05-27 Steven G. Kargl <kargls@comcast.net>
2272 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
2273 like types in comparsion.
2275 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
2277 * data.c, parse.c, trans-array.c, trans-decl.c,
2278 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2279 trans.h: Fix comment typos. Follow spelling conventions.
2281 2005-05-22 Roger Sayle <roger@eyesopen.com>
2283 * gfortran.texi: Document some more GNU extensions.
2285 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2287 * error.c (gfc_warning): Fix typo in comment.
2289 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
2292 * fortran/iresolve.c (gfc_resolve_reshape): Add
2293 gfc_type_letter (BT_COMPLEX) for complex to
2294 to resolved function name.
2296 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
2298 * array.c (gfc_match_array_constructor): Support [ ... ]
2299 style array constructors.
2301 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2303 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
2304 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
2305 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
2306 to correct enum type.
2307 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
2308 function. Add default case to switch, deal with FIX_TRUNC_EXPR
2309 instead of FIX_FLOOR_EXPR.
2311 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
2314 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
2315 build character length.
2317 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
2319 * trans-types.c (gfc_array_range_type): New variable.
2320 (gfc_init_types): Initialize gfc_array_range_type.
2321 (gfc_get_array_type_bounds): Use gfc_array_range_type.
2323 2005-05-17 Jakub Jelinek <jakub@redhat.com>
2326 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
2327 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
2328 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
2330 (generate_loop_for_rhs_to_temp): Likewise.
2331 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
2332 It non-NULL, add it to body.
2333 (allocate_temp_for_forall_nest_1): New function, split from
2334 allocate_temp_for_forall_nest.
2335 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
2336 propagate it down to compute_overall_iter_number. Use
2337 allocate_temp_for_forall_nest_1.
2338 (gfc_trans_assign_need_temp): Remove COUNT2. Call
2339 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
2340 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
2341 and generate_loop_for_temp_to_lhs.
2342 (gfc_trans_pointer_assign_need_temp): Adjust calls to
2343 allocate_temp_for_forall_nest.
2344 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
2345 stmtblock_t. Call compute_overall_iter_number just once, then
2346 allocate_temp_for_forall_nest_1 twice with the same size.
2347 Initialize mask indexes if nested_forall_info != NULL.
2348 (gfc_trans_where_2): Initialize mask indexes before calling
2349 gfc_trans_nested_forall_loop.
2351 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
2352 Jerry DeLisle <jvdelisle@verizon.net>
2355 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
2356 resolve ICE on assign of format label.
2357 * trans-io.c (set_string): add fold-convert to properly
2358 handle assigned format label in write.
2360 2005-05-13 Paul Brook <paul@codesourcery.com>
2362 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
2364 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2366 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
2368 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2371 * io.c (check_format): Look for literal characters inside
2374 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2376 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
2377 attribute from result symbol to function symbol.
2378 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
2379 instead of sym->result->attr.dimension.
2381 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2384 * gfortran.h (gfc_option): Add flag_f2c.
2385 * invoke.texi: Document '-ff2c' command line option. Adapt
2386 documentation for '-fno-second-underscore' and '-fno-underscoring'.
2387 * lang.opt (ff2c): New entry.
2388 * options.c (gfc-init_options): Set default calling convention
2389 to -fno-f2c. Mark -fsecond-underscore unset.
2390 (gfc_post_options): Set -fsecond-underscore if not explicitly set
2392 (handle_options): Set gfc_option.flag_f2c according to requested
2394 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
2395 intrinsics where necessary.
2396 (gfc_trans_deferred_vars): Change todo error to assertion.
2397 * trans-expr.c (gfc_conv_variable): Dereference access
2398 to hidden result argument.
2399 (gfc_conv_function_call): Add hidden result argument to argument
2400 list if f2c calling conventions requested. Slightly restructure
2401 tests. Convert result of default REAL function to requested type
2402 if f2c calling conventions are used. Dereference COMPLEX result
2404 * trans-types.c (gfc_sym_type): Return double for default REAL
2405 function if f2c cc are used.
2406 (gfc_return_by_reference): Slightly restructure logic. Return
2407 COMPLEX by reference depending on calling conventions.
2408 (gfc_get_function_type): Correctly make hidden result argument a
2409 pass-by-reference argument for COMPLEX. Remove old code which does
2410 this for derived types.
2412 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2414 * match.c (gfc_match_return): Only require space after keyword when
2415 it is obligatory. Only give stdwarn to after matching is successful.
2416 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
2418 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2420 * intrinsic.texi: Fix typos.
2422 2005-05-07 Steven G. Kargl <kargls@comcast.net>
2424 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
2425 description to include information about scalar arguments.
2427 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2429 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
2430 match.h, trans-array.h: Update copyright.
2432 2005-04-29 Tom Tromey <tromey@redhat.com>
2434 * f95-lang.c (poplevel): Updated for change to build_block.
2436 2005-04-29 Jakub Jelinek <jakub@redhat.com>
2440 * trans-expr.c (gfc_conv_variable): Handle return values in functions
2441 with alternate entry points.
2442 * resolve.c (resolve_entries): Remove unnecessary string termination
2443 after snprintf. Set result of entry master.
2444 If all entries have the same type, set entry master's type
2445 to that common type, otherwise set mixed_entry_master attribute.
2446 * trans-types.c (gfc_get_mixed_entry_union): New function.
2447 (gfc_get_function_type): Use it for mixed_entry_master functions.
2448 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
2449 * decl.c (gfc_match_entry): Set entry->result properly for
2451 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
2453 (build_entry_thunks): Handle return values in entry thunks.
2454 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
2455 shared between multiple contexts.
2456 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
2457 current_function_decl instead of sym->backend_decl. Skip over
2458 entry master's entry id argument. For mixed_entry_master entries or
2459 their results, return a COMPONENT_REF of the fake result.
2460 (gfc_trans_deferred_vars): Don't warn about missing return value if
2461 at least one entry point uses RESULT.
2462 (gfc_generate_function_code): For entry master returning
2463 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
2464 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
2465 values optional just because they are in entry master.
2467 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2469 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
2470 Tobias forgot this in previous commit.
2472 2005-04-29 Paul Brook <paul@codesourcery.com>
2474 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
2477 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2479 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
2480 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
2481 IMPLICIT NONE, set seen_implicit_none.
2482 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
2484 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2486 * gfortran.h (gfc_gsymbol): Make name a const char *.
2487 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
2490 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2493 * resolve.c (resolve_actual_arglist): Issue an error if a statement
2494 functions is used as actual argument.
2496 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2499 * interface.c (compare_parameter): Ignore type for EXPR_NULL
2500 only if type is BT_UNKNOWN.
2502 2005-04-25 Paul Brook <paul@codesourcery.com>
2503 Steven G. Kargl <kargls@comcast.net>
2506 * check.c (gfc_check_ichar_iachar): New function.
2507 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
2508 * intrinsic.c (add_functions): Use it.
2509 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
2510 character expression lengths.
2512 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2515 * trans-common.c (translate_common): Cast offset and
2516 common_segment->offset to type int for warning message.
2518 2005-04-23 DJ Delorie <dj@redhat.com>
2520 * trans-decl.c: Adjust warning() callers.
2522 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2524 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
2525 intermediate representation. Fix typo in comment.
2527 2005-04-21 Steven G. Kargl <kargls@comcast.net>
2529 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
2530 simplify logic; Add a gcc_assert.
2532 2005-04-19 Steven G. Kargl <kargls@comcast.net>
2534 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
2536 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
2537 Steven G. Kargl <kargls@comcast.net>
2539 * invoke.texi: Update -Waliasing description
2541 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2544 * resolve.c (resolve_variable): If e->symtree is not set, this
2545 ought to be a FAILURE, and not a segfault.
2547 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
2554 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
2555 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
2556 declarations of old namelist functions.
2557 (build_dt): Simplified call to transfer_namelist_element.
2558 (nml_get_addr_expr): Generates address expression for start of
2559 object data. New function.
2560 (nml_full_name): Qualified name for derived type components. New
2562 (transfer_namelist_element): Modified for calls to new functions
2563 and improved derived type handling.
2565 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
2567 * scanner.c (gfc_next_char_literal): Reset truncation flag
2568 for lines ending in a comment for both fixed and free form.
2569 (load_line): Do not set truncated flag if only truncating
2572 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
2575 * gfortran.h (gfc_linebuf): Add truncated field.
2576 * parse.c (next_statement): Handle warning for truncated
2578 * scanner.c (load_line): Return if line was truncated.
2579 No longer warn for truncated lines. Remove unused parameters.
2580 (load_file): Store load_line return value to linebuf.
2581 (gfc_error_recovery): Do not advance line at the end.
2583 2005-04-14 Steven G. Kargl <kargls@comcast.net>
2585 * gfortran.h (gfc_real_info): Add subnormal struct member.
2586 * arith.c (gfc_arith_init_1): Set it.
2587 (gfc_check_real_range): Use it.
2588 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
2590 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
2592 * simplify.c: Fix a comment typo.
2594 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2596 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2598 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2600 * simplify.c (gfc_simplify_nearest): Overhaul.
2602 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
2604 * interface.c: Fix a comment typo.
2606 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2608 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
2611 2005-04-09 Steven G. Kargl <kargls@comcast.net>
2613 * simplify.c (gfc_simplify_anint): Use mpfr_round()
2614 (gfc_simplify_dnint): ditto.
2615 (gfc_simplify_nint): ditto.
2617 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
2620 * io.c (check_format): Allow an optional comma
2621 between descriptors.
2623 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2625 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
2626 comment according to GNU coding style.
2627 (gfc_match_if): Remove gfc_ prefix in call to
2628 match_arithmetic_if.
2630 2005-04-08 Diego Novillo <dnovillo@redhat.com>
2632 * match.c (gfc_match_arithmetic_if): Declare static.
2634 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2637 * match.c (gfc_match_arithmetic_if): New function to match an
2638 arithmetic IF statement.
2639 (gfc_match_if): Use gfc_match_arithmetic_if to match an
2640 arithmetic IF statement embedded in a simple IF statement.
2642 2005-04-07 Steven G. Kargl <kargls@comcast.net>
2644 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
2646 2005-04-06 Steven G. Kargl <kargls@comcast.net>
2648 * invoke.texi: Remove documentation of -std=f90
2650 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2652 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2653 non-pointer assignment.
2655 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2660 * array.c (resolve_character_array_constructor): New function. Set
2661 constant character array's character length.
2662 (gfc_resolve_array_constructor): Use it.
2663 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2665 (gfc_set_constant_character_len): New function. Set constant character
2666 expression according the given length.
2667 * match.h (gfc_set_constant_character_len): Add prototype.
2669 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2671 * intrinsic.texi: BES?? functions are not in the f95 standard.
2673 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2675 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2677 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2679 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2680 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2682 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2684 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2686 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2688 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2689 trans.h: Fix comment typos.
2691 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2693 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2694 flag_default_integer, flag_default_real
2695 * invoke.texi: Update documentation
2696 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2697 fdefault-integer-8, and fdefault-real-8 definitions.
2698 * options.c (gfc_init_options): Set option defaults
2699 (gfc_handle_option): Handle command line options.
2700 * trans-types.c (gfc_init_kinds): Use options.
2702 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2704 * f95-lang.c (builtin_function): Process the attrs parameter
2705 and apply the "const" attribute to the builtin if found.
2707 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2709 * intrinsic.texi: Document AIMAG, AINT, ALL
2711 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2713 * arith.c (check_result): Fix illogical logic.
2715 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2717 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2718 contain no equivalence objects.
2719 (add_equivalences): New argument saw_equiv.
2720 (trans_common): New local variable saw_equiv.
2721 (finish_equivalences): Add a local variable dummy, Always pass true
2722 for the 3rd parameter to create_common.
2724 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2726 * intrinsic.texi: Fix "make dvi"
2728 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2730 * intrinsic.texi: New file.
2731 * gfortran.texi: Include it; white space change; fix typo.
2733 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2735 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2737 2005-03-23 Steven Bosscher <stevenb@suse.de>
2739 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2740 * trans-array.c (gfc_trans_allocate_array_storage,
2741 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2742 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2743 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2744 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2745 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2746 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2747 gfc_conv_expr_descriptor): Likewise.
2748 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2749 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2750 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2751 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2752 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2753 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2754 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2755 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2756 gfc_conv_intrinsic_merge, prepare_arg_info,
2757 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2758 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2759 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2760 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2761 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2762 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2764 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2765 * trans.c (gfc_add_modify_expr): Likewise.
2767 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2769 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2770 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2771 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2772 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2773 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2774 gfc_check_perror): new functions to check newly implemented
2776 * gfortran.h: adding symbols for new intrinsics.
2777 * intrinsic.c (add_functions): adding new intrinsics.
2778 (add_subroutines): adding new intrinsics.
2779 * intrinsic.h: prototype for all checking and resolving
2781 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2782 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2783 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2784 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2785 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2786 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2787 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2788 gfc_resolve_perror): new functions to resolve intrinsics.
2789 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2792 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2794 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2795 in which the variable is declared.
2798 * resolve.c (was_declared): Also check for dummy attribute.
2800 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2802 * gfortran.h (arith): Remove ARITH_0TO0.
2803 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2804 (gfc_arith_power): Remove special casing of zero to integral
2807 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2809 * Make-lang.in (fortran-warn): Remove -Wno-error.
2810 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2811 trans-common.o-warn): Specify -Wno-error.
2813 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2815 * trans-array.c (gfc_trans_static_array_pointer,
2816 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2817 comment and formatting typos.
2819 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2821 * invoke.texi: Fix typos.
2823 2005-03-15 Zack Weinberg <zack@codesourcery.com>
2825 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2827 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2829 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2830 to zero on label_tree.
2832 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2835 * io.c (resolve_tag): Add checking on assigned label.
2836 (match_dt_format): Does not set symbol assign attribute.
2837 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2838 * resolve.c (resolve_code): Add checking on assigned label.
2839 * trans-common.c (build_field): Deals with common variable assigned
2841 * trans-stmt.c (gfc_conv_label_variable): New function.
2842 (gfc_trans_label_assign): Use it.
2843 (gfc_trans_goto): Ditto.
2844 * trans-io.c (set_string): Ditto.
2845 * trans.h (gfc_conv_label_variable): Add prototype.
2847 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2850 * symbol.c (check_conflict): A dummy argument can't be a statement
2853 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2855 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2856 the argument of the shift to the unsigned type.
2858 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2861 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2863 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2866 * resolve.c (gfc_resolve): Check if character lengths are
2867 specification expressions.
2869 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2872 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2873 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2875 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2876 Remove declaration / prototype.
2877 * trans-common.c (build_equiv_decl): Give union a name. Check if
2878 it can be put on the stack.
2879 * trans-decl.c (gfc_stack_space_left): Move function here.
2880 (gfc_build_qualified_array): Fix comment typo.
2881 * trans.h (gfc_put_var_on_stack): Add prototype.
2883 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2885 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2886 * decl.c, trans.c: Don't use C++ style comments.
2887 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2888 ifsrc): Give names to enums and use ENUM_BITFIELD.
2889 (gfc_access): Remove trailing comma.
2891 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2894 * primary.c (match_complex_constant): Mangled complex constant may
2895 be an implied do-loop. Give implied do-loop matcher a chance.
2897 2005-03-05 Steven G. Kargl <kargls@comcast.net>
2900 * resolve.c (compare_shapes): New function.
2901 (resolve_operator): Use it.
2903 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2905 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2906 type for COMPLEX constants.
2908 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2911 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2912 argument from a pointer function also if it has a result clause.
2914 2005-03-04 Steven G. Kargl <kargls@comcast.net>
2916 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2918 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2920 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2923 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2927 * simplify.c (gfc_simplify_bound): Rename to ...
2928 (simplify_bound): ... this and overhaul.
2930 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2932 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2933 (gfc_conv_intrinsic_function): update function calls
2935 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2938 * trans-types.c (gfc_max_integer_kind): Declare
2939 (gfc_init_kinds): Initialize it.
2940 * gfortran.h (gfc_max_integer_kind): extern it.
2941 * primary.c (match_boz_constant): Use it; remove gfortran extension
2942 of kind suffixes on BOZ literal constants
2945 2005-02-27 Steven G. Kargl <kargls@comcast.net>
2947 * arith.c (gfc_check_real_range): Remove multiple returns
2948 (check_result): New function.
2949 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2950 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2953 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2955 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2958 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2960 Unrevert previously reverted patch. Adding this fix:
2961 * module.c (find_true_name): Deal with NULL module.
2963 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2965 Revert yesterday's patch:
2966 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2968 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2969 ... argument. Copy string instead of pointing to it.
2971 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2973 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2974 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2976 * module.c (mio_namespace_ref, load_needed): Likewise.
2977 * parse.c (parse_interface, parse_contained): Likewise. Here the
2978 correct second argument matters.
2979 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2980 parent's implicit types if this is set.
2981 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2982 * trans-common.c (build_common_decl): Likewise.
2984 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2986 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2987 and checking 'untyped' attribute.
2989 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2990 fields into new struct 'op' inside the 'value' union.
2991 * arith.c (eval_intrinsic): Adapt all users.
2992 * dependency.c (gfc_check_dependency): Likewise.
2993 * dump-parse-tree.c (gfc_show_expr): Likewise.
2994 * expr.c (gfc_get_expr): Don't clear removed fields.
2995 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2996 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2997 check_intrinsic_op): Adapt to new field names.
2998 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2999 nullify 'esym' and 'isym' fields of new function call.
3000 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
3001 Adapt to renamed structure fields.
3002 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
3003 * module.c (mio_expr): Likewise.
3004 * resolve.c (resolve_operator): Likewise.
3005 (gfc_find_forall_index): Likewise. Only look through operands
3006 if dealing with EXPR_OP
3007 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
3008 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
3009 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
3012 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
3013 'name' a 'const char *'.
3014 (gfc_symbol): Likewise, also for 'module'.
3015 (gfc_symtree): Make 'name' a 'const char *'.
3016 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
3017 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
3019 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
3020 initialize 'SYM->module'.
3021 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
3022 pointer instead of empty string.
3023 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
3024 * interface.c (gfc_compare_types): Adapt check to account for possible
3026 (compare_actual_formal): Check for NULL pointer instead of empty
3028 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
3029 Add 'const' qualifier.
3030 (conv_name): Return a heap allocated string.
3031 (find_conv): Add 'const' qualifier to 'target'.
3032 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
3033 (make_generic): Check for NULL pointer instead of empty string.
3034 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
3035 (add_conv): No need to strcpy result from 'conv_name'.
3036 (sort_actual): Check for NULL pointer instead of empty string.
3037 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
3039 * module.c (compare_true_names): Compare pointers instead of strings
3040 for 'module' member.
3041 (find_true_name): Initialize string fields with gfc_get_string.
3042 (mio_pool_string): New function.
3043 (mio_internal_string): Adapt comment.
3044 (mio_component_ref, mio_component, mio_actual_arg): Use
3045 'mio_pool_string' instead of 'mio_internal_string'.
3046 (mio_symbol_interface): Add 'const' qualifier to string arguments.
3047 Add level of indirection. Use 'mio_pool_string' instead of
3048 'mio_internal_string'.
3049 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
3050 (write_common, write_symbol): Use 'mio_pool_string' instead of
3051 'mio_internal_string'.
3052 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
3053 instead of empty string.
3054 (write_operator, write_generic): Pass correct type variable to
3055 'mio_symbol_interface'.
3056 (write_symtree): Use 'mio_pool_string' instead of
3057 'mio_internal_string'.
3058 * primary.c (match_keyword_arg): Adapt check to possible
3059 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
3060 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
3061 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
3063 (ambiguous_symbol): Check for NULL pointer instead of empty string.
3064 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
3066 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
3067 pointer instead of empty string.
3068 * trans-decl.c (gfc_sym_mangled_identifier,
3069 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
3070 gfc_get_symbol_decl): Likewise.
3071 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
3072 argument. Copy string instead of pointing to it.
3074 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
3076 * intrinsic.h, st.c: Update copyright.
3078 2005-02-20 Steven G. Kargl <kargls@comcast.net>
3080 * symbol.c: Typos in comments.
3082 2005-02-20 Steven G. Kargl <kargls@comcast.net>
3084 * expr.c (gfc_type_convert_binary): Typo in comment.
3086 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3088 * check.c (gfc_check_selected_int_kind): New function.
3089 * intrinsic.h: Prototype it.
3090 * intrinsic.c (add_function): Use it.
3091 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
3092 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
3094 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3096 * check.c (gfc_check_int): improve checking of optional kind
3097 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
3099 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3101 * check.c (gfc_check_achar): New function
3102 * intrinsic.h: Prototype it.
3103 * intrinsic.c (add_function): Use it.
3105 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3107 * trans-stmt.c (generate_loop_for_temp_to_lhs,
3108 generate_loop_for_rhs_to_temp): Remove if whose condition is
3111 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3113 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
3114 (gfc_use_derived): ... this function.
3116 2005-02-09 Richard Henderson <rth@redhat.com>
3118 * f95-lang.c (gfc_init_builtin_functions): Call
3119 build_common_builtin_nodes; do not define any functions handled
3122 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3124 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
3126 (gfc_is_constant_expr): Check 'ref' to determine if substring
3127 reference is constant.
3128 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
3129 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
3131 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
3133 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3135 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
3136 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
3137 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
3138 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
3139 gfc_add_procedure): Add argument.
3140 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
3141 gfc_match_null, match_type_spec, match_attr_spec,
3142 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
3143 Update callers to match.
3144 (gfc_match_entry): Likewise, fix comment typo.
3145 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
3146 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
3147 gfc_match_derived_decl): Update callers.
3148 * interface.c (gfc_match_interface): Likewise.
3149 * match.c (gfc_match_label, gfc_add_flavor,
3150 gfc_match_call, gfc_match_common, gfc_match_block_data,
3151 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
3153 * parse.c (parse_derived, parse_interface, parse_contained),
3154 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
3155 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
3156 * symbol.c (check_conflict, check_used): Add new 'name' argument,
3157 use when printing error message.
3158 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
3159 gfc_add_generic, gfc_add_in_common, gfc_add_data,
3160 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
3161 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
3162 gfc_add_procedure): Add new 'name' argument. Pass along to
3163 check_conflict and check_used.
3164 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
3165 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
3166 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
3167 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
3168 argument in calls to any of the modified functions.
3170 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3172 * gfortran.texi: Don't give last update date.
3174 2006-01-30 Richard Henderson <rth@redhat.com>
3176 * options.c (gfc_init_options): Zero flag_errno_math.
3178 2005-01-29 Paul Brook <paul@codesourcery.com>
3181 * check.c (real_or_complex_check): New function.
3182 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
3183 * intrinsic.c (add_functions): Use new check functions.
3184 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
3187 2005-01-29 Steven G. Kargl <kargls@comcast.net>
3190 * expr.c (gfc_check_assign): Check for conformance of logical operands
3192 2004-01-27 Steven Bosscher <stevenb@suse.de>
3194 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
3195 TREE_USED for all labels.
3196 (gfc_trans_entry_master_switch): Use it instead of building a
3198 * trans-io.c (add_case): Likewise.
3199 * trans-stmt.c (gfc_trans_integer_select): Likewise.
3201 2004-01-23 Paul Brook <paul@codesourcery.com>
3202 Steven G. Kargl <kargls@comcast.net>
3205 * arith.c (gfc_convert_real): Remove sign handling.
3206 * primary.c (match_digits): Allow whitespace after initial sign.
3207 (match_real_const): Handle signs here. Allow whitespace after
3208 initial sign. Remove dead code.
3209 (match_const_complex_part): Remove.
3210 (match_complex_part): Use match_{real,integer}_const.
3211 (match_complex_constant): Cross-promote integer types.
3213 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
3216 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
3217 transpose_c8 for complex types.
3219 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
3221 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
3222 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3223 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
3224 Follow spelling conventions.
3226 2005-01-22 Bud Davis <bdavis9659@comcast.net>
3229 * trans-io.c (gfc_trans_inquire): Added code to support
3232 2005-01-22 Steven G. Kargl <kargls@comcast.net>
3234 * intrinsic.c (make_alias): Add standard argument.
3235 (add_functions): Update make_alias calls.
3237 2005-01-22 Paul Brook <paul@codesourcery.com>
3239 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
3241 2005-01-22 Paul Brook <paul@codesourcery.com>
3243 * gfortran.h (gfc_check_access): Add prototype.
3244 * match.c (gfc_match_namelist): Remove TODO.
3245 * module.c (check_access): Rename ...
3246 (gfc_check_access): ... to this. Boolify. Update callers.
3247 * resolve.c (resolve_symbol): Check for private objects in public
3250 2005-01-22 Paul Brook <paul@codesourcery.com>
3252 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
3253 does not have an explicit type.
3254 (gfc_match_variable): Resolve implicit derived types in all cases.
3255 Resolve contained function types from their own namespace, not the
3257 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
3258 checking. Resolve from the contained namespace, not the parent.
3260 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3263 * trans-const.c (gfc_conv_constant_to_tree): Give logical
3264 constants the correct type.
3267 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
3269 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
3272 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3274 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
3275 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
3276 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
3277 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
3278 trans-io.c, trans-stmt.c, trans.c: Update copyright.
3280 2005-01-17 Ira Rosen <irar@il.ibm.com>
3282 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
3284 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3287 * error.c (error_char): Line-buffer errors / warnings.
3289 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3291 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
3292 unsigned issue. Use build_int_cst instead of converting
3293 integer_zero_node. Remove unnecessary conversion.
3295 * trans-types.c (gfc_get_character_type_len): Use
3296 gfc_charlen_type_node as basic type for the range field.
3298 * trans-intrinsic.c (build_fixbound_expr,
3299 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
3300 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
3301 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
3302 of converting 'integer_zero_node' or 'integer_one_node'
3304 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
3306 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
3307 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
3308 'build_int_cst' instead of converting 'integer_zero_node' or
3309 'integer_one_node' respectively.
3311 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3312 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
3313 'gfc'-prefix from local variable, remove dead code, use correct
3314 type when inserting argument.
3316 * trans-intrinsic.c, trans-types.c: Update copyright years.
3318 2005-01-16 Steven G. Kargl <kargls@comcast.net>
3321 * resolve.c (check_case_overlap): Typo in comment.
3322 (validate_case_label_expr): Fix up kinds of case values
3323 (resolve_select): Properly handle kind mismatches.
3325 2004-01-16 Paul Brook <paul@codesourcery.com>
3328 * trans-common.c (translate_common): Remove duplicate function call.
3329 (finish_equivalences): Preserve alignment when biasing offsets.
3331 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
3333 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
3334 ASCII-like character encoding.
3336 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3338 * resolve.c (compare_case): Cleanup.
3340 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3342 * resolve.c (compare_case): Give arguments correct type.
3344 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
3346 * iresolve.c, trans-common.c, trans-types.c: Fix comment
3349 2005-01-09 Paul Brook <paul@codesourcery.com>
3352 * trans-common.c (current_common, current_offset): Remove.
3353 (create_common): Add head argument.
3354 (align_segment): New function.
3355 (apply_segment_offset): New function.
3356 (translate_common): Merge code from new_segment. Handle alignment.
3357 (new_segment): Remove.
3358 (finish_equivalences): Ensure proper alignment.
3360 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3362 * trans-const.c: Don't include unused math.h.
3364 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
3365 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
3366 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
3367 trailing whitespace.
3368 (prepare_arg_info): Fix formatting, indenting and remove trailing
3370 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
3371 trailing whitespace.
3373 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
3374 gfc_constant_result, gfc_range_check, gfc_arith_power,
3375 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
3376 gfc_real2complex, gfc_complex2int, gfc_complex2real,
3377 gfc_complex2complex): Fix whitespace issues.
3378 * check.c (must_be, type_check, numeric_check, int_or_real_check,
3379 logical_array_check, array_check, scalar_check, nonoptional_check,
3380 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
3381 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
3382 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
3383 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
3384 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
3385 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
3386 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
3387 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
3388 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
3389 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
3390 gfc_check_lbound, gfc_check_logical, min_max_args,
3391 gfc_check_min_max_integer, gfc_check_min_max_real,
3392 gfc_check_min_max_double, gfc_check_matmul,
3393 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
3394 gfc_check_pack, gfc_check_precision, gfc_check_radix,
3395 gfc_check_range, gfc_check_real, gfc_check_repeat,
3396 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
3397 gfc_check_set_exponent): Fix formatting issues.
3398 (gfc_check_size, gfc_check_sign): Alphabetize function order,
3399 remove whitespace-only line.
3400 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
3401 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
3402 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
3403 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
3404 gfc_check_random_number, gfc_check_random_seed,
3405 gfc_check_second_sub, gfc_check_system_clock,
3406 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
3407 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
3408 gfc_check_unlink_sub): Fix formatting issues.
3410 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3412 * gfortran.h: Remove outdated comment. Don't include stdio.h
3415 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3417 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
3418 output of 'gfortran --version'.
3420 2005-01-03 Steven G. Kargl <kargls@comcast.net>
3422 * arith.c: Add system.h; remove string.h
3428 * check.c: Remove stdlib.h and stdarg.h
3429 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
3430 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
3431 * f95-lang.c: Add system.h; remove stdio.h
3432 * interface.c: Add system.h; remove stdlib.h and string.h
3433 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
3434 * io.c: Remove string.h
3436 * match.c: Remove stdarg.h and string.h
3437 * misc.c: Update copyright; add system.h; remove stdlib.h,
3438 string.h, and sys/stat.h
3439 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
3440 unistd.h, and time.h
3441 * option.c: Remove string.h and stdlib.h
3443 * scanner.c: Update copyright; add system.h; remove stdlib.h,
3444 stdio.h, string.h, and strings.h
3445 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
3446 * trans-array.c: Remove stdio.h and gmp.h
3447 * trans-const.c: Ditto
3448 * trans-expr.c: Ditto
3450 * trans-stmt.c: Ditto
3452 * trans-intrinsic.c: Remove stdio.h and string.h
3454 2004-12-29 Steven G. Kargl <kargls@comcast.net>
3456 * gfortran.h (gfc_case): fix typo in comment.
3458 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3460 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
3461 logical shift. Call fold. Remove 0-bit shift shortcut.
3462 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
3463 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
3464 result if width(arg 1) < 4 bytes. Call fold.
3467 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
3468 in front of function to match the standard. Correct handling
3471 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
3473 * trans-expr.c (gfc_conv_cst_int_power): Only check for
3474 flag_unsafe_math_optimizations if we have a float type.
3476 2004-12-23 Steven G. Kargl <kargls@comcast.net>
3478 * gfortran.texi: Fix typo.
3480 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3482 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
3485 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3488 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
3489 (gfc_match_nullify): Make sure that ')' is in front of the end of
3492 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
3495 2004-12-14 Richard Henderson <rth@redhat.com>
3497 * gfortran.h (gfc_expr.function.name): Make const.
3498 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3499 (gfc_get_string): Update prototype.
3500 * iresolve.c: Include tree.h.
3501 (string_node, HASH_SIZE, string_head, hash): Remove.
3502 (gfc_get_string): Use vsnprintf, get_identifier.
3503 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3504 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
3505 (gfc_done_1): Don't call gfc_iresolve_done_1.
3506 * module.c (mio_allocated_string): Take and return const char *,
3507 instead of modifying char**.
3508 (mio_expr): Update to match.
3509 * resolve.c (pure_function): Constify name argument.
3510 (resolve_function): Constify name.
3511 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
3513 2004-12-12 Richard Henderson <rth@redhat.com>
3515 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3516 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
3517 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
3518 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
3519 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
3520 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
3521 gfc_resolve_unpack: Use PREFIX.
3523 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3526 * match.c (gfc_match_common): Skip whitespace.
3528 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3531 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
3532 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
3533 integer kind check; Issue error for -std=f95 when needed.
3534 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
3536 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
3537 Promote arguments to same kind.
3539 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3540 Paul Brook <paul@codesourcery.com>
3543 * resolve.c (gfc_resolve_iterator_expr): New function.
3544 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
3545 start, end and stride to correct type.
3546 (resolve_code): Pass extra argument.
3547 * array.c (resolve_array_list): Pass extra argument.
3548 * gfortran.h (gfc_resolve): Add prototype.
3549 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
3550 Handle real type iterators.
3552 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3555 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
3556 same kind as C's 'int'.
3557 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
3559 2004-12-08 Richard Henderson <rth@redhat.com>
3561 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
3562 to the output expression.
3563 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
3565 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
3568 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3571 * resolve.c (resolve_code): Impose correct restrictions on
3574 * decl.c (gfc_match_end): Use locus of END when eos is an error.
3576 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3577 Paul Brook <paul@codesourcery.com>
3579 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
3580 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
3581 (gfc_check_stat, gfc_check_stat_sub): New functions.
3582 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
3583 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
3584 fstat, and stat to intrinsics symbol tables.
3585 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
3586 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
3587 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
3588 (gfc_resolve_stat, gfc_resolve_flush): New functions.
3589 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
3590 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
3592 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3594 * intrinsic.c: Fix and add comments, fix function declarations
3595 (OPTIONAL,REQUIRED): New symbols
3596 (add_functions,add_subroutines): Use symbols
3597 (gmp.h): Remove unused include
3599 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3601 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
3604 2004-11-24 Steven Bosscher <stevenb@suse.de>
3606 * options.c (gfc_post_options): Don't clear flag_inline_functions.
3608 2004-11-20 Steven G. Kargl <kargls@comcast.net>
3610 * check.c (gfc_check_getcwd_sub): Fix seg fault.
3612 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
3613 gfc_check_unlink,gfc_check_unlink_sub): New functions
3614 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
3615 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
3616 exit to intrinsics symbol tables.
3617 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
3618 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
3619 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
3620 gfc_resolve_unlink_sub): Add and sort prototypes.
3621 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
3622 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
3623 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
3625 2004-11-16 Paul Brook <paul@codesourcery.com>
3628 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
3629 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
3630 * trans-types.c (gfc_get_dtype): Accept array type rather than element
3632 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
3633 (gfc_get_array_type_bounds): Ditto.
3634 (gfc_get_derived_type): Recurse into derived type pointers.
3635 * trans-types.h (gfc_get_dtype): Add prototype.
3636 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
3638 2004-11-15 Paul Brook <paul@codesourcery.com>
3640 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
3642 2004-11-10 Paul Brook <paul@codesourcery.com>
3645 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
3646 * trans-io.c (transfer_array_component): Ditto.
3648 2004-11-10 Paul Brook <paul@codesourcery.com>
3650 * invoke.texi: Fix typo.
3652 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3654 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3655 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3656 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3657 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3658 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3660 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3663 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3665 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3667 * gfortranspec.c: Replace GNU CC with GCC.
3669 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3671 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3673 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3676 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3679 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3682 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3683 module procedures as if they were module variables.
3685 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3690 * module.c (write_symbol1): Set module_name for dummy arguments.
3692 2004-11-02 Paul Brook <paul@codesourcery.com>
3694 * intrinsic.c (check_intrinsic_standard): Include error locus.
3696 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3697 locus to check_intrinsic_standard.
3699 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3702 * gfortran.h: Change GFC_STD_* flags to more appropriate
3703 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3704 gfc_option_t): Add field for warning about use of nonstandard
3706 * intrinsic.c (add_sym): Add parameter for standard version, check
3707 this against current standard.
3708 (add_sym_0): Pass standard parameter to add_sym.
3709 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3710 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3711 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3712 (make_generic): Add parameter for standard, check this
3713 against currently selected standard.
3714 (add_functions, add_subroutines): Add parameter to tell which
3715 standard an intrinsic belongs to.
3716 (check_intrinsic_standard): New function.
3717 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3718 (gfc_intrinsic_sub_interface): Ditto.
3719 * lang.opt: Add Wnonstd-intrinsics option.
3720 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3722 (set_Wall): Add warning about nonstd intrinsics.
3723 (gfc_handle_option): Change to use new GFC_STD_* flags,
3725 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3727 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3729 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3731 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3733 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3735 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3737 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3740 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3742 * check.c (gfc_check_rand): Allow missing optional argument.
3743 (gfc_check_irand): Ditto.
3744 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3746 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3748 PR fortran/13490, PR fortran/17912
3749 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3750 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3751 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3752 warning when compiling with pedantic.
3753 * gcc/fortran/arith.c: Set minimum integer values to reflect
3754 realities of two's complement signed integers. Added
3757 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3759 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3760 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3763 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3765 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3767 (gfc_generate_function_code): Fix formatting issue.
3769 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3771 * module.c: Fix formatting issues.
3773 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3775 * module.c (mio_interface_rest): Set where member of interface
3778 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3781 * options.c (gfc_handle_option): Add break after handing the
3784 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3786 * arith.c: Fix formatting issues.
3788 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3791 * resolve.c (resolve_operator): Use correct operator name in message.
3793 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3795 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3796 Move standard warning further to the front.
3798 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3800 * trans-stmt.c: Fix a comment typo.
3802 2004-10-07 Paul Brook <paul@codesourcery.com>
3805 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3808 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3811 * simplify.c (twos_complement): New function.
3812 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3814 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3816 2004-10-06 Paul Brook <paul@codesourcery.com>
3818 * trans-stmt.c (gfc_trans_simple_do): New function.
3819 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3820 loop. Update comments.
3822 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3825 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3829 * intrinsic.c (add_sym_5): Remove.
3830 (add_subroutines): Add resolution function for MVBITS.
3831 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3833 * iresolve.c (gfc_resolve_mvbits): New function.
3834 (gfc_resolve_random_number): Remove empty line at end of function.
3836 * trans-const.c (gfc_build_cstring_const): New function.
3837 (gfc_init_cst): Use new function.
3838 * trans-const.h (gfc_build_cstring_const): Add prototype.
3839 * trans-io.c (set_string, set_error_locus): Use new function.
3840 * trans-stmt.c (gfc_trans_goto): Use new function.
3843 * parse.c (accept_statement): Don't treat END DO like END IF and
3845 (parse_do_block): Generate possible END DO label inside END DO
3849 * check.c (gfc_check_system_sub): New function.
3850 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3851 * intrinsic.c (add_functions): Add 'system'.
3852 (add_subroutines): Add 'system'.
3853 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3854 Move prototypes to other suborutines.
3855 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3857 (gfc_resolve_system_clock): Fix formatting of prototype.
3858 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3860 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3863 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3865 * scanner.c (preprocessor_line): Accept preprocessor lines without
3866 file names. Check file names for closing quotes. Handle escaped
3867 quotes in file names.
3869 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3870 Paul Brook <paul@codesourcery.com>
3872 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3873 Use gfc_get_expr_charlen.
3874 * trans-expr.c (gfc_get_expr_charlen): New function.
3875 * trans.h (gfc_get_expr_charlen): Add prototype.
3877 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3879 * trans-intrinsic.c: Fix a comment typo.
3881 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3883 * simplify.c (range_check): Remove blank line at beginning of function.
3884 (gfc_simplify_dint): Same at end of function.
3885 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3886 (gfc_simplify_bound): Fix indentation.
3887 (gfc_simplify_log10): Simplify calculation.
3888 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3890 (gfc_simplify_nearest): Same at end of function.
3891 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3893 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3894 gfc_simplify_spacing): Simplify calulations.
3896 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3898 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3899 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3901 2004-10-01 Jan Hubicka <jh@suse.cz>
3903 * f95-lang.c (gfc_expand_function): Update call of
3904 tree_rest_of_compilation.
3905 * trans-decl.c (gfc_generate_constructors): Likewise.
3907 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3909 * trans-intrinsic.c: Comment fixes.
3911 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3913 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3915 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3917 * trans-types.c (gfc_return_by_reference): Remove superfluous
3920 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3921 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3924 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3925 function to determine return type.
3927 2004-09-20 Jan Hubicka <jh@suse.cz>
3929 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3931 (gfc_generate_function_code): Likewise.
3933 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3936 * simplify.c (gfc_simplify_reshape): Set shape of return value
3939 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3940 Zack Weinberg <zack@codesourcery.com>
3942 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3943 enumeration constants.
3945 2004-09-17 Paul Brook <paul@codesourcery.com>
3947 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3948 (gfc_linebuf_header_size): Define.
3949 * scanner.c (load_file): Use it.
3951 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3953 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3954 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3955 resolve.c, scanner.c, trans-array.c, trans-array.h,
3956 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3957 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3958 trans.h: Fix comment typos. Follow spelling conventions.
3960 2004-09-16 Victor Leikehman <lei@il.ibm.com>
3963 * trans-io.c (transfer_array_component): New function.
3964 (transfer_expr): For array fields, call transfer_array_component.
3966 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3968 * gfortran.texi: Fix a typo.
3970 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
3972 * parse.c (eof_buf): Rename eof to eof_buf.
3973 (unexpected_eof): Same.
3974 (gfc_parse_file): Same.
3976 2004-09-15 Steven G. Kargl <kargls@comcast.net>
3978 * check.c (gfc_check_getcwd_sub): New function.
3979 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3980 * intrinsic.c (add_functions): Add function definition;
3982 * intrinsic.c (add_subroutines): Add subroutine definitions.
3983 * intrinsic.h: Add prototypes.
3984 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3986 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3988 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3991 * module.c (write_symbol): Don't fill in module name here.
3992 (write_symbol0): Fill in here instead.
3994 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3996 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3997 trans-array.c, trans-common.c, trans-expr.c,
3998 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3999 comment typos. Follow spelling conventions.
4001 2004-09-09 Paul Brook <paul@codesourcery.com>
4003 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
4005 2004-09-08 Paul Brook <paul@codesourcery.com>
4007 * array.c: Don't include assert.h.
4008 * data.c: Don't include assert.h. Replace assert and abort with
4009 gcc_assert and gcc_unreachable.
4010 * dependency.c: Ditto.
4011 * f95-lang.c: Ditto.
4012 * iresolve.c: Ditto.
4014 * simplify.c: Ditto.
4016 * trans-array.c: Ditto.
4017 * trans-common.c: Ditto.
4018 * trans-const.c: Ditto.
4019 * trans-decl.c: Ditto.
4020 * trans-expr.c: Ditto.
4021 * trans-intrinsic.c: Ditto.
4022 * trans-io.c: Ditto.
4023 * trans-stmt.c: Ditto.
4024 * trans-types.c: Ditto.
4027 2004-09-07 Per Bothner <per@bothner.com>
4028 Paul Brook <paul@codesourcery.com>
4030 * error.c (show_locus): Handle mapped locations.
4031 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
4032 * gfortran.h: Include input.h.
4033 (struct gfc_linebuf): Use source_location.
4034 * scanner.c (get_file): Initialize linemap.
4035 (preprocessor_line): Pass extra argument to get_file.
4036 (load_file): Ditto. Setup linemap.
4037 (gfc_new_file): Handle mapped locations.
4038 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
4039 Set decl source locations.
4040 (gfc_trans_common): Set blank common block location.
4041 * trans-decl.c (gfc_set_decl_location): New function.
4042 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
4043 (trans_function_start): Move call to gfc_set_backend_locus..
4044 (build_function_decl): ... to here.
4045 (build_entry_thunks): Set and restore the backend locus.
4046 (gfc_generate_constructors): Remove excess arguments to
4047 init_function_start.
4048 (gfc_generate_block_data): Add comments. Set the decl locus.
4049 * trans-io.c (set_error_locus): Handle mapped locations.
4050 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
4051 (gfc_trans_code): Use SET_EXPR_LOCATION.
4052 (gfc_generate_code): Override the location of the new symbol.
4053 * trans.h (gfc_set_decl_location): Add prototype.
4055 2004-08-31 Paul Brook <paul@codesourcery.com>
4057 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
4059 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4062 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
4065 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4070 * resolve.c (resolve_transfer): New function.
4071 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
4073 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4076 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
4079 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4081 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
4083 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4086 * trans-types.c (gfc_return_by_reference): Remove TODO error,
4087 add comment pointing out possible issue WRT compatibility with g77.
4089 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4091 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
4092 all occurences of 'gfc_strlen_type_node' by
4093 'gfc_charlen_type_node'.
4094 * trans-types.h: Same. Also update comment accordingly.
4096 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4098 * primary.c: Update copyright boilerplate to say GCC.
4099 * f95-lang.c: Change initial comment to say gfortran.
4101 2004-08-31 Paul Brook <paul@codesourcery.com>
4103 * trans-types.h: Add comments.
4104 (intmax_type_node, string_type_node, const_string_type_node): Remove.
4106 2004-08-30 Richard Henderson <rth@redhat.com>
4108 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
4109 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
4110 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
4111 c_long, c_long_long.
4112 (gfc_logical_info): Add c_bool.
4113 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
4114 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
4115 rather than gfc_int[48]_type_node for allocate choice.
4116 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
4117 local copies of some kind type nodes.
4118 (gfc_build_builtin_function_decls): Likewise.
4119 * trans-expr.c (gfc_conv_power_op): Likewise.
4120 * trans-intrinsic.c (gfc_conv_intrinsic_index,
4121 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
4122 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
4123 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
4124 gfc_trans_character_select, gfc_trans_allocate): Likewise.
4125 * trans-io.c (gfc_pint4_type_node): Move into ...
4126 (gfc_build_io_library_fndecls): ... here. Cache local copies of
4127 some kind type nodes.
4128 * trans-types.c (gfc_type_nodes): Remove.
4129 (gfc_character1_type_node, gfc_strlen_type_node): New.
4130 (gfc_integer_types, gfc_logical_types): New.
4131 (gfc_real_types, gfc_complex_types): New.
4132 (gfc_init_kinds): Fill in real mode_precision.
4133 (gfc_build_int_type, gfc_build_real_type): New.
4134 (gfc_build_complex_type, gfc_build_logical_type): New.
4135 (c_size_t_size): New.
4136 (gfc_init_types): Loop over kinds.
4137 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
4138 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
4139 (gfc_get_character_type_len): Likewise.
4140 (gfc_type_for_size): Loop over kinds; use a reduced set of
4141 unsigned type nodes.
4142 (gfc_type_for_mode): Loop over kinds.
4143 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
4144 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
4145 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
4146 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
4147 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
4148 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
4149 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
4150 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
4151 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
4152 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
4153 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
4154 gfc_complex8_type_node, gfc_complex16_type_node,
4155 gfc_logical1_type_node, gfc_logical2_type_node,
4156 gfc_logical4_type_node, gfc_logical8_type_node,
4157 gfc_logical16_type_node, gfc_strlen_kind): Remove.
4158 (gfc_character1_type_node): Turn in to a variable.
4159 (gfc_strlen_type_node): Likewise.
4161 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4163 * gfortran.h (gfc_namespace): Add new field is_block_data.
4164 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
4165 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
4166 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
4167 * trans.h (gfc_generate_block_data): Add prototype.
4168 * trans-decl.c (gfc_generate_block_data): New function.
4170 2004-08-29 Richard Henderson <rth@redhat.com>
4172 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
4173 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
4174 than two HOST_WIDE_INT.
4176 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4179 * decl.c (free_variable, free_value, gfc_free_data, var_list,
4180 var_element, top_var_list, match_data_constant, top_val_list,
4181 gfc_match_data): Move here from match.c.
4182 (match_old_style_init): New function.
4183 (variable_decl): Match old-style initialization.
4184 * expr.c (gfc_get_variable_expr): New function.
4185 * gfortran.h (gfc_get_variable_expr): Add prototype.
4186 * gfortran.texi: Start documentation for supported extensions.
4187 * match.c: Remove the functions moved to decl.c.
4188 * match.h (gfc_match_data): Move prototype to under decl.c.
4189 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
4192 2004-08-29 Steven G. Kargl <kargls@comcast.net>
4193 Paul Brook <paul@codesourcery.com>
4195 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
4196 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
4197 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
4198 (build_builtin_fntypes): New function.
4199 (gfc_init_builtin_functions): Use it.
4200 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
4201 and GFC_ISYM_ERF{,C}.
4202 (gfc_c_int_kind): Declare.
4203 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
4204 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
4205 gfc_resolve_g77_math1): Add prototypes.
4206 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
4207 * mathbuiltins.def: Add comment. Change third argument. Use
4208 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
4209 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
4210 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
4211 * trans-types.c (gfc_c_int_kind): Declare.
4212 (gfc_init_kinds): Set it.
4214 2004-08-29 Steven G. Kargl <kargls@comcast.net>
4215 Paul Brook <paul@codesourcery.com>
4217 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
4218 (gfc_check_f, gfc_simplify_f): Add f0.
4219 * intrinsic.c (do_check): Call f0. Flatten.
4220 (add_sym_0): Fix prototype. Set f0.
4221 (add_functions): Add getgid, getgid and getuid.
4222 (resolve_intrinsic): Remove obsolete comment.
4223 (do_simplify): Call f0.
4224 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
4225 gfc_resolve_getuid): Add prototypes.
4226 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
4227 gfc_resolve_getuid): New functions.
4228 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
4231 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4233 * error.c (gfc_error_init_1): Remove blank line in front of
4234 function body. Add missing blank.
4235 (gfc_buffer_error, error_char, error_string): Remove blank line in
4236 front of function body.
4237 (show_locus): Add comma in comment.
4238 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
4239 gfc_push_error, gfc_pop_error): Remove blank line in front of
4241 (gfc_get_errors): Typo fix in comment in front of function. Remove
4242 blank line in front of function body.
4244 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4246 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
4247 variable declaration of same name.
4248 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
4249 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
4250 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
4251 Replace all calls to gfc_default_*_kind with variable accesses.
4252 * trans-types.c: Same as above.
4253 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
4254 static qualifier. Replace all occurences.
4255 (gfc_default_*_kind): Remove functions.
4257 2004-08-26 Richard Henderson <rth@redhat.com>
4259 * arith.c: Include system.h, not real system headers.
4260 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
4261 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
4262 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
4263 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
4264 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
4265 gfc_index_integer_kind, gfc_default_integer_kind,
4266 gfc_default_real_kind,gfc_default_double_kind,
4267 gfc_default_character_kind, gfc_default_logical_kind,
4268 gfc_default_complex_kind, validate_integer, validate_real,
4269 validate_logical, validate_character,
4270 gfc_validate_kind): Move to trans-types.c.
4271 (gfc_set_model_kind): Use gfc_validate_kind.
4272 (gfc_set_model): Just copy the current precision to default.
4273 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
4274 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
4275 * gfortran.h: Update file commentary.
4276 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
4277 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
4278 gfc_default_double_kind_1, gfc_default_character_kind_1,
4279 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
4280 (gfc_init_kinds): New.
4281 (gfc_init_types): Don't set gfc_index_integer_kind here.
4282 * trans-types.h (gfc_init_kinds): Declare.
4283 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
4285 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4287 * check.c (gfc_check_atan2): New function.
4288 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
4289 * intrinsic.h (gfc_check_atan2): Add prototype.
4291 2004-08-25 Richard Henderson <rth@redhat.com>
4293 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
4294 false and we don't validate the kind.
4295 (gfc_check_integer_range, gfc_check_real_range): Update to match.
4296 * check.c (kind_check): Likewise.
4297 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
4298 (match_char_spec, match_logical_spec): Likewise.
4299 * gfortran.h (gfc_validate_kind): Likewise.
4300 * options.c (gfc_handle_option): Likewise.
4301 * primary.c (match_integer_constant, match_real_constant,
4302 match_string_constant, match_logical_constant,
4303 match_const_complex_part): Likewise.
4304 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
4305 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
4306 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
4307 gfc_simplify_maxexponent, gfc_simplify_minexponent,
4308 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
4309 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
4310 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
4311 gfc_simplify_tiny): Likewise.
4312 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
4313 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
4314 prepare_arg_info): Likewise.
4316 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4318 * expr.c (gfc_check_assign): Add comment. Add new warning.
4319 * trans-expr.c (gfc_conv_function_call): Correctly dereference
4320 result of pointer valued function when not in pointer assignment.
4322 2004-08-25 Paul Brook <paul@codesourcery.com>
4324 * config-lang.in: Remove dead commented line.
4325 * module.c: Replace g95 with gfortran in comment.
4327 2004-08-25 Paul Brook <paul@codesourcery.com>
4330 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
4332 2004-08-25 Paul Brook <paul@codesourcery.com>
4335 * trans-array.c (gfc_trans_allocate_temp_array): Remove
4336 string_length argument.
4337 (gfc_trans_array_ctor_element): New function.
4338 (gfc_trans_array_constructor_subarray): Use it.
4339 (gfc_trans_array_constructor_value): Ditto. Handle constant
4341 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
4342 (gfc_trans_array_constructor): Use them.
4343 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
4344 (gfc_conv_ss_descriptor): Remember section string length.
4345 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
4346 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
4347 (gfc_conv_expr_descriptor): Ditto.
4348 (gfc_conv_loop_setup): Ditto. Spelling fixes.
4349 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
4350 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
4351 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
4352 (gfc_conv_variable): Set string_length from section.
4353 (gfc_conv_function_call): Remove extra argument.
4354 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
4355 * trans-types.c (gfc_get_character_type_len): New function.
4356 (gfc_get_character_type): Use it.
4357 (gfc_get_dtype): Return zero for internal types.
4358 * trans-types.h (gfc_get_character_type_len): Add prototype.
4359 * trans.h (struct gfc_ss): Move string_length out of union.
4361 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4363 * trans.h (build2_v, build3_v): New macros.
4365 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
4367 * trans-array.c (gfc_conv_descriptor_data,
4368 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
4369 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
4370 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
4371 gfc_trans_allocate_temp_array,
4372 gfc_trans_array_constructor_subarray,
4373 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
4374 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
4375 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
4376 gfc_conv_array_ref, gfc_trans_preloop_setup,
4377 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
4378 gfc_conv_loop_setup, gfc_array_init_size,
4379 gfc_conv_array_initializer, gfc_trans_array_bounds,
4380 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
4381 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
4382 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
4383 of build and build_v as appropriate.
4384 * trans-common.c (create_common): Same.
4385 * trans-decl.c (gfc_trans_auto_character_variable,
4386 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
4387 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4388 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
4389 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
4390 gfc_conv_expr_op, gfc_conv_function_call,
4391 gfc_trans_structure_assign): Same.
4392 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
4393 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
4394 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
4395 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
4396 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
4397 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4398 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
4399 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
4400 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
4401 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
4402 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
4403 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
4404 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
4405 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
4406 gfc_conv_intrinsic_iargc): Same.
4407 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
4408 set_flag, add_case, io_result, transfer_namelist_element,
4409 transfer_expr): Same.
4410 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
4411 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
4412 gfc_trans_integer_select, gfc_trans_logical_select,
4413 gfc_trans_character_select, gfc_trans_forall_loop,
4414 gfc_trans_nested_forall_loop, gfc_do_allocate,
4415 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4416 compute_inner_temp_size, compute_overall_iter_number,
4417 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
4418 gfc_trans_forall_1, gfc_evaluate_where_mask,
4419 gfc_trans_where_assign, gfc_trans_allocate): Same.
4420 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
4421 * trans.c (gfc_add_modify_expr, gfc_finish_block,
4422 gfc_build_array_ref, gfc_build_function_call,
4423 gfc_trans_runtime_check): Same.
4425 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4427 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
4428 build_int_cst to build_int_cst_wide in accordance to Nathan's
4431 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4433 * trans-array.c (gfc_trans_array_constructor_value): Adjust
4434 build_int_cst calls.
4435 * trans-const.c (gfc_build_string_const, gfc_init_constants,
4436 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
4437 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
4438 gfc_trans_entry_master_switch): Likewise.
4439 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4440 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4441 * trans-io.c (add_case, set_error_locus,
4442 transfer_namelist_element, transfer_expr): Likewise.
4443 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4444 gfc_trans_stop, gfc_trans_character_select): Likewise.
4445 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4446 * trans.c (gfc_trans_runtime_check): Likewise.
4448 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4450 * trans-decl.c, trans-types.c: Add and remove blank lines as
4453 2004-08-24 Richard Henderson <rth@redhat.com>
4455 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
4457 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4459 * resolve.c (merge_argument_lists): Revert unintentionally
4462 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4464 * trans-decl.c (build_function_decl): Fix spelling in comment.
4465 (build_entry_thunks): Remove code with no function.
4466 (gfc_build_intrinsic_function_decls): Remove empty line.
4468 * resolve.c (resolve_entries): Fix a bunch of comment typos.
4470 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4472 * f95-lang.c (gfc_init_decl_processing): Adjust
4473 build_common_tree_nodes call.
4475 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4477 * trans-types.c: Spelling and formatting fixes.
4479 2004-08-23 Richard Henderson <rth@redhat.com>
4481 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
4482 of going through an intermediate string. Fix 32/64 int/long bug.
4484 2004-08-23 Eric Christopher <echristo@redhat.com>
4486 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
4487 usage. Use build_vector_type_for_mode for vector types.
4489 2004-08-22 Richard Henderson <rth@redhat.com>
4492 * data.c (find_con_by_offset): Search ordered list; handle
4493 elements with repeat counts.
4494 (gfc_assign_data_value_range): New.
4495 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
4496 (gfc_assign_data_value_range): Declare.
4497 * match.c (top_val_list): Extract repeat count into a temporary.
4498 * resolve.c (values): Make left unsigned.
4499 (next_data_value): Don't decrement left.
4500 (check_data_variable): Use gfc_assign_data_value_range.
4502 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4504 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
4506 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4508 * check.c (gfc_check_reduction): Rename to ...
4509 (check_reduction): ... this. Make static. Don't check type of
4511 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
4512 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
4513 SUM to use new check functions.
4514 (check_specific): Change logic to call new functions.
4515 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
4517 (gfc_check_reduction): Remove prototype.
4519 2004-08-20 Paul Brook <paul@codesourcery.com>
4520 Canqun Yang <canqun@nudt.edu.cn>
4523 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
4524 for automatic arrays.
4525 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
4527 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4531 * match.c (match_simple_forall, match_simple_where): Forward-declare.
4532 (gfc_match_if): Order statement list alphabetically, add WHERE and
4533 FORALL, remove double PAUSE.
4534 (gfc_match_simple_where, match_forall_header,
4535 gfc_match_simple_forall): New functions.
4536 (gfc_match_forall): Use match_forall_header.
4538 2004-08-19 Paul Brook <paul@codesourcery.com>
4541 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
4542 * symbol.c (gfc_clear_attr): Use memset.
4544 2004-08-19 Paul Brook <paul@codesourcery.com>
4548 * data.c (assign_substring_data_value): Remove.
4549 (create_character_intializer): New function.
4550 (gfc_assign_data_value): Track the typespec for the current
4551 subobject. Use create_character_intializer.
4553 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
4556 * check.c (gfc_check_reduction): New function.
4557 (gfc_check_minval_maxval): Removed.
4558 (gfc_check_product): Removed.
4559 (gfc_check_sum): Removed.
4560 * intrinsic.h: Add/remove declarations for these.
4561 * gfortran.h: Add field f3red to union gfc_check_f.
4562 * intrinsic.c (add_sym_3red): New function.
4563 (add_functions): Register maxval, minval, product, and sum intrinsics
4564 through add_sym_3red.
4565 (check_specific): Handle f3red union field.
4566 * iresolve.c: Whitespace change.
4568 2004-08-18 Paul Brook <paul@codesourcery.com>
4570 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
4572 2004-08-18 Victor Leikehman <lei@il.ibm.com>
4575 * trans-io.c (transfer_namelist_element): New. Recursively handle
4576 derived-type variables. Pass string lengths.
4577 (build_dt): Code moved to build_namelist, with some
4578 changes and additions.
4579 (gfc_build_io_library_fndecls): Declare the fifth
4580 argument in st_set_nml_var_char -- string_length.
4582 2004-08-17 Paul Brook <paul@codesourcery.com>
4583 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4586 * decl.c (get_proc_name): Update mystery comment.
4587 (gfc_match_entry): Check for errors earlier. Add entry point to list.
4588 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
4589 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
4590 (struct gfc_entry_list): Define.
4591 (gfc_get_entry_list): Define.
4592 (struct gfc_namespace): Add refs and entries.
4593 (enum gfc_exec_op): Add EXEC_ENTRY.
4594 (struct gfc_code): Add ext.entry.
4595 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
4596 (mio_symbol_attribute): Don't save/reture addr->entry.
4597 (mio_namespace_ref): Refcount namespaces.
4598 * parse.c (accept_statement): Handle ST_ENTRY.
4599 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
4600 (parse_contained): Fixup sibling references to entry points
4601 after parsing the procedure body.
4602 * resolve.c (resolve_contained_fntype): New function.
4603 (merge_argument_lists, resolve_entries): New functions.
4604 (resolve_contained_functions): Use them.
4605 (resolve_code): Handle EXEC_ENTRY.
4606 (gfc_resolve): Call resolve_entries.
4607 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
4608 * symbol.c (gfc_get_namespace): Refcount namespaces.
4609 (gfc_free_namespace): Ditto.
4610 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
4611 optional when multiple entry points are present.
4612 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
4613 (gfc_get_extern_function_decl): Add assertion. Fix coment.
4614 (create_function_arglist, trans_function_start, build_entry_thunks):
4616 (gfc_build_function_decl): Rename ...
4617 (build_function_decl): ... to this.
4618 (gfc_create_function_decl): New function.
4619 (gfc_generate_contained_functions): Use it.
4620 (gfc_trans_entry_master_switch): New function.
4621 (gfc_generate_function_code): Use new functions.
4622 * trans-stmt.c (gfc_trans_entry): New function.
4623 * trans-stmt.h (gfc_trans_entry): Add prototype.
4624 * trans-types.c (gfc_get_function_type): Add entry point argument.
4625 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
4626 (gfc_generate_module_code): Call gfc_create_function_decl.
4627 * trans.h (gfc_build_function_decl): Remove.
4628 (gfc_create_function_decl): Add prototype.
4630 2004-08-15 Andrew Pinski <apinski@apple.com>
4633 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
4634 for cabs{,f} and copysign{,f}.
4635 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
4636 (gfor_fndecl_math_cabs): Delete.
4637 (gfor_fndecl_math_sign4): Delete.
4638 (gfor_fndecl_math_sign8): Delete.
4639 (gfc_build_intrinsic_function_decls): Remove the
4640 initializing of cabs{,f} and copysign{,f} functions.
4641 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
4642 instead of the functions definitions.
4643 (gfc_conv_intrinsic_sign): Likewise.
4644 * trans.h (gfor_fndecl_math_cabsf): Delete.
4645 (gfor_fndecl_math_cabs): Delete.
4646 (gfor_fndecl_math_sign4): Delete.
4647 (gfor_fndecl_math_sign8): Delete.
4649 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4651 * trans-array.c (gfc_trans_array_constructor_value): Use
4653 * trans-const.c (gfc_build_string_const,
4654 gfc_init_constants, gfc_conv_mpz_to_tree,
4655 gfc_conv_constant_to_tree): Likewise.
4656 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4657 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4658 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4659 * trans-io.c (add_case, set_error_locus, build_dt,
4660 transfer_expr): Likewise.
4661 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4662 gfc_trans_stop, gfc_trans_character_select): Likewise.
4663 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4664 * trans.c (gfc_trans_runtime_check): Likewise.
4666 2004-08-14 Paul Brook <paul@codesourcery.com>
4668 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4670 2004-08-14 Paul Brook <paul@codesourcery.com>
4672 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4674 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4676 * gfortran.h: Add comments.
4677 * parse.c (parse_contained): Fix comment typo.
4678 * resolve.c (was_declared): Ditto.
4681 2004-08-11 Paul Brook <paul@codeourcery.com>
4684 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4686 2004-08-10 Richard Henderson <rth@redhat.com>
4688 * f95-lang.c (gfc_init_builtin_functions): Remove
4689 __builtin_stack_alloc, add __builtin_alloca.
4690 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4691 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4693 2004-08-10 Paul Brook <paul@codesourcery.com>
4695 * trans-io.c (transfer_expr): Handle pointters.
4697 2004-08-10 Paul Brook <paul@codesourcery.com>
4700 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4701 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4702 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4703 Handle GFC_SS_COMPONENT.
4704 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4705 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4707 (gfc_conv_array_initializer): Call specific initializer routines.
4708 * trans-expr.c (gfc_trans_structure_assign): New function.
4709 (gfc_trans_subarray_assign): New function.
4710 (gfc_trans_subcomponent_assign): New fucntion
4711 (gfc_conv_structure): Use them.
4712 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4713 (gfc_ss): Add shape.
4715 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4717 * simplify.c (gfc_simplify_shape): Bugfix.
4718 * expr.c (gfc_copy_shape_excluding): New function.
4719 * gfortran.h (gfc_get_shape): Bugfix.
4720 (gfc_copy_shape_excluding): Added declaration.
4721 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4722 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4723 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4724 time resolution of shape.
4726 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4728 * intrinsic.c (add_subroutines): Add getenv and
4729 get_environment_variable. (add_sym_5s): New function.
4730 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4732 * iresolve.c (gfc_resolve_get_environment_variable): New
4735 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4737 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4738 __builtin_pow[f] arguments.
4740 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4742 * arith.c: Add #define for model numbers. Remove global GMP variables.
4743 (natural_logarithm,common_logarithm,exponential,sine,
4744 cosine,arctangent,hypercos,hypersine ): Remove.
4745 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4746 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4747 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4748 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4749 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4750 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4751 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4752 gfc_real2int,gfc_real2real,gfc_real2complex,
4753 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4754 to MPFR, use new functions.
4755 * arith.h: Remove extern global variables.
4756 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4757 arctangent,hypercos,hypersine): Remove prototypes.
4758 (arctangent2): Update prototype from GMP to MPFR.
4759 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4760 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4761 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4762 * gfortran.h (GFC_REAL_BITS): Remove.
4763 (arith): Add ARITH_NAN.
4764 Include mpfr.h. Define GFC_RND_MODE.
4765 Rename GCC_GFORTRAN_H GFC_GFC_H.
4766 (gfc_expr): Convert GMP to MPFR.
4767 * module.c: Add arith.h, correct type in comment.
4768 (mio_gmp_real): Convert GMP to MPFR.
4769 (mio_expr): Use gfc_set_model_kind().
4770 * primary.c: Update copyright date with 2004.
4771 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4772 * simplify.c: Remove global GMP variables
4773 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4774 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4775 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4776 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4777 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4778 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4779 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4780 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4781 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4782 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4783 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4784 gfc_simplify_rrspacing,gfc_simplify_scale,
4785 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4786 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4787 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4788 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4790 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4791 gfc_conv_mpf_to_tree. Convert it to use MPFR
4792 (gfc_conv_constant_to_tree): Use it.
4793 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4794 * trans-intrinsic.c: Add arith.h, remove gmp.h
4795 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4797 2004-08-06 Victor Leikehman <lei@il.ibm.com>
4798 Paul Brook <paul@codesourcery.com>
4800 * trans-array.c (gfc_trans_allocate_array_storage,
4801 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4802 gfc_conv_loop_setup): For functions, if the shape of the result
4803 is not known in compile-time, generate an empty array descriptor for
4804 the result and let the callee to allocate the memory.
4805 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4806 (gfc_conv_expr_descriptor): Use function return values directly.
4807 * trans-expr.c (gfc_conv_function_call): Always add byref call
4809 (gfc_trans_pointer_assignment): Add comments.
4810 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4812 2004-08-01 Roger Sayle <roger@eyesopen.com>
4814 * options.c (gfc_init_options): Don't warn about the use GNU
4815 extensions by default.
4816 (gfc_post_options): Warn about GNU extensions with -pedantic.
4817 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4819 2004-07-30 Richard Henderson <rth@redhat.com>
4821 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4824 2004-07-25 Richard Henderson <rth@redhat.com>
4826 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4827 and DECL_IGNORED_P on RESULT_DECL.
4828 (gfc_generate_constructors): Likewise.
4830 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4833 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4835 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4836 * options.c (gfc_handle_options): Deal with changed options.
4837 * scanner.c (load_line): Change second arg to 'char **',
4838 allocate if pointing to NULL. Keep track of buffer's length.
4839 Adapt buffer size to overlong lines. Pad lines to full length
4841 (load_file): Adapt to new interface of load_line.
4843 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4845 * trans.h (builtin_function): Declare.
4847 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4850 (parts ported from g95)
4851 * parse.h (gfc_state_data): New field do_variable.
4852 (gfc_check_do_variable): Add prototype.
4853 * parse.c (push_state): Initialize field 'do_variable'.
4854 (gfc_check_do_variable): New function.
4855 (parse_do_block): Remember do iterator variable.
4856 (parse_file): Initialize field 'do_variable'.
4857 * match.c (gfc_match_assignment, gfc_match_do,
4858 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4859 Add previously missing checks.
4860 (gfc_match_return): Reformat error message.
4861 * io.c (match_out_tag): New function.
4862 (match_open_element, match_close_element,
4863 match_file_element, match_dt_element): Call match_out_tag
4864 instead of match_vtag where appropriate.
4865 (match_io_iterator, match_io_element): Add missing check.
4866 (match_io): Reformat error message.
4867 (match_inquire_element): Call match_out_tag where appropriate.
4869 * parse.c (gfc_check_do_variable): Fix error locus.
4871 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4874 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4875 for every assumed length character dummy argument.
4878 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4881 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4883 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4886 * trans-array.c gfc_trans_g77_array,
4887 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4888 for assumed length characters.
4889 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4890 with a character expression.
4891 (gfc_cvonv_array_parameter): Pass string length when passing
4892 character array according to g77 conventions.
4894 2004-07-12 Paul Brook <paul@codesourcery.com>
4896 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4897 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4898 initialization code.
4899 * trans-common.c (create_common): Use gfc_conv_initializer.
4900 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4901 * trans-expr.c (gfc_conv_initializer): New function.
4902 (gfc_conv_structure): Use it.
4903 * trans.h (gfc_conv_initializer): Add prototype.
4905 2004-07-11 Paul Brook <paul@codesourcery.com>
4908 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4910 (parse_contained): Mark contained symbols as referenced.
4912 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4915 * module.c (gfc_dump_module, gfc_use_module): Print locus
4916 when opening of module file fails.
4919 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4922 * match.c (gfc_match_program): A program name is obligatory.
4923 (gfc_match_return): RETURN in main program is an extension.
4924 (gfc_match_block_data): A space is required before a block data
4928 * primary.c (match_boz_constant): Call gfc_notify_std only if
4929 we actually have a non-standard boz-literal-constant.
4932 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4933 warning if assigning NULL().
4935 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4937 * f95-lang.c (set_block): Remove.
4938 (gfc_clear_binding_stack): New.
4939 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4940 (struct binding_level): Remove block_created_by_back_end.
4941 (clear_binding_level): Likewise.
4942 (poplevel): Don't handle block_created_by_back_end.
4944 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4946 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4947 symbol is in common, because we ...
4948 (gfc_generate_module_vars): Call gfc_trans_common.
4950 2004-07-10 Paul Brook <paul@codesourcery.com>
4952 * trans-array.c (gfc_build_null_descriptor): New function.
4953 (gfc_trans_static_array_pointer): Use it.
4954 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4955 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4957 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4960 * decl.c (gfc_match_save): Use-associated common block
4962 * gfortran.h (gfc_common_head): Add new field 'name'.
4963 Fix typo in comment after #endif.
4964 * match.c (gfc_get_common): Add new argument from_common,
4965 mangle name if flag is set, fill in new field in structure
4967 (match_common): Set new arg in call to gfc_get_common,
4968 use-associated common block doesn't collide.
4969 * match.h (gfc_get_common): Adapt prototype.
4970 * module.c (load_commons): Set new arg in call to
4972 * symbol.c (free_common_tree): New function.
4973 (gfc_free_namespace): Call new function.
4974 * trans-common.c (several functions): Remove argument
4975 'name', use name from gfc_common_head instead.
4977 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4979 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4980 and RHS match. Return early if the RHS is NULL().
4983 * match.c (match_common): Fix error reporting for used common.
4986 * trans-expr.c (gfc_conv_structure): Handle initialization
4987 of scalar pointer components.
4989 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4991 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4992 by fix for PR 15481.
4994 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4996 * trans-common.c: Fix whitespace issues, make variable names
4998 (create_common): Additionally, make loop logic more obvious.
5000 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5001 Paul Brook <paul@codesourcery.com>
5004 * trans-common.c (calculate_length): Remove ...
5005 (get_segment_info): Merge into here. Save field type.
5006 (build_field): Use saved type.
5007 (create_common, new_condition, new_segment, finish_equivalences):
5008 Use new get_segment_info.
5009 * trans-types.c: Update comment.
5011 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5014 * moduele.c (mio_symbol): Don't I/O initial values unless
5015 symbol is a parameter.
5017 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5020 * resolve.c (resolve_symbol): Verify that the shape of a
5021 parameter array is not only explicit, but also constant.
5022 * array.c (gfc_is_compile_time_shape): New function.
5023 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
5025 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5031 * module.c (write_symbol, write_symtree): Remove workaround.
5032 * primary.c (match_actual_arglist): Enhance comment.
5033 (gfc_match_rvalue): Handle function call with first argument
5034 a keyword argument correctly.
5035 * resolve.c (resolve_symbol): Change call to
5036 gfc_set_default_type to issue error if no implicit type
5038 * trans-decl.c (gfc_create_module_variable): Remove workaround.
5040 2004-07-08 Paul Brook <paul@codesourcery.com>
5042 * intrinsic.c (add_sym_4s): New function.
5043 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
5045 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
5046 Paul Brook <paul@codesourcery.com>
5050 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
5051 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
5052 * intrinsic.c (add_functions): Identify iargc. Add
5053 command_argument_count.
5054 (add_subroutines): Resolve getarg. Add get_command and
5055 get_command_argument.
5056 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
5057 gfc_resolve_get_command_argument): Add prototypes.
5058 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
5059 gfc_resolve_get_command_argument): New functions.
5060 * trans-decl.c (gfor_fndecl_iargc): New variable.
5061 (gfc_build_intrinsic_function_decls): Set it.
5062 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
5063 (gfc_conv_intrinsic_function): Use it.
5064 * trans.h (gfor_fndecl_iargc): Declare.
5066 2004-07-04 Matthias Klose <doko@debian.org>
5068 * Make-lang.in: Generate and install gfortran man page.
5069 * invoke.texi: Remove extra '@c man end'.
5071 2004-07-04 Richard Henderson <rth@redhat.com>
5073 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
5075 2004-07-04 Paul Brook <paul@codesourcery.com>
5077 * decl.c (gfc_match_implicit_range): Don't use typespec.
5078 (gfc_match_implicit): Handle character selectors.
5079 * gfortran.h (gfc_set_implicit): Remove prototype.
5080 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
5081 * parse.c (accept_statement): Don't call gfc_set_implicit.
5082 * symbol.c (new_ts): Remove.
5083 (gfc_set_implicit_none): Use same loop bounds as other functions.
5084 (gfc_set_implicit): Remove.
5085 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
5086 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
5088 2004-06-30 Richard Henderson <rth@redhat.com>
5090 * match.c (var_element): Remove unused variable.
5092 * trans-decl.c (gfc_generate_function_code): Don't set
5093 x_whole_function_mode_p.
5094 (gfc_generate_constructors): Likewise.
5096 2004-06-30 Richard Henderson <rth@redhat.com>
5098 * trans-decl.c (gfc_generate_function_code): Don't set
5099 immediate_size_expand.
5100 (gfc_generate_constructors): Likewise.
5102 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5105 * decl.c (gfc_match_type_spec): Rename second argument to
5106 'implicit_flag', reverse meaning. Don't match_char_spec if
5107 'implicit_flag' is set. Rename to ...
5108 (match_type_spec): ... this.
5109 (gfc_match_implicit_none, match_implicit_range): Move here
5111 (gfc_match_implicit): Move here from match.c, try to
5112 match_char_len if match_implicit_range doesn't succeed for
5113 CHARACTER implicits. Call renamed fucntion match_type_spec.
5114 (gfc_match_data_decl, match_prefix): Call renamed function
5116 * match.c (gfc_match_implicit_none, match_implicit_range,
5117 gfc_match_implicit): Move to decl.c.
5118 * match.h (gfc_match_implicit_none, gfc_match_implicit):
5119 Move protoypes to section 'decl.c'.
5120 (gfc_match_type_spec): Remove prototype.
5122 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5124 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
5127 2004-06-29 Steven Bosscher <stevenb@suse.de>
5129 Make sure types in assignments are compatible. Mostly mechanical.
5130 * trans-const.h (gfc_index_one_node): New define.
5131 * trans-array.c (gfc_trans_allocate_array_storage,
5132 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
5133 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
5134 gfc_conv_array_ubound, gfc_conv_array_ref,
5135 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
5136 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
5137 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
5138 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
5139 types in assignments, conversions and conditionals for expressions.
5140 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
5141 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
5142 gfc_conv_function_call, gfc_trans_pointer_assignment,
5143 gfc_trans_scalar_assign): Likewise.
5144 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
5145 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
5146 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
5147 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
5148 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
5149 gfc_conv_allocated, gfc_conv_associated,
5150 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
5151 * trans-io.c (set_string): Likewise.
5152 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
5153 gfc_do_allocate, generate_loop_for_temp_to_lhs,
5154 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
5155 compute_overall_iter_number, gfc_trans_assign_need_temp,
5156 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
5157 gfc_evaluate_where_mask, gfc_trans_where_assign,
5158 gfc_trans_where_2): Likewise.
5159 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
5160 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
5162 * trans.c (gfc_add_modify_expr): Add sanity check that types
5163 for the lhs and rhs are the same for scalar assignments.
5165 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5167 * dump-parse-tree.c (show_common): New function.
5168 (gfc_show_namespace): Show commons.
5170 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5171 Andrew Vaught <andyv@firstinter.net>
5175 * decl.c (gfc_match_save): Adapt to new common structures,
5176 don't allow saving USE-associated common.
5177 * dump-parse-tree (gfc_show_attr): (saved_)common are not
5178 symbol attributes any longer.
5179 (gfc_show_symbol): Don't show old-style commons any longer.
5180 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
5182 * gfortran.h (symbol_attribute): Remove common and saved_common
5184 (gfc_symbol): Remove common_head element.
5185 (gfc_common_head): New struct.
5186 (gfc_get_common_head): New macro.
5187 (gfc_symtree): Add field 'common' to union.
5188 (gfc_namespace): Add field 'common_root'; change type of field
5189 'blank_common' to blank_common.
5190 (gfc_add_data): New prototype.
5191 (gfc_traverse_symtree): Expect a symtree as first argument
5192 instead of namespace.
5193 * match.c (gfc_get_common): New function.
5194 (match_common_name): Change to take char * as argument, adapt,
5195 fix bug with empty name.
5196 (gfc_match_common): Adapt to new data structures. Disallow
5197 redeclaration of USE-associated COMMON-block. Fix bug with
5199 (var_element): Adapt to new common structures.
5200 * match.h (gfc_get_common): Declare.
5201 * module.c: Add 2004 to copyright years, add commons to module
5202 file layout description.
5203 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
5204 for removed attributes.
5205 (mio_symbol): Adapt to new way of storing common relations.
5206 (load_commons): New function.
5207 (read_module): Skip common list on first pass, load_commons at
5209 (write_commons): New function.
5210 (write_module): Call write_commons().
5211 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
5212 functions related to removed attributes.
5213 (gfc_add_data): New function.
5214 (gfc_clear_attr): Don't set removed attributes.
5215 (gfc_copy_attr): Don't copy removed attributes.
5216 (traverse_symtree): Remove.
5217 (gfc_traverse_symtree): Don't traverse symbol
5218 tree of the passed namespace, but require a symtree to be passed
5219 instead. Unify with traverse_symtree.
5220 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
5222 (save_symbol): Remove setting of removed attribute.
5223 * trans-common.c (gfc_sym_mangled_common_id): Change to
5224 take 'char *' argument instead of 'gfc_symbol'.
5225 (build_common_decl, new_segment, translate_common): Adapt to new
5226 data structures, add new
5228 (create_common): Adapt to new data structures, add new
5229 argument name. Fix typo in intialization of derived types.
5230 (finish_equivalences): Add second argument in call to
5232 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
5233 (gfc_trans_common): Adapt to new data structures.
5234 * trans-decl.c (gfc_create_module_variables): Remove test for
5237 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5239 * io.c: Add 2004 to copyright years.
5241 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5242 Andrew Vaught <andyv@firstinter.net>
5244 * gfortran.h (gfc_gsymbol): New typedef.
5245 (gfc_gsym_root): New variable.
5246 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
5247 * parse.c (global_used): New function.
5248 (parse_block_data): Check for double empty BLOCK DATA,
5249 use global symbol table.
5250 (parse_module): Use global symbol table.
5251 (add_global_procedure, add_global_program): New functions.
5252 (gfc_parse_file): Use global symbol table.
5253 * symbol.c (gfc_gsym_root): New variable.
5254 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
5257 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5259 * module.c (mio_gmp_real): Correct writing of negative numbers.
5261 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5264 * expr.c (check_intrinsic_op): Allow comparison of characters.
5267 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5268 Andrew Vaught <andyv@firstinter.net>
5270 * decl.c (contained_procedure): New function.
5271 (match_end): Verify correctness of END STATEMENT in
5274 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5275 Andrew Vaught <andyv@firstinter.net>
5278 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
5279 (decode_statement): Enforce required space in free-form.
5281 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5283 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
5284 * trans-array.c (gfc_conv_descriptor_data): Add operand
5286 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
5287 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
5288 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
5289 * trans-common.c (create_common): Likewise.
5290 * trans-expr.c (gfc_conv_component_ref): Likewise.
5291 * trans-io.c (set_parameter_value): Likewise.
5292 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
5293 (transfer_expr): Likewise.
5294 * trans-decl.c (gfc_trans_auto_character_variable):
5295 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
5296 (gfc_gimplify_function): New function.
5297 (gfc_generate_function-code): Properly handle nested functions.
5298 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
5300 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
5303 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
5304 (gfc_resolve_inquire): Resolve the iolength tag. Return
5305 SUCCESS at end of function if no failure has occured.
5306 * resolve.c (resolve_code): Resolve if iolength is encountered.
5307 * trans-io.c: (ioparm_iolength, iocall_iolength,
5308 iocall_iolength_done): New variables.
5309 (last_dt): Add IOLENGTH.
5310 (gfc_build_io_library_fndecls ): Set iolength related variables.
5311 (gfc_trans_iolength): Implement.
5312 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
5314 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
5317 * scanner.c (load_line): Don't truncate preprocessor lines.
5318 Reformat error message.
5319 (preprocessor_line): Issue warning in case of malformed
5322 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5324 * resolve.c (resolve_symbol): Add comment in function body.
5325 (check_data_variable): Change type of mark to ar_type, adapt code
5328 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5330 * array.c (gfc_insert_constructor): Avoid redundant call to
5331 mpz_comp. Add 2004 to copyright years.
5333 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5335 * trans.h (stmtblock_t): Change has_scope to unsigned int.
5337 2004-06-20 Steven G. Kargl <kargls@comcast.net>
5339 * arith.c (gfc_range_check): correct complex underflow.
5341 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5344 * match.c (match_case_selector): Call gfc_match_init_expr
5345 instead of gfc_match_expr.
5346 * resolve.c (validate_case_label_expr): No need to check for
5347 constant, since it wouldn't have been matched with the fix to
5350 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5353 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
5356 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5359 * trans-deecl.c (generate_local_decl): Do not issue warning for
5360 unused variables if they're use associated.
5362 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5363 Andrew Vaught <andyv@firstinter.net>
5366 * gfortran.h (gfc_check_f): Add new field f3ml.
5367 * check.c (gfc_check_minloc_maxloc): Take argument list instead
5368 of individual arguments, reorder if necessary.
5369 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
5370 * intrinsic.c (add_sym_3ml): New function.
5371 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
5372 (check_specific): Catch special case MINLOC, MAXLOC.
5374 2004-06-14 Paul Brook <paul@codesourcery.com>
5376 * intrinsic.c (add_sym_2s): Use correct function types.
5378 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5380 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
5381 * data.c (gfc_get_section_index): Remove dependency on trans.h.
5383 2004-06-12 Steven G. Kargl <kargls@comcast.net>
5385 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
5386 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
5387 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
5388 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
5389 * trans-intrinsic.c: Use symbols.
5390 * intrinsic.c (add_sym_2s): New function.
5391 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
5392 * intrinsic.h: Function prototypes.
5393 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
5394 gfc_resolve_srand): New functions.
5396 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5399 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
5400 contained procedure.
5402 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5405 * interface.c (compare_parameter, compare_actual_formal): Don't
5406 check types and array shapes for NULL()
5407 * trans-expr.c (conv_function_call): No double indirection for
5410 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
5412 * trans-expr.c (gfc_conv_cst_int_power): Compute
5413 x**(-n) by converting it to (1/x)**n instead of
5416 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5419 * module.c (write_symbol, write_symtree): Don't write symbols
5420 wrongly added to namespace.
5421 * trans-decl.c (gfc_create_module_variable): Don't create a
5422 backend decl for a symbol incorrectly added to namespace.
5424 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5427 * resolve.c (resolve_symbol): Verify that parameter array has an
5428 explicit shape. Fix typos and coding style issues in surrounding
5431 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5434 * gfortran.texi: The documentation doesn't contain infomration on
5435 how to report bugs, and shouldn't, so remove the line which
5438 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5440 * intrinsic.c (sort_actual): Keep track of type of missing
5441 arguments. (Missing from previous commit.)
5443 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5445 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
5446 * interface.c (compare_actual_formal): Keep type of omitted
5448 * trans-expr.c (gfc_conv_function_call): Add string length
5449 argument for omitted string argument.
5451 2004-06-03 Paul Brook <paul@codesourcery.com>
5453 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
5454 lists instead of compound expr chains.
5455 (gfc_trans_code): Annotate statement lists.
5457 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5459 * trans-array.c: Fix spelling in comments.
5461 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5464 * data.c (assign_substring_data_value): New function.
5465 (gfc_assign_data_value): Call the new function if we're dealing
5466 with a substring LHS.
5468 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5471 * gfortran.h (GFC_VERSION): Remove.
5472 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
5475 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5477 * trans-types.c: Fix spelling & layout in comments.
5479 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5482 * trans-const.c (gfc_conv_string_init): Allow variable string
5483 length lower than initialization string length.
5485 2004-05-30 Paul Brook <paul@codesourcery.com>
5488 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
5489 * trans-expr.c (gfc_trans_string_copy): New function.
5490 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
5492 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
5493 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
5494 * trans.h (struct gfc_saved_var): Define.
5495 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
5497 2004-05-30 Steven G. Kargl <kargls@comcast.net>
5499 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
5501 2004-05-29 Steven G. Kargl <kargls@comcast.net>
5503 * simplify.c (gfc_simplify_log): Remove useless line of code.
5505 2004-05-29 Paul Brook <paul@codesourcery.com>
5507 * trans-common.c (find_equivalence): Find multiple rules.
5509 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5511 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
5512 (gfc_current_locus): Declare new global variable.
5513 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
5514 (gfc_current_locus1): Rename ...
5515 (gfc_current_locus): ... to this.
5516 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
5517 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
5518 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
5519 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
5520 and gfc_current_locus(), respectively.
5521 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
5522 match_array_cons_element, gfc_match_array_constructor):
5523 Read/modify gfc_current_locus instead of calling gfc_set_locus()
5524 and gfc_current_locus().
5525 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
5526 match_attr_spec, gfc_match_function_decl, gfc_match_end,
5527 attr_decl1, gfc_match_save): Likewise.
5528 * error.c (error_print, gfc_internal_error): Likewise.
5529 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
5530 * interface.c (gfc_add_interface): Likewise.
5531 * io.c (gfc_match_format, match_dt_format, match_dt_element,
5532 match_io_iterator, match_io): Likewise.
5533 * match.c (gfc_match_space, gfc_match_eos,
5534 gfc_match_small_literal_int, gfc_match_st_label,
5535 gfc_match_strings, gfc_match_name, gfc_match_iterator,
5536 gfc_match_char, gfc_match, gfc_match_assignment,
5537 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
5538 gfc_match_nullify, gfc_match_call, match_implicit_range,
5539 gfc_match_implicit, gfc_match_data, match_case_selector,
5540 gfc_match_case, match_forall_iterator): Likewise.
5541 * matchexp.c (gfc_match_defined_op_name, next_operator,
5542 match_level_1, match_mult_operand, match_ext_mult_operand,
5543 match_add_operand, match_ext_add_operand, match_level_2,
5544 match_level_3, match_level_4, match_and_operand, match_or_operand,
5545 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
5546 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
5547 * parse.c (match_word, decode_statement, next_free, next_fixed,
5548 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
5550 * primary.c (match_digits, match_integer_constant,
5551 match_boz_constant, match_real_constant, match_substring,
5552 next_string_char, match_charkind_name, match_string_constant,
5553 match_logical_constant, match_const_complex_part,
5554 match_complex_constant, match_actual_arg, match_keyword_arg,
5555 gfc_match_actual_arglist, gfc_match_structure_constructor,
5556 gfc_match_rvalue, gfc_match_variable): Likewise.
5557 * st.c (gfc_get_code): Likewise.
5558 * symbol.c (check_conflict, check_used, check_done,
5559 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
5560 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
5561 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
5563 2004-05-26 Roger Sayle <roger@eyesopen.com>
5565 * io.c (format_asterisk): Silence compiler warnings by correcting
5566 the number of elements of a "locus" initializer.
5568 2004-05-25 Roger Sayle <roger@eyesopen.com>
5571 * matchexp.c: Allow unary operators after arithmetic operators
5573 (match_ext_mult_operand, match_ext_add_operand): New functions.
5574 (match_mult_operand): Tweak to call match_ext_mult_operand.
5575 (match_add_operand): Tweak to call match_ext_mult_operand.
5576 (match_level_2): Rearrange to call match_ext_add_operand.
5578 2004-05-25 Paul Brook <paul@codesourcery.com>
5580 * expr.c (check_inquiry): Remove bogus tests.
5582 2004-05-23 Paul Brook <paul@codesourcery.com>
5585 * expr.c (restricted_args): Remove redundant checks/argument.
5586 (external_spec_function): Update to match.
5587 (restricted_intrinsic): Rewrite.
5589 2004-05-23 Paul Brook <paul@codesourcery.com>
5590 Victor Leikehman <lei@haifasphere.co.il>
5592 * gfortran.h (struct gfc_symbol): Add equiv_built.
5593 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
5595 (current_length): Remove.
5596 (add_segments): New function.
5597 (build_equiv_decl): Create initialized common blocks.
5598 (build_common_decl): Always add decl to bindings.
5599 (create_common): Create initializers.
5600 (find_segment_info): Reformat to match coding conventions.
5601 (new_condition): Use add_segments.
5602 (add_condition, find_equivalence, add_equivalences): Move iteration
5603 inside functions. Only process each segment once.
5604 (new_segment, finish_equivalences, translate_common): Simplify.
5606 2004-05-23 Steven G. Kargl <kargls@comcast.net>
5608 * check.c (gfc_check_random_seed): Issue for too many arguments.
5610 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5612 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
5614 2004-05-22 Paul Brook <paul@codesourcery.com>
5616 * dump-parse-tree.c (gfc_show_equiv): New function.
5617 (gfc_show_namespace): Use it.
5619 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
5622 * symbol.c (gfc_add_common): Disable checks to work around other more
5623 fundamental inadequacies.
5625 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5627 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
5629 (gfc_build_function_decl): Likewise.
5631 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5633 * check.c (gfc_check_system_clock): New function.
5634 * intrinsic.c (add_sym_3s): New function.
5635 (add_subroutines): Use it.
5636 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
5638 * iresolve.c (gfc_resolve_system_clock): New function.
5640 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5642 * invoke.texi: Document -Wunderflow and spell check.
5643 * lang.opt: Add Wunderflow.
5644 * gfortran.h (gfc_option_t): Add warn_underflow option.
5645 * options.c (gfc_init_options, set_Wall): Use it.
5646 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
5647 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
5648 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
5649 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
5650 * arith.c (common_logarithm): Fix typo in comment.
5652 2004-05-21 Roger Sayle <roger@eyesopen.com>
5654 * io.c (check_format): As a GNU extension, allow the comma after a
5655 string literal to be optional in a format. Use gfc_notify_std to
5656 issue an error/warning as appropriate.
5658 2004-05-21 Roger Sayle <roger@eyesopen.com>
5660 * io.c (check_format): Use gfc_notify_std to determine whether to
5661 issue an error/warning for omitting the digits from the X format.
5663 2004-05-20 Roger Sayle <roger@eyesopen.com>
5665 * io.c (check_format): Allow the number before the X format to
5666 be optional when not -pedantic.
5668 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5669 Paul Brook <paul@codesourcery.com>
5671 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5672 Create decls for __builtin_pow{,f}.
5673 * gfortran.h (PREFIX_LEN): Define.
5674 * trans-decl.c (gfor_fndecl_math_powi): Add.
5675 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5676 (gfc_build_intrinsic_function_decls): Create decls for powi.
5677 * trans-expr.c (powi_table): Add.
5678 (gfc_conv_integer_power): Remove.
5679 (gfc_conv_powi): New function.
5680 (gfc_conv_cst_int_power): New function.
5681 (gfc_conv_power_op): Use new powi routines.
5682 * trans.h (struct gfc_powdecl_list): Add.
5683 (gfor_fndecl_math_powi): Add.
5684 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5686 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5688 * trans.c, trans-decl.c: Fix comment typos.
5690 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5692 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5694 2004-05-18 Steve Kargl <kargls@comcast.net>
5696 * arith.c (gfc_int2complex): Fix incorrect range checking.
5698 2004-05-18 Paul Brook <paul@codesourcery.com>
5701 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5702 (default_initializer): Move to expr.c.
5703 (variable_decl): Don't assign default initializer to variables.
5704 * expr.c (gfc_default_initializer): Move to here.
5705 * gfortran.h (gfc_default_initializer): Add prototype.
5706 * resolve.c (resolve_symbol): Check for illegal initializers.
5707 Assign default initializer.
5709 2004-05-17 Steve Kargl <kargls@comcast.net>
5711 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5713 2004-05-17 Steve Kargl <kargls@comcast.net>
5715 * arith.c (gfc_real2complex): Range checking wrong part of complex
5718 2004-05-16 Paul Brook <paul@codesourcery.com>
5720 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5722 2004-05-16 Paul Brook <paul@codesourcery.com>
5724 * arith.c (gfc_range_check): Fix logic error.
5726 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5728 * arith.c: Fix comment typos.
5730 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5733 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5734 not initialized in a disallowed fashion.
5735 * match.c (gfc_match_common): Likewise.
5736 (var_element): Verify that variable is not in the blank COMMON,
5737 if it is in a common.
5739 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5741 * Make-lang.in (f95.generated-manpages): Remove.
5742 (f95.srcextra): New.
5743 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5744 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5747 (f95.install-info): Remove.
5748 (install-info): New.
5750 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5752 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5754 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5756 * primary.c (match_boz_constant): Use gfc_notify_std() for
5757 issuing a warning or an error.
5759 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5762 * primary.c (match_structure_constructor): Rename ...
5763 (gfc_match_structure_constructor): ... to this. Make non-static.
5764 (gfc_match_rvalue): Call renamed function.
5765 * match.h (gfc_match_structure_constructor): Declare.
5766 * match.c (gfc_match_data_constant): Handle structure
5769 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5773 * gfortran.h (gfc_linebuf): New typedef.
5775 (gfc_file): Revamped, use new gfc_linebuf.
5776 (locus): Revamped, use new types.
5777 (gfc_current_file): Remove.
5778 (gfc_current_form, gfc_source_file): New global variables.
5779 * match.c (gfc_match_space, gfc_match_strings): Use
5780 gfc_current_form to find source form.
5781 * module.c (gfc_dump_module): Use gfc_source_file when printing
5783 * error.c (show_locus, show_loci) Use new data structures to print
5785 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
5787 (file_head, current_file, gfc_current_form, line_head, line_tail,
5788 gfc_current_locus1, gfc_source_file): New global variables.
5789 (gfc_scanner_init1): Set new global variables.
5790 (gfc_scanner_done1): Free new data structures.
5791 (gfc_current_locus): Return pointer to gfc_current_locus1.
5792 (gfc_set_locus): Set gfc_current_locus1.
5793 (gfc_at_eof): Set new variables.
5794 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
5795 to new locus structure.
5796 (gfc_check_include): Remove.
5797 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
5798 (gfc_skip_comments): Use gfc_current_form, find locus with
5800 (gfc_next_char): Use gfc_current_form.
5801 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
5802 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
5804 (get_file): New function.
5805 (preprocessor_line, include_line): New functions.
5806 (load_file): Move down, rewrite to match new data structures.
5807 (gfc_new_file): Rewrite to match new data structures.
5808 * parse.c (next_statement): Remove code which is now useless. Use
5809 gfc_source_form and gfc_source_file where appropriate.
5810 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
5811 when determining locus of frontend code.
5812 * trans-io.c (set_error_locus): Same.
5813 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
5814 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
5816 (all): Add missing initializers.
5818 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5820 * Make-lang.in (trans-common.o): Remove redundant dependency.
5821 (data.c): Replace object file name ...
5822 (data.o): ... by the correct one.
5824 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5826 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
5827 for ranges when dumping array references.
5829 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
5831 * decl.c (variable_decl): Always apply default initializer.
5833 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5836 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
5837 handle zero correctly.
5839 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5841 * match.c (gfc_match): Eliminate dead code.
5843 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5845 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
5846 Detect bad continuation line in fixed form sources.
5848 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5851 * iresolve.c (gfc_resolve_nearest): Add new function.
5852 * intrinsic.h: ... declare it here.
5853 * intrinsic.c (add_functions): ... add it as resolving function
5856 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5859 * match.c (gfc_match_do): Allow infinite loops with
5860 label-do-stmt. Do not enforce space after comma.
5862 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5865 * parse.c (parse_interface): Allow empty INTERFACE, remove
5868 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5870 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5871 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5872 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5873 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5874 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5875 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5876 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5877 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5878 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5879 trans-types.h, trans.c, trans.h: Update copyright years and
5881 * data.c: Likewise, also removed two whitespace-only lines.
5882 * gfortranspec.c, lang.opt: Update copyright years.
5884 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5887 * trans-decl.c (generate_local_decl): Don't warn for unused
5888 variables which are in common blocks.
5890 2004-05-13 Diego Novillo <dnovillo@redhat.com>
5892 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5893 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5894 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5896 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
5899 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5901 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
5903 * gfortran.texi: Use @table @emph instead of @itemize @emph.
5904 Remove "set DEVELOPMENT".
5905 (Compiling GFORTRAN): Remove.
5907 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5909 * array.c (match_subscript, match_array_ref): Add comments
5910 explaining argument 'init'.
5911 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5912 trans-expr.c, trans.c: Fix some typos in comments.
5913 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5914 * primary.c (match_digits, match_integer_constant): Add comment
5915 explaining signflag.
5917 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5920 * primary.c: Include system.h and flags.h, needed for pedantic.
5921 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5924 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5927 * match.c (match_data_constant): Handle case where
5928 gfc_find_symbol sets sym to NULL
5930 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5932 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5933 dependency on mathbuiltins.def
5935 2004-04-24 Victor Leikehman <lei@il.ibm.com>
5937 * trans-io.c (transfer_expr): Implemented recursive printing
5940 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
5942 * gfortranspec.c: Do not include multilib.h.
5944 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5946 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5947 2004 to copyright years.
5948 * trans-expr.c, trans-decl.c: Comment update, we now generate
5949 GENERIC, not SIMPLE. Add 2004 to copyright years.
5951 2004-04-24 Paul Brook <paul@codesourcery.com>
5953 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5955 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
5958 * arith.c (gfc_arith_divide): Fix complex divide.
5960 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
5962 * gfortranspec.c: Include the target headers.
5964 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
5968 * arith.c (arctangent2): New function.
5969 * arith.h (arctangent2): Add function prototype.
5970 * simplify.c (gfc_simplify_atan2): Use it.
5971 (gfc_simplify_log): Use it.
5973 2004-04-12 Diego Novillo <dnovillo@redhat.com>
5975 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5976 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5978 2004-04-11 Bud Davis <bdavis9659@comcast.net>
5981 * trans-io.c (build_dt): Change REC to value.
5983 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5986 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5987 the real value when converting mpf to string.
5989 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5992 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5995 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
5998 * simplify.c (simplify_min_max): Convert the type of the result.
6000 2004-04-11 Paul Brook <paul@codesourcery.com>
6002 * gfortran.texi: Use full target triplet.
6004 2004-04-11 Paul Brook <paul@codesourcery.com>
6006 * Make-lang.in (GFORTRAN_TEXI): Set it.
6007 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
6008 (fortran/gfortran.info): Ditto.
6009 * gfortran.texi: Major update.
6010 * invoke.texi: New file.
6012 2004-04-10 Paul Brook <paul@codesourcery.com>
6014 * trans-array.c (gfc_trans_allocate_temp_array,
6015 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
6016 * trans-decl.c (gfc_build_dummy_array_decl,
6017 gfc_get_symbol_decl, gfc_build_function_decl,
6018 gfc_create_module_variable): Ditto.
6019 * trans-expr.c (gfc_conv_variable): Ditto.
6020 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
6021 * trans.h (GFC_DECL_STRING): Remove.
6022 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
6023 GFC_DECL_ASSIGN): Renumber flags.
6025 2004-04-05 Paul Brook <paul@codesourcery.com>
6029 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
6031 * gfortran.h (struct gfc_charlen): Add backend_decl.
6032 * trans-array.c (gfc_trans_allocate_temp_array,
6033 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
6034 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
6035 Remove old, broken string handling.
6036 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
6037 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
6038 gfc_trans_deferred_array): Handle character arrays.
6039 * trans-const.c (gfc_conv_const_charlen): New function.
6040 * trans-const.h (gfc_conv_const_charlen): Add prototype.
6041 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
6043 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
6044 (gfc_create_string_length): New function.
6045 (gfc_get_symbol_decl): Create lengths for character variables.
6046 (gfc_get_fake_result_decl): Ditto.
6047 (gfc_build_function_decl): Only set length for assumed length
6048 character arguments.
6049 (gfc_trans_dummy_character): New function.
6050 (gfc_trans_auto_character_variable): Rewrite.
6051 (gfc_trans_deferred_vars): Handle more types of character variable.
6052 (gfc_create_module_variable): String lengths have moved.
6053 (gfc_generate_function_code): Initialize deferred var chain earlier.
6054 * trans-expr.c (gfc_conv_init_string_length): Rename ...
6055 (gfc_trans_init_string_length): ... to this.
6056 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
6057 gfc_conv_function_call): Update to new format for character variables.
6058 (gfc_conv_string_length): Remove.
6059 (gfc_conv_string_parameter): Update assertion.
6060 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
6061 * trans-io.c (set_string): Use new macro names.
6062 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
6063 * trans-types.c (gfc_get_character_type): Use existing length expr.
6064 (gfc_is_nodesc_array): Make public.
6065 (gfc_get_dtype_cst): Rename ...
6066 (gfc_get_dtype): ... to this. Handle unknown size arrays.
6067 (gfc_get_nodesc_array_type): Use new name.
6068 (gfc_sym_type): New character variable code.
6069 (gfc_get_derived_type): Ditto.
6070 (gfc_get_function_type): Evaluate character variable lengths.
6071 * trans-types.h (gfc_strlen_kind): Define.
6072 (gfc_is_nodesc_array): Add prototype.
6073 * trans.h: Update prototypes.
6074 (struct lang_type): Update comments.
6075 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
6076 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
6078 2004-04-04 Paul Brook <paul@codesourcery.com>
6080 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
6081 * options.c (gfc_init.options, gfc_handle_option): Ditto.
6082 * trans-expr.c (gfc_conv_function_call): Ditto.
6083 * trans-types.c (gfc_is_nodesc_array): Ditto
6084 * lang.opt (fg77-calls): Remove.
6086 2004-04-04 Paul Brook <paul@codesourcery.com>
6088 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
6089 (gfc_conv_descriptor_base): Rename ...
6090 (gfc_conv_descriptor_offset): ... to this.
6091 (gfc_trans_allocate_array_storage): Set offset to zero.
6092 (gfc_conv_array_base): Rename ...
6093 (gfc_conv_array_offset): ... to this.
6094 (gfc_conv_array_index_ref): Add offset parameter.
6095 (gfc_conv_array_ref): Include offset.
6096 (gfc_trans_preloop_setup): Use existing offset.
6097 (gfc_trans_allocate_temp_array, gfc_array_allocate,
6098 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
6099 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
6100 gfc_conf_ss_descriptor): Set offset.
6101 * trans-array.h: Rename prototypes.
6102 * trans-const.h (gfc_index_zero_node): Define.
6103 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
6104 * trans-types.c (gfc_get_array_type_bounds): Ditto.
6105 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
6107 2004-03-25 Diego Novillo <dnovillo@redhat.com>
6109 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
6111 2004-03-24 Bud Davis <bdavis9659@comcast.net>
6114 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
6115 before conversion by gmp library call.
6117 2004-03-24 Bud Davis <bdavis9659@comcast.net>
6120 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
6122 2004-02-24 Richard Henderson <rth@redhat.com>
6124 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
6126 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
6128 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
6129 (fortran/gfortran.info): ... to here.
6132 2004-02-16 Richard Henderson <rth@redhat.com>
6134 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
6135 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
6136 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
6137 (gfc_expand_function): Rename from expand_function_body, make static,
6138 don't do anything except invoke tree_rest_of_compilation.
6139 (gfc_be_parse_file): Invoke cgraph.
6140 (gfc_expand_decl): Remove.
6141 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
6142 __builtin_adjust_trampoline.
6143 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
6144 (gfc_finalize): New.
6145 (gfc_generate_function_code): Use it. Lower nested functions.
6146 * trans-expr.c (gfc_conv_function_call): Add static chain operand
6148 * trans.c (gfc_build_function_call): Likewise.
6149 * trans.h (expand_function_body): Remove.
6151 2004-02-15 Victor Leikehman <lei@il.ibm.com>
6154 * trans-decl.c (gfc_build_function_decl) For functions
6155 returning CHARACTER pass an extra length argument,
6156 following g77 calling conventions.
6157 * trans-types.c (gfc_get_function_type) Ditto.
6158 * trans-expr.c (gfc_conv_function_call) Ditto.
6160 2004-02-14 Paul Brook <paul@codesourcery.com>
6162 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
6164 2004-02-12 Paul Brook <paul@nowt.org>
6168 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
6170 * gfortran.texi: Fix typos.
6172 2004-02-07 Bud Davis <bdavis9659@comcast.net>
6175 * intrinsic.c (add_conversions) Use logical conversion instead
6177 * trans-types.c (gfc_get_logical_type) implemented logical*1
6180 2004-01-17 Paul Brook <paul@codesourcery.com>
6182 * lang-specs.h: Remove %<fixed-form.
6184 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
6186 * lang-specs.h: Enable preprocessing of source files
6187 ending in .F, .fpp, .FPP, .F90 and .F95.
6189 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
6192 * lang-specs.h: Enable compilation of files ending
6193 in .f, .for and .FOR.
6195 2004-01-11 Paul Brook <paul@codesourcery.com>
6197 * trans-stmt.c (gfc_trans_if_1): New function.
6198 (gfc_trans_if): Use it.
6200 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
6202 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
6203 (gfc_option_t): Add max_identifier_length.
6204 * lang.opt: Add fmax-identifier-length.
6205 * match.c (parse_name): Use limit.
6206 * options.c (gfc_init_options): Set max_identifier_length.
6207 (gfc_handle_option): Ditto.
6209 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
6211 * intrinsic.c (add_functions): Add resolve function to dcmplx.
6212 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
6213 * iresolve.c (gfc_resolve_dcmplx): New function.
6215 2004-01-10 Paul Brook <paul@codesourcery.com>
6217 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
6218 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
6219 (gfc_return_by_reference): Correct condition.
6220 (gfc_get_function_type): Ditto.
6222 2004-01-10 Paul Brook <paul@codesourcery.com>
6224 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
6227 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
6229 * iresolve.c: Use correct kind.
6231 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
6234 * trans-decl.c (gfc_create_module_variable): Output array valued
6237 2004-01-10 Paul Brook <paul@codesourcery.com>
6239 * resolve.c (resolve_branch): Get error message right way round.
6241 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
6243 * trans-array (gfc_conv_loop_setup): Adjust comment to track
6245 (gfc_array_allocate): Don't count size of element twice.
6247 2004-01-04 Paul Brook <paul@codesourcery.com>
6249 * lang.opt (i8, r8, std=*): Remove RejectNegative.
6251 2004-01-04 Paul Brook <paul@codesourcery.com>
6253 * error.c (gfc_notify_std): New function.
6254 * gfortran.h (gfc_notify_std): Declare.
6255 (GFC_STD_*): Define.
6256 (gfc_option_t): Add warn_std and allow_std.
6257 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
6258 (gfc_intrinsic_func_interface): Use gfc_notify_std.
6259 * check.c (check_rest): Use gfc_notify_std.
6260 * match.c (gfc_match_pause): Ditto.
6261 (gfc_match_assign): Ditto.
6262 (gfc_match_goto): Ditto.
6263 * resolve.c (resolve_branch): Ditto.
6264 * lang.opt: Add std=<foo> and w.
6265 * options.c (gfc_init_options): Set allow_std and warn_std.
6266 (gfc_handle_option): Handle OPT_std_* and OPT_w.
6268 2004-01-01 Paul Brook <paul@codesourcery.com>
6270 * array.c (gfc_append_constructor): Take constructor, not expression.
6271 * data.c (struct gfc_expr_stack): Remove.
6272 (expr_stack): Remove.
6273 (find_con_by_offset): Rename from find_expr_in_con.
6274 (find_con_by_component): Rename from find_component_in_con.
6275 (gfc_get_expr_stack): Remove.
6276 (gfc_assign_data_value): Rewrite.
6277 (gfc_expr_push): Remove.
6278 (gfc_expr_pop): Remove.
6279 (gfc_advance_section): Rename from
6280 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
6281 (gfc_get_section_index): Handle unbounded sections.
6282 * gfortran.h: Update prototypes.
6283 * resolve.c (check_data_variable): Array section maight not be the
6286 2004-01-01 Paul Brook <paul@codesourcery.com>
6289 * resolve.c (resolve_symbol): Allow assumed length function results.
6291 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
6293 * match.c (gfc_match_pause): Fix spelling.
6295 2004-01-01 Steven Bosscher <stevenb@suse.de>
6298 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
6299 reference from the expression.
6301 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
6303 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
6305 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
6306 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
6307 (symbol_attribute):New variable attribute: assign.
6308 * io.c (resolve_tag):Integer variable is allowed.
6309 (match_dt_format): Add ASSIGN statement. Set assign flag.
6310 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
6311 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
6312 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
6313 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
6314 (next_statement): Add ST_LABEL_ASSIGNMENT.
6315 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
6316 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
6317 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
6318 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
6319 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
6320 assign. Put them into the stuct lang_decl.
6321 * trans-io.c (set_string): Add the assign statement.
6322 * trans-stmt.c (gfc_trans_label_assign): New function.
6323 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
6324 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
6325 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
6326 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
6327 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
6328 (GFC_DECL_ASSIGN(node)): New macro to access flag.
6330 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
6333 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
6336 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
6338 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
6339 that arguments to subroutines/functions can't alias themselves, nor global
6342 2003-12-20 Steven Bosscher <stevenb@suse.de>
6344 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
6345 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
6347 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
6349 * primary.c (match_substring): Fix substring bug for start point
6350 or end point is NULL.
6351 * trans-expr.c (gfc_conv_substring): Ditto
6352 * trans-types.c (gfc_sym_type): Get correct type of scalar
6353 character variables.
6354 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
6357 2003-12-10 Richard Henderson <rth@redhat.com>
6359 * options.c (gfc_post_options): Don't ever use rtl inlining.
6361 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
6363 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
6364 * trans-equivalence.c: Remove.
6365 * trans-decl.c (gfc_get_symbol_decl): Update to match.
6366 (gfc_generate_function_code): Ditto.
6367 * trans-array.c (gfc_conv_array_parameter): Ditto.
6368 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
6369 (F95_ADDITIONAL_OBJS): Add stor-layout.o
6370 * trans.h (gfc_trans_equivalence): Remove.
6371 * gfortran.h (struct gfc_equiv): Add used field.
6372 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
6373 equiv_offset fields.
6375 2003-12-05 Richard Henderson <rth@redhat.com>
6377 * trans.c (gfc_build_addr_expr): New.
6378 (gfc_build_indirect_ref, gfc_build_array_ref): New.
6379 * trans.h: Declare them.
6380 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
6381 trans-stmt.c, trans.c (*): Use them.
6383 * f95-lang.c (gfc_post_options): Remove dead prototype.
6384 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
6385 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
6388 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
6390 * io.c (gfc_match_format): Check for missing format label.
6392 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
6395 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
6396 from interfaces in modules.
6398 2003-11-30 Paul Brook <paul@nowt.org>
6400 * trans-array.c (gfc_trans_g77_array): Make non-static.
6401 (gfc_trans_assumed_size): Remove.
6402 (gfc_trans_dummy_array_bias): Explicitly free temporary.
6403 * trans-array.h (gfc_trans_g77_array): Add prototype.
6404 (gfc_trans_assumed_size): Remove.
6405 * trans-decls.c (gfor_fndecl_push_context): Remove.
6406 (gfor_fndecl_pop_context): Remove.
6407 (gfc_build_function)decls): Don't create them.
6408 (gfc_trans_deferred_vars): Update to match. Remove dead code.
6409 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
6411 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
6413 * trans-array.c (gfc_conv_array_parameter): Simplify
6414 array argument passing for array name actual argument.
6415 * trans-expr.c (gfc_conv_function_call): Ditto
6416 * trans-types.c (gfc_is_nodesc_array):Ditto.
6418 2003-11-30 Paul Brook <paul@nowt.org>
6420 * f95-lang.c (gfc_post_options): Move ...
6421 * options.c (gfc_post_options): .. to here. Handle inlining options.
6422 * gfortran.h (gfc_post_options): Add prototype.
6424 2003-11-28 Richard Henderson <rth@redhat.com>
6426 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
6428 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
6430 * trans.h (has_alternate_specifier): New global variable.
6431 * match.c (gfc_match_call): Handle actual arguments associated with
6432 alternate return indicators.
6433 * trans-expr.c (gfc_conv_function_call): Ditto
6434 * trans-stmt.c (gfc_trans_call): Ditto
6435 (gfc_trans_return): Handle return statement with value.
6436 * trans-decl.c (gfc_generate_function_code): Handle functions with
6438 (gfc_get_fake_result_decl): Ditto
6439 * trans-types.c (gfc_get_function_type): Ditto
6440 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
6441 (resolve_formal_arglist): Check asterisk dummy.
6443 2003-11-27 Paul Brook <paul@nowt.org>
6445 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
6446 allocation interface.
6447 (gfc_conv_ array_parameter): Ditto.
6448 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
6449 * trans-array.c: Update prototype.
6450 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
6451 (gfc_trans_auto_character_variable): Use new memory alloc interface.
6452 * trans-expr.c (gfc_conv_string_tmp): Ditto.
6453 (gfc_conv_function_call): Use gfc_conv_string_tmp.
6454 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
6455 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
6456 * trans.h (gfc_ss_info): Remove unused pdata field.
6457 * trans.c (gfc_create_var_np): Change T to V.
6459 2003-11-26 Richard Henderson <rth@redhat.com>
6461 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
6462 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
6463 FRACTION, NEAREST, SET_EXPONENT.
6464 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
6465 Fix GTY marking. Remove unnecessary const's.
6466 (LIBM_FUNCTION): Rename from I_LIB.
6467 (LIBF_FUNCTION): New.
6468 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
6469 conventions. Assume the expr signature is correct. Mark const.
6470 (gfc_conv_intrinsic_exponent): Use library functions.
6471 (gfc_conv_intrinsic_set_exponent): Remove.
6472 (gfc_conv_intrinsic_scale): Remove.
6473 (gfc_conv_intrinsic_nearest): Remove.
6474 (gfc_conv_intrinsic_fraction): Remove.
6475 (gfc_conv_intrinsic_function): Update.
6476 * trans-decl.c (gfor_fndecl_math_exponent4): New.
6477 (gfor_fndecl_math_exponent8): New.
6478 (gfc_build_intrinsic_function_decls): Set them.
6479 * trans.h: Declare them.
6481 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
6483 * trans-common.c (gfc_layout_global_equiv): Locate the error for
6484 underflow COMMON block.
6485 (gfc_trans_one_common): Fix bug for size of COMMON block containing
6486 EQUIVALENCE object. Also fix typo in an error message.
6488 2003-11-25 Diego Novillo <dnovillo@redhat.com>
6490 * Make-lang.in: Add check-gfortran to lang_checks.
6491 (check-f95): Alias for check-gfortran.
6493 2003-11-25 Jason Merrill <jason@redhat.com>
6495 * Make-lang.in (f95.tags): Create TAGS.sub files in each
6496 directory and TAGS files that include them for each front end.
6498 2003-11-24 Paul Brook <paul@nowt.org>
6501 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
6503 2003-11-24 Paul Brook <paul@nowt.org>
6505 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
6507 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
6509 2003-11-24 Paul Brook <paul@nowt.org>
6512 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
6513 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
6515 2003-11-20 Richard Henderson <rth@redhat.com>
6517 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
6518 (gfc_conv_array_base): Likewise.
6519 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
6520 * trans-expr.c (gfc_conv_string_tmp): Likewise.
6521 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
6522 * trans-stmt.c (gfc_trans_character_select): Likewise.
6524 2003-11-13 Paul Brook <paul@nowt.org>
6526 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
6528 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
6530 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
6531 (resolve_equivalence): New function.
6532 (resolve_equivalence_derived): New function.
6534 2003-11-12 Richard Henderson <rth@redhat.com>
6536 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
6537 annotate_all_with_locus.
6539 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
6541 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
6542 * trans-decl.c (gfc_finish_var_decl): Modified.
6544 2003-11-08 Paul Brook <paul@nowt.org>
6547 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
6550 2003-11-06 Paul Brook <paul@nowt.org>
6552 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
6554 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
6556 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
6558 2003-10-27 Anthony Green <green@redhat.com>
6560 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
6561 (f95.stagefeedback): Ditto.
6563 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
6566 * Make-lang.in (f95.stageprofile): Add.
6567 (f95.stagefeedback): Add.
6569 2003-10-23 Richard Henderson <rth@redhat.com>
6571 * f96-lang.c (gfc_gimplify_expr): Remove.
6572 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
6573 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
6575 2003-10-23 Richard Henderson <rth@redhat.com>
6577 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
6579 2003-10-20 Paul Brook <paul@nowt.org>
6581 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
6582 * trans-stmt.c (gfc_trans_do_while): Ditto.
6584 2003-10-17 Paul Brook <paul@nowt.org>
6586 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
6588 2003-10-17 Paul Brook <paul@nowt.org>
6590 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
6592 2003-10-17 Feng Wang <wf_cs@yahoo.com>
6594 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
6595 (gfc_resolve_minloc): Ditto.
6596 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
6597 Return the value after subtracting the lower bound.
6599 2003-10-16 Richard Henderson <rth@redhat.com>
6601 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
6603 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
6605 * lang.c: Remove -M option for now, it's in the way for C.
6607 2003-10-14 Jason Merrill <jason@redhat.com>
6609 * Make-lang.in (f95.tags): New rule.
6611 2003-10-13 Richard Henderson <rth@redhat.com>
6613 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
6615 2003-10-13 Paul Brook <paul@nowt.org>
6617 * trans-decl.c (generate_local_decl): Don't create junk variables.
6619 2003-10-13 Paul Brook <paul@nowt.org>
6621 * resolve.c (resolve_formal_arglist): Use function result decl in
6622 preference to function decl.
6624 2003-10-12 Richard Henderson <rth@redhat.com>
6626 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
6627 TREE_READONLY. Update all callers.
6629 2003-10-12 Feng Wang <wf_cs@yahoo.com>
6631 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
6632 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
6633 (gfc_is_intrinsic_libcall): Add CSHIFT.
6635 2003-10-12 Richard Henderson <rth@redhat.com>
6637 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
6638 (gfc_trans_array_constructor_value): Likewise.
6639 (gfc_conv_array_initializer): Likewise.
6640 * trans-stmt.c (gfc_trans_character_select): Likewise.
6642 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
6644 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
6646 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6648 * check.c (gfc_check_repeat): Check arguments are scalar.
6649 (gfc_check_trim): New function.
6650 * intrinsic.h (gfc_check_trim): Add prototype.
6651 * intrinsic.c (add_functions): Use it.
6652 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
6654 * trans-decl.c: Ditto.
6655 (gfc_build_intrinsic_fucntion_decls): Set them.
6656 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
6657 (gfc_conv_intrinsic_trim): New function.
6658 (gfc_conv_intrinsic_repeat): New function.
6659 (gfc_conv_intrinsic_function): Use them.
6661 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6663 * trans-types.c (gfc_sym_type): Handle result variables.
6665 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6667 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6668 gfc_get_character_type.
6670 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6672 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6674 2003-10-11 Paul Brook <paul@nowt.org>
6676 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6677 (gfc_resolve_dprod): New function.
6678 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6679 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6680 (gfc_resolve_dprod): Declare.
6681 * intrinsic.c (add_functions): Use them.
6682 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6684 2003-10-06 Richard Henderson <rth@redhat.com>
6686 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6687 * trans-intrinsic.c (call_builtin_clz): Use it.
6689 2003-10-05 Paul Brook <paul@nowt.org>
6691 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6692 * trans-decl.c (gfc_generate_function_code): Set
6693 cfun->function_end_locus.
6695 2003-09-24 Jason Merrill <jason@redhat.com>
6697 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6700 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6701 Paul Brook <paul@nowt.org>
6703 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6704 * array.c (gfc_inser_constructor): New function.
6705 (gfc_get_constructor): New function.
6706 (gfc_free_constructor): Initialize offset and repeat.
6707 (iterator_stack): Remove.
6708 (expand_info): Add offset, component and repeat fields.
6709 (expand_constructor): Set them.
6710 (expand): Set new fields.
6711 (gfc_copy_constructor): Ditto. Avoid recursion.
6712 * gfortran.h: Add prototypes for new functions.
6713 (gfc_constructor): Add offset, component and repeat.
6714 (iteratio_stack): Move to here.
6715 * resolve.c (check_data_variable): Convert data values into variable
6717 (traverse_data_list): Build implicit loop chain.
6718 (gfc_resolve): Ditto.
6719 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6720 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6721 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6722 (gfc_conv_expr): Update to match.
6723 * trans.h (gfc_conv_structure): Declare.
6726 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6728 * trans.h: Add declarations for gfor_fndecl_si_kind and
6729 gfor_fndecl_sr_kind.
6730 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6731 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6732 (g95_conv_intrinsic_sr_kind): New function.
6733 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6736 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6738 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6739 instead of _4 and _8 as postfix for libgfortran calls.
6741 2003-09-16 Paul Brook <paul@nowt.org>
6743 * array.c (compare_bounds): New function.
6744 (gfc_compare_array_spec): Use it.
6746 2003-09-14 Paul Brook <paul@nowt.org>
6748 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6749 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6751 2003-09-14 Paul Brook <paul@nowt.org>
6753 * check.c (dim_rank_check): Allow assumed bounds if requested.
6754 (gfc_check_lbound): Call it.
6755 (gfc_check_ubound): Ditto.
6756 (gfc_check_size): Change to match.
6757 * simplify.c (gfc_simplify_bound): New function.
6758 (gfc_simplify_lbound): New function.
6759 (gfc_simplify_ubound): New function.
6760 * intrinsic.h: Declare them.
6761 * intrinsic.c (add_functions): Use them.
6763 2003-09-14 Paul Brook <paul@nowt.org>
6765 * io.c (format_lex): Initialize negative_flag.
6766 (check_format): Intialize repeat.
6767 * trans-io.c (gfc_new_nml_name_expr): Declare static.
6768 (gfc_new_var_expr): Ditto.
6770 2003-09-14 Paul Brook <paul@nowt.org>
6772 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
6773 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
6775 2003-09-12 Paul Brook <paul@nowt.org>
6777 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
6779 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
6781 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
6782 for a correct expression.
6784 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
6786 * trans-intrinsic.c (real_compnt_info): New struct.
6787 (prepare_arg_info): New function.
6788 (gfc_conv_intrinsic_set_exponent): New function.
6789 (gfc_conv_intrinsic_scale): New function.
6790 (gfc_conv_intrinsic_nearest): New function.
6791 (gfc_conv_intrinsic_fraction): New function.
6792 (gfc_conv_intrinsic_exponent): New function.
6793 (gfc_conv_intrinsic_spacing): New function.
6794 (gfc_conv_intrinsic_rrspacing): New function.
6795 (gfc_conv_intrinsic_function): Use them.
6797 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
6799 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
6800 build_int_2 changed from (high, low) to (low, high).
6801 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
6802 ioparm_namelist_read_mode, iocall_set_nml_val_int,
6803 iocall_set_nml_val_float, iocall_set_nml_val_char,
6804 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
6805 (gfc_build_io_library_fndecls): Add variable initialization.
6806 (gfc_new_nml_name_expr, get_new_var_expr): New function.
6807 (build_dt): Add namelist support.
6808 * io.c (value): New variable.
6809 (check_format): Support FMT_H now.
6811 2003-09-07 Paul Brook <paul@nowt.org>
6813 * io.c (gfc_resolve_dt): Error if format label is not defined.
6815 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
6817 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
6818 about case_switch's break. The other is about building the condition
6819 statement tree, which judges the argument in the range of the
6820 corresponding integer type.
6821 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
6822 for the large values.
6824 2003-09-05 Paul Brook <paul@nowt.org>
6826 * f95-lang.c (expand_function_body): Gimplify the function.
6828 2003-09-04 Jeff Law <law@redhat.com>
6830 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
6833 2003-09-04 Paul Brook <paul@nowt.org>
6835 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
6836 (gfc_expand_stmt): New function.
6837 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
6838 (expand_function_body): Use tree_rest_of_compilation.
6839 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
6841 2003-09-03 Jeff Law <law@redhat.com>
6843 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
6846 2003-08-30 Paul Brook <paul@nowt.org>
6848 * f95-lang.c (builtin_function): Remove #if 0 code.
6849 (gfc_define_builtin): New function.
6850 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
6851 * mathbuiltins.def: New file.
6852 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
6853 (gfc_intrinsic_map): Use mathbuiltins.def.
6854 (gfc_intrinsic_builtin_t): Remove.
6855 (gfc_build_intrinsic_lib_fndecls): Update.
6856 * trans-types.c (gfc_init_types): Remove redundant initilaization of
6857 signed_size_type_node.
6859 2003-08-29 Paul Brook <paul@nowt.org>
6861 * arith.c (gfc_real_kinds): Use correct minimum exponents.
6863 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
6865 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6866 (gfc_conv_intrinsic_function): Add MODULO.
6868 2003-08-22 Jason Merrill <jason@redhat.com>
6870 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6872 2003-08-22 Andreas Jaeger <aj@suse.de>
6874 * Make-lang.in (f95.install-common): Add DESTDIR support.
6875 * (f95.install-info): Likewise.
6876 (f95.uninstall): Likewise.
6878 2003-08-19 Diego Novillo <dnovillo@redhat.com>
6880 * trans-types.c (gfc_init_types): Initialize
6881 signed_size_type_node with size_type_node.
6883 2003-08-18 Paul Brook <paul@nowt.org>
6885 * dependency.c (gfc_dependency): New enum.
6886 (check_another_array_ref): Remove.
6887 (gfc_get_array_from_component): Remove.
6889 (get_range): Remove.
6890 (get_no_of_elements): Use mpz_t, not mpf_t.
6891 (transform_sections): New function.
6892 (gfc_check_range_range): Rename ...
6893 (gfc_check_section_vs_section): ... to this. Use new function.
6894 (gfc_is_inside_range): Rewrite to match.
6895 (gfc_check_element_vs_section): Ditto.
6896 (gfc_check_element_vs_element): Ditto.
6898 (gfc_dep_resolver): Ditto. Remove unused parameter.
6899 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6900 gfc_check_element_vs_element, gfc_is_inside_range,
6901 gfc_get_array_from_component): Remove prototypes for static functions.
6902 (gfc_dep_resolver): Update prototype.
6903 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6905 2003-08-15 Paul Brook <paul@nowt.org>
6907 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6908 return values to parent scope.
6909 (gfc_build_dummy_array_decl): Ditto.
6911 2003-08-14 Paul Brook <paul@nowt.org>
6913 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6914 size of the type, not the pointer.
6915 * resolve.c (resolve_symbol): Give more accurate error message.
6917 2003-08-10 Paul Brook <paul@nowt.org>
6919 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6921 2003-08-10 Paul Brook <paul@nowt.org>
6923 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6926 2003-08-10 Chun Huang <compiler@sohu.com>
6928 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6929 (resolve_symbol): Ditto.
6930 * trans-expr.c (gfc_conv_statement_function): New function.
6931 (gfc_conv_function_expr): Use it.
6933 2003-08-10 Paul Brook <paul@nowt.org>
6935 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6936 (walk_function_expr): Set section rank.
6937 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6939 2003-08-10 Paul Brook <paul@nowt.org>
6941 * intrinsic.c (add_sym): Prefix names with correct string.
6942 (add_sym_0s): New function.
6943 (add_subroutines): Register abort.
6945 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
6947 * gfortran.h: Introduce options to control the mangling.
6948 * lang.opt: Likewise.
6949 * options.c (gfc_init_options): Handle the options.
6950 * trans-common.c (gfc_sym_mangled_common_id): New function.
6951 (gfc_build_common_decl): Call it.
6952 * trans-decl.c (gfc_sym_mangled_function_id): New function.
6953 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6955 2003-08-09 Paul Brook <paul@nowt.org>
6957 * module.c (mio_symbol): Always ouput a namespace for formal args.
6958 (load_needed): Namespace now belong to their proper symbol.
6959 (gfc_dump_module): Change G95=>GFORTRAN.
6961 2003-08-05 Paul Brook <paul@nowt.org>
6963 * options.c: Force -fg77-calls.
6965 2003-08-02 Paul Brook <paul@nowt.org>
6967 * Makelang.in: Rename G95_* to GFORTRAN_*.
6968 * All sources: Rename G95_* to GFC_*.
6970 2003-08-01 Paul Brook <paul@nowt.org>
6972 * fortran/Make-lang.in: Use GMPLIBS.
6973 * fortran/config-lang.in: Set need_gmp.
6974 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6976 2003-07-27 Andreas Jaeger <aj@suse.de>
6978 * trans-decl.c (gfc_generate_constructors): Convert prototype to
6980 * trans-const.c (gfc_init_constants): Likewise.
6981 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6983 * gfortranspec.c: Convert to ISO C90.
6984 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6986 2003-07-26 Paul Brook <paul@nowt.org>
6988 * lang.opt: Add -fdump-parse-tree.
6989 * options.c (gfc_handle_option): Ditto.
6990 * resolve.c (resolve_forall_iterators): Convert to proper type.
6991 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6993 2003-07-26 Paul Brook <paul@nowt.org>
6995 * Makefile.in: Add build dependencies on files common with rest of gcc.
6997 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
6999 * trans.h: Declare g95_trans_pointer_assignment.
7000 * trans-expr.c (g95_trans_pointer_assignment): New function.
7001 (g95_trans_pointer_assign): Use it.
7002 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
7003 (g95_trans_pointer_assign_need_temp): New function.
7005 2003-07-26 Paul Brook <paul@nowt.org>
7007 * gfortran.texi: Replace references to g95.
7009 2003-07-26 Paul Brook <paul@nowt.org>
7011 Rename g95_* to gfc_*.
7013 2003-07-25 Paul Brook <paul@nowt.org>
7015 * gfortran.h: Rename from g95.h.
7016 * trans-types.c (boolean_type_node, booelan_true_node,
7017 boolean_false_node): Remove.
7018 * trans-types.h: Ditto.
7020 2003-07-25 Chun Huang <compiler@sohu.com>
7022 * parse.c (accept_statement): Implement BLOCK DATA statement.
7023 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
7026 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
7028 * trans-stmt.c (temporary_list): Define.
7029 (g95_trans_assign_need_temp): New function.
7030 (g95_trans_forall_1): Modified for WHERE.
7031 (g95_trans_where_assign): Modified.
7032 (g95_trans_where_2): Modified.
7033 (g95_evaluate_where_mask): Modified.
7034 (g95_trans_where): Modified.
7035 (g95_get_temp_expr): Removed.
7036 (g95_add_to_where_stmt_list): Removed.
7037 (compute_overall_iter_number): Modified for WHERE.
7038 * trans.h: Remove where_stmt_list.
7040 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7042 * lang.opt: Correct description of options -J and -M.
7044 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
7046 * lang.opt: Move help text to here.
7047 * lang-options.h: Remove.
7049 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7050 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
7051 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
7054 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
7055 Paul Brook <paul@nowt.org>
7057 * check.c (check_rest): Use global pedantic flag.
7058 * io.c (data_desc): Ditto.
7059 * error.c (g95_warning, g95_warning_now): Use global flag.
7060 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
7061 (expand_function_body): Update to new prototypes.
7062 (g95_init): Use new option names.
7063 * g95.h (g95_option_t): Standardize names.
7064 (g95_init_options, g95_handle_option): Update prototypes.
7065 * interface.c: Use new option names.
7072 * simplify.c: Ditto.
7074 * trans-array.c: Ditto.
7075 * trans-expr.c: Ditto.
7076 * trans-types.c: Ditto.
7077 * trans-decl.c: Ditto.
7078 (g95_build_library_function_decl): Remove obsolete VPARAMS.
7080 * options.c (g95_display_help): Remove.
7081 (g95_init_options): Convert to new scheme.
7083 (g95module_option): Ditto, rename from g95_parse_arg.
7084 (g95_handle_module_path_options): New function.
7085 * trans-equivalence.c: Fix error message.
7086 * lang.opt: Corrections.
7088 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
7090 * lang.opt: New file.
7092 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7094 * decl.c (match_attr_spec): Set colon_seen.
7096 2003-07-14 Paul Brook <paul@nowt.org>
7098 * trans-array.c: Update comment.
7099 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
7100 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
7101 minmaxloc,minmaxval): Ditto.
7102 * trans-io.c (g95_trans_transfer): Ditto.
7103 * trans-stmt.c: Remove unneeded prototypes.
7104 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
7105 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
7106 (compute_inner_temp_size): Remove bits of dead code. Add comments.
7107 Don't share loopinfo.
7108 (compute_overall_iter_number): Declare as static.
7109 (allocate_temp_for_forall_nest): Ditto.
7110 (g95_trans_forall_1): Don't pass shared loopinfo.
7111 * trans.c (g95_start_block): Expand comment.
7113 2003-07-12 Paul Brook <paul@nowt.org>
7115 * arith.c (g95_index_integer_kind): Remove unused initializer.
7116 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
7117 index by size of element.
7118 (generate_loop_for_rhs_to_temp): Ditto.
7119 (allocate_temp_for_forall_nest): Use element size, not index size.
7121 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7123 * arith.c (g95_index_integer_kind): Add a TODO.
7124 * simplify.c (g95_simplify_nearest): Add a TODO.
7126 2003-07-09 Chun Huang <compiler@sohu.com>
7128 * trans.h: Add declarations for gfor_fndecl_string_scan and
7129 gfor_fndecl_string_verify.
7130 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
7131 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
7132 (g95_conv_intrinsic_verify): New function.
7133 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
7134 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
7135 of parameter 'BACK=.TRUE.'
7137 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
7139 * trans-stmt.c (iter_info, forall_info): Define.
7140 (g95_trans_forall_block): Remove.
7141 (g95_trans_forall_loop): Use forall info blocks.
7142 (g95_trans_nested_forall_loop): New function.
7143 (g95_do_allocate): Handle things other than logical masks.
7144 (generate_loop_for_temp_to_lhs): New function.
7145 (generate_loop_for_rsh_to_temp): New function.
7146 (compute_inner_temp_size): New function.
7147 (compute_overall_iter_number): New function.
7148 (allocate_temp_for_forall_nest): New function.
7149 (g95_trans_forall): Move body ...
7150 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
7152 2003-07-02 Paul Brook <paul@nowt.org>
7154 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
7155 in correct scope. Change callers to match.
7156 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
7157 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
7159 2003-07-02 Paul Brook <paul@nowt.org>
7161 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
7162 expression shape for all expressions.
7163 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
7165 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7167 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
7168 g95_parse_arg), intrinsic.c (g95_convert_type): support of
7170 * intrinsic.c, g95.h: Add g95_convert_type_warn,
7171 * resolve.c (g95_resolve_index): Call it.
7173 2003-07-02 Paul Brook <paul@nowt.org>
7175 * iresolve.c (g95_resolve_reshape): Set expression shape.
7176 (g95_resolve_shape): Ditto.
7177 * simplify.c (g95_simplify_shape): Move common code outside condition.
7178 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
7180 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7182 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
7185 2003-06-29 Paul Brook <paul@nowt.org>
7187 * array.c (g95_simplify_iterator_var): Don't bother with return value.
7188 * expr.c (find_array_element, find_component_ref): New functions.
7189 (remove_subobject_ref): New function.
7190 (simplify_const_ref): Use them. Rename from simplify_component_ref.
7191 (simplify_ref_chain): New function.
7192 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
7193 (g95_specification_expr): Simplify the expression.
7194 * resolve.c (resolve_operator): Check simplifications return code.
7195 (g95_resolve_expr): Ditto.
7197 2003-06-26 Paul Brook <paul@nowt.org>
7199 * expr.c (simplify_component_ref): New function.
7200 (g95_simplify_expr): Use it.
7201 * resolve.c (resolve_structure_cons): Handle references.
7203 2003-06-25 Paul Brook <paul@nowt.org>
7205 * trans-io.c (build_dt): Handle internal units.
7207 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
7209 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
7210 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
7211 Use g95_array_index_type instead of integer_type_node.
7212 (g95_build_common_decl, g95_set_common_master_type): Use
7213 g95_character1_type_node instead of char_type_node.
7214 * trans-equivalence.c (g95_layout_local_equiv): As above.
7216 2003-06-24 Steven G. Kargl <kargls@attbi.com>
7218 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
7219 remove last remains of -fquiet.
7221 2003-06-22 Paul Brook <paul@nowt.org>
7223 * resolve.c (resolve_operator): Don't fail if we can't simplify.
7224 (g95_resolve_expr): Ditto.
7225 (resolce_code): Mark as static.
7226 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
7227 gimplifer doesn't (yet).
7229 2003-06-20 Paul Brook <paul@nowt.org>
7231 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
7232 * match.c (g95_match_if): Add ST_PAUSE.
7233 (g95_match_stopcode): New function.
7234 (g95_match_pause, g95_match_stop): Use it.
7235 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
7236 (decode_stmt, next_statement, parse_executable): Ditto.
7237 * resolve.c (resolve_code): Ditto.
7238 * st.c (g95_free_statement): Ditto.
7239 * trans-stmt.c (g95_trans_pause): New function.
7240 * trans-stmt.h: Declare it.
7241 * trans.c (g95_trans_code): Use it.
7242 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
7244 (g95_build_builtin_function_decls): Initialize them.
7246 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
7248 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7250 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
7251 match_filepos): Fix error handling.
7253 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7255 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
7256 Add assertions on arguments.
7257 * resolve.c (expression_shape): Remove useless &.
7258 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
7259 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
7260 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
7261 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
7262 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
7263 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
7264 (g95_simplify_not, g95_simplify_scale): Add assertions.
7266 2003-06-15 Paul Brook <paul@nowt.org>
7268 Clean up stuff to work with the ssa optimizers.
7269 * convert.c (convert): Handle BOOLEAN_TYPEs.
7270 * f95-lang.c (g95_truthvalue_conversion): Implement.
7271 * trans-array.c (g95_trans_array_constructor_value): Group multiple
7273 * trans.h (g95_truthvalue_conversion): Declare.
7274 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
7275 * trans-stmt.c (g95_trans_character_select): Don't create array
7276 assignments. Mark labels as indirect jump targets.
7277 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
7278 (g95_get_dtype_cst): Handle LOGICAL types.
7280 2003-06-14 Paul Brook <paul@nowt.org>
7282 * f95-lang.c (g95_gimplify_expr): New function.
7283 * trans-array.c (g95_trans_array_constructor_value): Don't create
7285 (g95_conv_expr_descriptor): Rename simple->gimple.
7286 * trans-expr.c (conv_expr_op): Use proper logical operators.
7287 * trans-intrinsic.c (build_fixbound_expr): New function.
7288 (build_fix_expr): Ditto.
7289 (g95_conv_intinsic_aint): Use them. Use builtin functions.
7290 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
7292 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7294 * array.c (g95_compare_array_spec): Remove unreachable code.
7295 * expr.c (g95_copy_expr): Likewise.
7296 * intrinsic.c (g95_convert_type): Likewise.
7297 * misc.c (g95_code2string): Likewise.
7298 * simplify.c (g95_simplify_ishft, g95_simplify_real,
7299 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
7300 * trans-stmt.c (g95_trans_select): Likewise.
7301 * primary.c (extend_ref): Add an assertion.
7302 * simplify.c (g95_convert_constant): Add const.
7303 * intrinsic.h: Remove g95_check_x_ni.
7304 * f95-lang.c (g95_finish): Call g95_release_include_path.
7306 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7308 * resolve.c (resolve_contained_functions): Fix typo introduced on
7311 2003-06-09 Paul Brook <paul@nowt.org>
7313 * g95.h: Include system.h not hwint.h.
7314 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
7315 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
7317 2003-06-09 Paul Brook <paul@nowt.org>
7319 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
7320 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
7321 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
7322 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
7323 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
7325 * trans.h (g95_trans_equivalence, g95_trans_common,
7326 g95_add_decl_to_function): Declare.
7327 * trans-common.c, trans-equivalence.c: New files.
7329 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
7331 * intrinsic.c (g95_intrinsic_extension): Remove.
7332 (add_functions): Substitute g95_check_x for g95_check_x_ni
7334 (g95_init_expr_extensions): New function.
7335 (g95_intrinsic_func_interface): Use it.
7336 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
7337 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
7338 g95_check_precision, g95_check_present, g95_check_radix,
7339 g95_check_range, g95_check_selected_real_kind): Do not set
7340 g95_intrinsic_extension.
7341 (g95_check_x_ni): Remove now duplicate of g95_check_x.
7343 * expr.c (check_inquiry): Add FIXME, fixup some code style.
7345 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7347 * g95.h (ref_type): Name this type explicitly.
7348 * module.c (MIO_NAME): Add specialisations of mio_name.
7349 (mio_symbol_attribute, mio_typespec, mio_array_ref,
7350 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
7351 (ab_attribute): Name this type explicitly.
7352 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
7354 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
7356 * trans-intrinsic.c (g95_conv_allocated): New function.
7357 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
7359 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7361 * f95-lang.c: Don't include g95-support.h
7362 (g95_mark_addressable): Add prototype.
7363 (g95_init_decl_processing): Remove C front end hack.
7364 * f95-tree.c: Remove file.
7365 * support.c: Remove file.
7366 * g95-support.h: Remove file.
7367 * trans-types.c (g95_init_types): Set up boolean
7368 type related tree nodes.
7369 * Make-lang.in: Remove rules for dead files and
7370 dependencies on them.
7372 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7374 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
7375 C front end dependency. Also, convert.c does not depend on
7376 g95-support.h anymore.
7377 * convert.c: Don't include c-common.h and g95-support.h
7378 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
7379 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
7380 stmts_are_full_exprs_p, current_stmt_tree,
7381 current_scope_stmt_stack): Remove.
7382 * g95-support.h (unsigned_conversion_warning): Kill proto.
7383 (boolean_type_node, boolean_true_node, boolean_false_node):
7384 Don't define here. Instead, make then true tree nodes in
7386 * support.c (c_global_trees): Die, C front end, die!!!
7387 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
7388 uintmax_type_node, string_type_node and const_string_type_node.
7389 (decl_constant_value, overflow_warning): Make static functions.
7390 They are in death row too, though.
7391 (default_conversion, c_expand_asm_operands): Remove.
7392 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
7393 trans.c: Don't include c-common.h.
7394 * trans-types.c (boolean_type_node, boolean_true_node,
7395 boolean_false_node): Make them real tree nodes.
7396 * trans-types.h (intmax_type_node, string_type_node,
7397 const_string_type_node): Hack to work around C dependencies
7398 in builtin-types.def.
7400 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7402 * decl.c (decl_types): Add some iterators-like sentinels.
7403 * decl.c (match_attr_spec): Use them.
7404 Use "decl_types" instead of "int".
7405 Add cast in call to g95_match_strings.
7406 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
7408 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
7409 (g95_interface_info): Use "g95_intrinsic_op".
7410 * dump-parse-tree.c (g95_show_namespace): Use them.
7411 * interface.c (g95_check_interfaces): Use them.
7412 * module.c (read_module, write_module): Use them.
7413 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
7414 Use "g95_intrinsic_op".
7415 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
7416 Add a default case in switch statement.
7417 * intrinsic.h (g95_generic_isym_id): Moved to...
7418 * g95.h (g95_generic_isym_id): here.
7419 (g95_intrinsic_sym): Use "g95_generic_isym_id".
7420 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
7421 * trans-intrinsic.c (g95_intrinsic_map_t,
7422 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
7423 * match.c (g95_match_intrinsic_op): Add cast in call to
7426 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
7428 * support.c (skip_evaluation, warn_conversion, lvalue_p,
7429 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
7430 constant_fits_type_p, convert_and_check,
7431 unsigned_conversion_warning): Remove these ugly remnants
7432 we inherited from the C front end.
7433 (function_types_compatible): Remove '#if 0'-edcode.
7434 (build_modify_expr): Likewise.
7435 (convert_for_assignment): Don't use the deceased functions.
7436 The parameter fundecl is now unused.
7437 (decl_constant_value): Always just return decl. In fact
7438 this function is not used at present, but it might be in
7439 the future, when we start using the tree inliner.
7440 (overflow_warning, default_conversion, c_expand_asm_operands):
7441 Abort when these are called, they are part of the C type
7442 checking implementation and therefore poison to Fortran.
7444 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
7446 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
7447 c-pretty-print.o and c-dump.o. Add a comment on why we
7448 depend on c-semantics.c.
7449 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
7450 Don't use the C front end tree dumper hook to dump the
7451 language specific tree representation -- we don't have
7452 one. So instead, inherit the default langhook.
7454 2003-06-02 Paul Brook <paul@nowt.org>
7456 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
7458 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7460 * check.c (g95_check_associated): Use proper types. Remove
7461 extraneous argument in call to g95_error().
7463 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7465 * resolve.c (resolve_operator): Make logical operands convert to the
7466 type with higher kind.
7468 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7470 * check.c (g95_check_associated): Make sure both pointer and target has
7471 the same type and rank. Null pointer or array section with vector
7472 subscript as target are not allowed.
7473 * trans.h: Declare gfor_fndecl_associated.
7474 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
7475 gfor_fndecl_associated.
7476 * trans-intrinsic.c (g95_conv_associated): New function.
7477 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
7479 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7481 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
7482 according to POINTER itself rather than TARGET.
7483 (g95_conv_expr_descriptor): Make lbound start at 1.
7484 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
7486 2003-06-01 Paul Brook <paul@nowt.org>
7488 * expr.c (g95_type_convert_binary): Make it match the standard.
7489 * g95.texi: Remove dead link.
7491 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
7493 * g95.texi: Cleanup somewhat in preparation for inclusion
7496 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7497 Canqun Yang <canqun@yahoo.com.cn>
7499 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
7501 (g95_find_forall_index): Return proper value.
7502 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
7503 compare the return value from g95_find_forall_index.
7505 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7506 * g95.h, io.c (g95_st_label): Remove "length".
7507 (g95_symtree): Remove "link".
7508 (g95_case): Remove "code".
7509 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
7510 g95_convert_real): Make an argument pointer to const.
7511 * decl.c (colon_seen): Add a TODO.
7512 * interface.c (g95_compare_types): Fix typo.
7513 * interface.c (compare_interfaces): Preserve value of "p".
7514 * intrinsic.c (sort_actual): Remove "i".
7515 * match.c (g95_match_assign): Proper type in call to g95_match().
7516 * parse.c (next_free): Avoid duplicate call due to macro.
7517 * parse.c (check_statement_label): wrong type in call to g95_error.
7518 * primary.c (match_real_constant): Add a TODO.
7519 * resolve.c (resolve_select): Remove useless conditional.
7520 * simplify.c (g95_simplify_repeat): Proper assignment to
7521 "value.character.string".
7522 * simplify.c (g95_simplify_reshape): Wrong variable in call to
7525 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
7527 * trans-stmt.c: Remove unnecessary include file defaults.h.
7529 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
7531 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
7533 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
7534 actual variables used as FORALL indexes.
7536 2003-05-15 Paul Brook <paul@nowt.org>
7538 * trans-array.c (g95_trans_static_array_pointer): Use
7540 (g95_trans_deferred_array): Initialize static array pointers.
7541 * trans-expr.c (g95_conv_function_call): Use formal arglist to
7542 correctly pass POINTER and absent CHARACTER arguments.
7544 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
7546 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
7547 (g95_resolve_forall_body): Resolve FORALL body.
7548 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
7549 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
7550 (g95_find_forall_index): Check whether the FORALL index appears in
7551 the expression or not.
7552 (resolve_code): Modified.
7554 2003-05-14 Paul Brook <paul@nowt.org>
7556 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
7558 2003-05-13 Paul Brook <paul@nowt.org>
7560 * trans-types.c (g95_max_array_element_size): Now a tree node.
7561 (g95_init_types): Work out max size properly.
7562 (g95_get_dtype_cst): Modify to match.
7564 2003-05-11 Paul Brook <paul@nowt.org>
7566 * trans-io.c (add_case): Create a label decl for case labels.
7568 2003-05-11 Paul Brook <paul@nowt.org>
7570 * arith.c (g95_integer_index_kind): New variable.
7571 * f95-lang.c (g95_init): Move frontend initialization here ...
7572 (g95_post_options): ... from here.
7573 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
7574 * intrinsic.c (add_functions): Use index kinds.
7575 * iresolve.c: Convert to index_kind where needed.
7576 * resolve.c (g95_resolve_index): Make public, use index_kind.
7577 (resolve_array_ref): Adjust to match.
7578 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
7579 * trans-stmt.c: Ditto.
7580 * trans-types.c: Ditto.
7581 * trans-types.h (g95_array_index_kind): Remove declaration.
7582 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
7584 2003-05-07 Paul Brook <paul@nowt.org>
7586 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
7587 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
7590 2003-05-07 Paul Brook <paul@nowt.org>
7592 * trans-array.c (trans_static_array_pointer,
7593 g95_trans_array_constructor_value, g95_conv_array_initializer,
7594 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
7595 (g95_add_loop_ss_code): Convert subscripts to the correct type.
7596 * trans-stmt.c (g95_trans_character_select): Ditto.
7597 * trans-types.c (g95_init_types): Ditto.
7599 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
7601 * f95-lang.c (expand_function_body): Use input_line, not lineno.
7602 * trans-decl.c (g95_generate_function_code,
7603 g95_generate_constructors): Likewise.
7604 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
7605 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
7608 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7609 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
7610 with components point to the DERIVED type itself, and two DERIVED
7611 type with components point to each other.
7612 * trans-expr.c (g95_conv_componet_ref): Modified
7614 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7615 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
7617 (g95_trans_pointer_assign): Implement Nullify.
7619 2003-05-01 Paul Brook <paul@nowt.org>
7621 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
7622 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
7624 2003-05-01 Paul Brook <paul@nowr.org>
7626 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
7627 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
7630 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
7632 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
7635 2003-04-28 Paul Brook <paul@nowt.org>
7637 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
7638 as their kind suggests.
7639 (g95_resolve_reshape): Ditto.
7641 2003-04-28 Chun Huang <compiler@sohu.com>
7643 * trans-expr.c (g95_conv_substring_expr): New function.
7644 (g95_conv_expr): Use it.
7646 2003-04-28 Paul Brook <paul@nowt.org>
7648 * iresolve.c (g95_resolve_transpose): Make it match the
7650 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
7652 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7654 * trans-types.c (g95_add_field_to_struct): New function to
7655 add a field to a UNION_TYPE or RECORD_TYPE.
7656 * trans-types.h (g95_add_field_to_struct): Prototype.
7657 (g95_get_derived_type): Use g95_add_field_to_struct to add
7659 * trans-io.c (g95_add_field): Remove.
7660 (ADD_FIELD): Use new g95_add_field_to_struct function.
7661 (ADD_STRING): Likewise.
7662 * trans-stmt.c (g95_trans_select): Likewise.
7663 (g95_add_field): Remove duplicated function.
7665 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7667 Port implementation for CHARACTER SELECT from Andy's tree.
7668 * trans-stmt.c (g95_trans_character_select): Implement character
7669 select. (g95_add_field): New function.
7670 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7671 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7672 * g95.h (struct g95_case): Add field 'int n'.
7673 * trans.h: Declare 'gfor_fndecl_select_string'.
7675 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7677 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7678 (g95_insert_bbd): Die on duplicates.
7679 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7681 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7683 * g95.texi: Require GMP 4.0 -- like we actually
7684 do. Explain the testsuite and what-goes-where.
7685 Don't use undefined texinfo symbol. Break very
7686 long line. Remove finished item from the list
7689 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7691 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7694 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7696 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7697 (g95_trans_forall_body): New function.
7699 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7701 * resolve.c (resove_where): New function.
7702 (resolve_where_shape): New function.
7703 (resolve_code): Add call to 'resolve_where'
7704 * trans-stmt.c (g95_trans_where): Modified.
7705 (g95_trans_where_2): New function.
7706 (g95_trans_where_assign): New function.
7707 (g95_evaluate_where_mask): New function.
7708 (g95_add_to_stmt_list): New function.
7709 (g95_get_temp_expr): New function.
7710 * trans.h (where_stmt_list): New structure.
7712 2003-04-10 Paul Brook <paul@nowt.org>
7714 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7715 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7717 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7719 Update after mainline -> tree-ssa-branch merge.
7720 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7722 (g95_init): Update for new lang_hooks definition.
7723 (g95_post_options): New langhook.
7724 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7725 * scanner.c (g95_new_file): Comment update.
7727 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7729 * g95.h, lang-options.h: Add -Wimplicit-interface.
7730 * options.c (g95_init_options, g95_parse_arg): Set it.
7731 * interface.c (check_intents): Warn about call with implicit
7733 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7736 2003-04-05 Paul Brook <paul@nowt.org>
7738 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7739 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7741 2003-03-29 Paul Brook <paul@nowt.org>
7743 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7744 (g95_resolve_unpack): Ditto.
7745 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7746 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7747 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7749 2003-03-25 Paul Brook <paul@nowt.org>
7751 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7753 * array.c (g95_free_array_ref): Ditto.
7755 * symbol.c (g95_use_derived_tree): Ditto.
7756 * intrinsic.c (add_functions): Use simplification for SCALE.
7757 * primary.c (g95_match_rvalue): Test sym, not symtree.
7759 2003-03-25 Paul Brook <paul@nowt.org>
7761 * trans-decl.c (build_function_decl): Add parameter before it gets
7762 turned into a constant.
7763 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7764 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
7765 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
7767 2003-03-22 Paul Brook <paul@nowt.org>
7769 * trans-array.c (g95_conv_array_initializer): Allow scalar
7771 * trans-decl.c (g95_finish_var_decl): Result variables are not
7773 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
7774 (g95_conv_intrinsic_function): Use it.
7775 * trans-types.h (g95_type_spec): Remove dead declaration.
7777 2003-03-21 Paul Brook <paul@nowt.org>
7779 * trans-decl.c (g95_build_function_decl): Mark string parameters.
7781 2003-03-20 Paul Brook <paul@nowt.org>
7783 * trans-decl.c (g95_build_function_decl): Put character length
7784 parameters at the end of the function declaration.
7785 * trans-expr.c (g95_conv_function_call): Ditto.
7786 * trans-types.c (g95_get_function_type): Ditto.
7788 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7790 * resolve.c (resolve_formal_arglist): Don't impose intent for
7791 procedure arguments of pure functions.
7792 (resolve_select): Remove redundant assignment.
7794 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7796 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
7798 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
7799 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
7801 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
7803 * symbol.c (g95_add_type): Fix typo in comment.
7806 2003-03-16 Paul Brook <paul@nowt.org>
7808 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
7809 * expr.c (g95_build_call): Remove.
7810 * f95-lang.c (puchdecl_top_level): New function.
7811 * g95.h (g95_code): Store resolved symbol, not just the name.
7812 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
7813 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
7814 (g95_get_intrinsic_sub_symbol): New function.
7815 * iresolve.c (g95_resolve_cpu_time): Use it.
7816 (g95_resolve_random_number): Ditto.
7817 * resolve.c: Set code->resolved_sym instead of code->sub_name.
7818 * trans-decl.c (g95_get_extern_function_decl): Give external decls
7819 the correct DECL_CONTEXT. Add global symbold to the global scope.
7820 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
7823 2003-03-16 Paul Brook <paul@nowt.org>
7825 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
7826 * options.c (g95_parse_arg): Ditto.
7827 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
7828 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
7829 for the procedure, not the parameter.
7830 * trans-array.c (g95_trans_g77_array): New function.
7831 (g95_trans_assumed_size): Use it.
7832 (g95_trans_dummy_array_bias): Ditto.
7833 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
7834 (g95_conv_expr_descriptor): ... to here. Update callers.
7835 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
7836 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
7837 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
7838 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
7839 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
7840 (g95_sym_type): Ditto.
7842 2003-03-15 Paul Brook <paul@nowt.org>
7844 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
7846 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
7848 2003-03-14 Paul Brook <paul@nowt.org>
7850 * trans-array.c (g95_array_is_packed): Remove.
7851 (g95_conv_array_base): Correctly handle all descriptorless cases.
7852 (g95_conv_array_stride): Use descriptorless strides.
7853 (g95_trans_dummy_array_bias): Don't always repack the array.
7854 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
7856 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7857 dummy and non-dummy arrays...
7858 (g95_sym_type, g95_get_derived_type): ... like these.
7859 (g95_get_array_type_bounds): Allow discontiguous arrays.
7861 2003-03-12 Paul Brook <paul@nowt.org>
7863 * array.c (g95_resolve_array_spec): Fix comment.
7864 * g95.h (symbol_attributes): New flag always_explicit.
7865 * resolve.c (resolve_formal_arglist): Set it always_explicit.
7866 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7867 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7868 (g95_trans_array_bounds): Allow assumed shape arrays.
7869 (g95_trans_repack_array): Remove.
7870 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7871 * trans-decl.c (g95_build_qualified_array): Only ignore absent
7872 bounds for assumed size arrays.
7873 (g95_build_dummy_array_decl): Use descriptorless arrays.
7874 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7875 (g95_trans_pointer_assign): Fix typo.
7876 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7878 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7879 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7880 Also modify callers.
7881 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7883 2003-03-08 Paul Brook <paul@nowt.org>
7885 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7886 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7887 * resolve.c (compare_spec_to_ref): Allow full array sections.
7889 2003-03-08 Paul Brook <paul@nowt.org>
7891 * expr.c (g95_simplify_expr): Also simplify array index and
7892 substring expressions.
7893 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7894 * trans-array.c (g95_trans_array_bounds): New function.
7895 (g95_trans_auto_array_allocation): Use it.
7896 (g95_trans_assumed_size): Rewrite.
7897 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7898 (gfor_fndecl_repack): Remove.
7899 (g95_build_qualified_array): Handle absent upper bounds.
7900 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7901 (g95_get_symbol_decl): Update.
7902 (g95_build_intrinsic_function_decls): Initialize new decls.
7903 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7904 (gfor_fndecl_repack): Remove.
7905 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7906 * trans-types.c: (g95_build_array_type): Merge duplicated code..
7907 (g95_get_nodesc_array_type): Handle absent bounds.
7908 * trans-types.h (g95_get_nodesc_array_type): Declare.
7910 2003-03-04 Paul Brook <paul@nowt.org>
7912 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7915 2003-03-02 Paul Brook <paul@nowt.org>
7917 * options.c (g95_init_options): Drfault to 1.
7918 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7919 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7920 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7921 Handle non-constant size automatic arrays.
7922 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7923 generic bound functions.
7924 (g95_trans_auto_array_allocation): Don't create a descriptor.
7925 (g95_trans_assumed_size): New function (broken).
7926 (g95_trans_dummy_array_bias): Remove unused var.
7927 * trans-array.h (g95_trans_assumed_size): Declare.
7928 * trans-decl.c (create_index_var): New fuction.
7929 (g95_build_qualified_array): New function.
7930 (g95_get_symbol_decl): Use it.
7931 (g95_trans_deferred_vars): Handle assumed shape seperately.
7932 * trans-types.c (get_element_type): Handle heap allocated arrays.
7933 (g95_is_nodesc_array): Include non-const size arrays.
7934 (g95_get_nodesc_array_type): Ditto.
7936 2003-02-23 Paul Brook <paul@nowt.org>
7938 * trans-array.c (g95_array_init_size): Should use stride, not size of
7941 2003-02-18 Paul Brook <paul@nowt.org>
7943 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7944 after intrinsic function check.
7946 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7948 * io.c (match_io): Fix missing return value and remove useless
7950 * match.c (g95_match): Remove useless assignment.
7951 * module.c (parse_string): Remove useless post increment.
7952 * simplify.c (g95_simplify_verify): Remove useless assignment.
7954 2003-02-15 Paul Brook <paul@nowt.org>
7956 * expr.c (restricted_intrinsic): Handle bad values gracefully.
7957 * g95.h (symbol_attribute): Add referenced member.
7958 (g95_symbol): Add dummy_order member.
7959 (g95_set_sym_referenced): Declare.
7960 * match.c (g95_match_assignment, g95_match_call): Use it
7961 * primary.c (match_actual_arg, g95_match_rvalue,
7962 g95_match_variable): Ditto.
7963 * symbol.c (next_dummy_order): New variable.
7964 (g95_set_sym_referenced): New function.
7965 (check_done): New function.
7966 (g95_add_*): Use it.
7967 * trans-decl.c: Make formatting conform to GCC standards.
7968 (g95_defer_symbol_init): Add dummy variables in the right order.
7969 (g95_get_symbol_decl): Only accept referenced variables.
7970 (g95_create_module_variable): Module variables are always required.
7971 (generatr_local_decls): New function.
7972 (generate_local_vars): New function.
7973 (g95_generate_function_code): Use it.
7975 2003-02-13 Paul Brook <paul@nowt.org>
7977 * trans-decl.c (g95_conv_struct_cons): Remove.
7978 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7979 * trans-expr.c (g95_conv_structure): New function.
7980 (g95_conv_expr): Use it.
7982 2003-02-09 Paul Brook <paul@nowt.org>
7984 * trans-array.c (g95_array_init_size): Don't evaluate the linit
7985 expressions multiple times.
7986 (g95_trans_auto_arry_allocation): Use pointer not tmp.
7988 2003-02-08 Paul Brook <paul@nowt.org>
7990 * module.c (mio_symtree_ref): Declare as static.
7991 (mio_expr): Remove dead code.
7992 (read_module): Set the symtree link for fixups.
7993 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7994 (build_round_expr): ... to this.
7995 (g95_conv_intrinsic_aint): New function.
7996 (g95_conv_intrinsic_function): Use it.
7998 2003-02-08 Paul Brook <paul@nowt.org>
8000 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
8001 offset after modificaton, not the increment expression.
8002 * dependency.c: Kill excess whitespace.
8004 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
8006 * dependency.h: Remove some function declarations.
8007 * dependency.c (get_no_of_elements): Change this function not to
8009 * other: Add comments for all modified functions.
8011 2003-02-06 Paul Brook <paul@nowt.org>
8013 * g95spec.c (lang_specific_functions): Fix initializer warning.
8014 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
8015 for structure type names.
8016 * trans-decl.c (g95_cons_structure_cons): New function.
8017 (g95_get_symbol_decl): Use it.
8018 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
8021 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8023 * resolve.c (compare_cases): Add const to casts.
8025 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8027 * g95.h (g95_check_f): Change a1 to f1m.
8028 * intrinsic.c (add_sym_1m, check_specific,
8029 g95_intrinsic_func_interface): Use it.
8031 * module.c (init_pi_tree): Remove useless cast.
8032 (fp2): Fix argument type.
8034 * parse.c (parse_select_block): Add comment.
8036 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
8038 * lang-options.h: Fix warning involving C90 concatenated
8041 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8042 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8044 * io.c (format_asterisk): Complete initializer to kill warning.
8045 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
8046 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
8047 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
8048 new defines to complete initializers. Kills all warnings.
8050 * Make-lang.in: Comment cleanup.
8052 2003-02-05 Paul Brook <paul@nowt.org>
8054 * array.c (g95_free_constructor): Handle NULL expressions.
8055 * resolve.c (resolve_structure_cons): Ditto.
8056 * decl.c (g95_match_null): New Function.
8057 (variable_decl): Use it.
8058 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
8059 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
8060 * trans-types.c (g95_set_decl_attributes): Remove empty function.
8062 2003-02-05 Paul Brook <paul@nowt.org>
8064 * trans.h (build1_v): New macro.
8065 (build_v): Remove pointless and incorrect prototype.
8066 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
8067 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
8069 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8071 * Make-lang.in (F95_OBJS): Remove one more dead file.
8073 2003-02-01 Paul Brook <paul@nowt.org>
8075 * lang-specs.h: Don't pass -ffixed-form to the linker.
8076 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
8078 2003-02-01 Paul Brook <paul@nowt.org>
8080 * Make-lang.in (F95_OBJS): Remove dead files.
8081 * trans-array.c (g95_array_init_size): Do the right thing when
8083 * trans-decl.c (g95_generate_function_code): Initialize deffered
8084 symbol list before translating contained subroutines.
8085 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
8086 scalar invariant values here...
8087 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
8088 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
8090 2003-01-29 Paul Brook <paul@nowt.org>
8092 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
8093 (g95_walk_elemental_function_args): Reverse chains before adding.
8094 (g95_reverse_ss): Move about a bit.
8095 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
8098 2003-01-28 Paul Brook <paul@nowt.org>
8100 * intrinsic.c (resolve_intrinsic): Use correct union member.
8101 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
8103 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
8104 use associated variables.
8105 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
8106 * trans-expr.c (g95_conv_expr_present): ... to here.
8107 * trans.h: Declare it.
8108 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
8110 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8112 * array.c (expand_iterator): Suppress useless assignment.
8113 * decl.c (match_char_spec): Ditto.
8114 * io.c (match_io_iterator): Ditto.
8115 * primary.c (match_real_constant): Ditto.
8116 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
8117 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
8118 * matchexp.c (match_add_operand, match_level_5): Likewise.
8119 * module.c (parse_atom, find_enum): Likewise.
8120 * resolve.c: move #include <string.h>
8121 (resolve_select): Fix serious typo.
8123 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
8125 * Make-lang.in: Don't build with broken tree-ssa-pre.
8127 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
8129 * resolve.c (resolve_index): Add a TODO.
8130 * symbol.c: Remove useless "#include <ctype.h>".
8132 2003-01-27 Paul Brook <paul@nowt.org>
8134 * check.c (check_rest): Allow different type kinds as an extension.
8135 * g95.h (g95_resolve_f): Add f1m.
8136 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
8137 * intrinsic.h: Chenge prototypes for MIN and MAX.
8138 * iresolve.c (g95_resolve_minmax): New function.
8139 (g95_resolve_min, g95_resolve_max): Use it.
8140 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
8142 (g95_conv_intrinsic_present): Fix logic.
8144 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
8146 * g95.h (g95_case): Don't be a tree, be a double linked list.
8147 * match.c (match_case_selector): Remove redundant semantics check.
8148 Clean up a few goto's to make it a tiny little bit faster.
8149 * resolve.c (case_tree): Die.
8150 (compare_cases): Accept and compare unbounded cases too.
8151 (check_case_overlap): Don't build a tree. Instead, merge-sort the
8152 whole list of g95_cases passed from resolve_select.
8153 (sane_logical_select): Die.
8154 (check_case_expr): Return FAILURE if a CASE label is of the wrong
8156 (resolve_select): Fixup case expression for computed GOTOs, put it
8157 in expr, not expr2, for easier handing in the parse tree dumper and
8158 the code generator. Rewrite the rest of the function: Kill
8159 unreachable case labels and unreachable case blocks.
8160 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
8161 an EXEC_SELECT, not case2 anymore.
8162 * trans-const.c (g95_conv_constant_to_tree): New function.
8163 (g95_conv_constant): Use it.
8164 * trans-const.h: Declare prototype for the new function.
8165 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
8166 g95_trans_character_select): New static functions.
8167 (g95_trans_select): Rewrite.
8169 2003-01-26 Paul Brook <paul@nowt.org>
8171 * intrinsic.c (add_fnctions): Properly add dreal.
8172 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
8173 (g95_conv_intrinsic_function): Use it.
8174 * trans-io.c (build_dt): Abort on internal files (unimplemented).
8176 2003-01-26 Paul Brook <paul@nowt.org>
8178 Widespread changes to the handling of symbols in expressions. These
8179 are now linked via g95_symtree nodes.
8180 * parse.c (g95_fixup_sibling symbols): New function.
8181 (parse_contained): Use it.
8182 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
8183 contained procedure that has bee correctly fixed up.
8184 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
8186 2003-01-24 Paul Brook <paul@nowt.org>
8188 * trans-array.c (g95_walk_expr): Function result attributes are in
8190 * trans-expr.c (g95_conv_function_call,
8191 g95_trans_arrayfunc_assign): Ditto.
8192 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
8194 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
8196 * expr.c (check_restricted): Fix error message.
8197 * symbol.c (free_st_labels): Plug memleak.
8199 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
8201 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
8202 reduce_binary_aa, reduce_binary, eval_intrinsic,
8203 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
8204 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
8205 for typesafe intrinsics helper functions.
8206 (g95_intrinsic_sym): Use them.
8207 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
8208 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
8209 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
8210 check_specific, g95_intrinsic_func_interface,
8211 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
8213 * trans-decl.c (g95_get_extern_function_decl): Likewise.
8214 * Make-lang.in: Don't disable warnings for strict prototypes
8215 any longer, everything is typesafe now.
8217 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
8219 * bbt.c (duplicate_node): Make static.
8220 * module.c (module_name): Make static.
8221 * scanner.c (include_dirs): Make static.
8223 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8225 Hard coded _gfor_'s should not show up anymore.
8226 * g95.h (PREFIX): New macro.
8227 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
8229 (g95_resolve_random_number): Likewise.
8230 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
8231 * trans-io.c: Remove 'prefix' macro. Replace all uses with
8232 the new PREFIX macro from g95.h.
8234 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8236 The troubles of forking... Andy implemented this just now too.
8237 Let's stick to that and keep the trees close.
8238 * g95.h (g95_st_label): 'format' member is now a g95_expr.
8239 * io.c: Revert previous changes.
8240 (g95_match_format): Match the format string as a character
8242 * match.h (g95_statement_label): Declare external.
8243 * parse.c: Revert previous changes.
8244 * symbol.c (g95_free_st_label): Free a g95_expr instead
8246 * trans-io.c: Revert previous changes.
8247 (build_dt): Use set_string to set the format string.
8249 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8251 * io.c (format_string): Make non-static.
8252 (g95_match_format): Remember the format string.
8253 (terminate_io): Add I/O termination for empty I/O lists.
8254 * match.h: Declare external format_string.
8255 * parse.c (check_statement_label): Attack the format string
8256 to a format label for FORMAT statements.
8257 * trans-io.c (g95_add_field): Define prefix macro. Replace
8258 all uses of PREFIX define with a use of this macro.
8259 (build_dt): Implement formatted I/O for format labels.
8261 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8263 * lang-options.h: Kill "-std=F".
8264 * options.c: Remove unimplemented "-std=F". Modify
8266 * misc.c (g95_terminal_width): New function.
8267 * error.c (g95_error_init_1): Use g95_terminal_width.
8268 * g95.h: Add prototype for g95_terminal_width, remove
8271 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
8273 * Make-lang.in: Fix typo.
8275 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8277 * g95.h (struct g95_case): Remove unused cruft, new member
8278 'where' to keep track of the locus of the default case.
8279 * match.c (g95_match_case): Add locus to the current case.
8280 (match_case_selector): Likewise.
8281 * parse.c (parse_select_block): Move semantics check for
8282 multiple DEFAULT cases out of here to...
8283 * resolve.c (check_case_overlap): ...here. Return sooner
8285 (check_case_expr): Take two g95_cases now, use to sure the
8286 expression kinds are the same.
8287 (resolve_select): Cleanup.
8289 2003-01-18 Paul Brook <paul@nowt.org>
8291 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
8292 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
8294 (g95_get_extern_function_decl): Put decls in the correct context.
8296 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8298 * trans-io.c: Port changes from Andy to set ERR flag.
8300 2003-01-17 Paul Brook <paul@nowt.org>
8302 * trans-array.c: Add various comments.
8303 (g95_ss_terminator): Declare as const.
8304 (g95_walk_expr): Remove first parameter and update all callers.
8305 (g95_walk_op_expr): Initialize scalar SS properly.
8306 * trans-array.h (g95_walk_expr): Update prototype.
8307 * trans-expr.c: Update for new g95_walk_expr.
8308 * trans-intrinsic.c: Ditto.
8309 * trans-io.c: Ditto.
8310 * trans.h: Various comments for SS chains.
8312 2003-01-17 Paul Brook <paul@nowt.org>
8314 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
8316 * intrinsic.c (add_functions): Use them.
8317 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
8318 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
8320 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8322 Fallout of a small merge conflict:
8323 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
8325 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8327 * initrinsic.c: New add_sym_* functions for strong typing.
8328 (add_conv): Make prototype strict.
8329 * dump-parse-tree.c, dependency.c: Include config.h
8330 * resolve.c, trans-io.c: Fix typos.
8332 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8334 * dump-parse-tree.c (g95_show_code_node): Show the
8335 condition for a computed GOTO that was transformed
8336 to a SELECT CASE construct.
8337 * resolve.c (check_case_overlap): Revert previous switch
8338 to treaps, it was too slow and didn't catch all trouble.
8339 (resolve_symbol): Be more flexible about module procedures.
8340 * symbol.c (check_conflict): Point to relevant section in
8341 the standard for dubious conflict. Allow procedure
8342 dummy arguments to be optional again.
8343 * trans-io (add_field): Rename to g95_add_field. Change
8345 * trans-stmt (trans_select): Handle unbounded cases for
8346 integer SELECT CASE constructs. Fix/add more comment.
8348 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8350 * g95.h: Uses GCC's function attribute macros.
8351 * error.c, module.c, parse.c, g95.h: More function attributes.
8353 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8355 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
8356 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
8359 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8361 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
8363 * trans.c (g95_trans_code): Use annotate_all_with_file_line
8364 instead of nowdead wrap_all_with_wfl.
8366 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8368 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
8369 before generating code, so we can still see it even if the code
8370 generation phase dies.
8372 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8374 * decl.c (build_sym): Split out initialization expression parts...
8375 (add_init_expr_to_sym): ...to here.
8376 (variable_decl): Add the symbol following an attribute list to the
8377 symbol tree before parsing the optional initialization expression
8378 if the symbol is not of a derived type.
8379 * primary.c (g95_match_rvalue): Don't assume a symbol always has
8380 a value if it is a PARAMETER.
8382 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8384 * misc.c: Don't #include <mcheck.h>
8385 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
8386 ever was a glibc bug, then either this was never reported to
8387 glibc people, or it has been fixed for so long that there's
8388 no information you can find about it, anywhere.
8390 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8393 * module.c (attr_bits, bt_types, array_spec_types):
8394 Switch 'const' and 'static'.
8395 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
8397 GNU'ify source code:
8398 * trans-io.c: Numerous fixes, one fixed warning and a few
8399 TODO markers so that we don't forget about them.
8401 2003-01-13 Paul Brook <paul@nowt.org>
8403 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
8404 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
8406 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
8407 * match.c (g95_match_stop): Fix dumb == -> != error.
8409 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8411 * dump-parse-tree.c (show_indent): Add line breaks. This
8412 whole dumping process needs cleanups.
8413 * f95-lang.c (g95_mark_addressable): Fix prototype to match
8414 the langhook. Fix 'return's accordingly.
8415 * g95-support.h: Adjust prototype.
8416 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
8417 * lang-options.h: Add '-fsyntax-only'.
8418 * options.c (g95_init_options): Init 'no_backend'.
8419 (g95_parse_arg): Deal with '-fsyntax-only'.
8420 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
8423 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8425 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
8426 arguments. Also make sure that if a symbol is marked INTRINSIC,
8427 an intrinsic with the symbol's name actually exists.
8428 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
8429 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
8430 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
8432 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8434 * resolve.c (resolve_contained_functions): Fix condition, don't
8435 throw internal_error if a child namespace has no name. Apparently
8436 this can be the case?
8438 2003-01-11 Paul Brook <paul@nowt.org>
8440 Port changes from Andy's tree:
8441 * g95.h (g95_code): Add stop_code.
8442 * match.c (g95_match_stop): Detter syntax checking.
8443 * resolve.c (resolve_generic_f0): Return match type.
8444 (resolve_generic_f): Remove dead/duplicated code.
8445 (resolve_specific_f): Ditto.
8446 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
8447 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
8448 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
8450 2003-01-11 Paul Brook <paul@nowt.org>
8452 * trans-array.c: Various documentation/comment changes.
8453 * trans-stmt.c: Ditto.
8456 2003-01-10 Paul Brook <paul@nowt.org>
8458 * options.c/h: Add -fdump-parse-tree as alias of -v.
8460 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8462 * dump-parse-tree.c (g95_show_namespace): Fixed another
8463 typo. Sorry, it's Friday...
8465 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8468 * trans-array.c, trans-array.h, trans.c, trans-const.c,
8469 trans-const.h, trans-decl.c, trans-expr.c, trans.h
8470 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
8471 trans-types.c: Fix bogus copyright years, add 2003.
8472 * trans-types.h: Give copyright header.
8474 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8476 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
8477 * expr.c, options.c, scanner.c: Add some more 'const' markers.
8478 * intrinsic.c: Some constant strings moved to read-only memory.
8479 * io.c (format_asterisk): Move to...
8482 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8484 * dump-parse-tree.c (g95_show_namespace): Dump implicit
8485 types for ranges instead of per-letter. Indent the
8486 'CONTAINS' just like everything else.
8487 * resolve.c (resolve_contained_functions): Clarify comment.
8488 Explain non-obvious conditional expression. Improve
8489 diagnostics if tyoe cannot be resolved.
8490 Port semi-fix from Andy's tree:
8491 (was_declared): Move up before first use.
8492 (generic_sym, specific_sym): New functions. Code moved
8493 out if procedure_kind.
8494 (procedure_kind): Simplify using new functions.
8495 (resolve_generic_f): Make sure the functions we find in
8496 a parent namespace is generic.
8497 (resolve_specific_f): Ditto for specific functions.
8499 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8501 * trans-stmt.c, trans.c: Fix some code style issues. Add
8502 some more comment (but still not enough!).
8504 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8506 * symbol.c (flavors, procedures, intents, acces_types,
8507 access_types, ifsrc_types): Make const.
8508 * misc.c (g95_string2code): Make 'm' param 'const'.
8509 * module.c (find_enum, write_atom, mio_name): Make
8511 (attr_bits, bt_types, array_spec_types, array_ref_types,
8512 ref_types, expr_types): Make const.
8513 * g95.h: Adjust external decls.
8515 2003-01-09 Paul Brook <paul@nowt.org>
8517 * Testsuite: Add a load of new cases.
8519 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8521 * Make-file.in: Add dependency on back end header files;
8522 a parallel build should work now.
8523 * f95-lang-c (lang_identifier): Remove bogus comment.
8524 (g95_be_parse_file): Fix prototype.
8525 (g95_init): Make static.
8526 (g95_finish): Make static.
8527 * error.c (g95_syntax_error): Kill. Make define in...
8528 * g95.h (g95_syntax_error): Define.
8529 (g95.options): Make 'source' member 'const'.
8530 * interface.c (g95_match_interface): Explain
8531 hard-to-read condition.
8532 (g95_match_end_interface): Ditto.
8533 * trans_const.c (g95_build_string_const): Make 's' parameter
8535 * trans_const.h: Adjust protoype accordingly.
8536 * trans-decl.c: Include tree-dump.h
8537 (g95_generate_function_code): Build fixes for recent changes
8538 in the tree-ssa branch.
8540 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8542 * format.c: Kill, move code from here...
8544 * Make-lang.in: Adjust.
8547 * BUGS: Mention where to submit bugs. Move old content...
8548 * TODO: ...to here. New file.
8550 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8551 Fix most warnings, and suppress the ones we can't fix for now.
8552 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
8553 these warnings just clutter the screen and there's not much
8554 we can do about them for now anyway.
8555 * check.c, iresolve.c: Mark unused function parameters.
8556 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
8557 they should be resolved before they get here.
8558 * error.c: Remove unused FILE *status_out.
8559 * f95-lang.c (g95_init): Remove bogus cast.
8560 * Many files: Make things 'const' where required.
8561 * g95.h: Fix prototypes for all modified functions above.
8562 (g95_options): Remove 'object' member.
8564 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8566 * Make-file.in: Cleanup bogus targets. Add more comment.
8567 * lang-options.h: New option '-w'.
8568 * g95.h: add no_options field to struct g95_options.
8569 * options.c (g95_init_options): Default no_warnings to off.
8570 (g95_parse_arg): Recognise the '-w' switch and its alias,
8572 * error.c (g95_warning, g95_warning_now): Don't emit warning if
8573 no_warning option is set.
8574 * iresolve.c (g95_resolve_shape): Fix warning.
8576 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8578 * primary.c (g95_next_string_char): Rename next_string_char, and
8579 make static. Adjust callers accordingly.
8580 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
8581 callers accordingly.
8582 * g95.h: Split out all g95_match* functions to...
8583 * match.h: ...here. New file.
8584 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
8585 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
8587 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8589 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
8590 g95_merge_new_implicit): New functions.
8591 (g95_match_implicit_none, g95_match_implicit): Move from here...
8592 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
8593 Modify to use the new functions in symbol.c.
8594 * g95.h: Add and move prototypes.
8596 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8598 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
8599 node compare function.
8600 (g95_insert_bbt): Likewise.
8601 (g95_insert_bbt_with_overlap): Likewise.
8602 (g95_delete_bbt): Likewise.
8603 (delete_treap): Likewise. Also fix a potential bug when calling it.
8604 * module.c (compare_pointers): Change proto to compare_fn.
8605 (compare_integers): Likewise.
8606 (compare_true_names): Likewise.
8607 (find_true_name): Adjust call to compare_true_names to match proto.
8608 (require_atom, write_atom, mio_name): Fix 'const' warnings.
8609 (init_pi_tree): Make compare a compare_fn instead of (int *).
8610 * resolve.c (compare_cases): Change proto to compare_fn.
8611 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
8612 it static, and rename to compare_symtree.
8613 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
8615 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
8616 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
8618 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8619 * Make-lang.in: Fix spaces/tabs issues from previous patch.
8620 * patch.options: Blow away Paul's checkin mistake :-)
8621 * io.c (terminate_io): Fix memory leak (Arnaud).
8623 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8625 * Make-lang.in: Teach about building DVI, info manual.
8626 * g95.texi: New file.
8628 2003-01-02 Paul Brook <paul@nowt.org>
8630 * trans-array.c (g95_reverse_ss): Make static and don't use.
8631 (g95_conv_ss_descriptor): Don't use g95_loopinfo
8632 (g95_conv_array_parameters): Modify for pointer assignments.
8633 (g95_walk_subexpr): New function.
8634 (g95_walk_expr*): Use it.
8635 * trans-array.h (g95_reverse_ss): Remove prototype.
8636 * trans-expr.c (g95_trans_pointer_assign): Implement.
8637 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
8638 * trans-intrinsic.c: Sync with scalarizer changes.
8639 * trans-io.c: Ditto.
8641 2002-12-29 Paul Brook <paul@nowt.org>
8643 * trans-array.c: Document calling convention for arrays.
8645 2002-12-19 Paul Brook <paul@nowt.org>
8647 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
8648 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
8649 optional parameters for some intrinsics.
8650 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
8651 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
8652 optional parameters.
8653 * trans.h (g95_se): Add ignore_optional flag.
8655 2002-12-15 Paul Brook <paul@nowt.org>
8657 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
8658 * trans-decl.c (g95_generate_function_code): Use TDI_original.
8660 2002-12-14 Paul Brook <paul@nowt.org>
8662 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8664 2002-12-12 Paul Brook <paul@nowt.org>
8666 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8667 initialize the scalarizer.
8668 (various): Update to new format of g95_expr->value.constructor.
8670 2002-12-08 Paul Brook <paul@nowt.org>
8672 * trans-array.c (g95_put_offset_into_var): New function.
8673 (g95_trans_array_constructor_subarray): New function.
8674 (g95_trans_array_constructor_value): Use it.
8675 (g95_array_cons_size): Don't abort() on array components.
8677 2002-12-08 Paul Brook <paul@nowt.org>
8679 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8680 * support.c: Update #includes.
8681 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8682 * trans-array.c: Update #includes.
8684 * trans-const.c: Ditto.
8685 * trans-io.c: Ditto.
8686 * trans-types.c: Ditto.
8687 (g95_init_types): Set size_type_node.
8688 * trans-decl.c: Update #includes.
8689 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8690 * trans-stmt.c: Update #includes.
8691 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8692 (g95_trans_select): Fix check for unbounded ranges.
8693 * trans-expr.c: Update #includes.
8694 (g95_conv_string_tmp): New function.
8695 (g95_conv_concat_op): Use it.
8696 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8697 * Trans-intrisic.c: Update #includes.
8698 (g95_conv_intrinsic_strcmp): New function.
8699 (g95_conv_intrinsic_adjust): Ditto.
8700 (g95_conv_intrinsic_function: Use them.
8702 2002-11-30 Paul Brook <paul@nowt.org>
8704 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8706 * trans-dec.c (g95_build_function_decl): Handle character return
8708 (g95_get_fake_result_decl): Ditto.
8709 (g95_trans_deferred_vars): Ditto.
8710 * trans-expr.c (g95_conv_function_call): Ditto.
8711 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8712 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8713 (g95_conv_intrinsic_function): Use it.
8714 * trans-types.c (g95_sym_type): Handle functions returning strings.
8715 (g95_return_by_reference): Ditto.
8716 (g95_get_function_type): Ditto.
8718 2002-11-18 Paul Brook <paul@nowt.org>
8720 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8721 requires a temporary.
8722 (g95_trans_select): Handle computed gotos.
8723 * trans-types.c (g95_build_array_type): Warn about non-functional
8724 assumed shape arrays.
8725 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8727 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8728 (g95_conv_intrinsic_int): New function.
8729 (g95_conv_intrinsic_mod): New function.
8730 (g95_conv_intrinsic_ichar): New function.
8731 (g95_conv_intrinsic_function): Use them.
8732 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8734 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8736 * trans-types.c (g95_build_array_type): Assumed
8737 sized arrays can have rank > 1.
8738 * trans.c (g95_trans_code): Remove erroneous
8739 warning about CONTINUE.
8740 * trans-expr.c (g95_conv_variable): Remove
8743 2002-11-15 Paul Brook <paul@nowt.org>
8745 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8747 2002-10-31 Paul Brook <paul@nowt.org>
8749 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8750 * trans-expr.c (g95_conv_component_ref): Handle character string
8752 (g95_conv_string_parameter): Ditto.
8753 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8756 2002-10-10 Paul Brook <paul@nowt.org>
8758 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8759 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8761 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8762 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8763 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8764 * trans-types.c (pvoid_type_node): Declare and initialize.
8765 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
8766 (g95_array_allocate): Fix when base==data.
8767 (g95_conv_array_parameter): Correctly handle reduced rank sections.
8768 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
8770 2002-10-09 Paul Brook <paul@nowt.org>
8772 * (g95_conv_expr_reference): Handle character strings correctly.
8774 2002-10-07 Paul Brook <paul@nowt.org>
8776 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
8778 * trans-array.c (g95_build_array_initializer): Remove.
8779 (g95_conv_array_initializer): New Function.
8780 (g95_trans_auto_arry_allocation): Cleanup.
8781 (g95_trans_init_character_array): Remove.
8782 * g95spec.c: Link in libgforbegin.
8783 * trans.c (g95_generate_code): Rename main function to MAIN__.
8784 (g95_create_var): New function.
8785 (g95_create_var_np): New function.
8786 (g95_evaluate_now): New function.
8787 (g95_start_block): New function.
8788 (g95_finish_block): New function.
8789 (g95_add_expr_to_block): New function.
8790 (g95_add_block_to_block): New function.
8791 * trans-expr.c (g95_conv_componen_ref): New function.
8792 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
8793 (F95_OBJS): Add dependency.o.
8794 * f95-lang.c (g95_is_simple_stmt): Remove.
8795 * f95-tree.c (mark_not_simple): New function.
8796 (unshare_all_trees): New function.
8797 (create_tmp_var, create_tmp_alias_var): Remove.
8798 * support.c (declare_tmp_vars, tree_last_decl): Remove.
8799 * trans*: Convert to new IR using GENERIC trees. Don't bother about
8800 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
8802 2002-10-01 Paul Brook <paul@nowt.org>
8804 * trans-array.c: Add support for descriptorless arrays.
8805 (g95_conv_array_data): New function.
8806 (g95_conv_array_base): New function.
8807 * trans-array.h: Declare these here.
8808 * trans-decl.c(g95_create_mopdule_variable): Perform variable
8809 initialization and creation here.
8810 (g95_create_module_vars): Instead of here.
8811 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
8812 * trans-intrinsic.c: Ditto.
8813 * trans-types.c (g95_is_nodesc_array): New function.
8814 (g95_get_nodesc_array_type): New function.
8815 (g95_sym_type, g95_get_derived_type): Use them.
8816 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
8818 2002-09-28 Paul Brook <paul@nowt.org>
8820 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
8821 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
8824 2002-09-24 Paul Brook <paul@nowt.org>
8826 * f95-lang.c (listify): Remove declaration.
8827 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
8829 * f95-tree.c (get_name): New function.
8830 * trans.c (module_namespace): Remove.
8831 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
8832 * trans-types.c: Ditto.
8834 2002-09-19 Paul Brook <paul@nowt.org>
8836 * trans-array.c (g95_get_array_cons_size): New Function.
8837 (g95_con_ss_startstride): Handle Array constructors.
8838 (g95_conv_loop_setup): Ditto.
8839 (g95_conv_array_parameter): Ditto.
8840 * tras-decl.c (g95_finish_var_decl): Make initializes variables
8843 2002-09-19 Paul Brook <paul@nowt.org>
8845 * trans.c (g95_simple_fold_tmp): Detect variables inside
8847 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
8849 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8851 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
8853 2002-09-14 Paul Brook <paul@nowt.org>
8855 * trans.c (g95_create_module_variable): Move to trans-decl.c.
8856 * trans-const.c (g95_conv_string_init): New Function.
8857 * trans-const.h: Declare it.
8858 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8859 variables. Don't bail on intrinsic symbols.
8860 (get_extern_function_decl): Handle specific intrinsic functions.
8861 * trans-types.c (g95_sym_type): Dummy functions don't return
8863 * trans-array.c (g95_build_array_initializer): New Function.
8864 (g95_trans_auto_array_allocation): Build initializer for static decls.
8865 Don't use mpz_addmul, it's GMP4 only.
8867 2002-09-12 Paul Brook <paul@nowt.org>
8869 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8870 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8871 assembler names for module procedures.
8873 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8875 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8878 2002-09-10 Paul Brook <paul@nowt.org>
8880 * trans-array.c: Change format of G95_SS_TEMP strictures.
8881 (g95_check_fncall_dependancy): New function.
8882 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8884 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8886 (g95_build_function_decl): Don't assume result arrays are packed.
8887 (g95_trans-deferred-vars): Handle array result variables.
8888 (g95_generate_fuction_code): Clear saved_function_decls.
8889 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8891 (g95_trans_arrayfunc_assign): New function.
8892 (g95_trans_assignment): Use it.
8893 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8894 (g95_se): Add direct_byref.
8895 * trans-types.c: Use sym->result rather than sym where appropriate.
8896 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8897 Update other functions to use this.
8898 (g95_is_intrinsic_libcall): New function.
8899 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8900 (g95_walk_intrinsic_function): Ditto.
8902 2002-09-08 Paul Brook <paul@nowt.org>
8904 * trans-types.c: Change rank field to dtype field in array descriptor.
8905 * trans-array.c: Implement filling of dtype array descriptor field.
8906 * trans-intrinsic.c: Fix broken LEN intrinsic.
8908 2002-09-07 Paul Brook <paul@nowt.org>
8910 * trans-intrinsic.c: Remove outdated todo intrinsic list.
8911 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8912 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8914 2002-09-06 Paul Brook <paul@nowt.org>
8916 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8917 (gt-f95-trans-types.h): Add dependancy information.
8918 * config-lang.in (gtfiles): Add trans-types.c
8919 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8920 back to top-level code.
8921 * trans-array.c, trans-types.c: Change format of array descriptor.
8922 (g95_conv_descriptor_dimension): New function.
8923 * trans-types.h (g95_conv_descriptor_rank): define.
8924 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8927 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8929 * trans-array.c, trans-types.c: Add rank information to descriptor.
8931 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
8933 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8935 2002-09-04 Paul Brook <paul@nowt.org>
8937 * f95-lang.c (g95_create_decls): New function.
8938 (g95_init): Move initialization of external decls to above, and call
8939 from g95_be_parse_file.
8940 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8941 * trans-types.c (g95_init_types): Always name integer and char types.
8942 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8944 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
8946 * Make-lang.in: Add options.c to F95_PARSER_OBJS
8948 2002-09-02 Paul Brook <paul@nowt.org>
8950 * g95_generate_code: Clear the attr for __fortran_main.
8951 * trans-types.c (g95_finish_type): New function.
8952 * g95_init_io_state_type: Use g95_finish_type.
8953 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8955 2002-09-01 Paul Brook <paul@nowt.org>
8957 * README.backend: Warn about the dangers of extra config.h files.
8958 Remove obsolete libgfor stuff.
8959 * config-lang.in: Add target-libgfor dependancy.
8960 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8962 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
8964 * g95_conv_mpz_to_tree: Free storage pointed to by q,
8967 2002-08-30 Paul Brook <paul@nowt.org>
8969 * trans-intrinsic.c (g95_conv_intrinsic_function,
8970 g95_walk_intrinsic_function): Added ANY and ALL.
8971 (g95_conv_intrinsic_anyall): New function.
8972 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in