1 2005-01-03 Steven G. Kargl <kargls@comcast.net>
3 * arith.c: Add system.h; remove string.h
9 * check.c: Remove stdlib.h and stdarg.h
10 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
11 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
12 * f95-lang.c: Add system.h; remove stdio.h
13 * interface.c: Add system.h; remove stdlib.h and string.h
14 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
15 * io.c: Remove string.h
17 * match.c: Remove stdarg.h and string.h
18 * misc.c: Update copyright; add system.h; remove stdlib.h,
19 string.h, and sys/stat.h
20 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
22 * option.c: Remove string.h and stdlib.h
24 * scanner.c: Update copyright; add system.h; remove stdlib.h,
25 stdio.h, string.h, and strings.h
26 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
27 * trans-array.c: Remove stdio.h and gmp.h
28 * trans-const.c: Ditto
33 * trans-intrinsic.c: Remove stdio.h and string.h
35 2004-12-29 Steven G. Kargl <kargls@comcast.net>
37 * gfortran.h (gfc_case): fix typo in comment.
39 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
41 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
42 logical shift. Call fold. Remove 0-bit shift shortcut.
43 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
44 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
45 result if width(arg 1) < 4 bytes. Call fold.
48 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
49 in front of function to match the standard. Correct handling
52 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
54 * trans-expr.c (gfc_conv_cst_int_power): Only check for
55 flag_unsafe_math_optimizations if we have a float type.
57 2004-12-23 Steven G. Kargl <kargls@comcast.net>
59 * gfortran.texi: Fix typo.
61 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
63 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
66 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
69 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
70 (gfc_match_nullify): Make sure that ')' is in front of the end of
73 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
76 2004-12-14 Richard Henderson <rth@redhat.com>
78 * gfortran.h (gfc_expr.function.name): Make const.
79 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
80 (gfc_get_string): Update prototype.
81 * iresolve.c: Include tree.h.
82 (string_node, HASH_SIZE, string_head, hash): Remove.
83 (gfc_get_string): Use vsnprintf, get_identifier.
84 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
85 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
86 (gfc_done_1): Don't call gfc_iresolve_done_1.
87 * module.c (mio_allocated_string): Take and return const char *,
88 instead of modifying char**.
89 (mio_expr): Update to match.
90 * resolve.c (pure_function): Constify name argument.
91 (resolve_function): Constify name.
92 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
94 2004-12-12 Richard Henderson <rth@redhat.com>
96 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
97 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
98 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
99 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
100 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
101 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
102 gfc_resolve_unpack: Use PREFIX.
104 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
107 * match.c (gfc_match_common): Skip whitespace.
109 2004-12-12 Steven G. Kargl <kargls@comcast.net>
112 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
113 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
114 integer kind check; Issue error for -std=f95 when needed.
115 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
117 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
118 Promote arguments to same kind.
120 2004-12-12 Steven G. Kargl <kargls@comcast.net>
121 Paul Brook <paul@codesourcery.com>
124 * resolve.c (gfc_resolve_iterator_expr): New function.
125 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
126 start, end and stride to correct type.
127 (resolve_code): Pass extra argument.
128 * array.c (resolve_array_list): Pass extra argument.
129 * gfortran.h (gfc_resolve): Add prototype.
130 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
131 Handle real type iterators.
133 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
136 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
137 same kind as C's 'int'.
138 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
140 2004-12-08 Richard Henderson <rth@redhat.com>
142 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
143 to the output expression.
144 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
146 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
149 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
152 * resolve.c (resolve_code): Impose correct restrictions on
155 * decl.c (gfc_match_end): Use locus of END when eos is an error.
157 2004-12-02 Steven G. Kargl <kargls@comcast.net>
158 Paul Brook <paul@codesourcery.com>
160 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
161 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
162 (gfc_check_stat, gfc_check_stat_sub): New functions.
163 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
164 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
165 fstat, and stat to intrinsics symbol tables.
166 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
167 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
168 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
169 (gfc_resolve_stat, gfc_resolve_flush): New functions.
170 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
171 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
173 2004-12-02 Steven G. Kargl <kargls@comcast.net>
175 * intrinsic.c: Fix and add comments, fix function declarations
176 (OPTIONAL,REQUIRED): New symbols
177 (add_functions,add_subroutines): Use symbols
178 (gmp.h): Remove unused include
180 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
182 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
185 2004-11-24 Steven Bosscher <stevenb@suse.de>
187 * options.c (gfc_post_options): Don't clear flag_inline_functions.
189 2004-11-20 Steven G. Kargl <kargls@comcast.net>
191 * check.c (gfc_check_getcwd_sub): Fix seg fault.
193 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
194 gfc_check_unlink,gfc_check_unlink_sub): New functions
195 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
196 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
197 exit to intrinsics symbol tables.
198 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
199 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
200 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
201 gfc_resolve_unlink_sub): Add and sort prototypes.
202 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
203 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
204 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
206 2004-11-16 Paul Brook <paul@codesourcery.com>
209 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
210 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
211 * trans-types.c (gfc_get_dtype): Accept array type rather than element
213 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
214 (gfc_get_array_type_bounds): Ditto.
215 (gfc_get_derived_type): Recurse into derived type pointers.
216 * trans-types.h (gfc_get_dtype): Add prototype.
217 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
219 2004-11-15 Paul Brook <paul@codesourcery.com>
221 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
223 2004-11-10 Paul Brook <paul@codesourcery.com>
226 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
227 * trans-io.c (transfer_array_component): Ditto.
229 2004-11-10 Paul Brook <paul@codesourcery.com>
231 * invoke.texi: Fix typo.
233 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
235 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
236 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
237 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
238 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
239 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
241 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
244 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
246 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
248 * gfortranspec.c: Replace GNU CC with GCC.
250 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
252 * gfortranspec.c (lang_specific_driver): Change year to 2004.
254 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
257 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
260 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
263 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
264 module procedures as if they were module variables.
266 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
271 * module.c (write_symbol1): Set module_name for dummy arguments.
273 2004-11-02 Paul Brook <paul@codesourcery.com>
275 * intrinsic.c (check_intrinsic_standard): Include error locus.
277 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
278 locus to check_intrinsic_standard.
280 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
283 * gfortran.h: Change GFC_STD_* flags to more appropriate
284 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
285 gfc_option_t): Add field for warning about use of nonstandard
287 * intrinsic.c (add_sym): Add parameter for standard version, check
288 this against current standard.
289 (add_sym_0): Pass standard parameter to add_sym.
290 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
291 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
292 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
293 (make_generic): Add parameter for standard, check this
294 against currently selected standard.
295 (add_functions, add_subroutines): Add parameter to tell which
296 standard an intrinsic belongs to.
297 (check_intrinsic_standard): New function.
298 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
299 (gfc_intrinsic_sub_interface): Ditto.
300 * lang.opt: Add Wnonstd-intrinsics option.
301 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
303 (set_Wall): Add warning about nonstd intrinsics.
304 (gfc_handle_option): Change to use new GFC_STD_* flags,
306 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
308 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
310 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
312 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
314 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
316 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
318 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
321 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
323 * check.c (gfc_check_rand): Allow missing optional argument.
324 (gfc_check_irand): Ditto.
325 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
327 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
329 PR fortran/13490, PR fortran/17912
330 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
331 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
332 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
333 warning when compiling with pedantic.
334 * gcc/fortran/arith.c: Set minimum integer values to reflect
335 realities of two's complement signed integers. Added
338 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
340 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
341 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
344 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
346 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
348 (gfc_generate_function_code): Fix formatting issue.
350 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
352 * module.c: Fix formatting issues.
354 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
356 * module.c (mio_interface_rest): Set where member of interface
359 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
362 * options.c (gfc_handle_option): Add break after handing the
365 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
367 * arith.c: Fix formatting issues.
369 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
372 * resolve.c (resolve_operator): Use correct operator name in message.
374 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
376 * primary.c (match_boz_constant): Allow kind parameter suffixes.
377 Move standard warning further to the front.
379 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
381 * trans-stmt.c: Fix a comment typo.
383 2004-10-07 Paul Brook <paul@codesourcery.com>
386 * trans-array.c (gfc_trans_deferred_array): Leave use associated
389 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
392 * simplify.c (twos_complement): New function.
393 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
395 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
397 2004-10-06 Paul Brook <paul@codesourcery.com>
399 * trans-stmt.c (gfc_trans_simple_do): New function.
400 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
401 loop. Update comments.
403 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
406 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
410 * intrinsic.c (add_sym_5): Remove.
411 (add_subroutines): Add resolution function for MVBITS.
412 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
414 * iresolve.c (gfc_resolve_mvbits): New function.
415 (gfc_resolve_random_number): Remove empty line at end of function.
417 * trans-const.c (gfc_build_cstring_const): New function.
418 (gfc_init_cst): Use new function.
419 * trans-const.h (gfc_build_cstring_const): Add prototype.
420 * trans-io.c (set_string, set_error_locus): Use new function.
421 * trans-stmt.c (gfc_trans_goto): Use new function.
424 * parse.c (accept_statement): Don't treat END DO like END IF and
426 (parse_do_block): Generate possible END DO label inside END DO
430 * check.c (gfc_check_system_sub): New function.
431 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
432 * intrinsic.c (add_functions): Add 'system'.
433 (add_subroutines): Add 'system'.
434 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
435 Move prototypes to other suborutines.
436 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
438 (gfc_resolve_system_clock): Fix formatting of prototype.
439 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
441 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
444 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
446 * scanner.c (preprocessor_line): Accept preprocessor lines without
447 file names. Check file names for closing quotes. Handle escaped
448 quotes in file names.
450 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
451 Paul Brook <paul@codesourcery.com>
453 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
454 Use gfc_get_expr_charlen.
455 * trans-expr.c (gfc_get_expr_charlen): New function.
456 * trans.h (gfc_get_expr_charlen): Add prototype.
458 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
460 * trans-intrinsic.c: Fix a comment typo.
462 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
464 * simplify.c (range_check): Remove blank line at beginning of function.
465 (gfc_simplify_dint): Same at end of function.
466 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
467 (gfc_simplify_bound): Fix indentation.
468 (gfc_simplify_log10): Simplify calculation.
469 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
471 (gfc_simplify_nearest): Same at end of function.
472 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
474 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
475 gfc_simplify_spacing): Simplify calulations.
477 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
479 * trans-intrinsic.c: Fix comments on spacing and rrspacing
480 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
482 2004-10-01 Jan Hubicka <jh@suse.cz>
484 * f95-lang.c (gfc_expand_function): Update call of
485 tree_rest_of_compilation.
486 * trans-decl.c (gfc_generate_constructors): Likewise.
488 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
490 * trans-intrinsic.c: Comment fixes.
492 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
494 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
496 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
498 * trans-types.c (gfc_return_by_reference): Remove superfluous
501 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
502 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
505 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
506 function to determine return type.
508 2004-09-20 Jan Hubicka <jh@suse.cz>
510 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
512 (gfc_generate_function_code): Likewise.
514 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
517 * simplify.c (gfc_simplify_reshape): Set shape of return value
520 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
521 Zack Weinberg <zack@codesourcery.com>
523 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
524 enumeration constants.
526 2004-09-17 Paul Brook <paul@codesourcery.com>
528 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
529 (gfc_linebuf_header_size): Define.
530 * scanner.c (load_file): Use it.
532 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
534 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
535 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
536 resolve.c, scanner.c, trans-array.c, trans-array.h,
537 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
538 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
539 trans.h: Fix comment typos. Follow spelling conventions.
541 2004-09-16 Victor Leikehman <lei@il.ibm.com>
544 * trans-io.c (transfer_array_component): New function.
545 (transfer_expr): For array fields, call transfer_array_component.
547 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
549 * gfortran.texi: Fix a typo.
551 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
553 * parse.c (eof_buf): Rename eof to eof_buf.
554 (unexpected_eof): Same.
555 (gfc_parse_file): Same.
557 2004-09-15 Steven G. Kargl <kargls@comcast.net>
559 * check.c (gfc_check_getcwd_sub): New function.
560 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
561 * intrinsic.c (add_functions): Add function definition;
563 * intrinsic.c (add_subroutines): Add subroutine definitions.
564 * intrinsic.h: Add prototypes.
565 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
567 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
569 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
572 * module.c (write_symbol): Don't fill in module name here.
573 (write_symbol0): Fill in here instead.
575 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
577 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
578 trans-array.c, trans-common.c, trans-expr.c,
579 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
580 comment typos. Follow spelling conventions.
582 2004-09-09 Paul Brook <paul@codesourcery.com>
584 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
586 2004-09-08 Paul Brook <paul@codesourcery.com>
588 * array.c: Don't include assert.h.
589 * data.c: Don't include assert.h. Replace assert and abort with
590 gcc_assert and gcc_unreachable.
591 * dependency.c: Ditto.
597 * trans-array.c: Ditto.
598 * trans-common.c: Ditto.
599 * trans-const.c: Ditto.
600 * trans-decl.c: Ditto.
601 * trans-expr.c: Ditto.
602 * trans-intrinsic.c: Ditto.
604 * trans-stmt.c: Ditto.
605 * trans-types.c: Ditto.
608 2004-09-07 Per Bothner <per@bothner.com>
609 Paul Brook <paul@codesourcery.com>
611 * error.c (show_locus): Handle mapped locations.
612 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
613 * gfortran.h: Include input.h.
614 (struct gfc_linebuf): Use source_location.
615 * scanner.c (get_file): Initialize linemap.
616 (preprocessor_line): Pass extra argument to get_file.
617 (load_file): Ditto. Setup linemap.
618 (gfc_new_file): Handle mapped locations.
619 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
620 Set decl source locations.
621 (gfc_trans_common): Set blank common block location.
622 * trans-decl.c (gfc_set_decl_location): New function.
623 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
624 (trans_function_start): Move call to gfc_set_backend_locus..
625 (build_function_decl): ... to here.
626 (build_entry_thunks): Set and restore the backend locus.
627 (gfc_generate_constructors): Remove excess arguments to
629 (gfc_generate_block_data): Add comments. Set the decl locus.
630 * trans-io.c (set_error_locus): Handle mapped locations.
631 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
632 (gfc_trans_code): Use SET_EXPR_LOCATION.
633 (gfc_generate_code): Override the location of the new symbol.
634 * trans.h (gfc_set_decl_location): Add prototype.
636 2004-08-31 Paul Brook <paul@codesourcery.com>
638 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
640 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
643 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
646 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
651 * resolve.c (resolve_transfer): New function.
652 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
654 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
657 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
660 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
662 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
664 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
667 * trans-types.c (gfc_return_by_reference): Remove TODO error,
668 add comment pointing out possible issue WRT compatibility with g77.
670 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
672 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
673 all occurences of 'gfc_strlen_type_node' by
674 'gfc_charlen_type_node'.
675 * trans-types.h: Same. Also update comment accordingly.
677 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
679 * primary.c: Update copyright boilerplate to say GCC.
680 * f95-lang.c: Change initial comment to say gfortran.
682 2004-08-31 Paul Brook <paul@codesourcery.com>
684 * trans-types.h: Add comments.
685 (intmax_type_node, string_type_node, const_string_type_node): Remove.
687 2004-08-30 Richard Henderson <rth@redhat.com>
689 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
690 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
691 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
693 (gfc_logical_info): Add c_bool.
694 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
695 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
696 rather than gfc_int[48]_type_node for allocate choice.
697 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
698 local copies of some kind type nodes.
699 (gfc_build_builtin_function_decls): Likewise.
700 * trans-expr.c (gfc_conv_power_op): Likewise.
701 * trans-intrinsic.c (gfc_conv_intrinsic_index,
702 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
703 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
704 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
705 gfc_trans_character_select, gfc_trans_allocate): Likewise.
706 * trans-io.c (gfc_pint4_type_node): Move into ...
707 (gfc_build_io_library_fndecls): ... here. Cache local copies of
708 some kind type nodes.
709 * trans-types.c (gfc_type_nodes): Remove.
710 (gfc_character1_type_node, gfc_strlen_type_node): New.
711 (gfc_integer_types, gfc_logical_types): New.
712 (gfc_real_types, gfc_complex_types): New.
713 (gfc_init_kinds): Fill in real mode_precision.
714 (gfc_build_int_type, gfc_build_real_type): New.
715 (gfc_build_complex_type, gfc_build_logical_type): New.
716 (c_size_t_size): New.
717 (gfc_init_types): Loop over kinds.
718 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
719 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
720 (gfc_get_character_type_len): Likewise.
721 (gfc_type_for_size): Loop over kinds; use a reduced set of
723 (gfc_type_for_mode): Loop over kinds.
724 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
725 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
726 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
727 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
728 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
729 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
730 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
731 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
732 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
733 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
734 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
735 gfc_complex8_type_node, gfc_complex16_type_node,
736 gfc_logical1_type_node, gfc_logical2_type_node,
737 gfc_logical4_type_node, gfc_logical8_type_node,
738 gfc_logical16_type_node, gfc_strlen_kind): Remove.
739 (gfc_character1_type_node): Turn in to a variable.
740 (gfc_strlen_type_node): Likewise.
742 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
744 * gfortran.h (gfc_namespace): Add new field is_block_data.
745 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
746 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
747 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
748 * trans.h (gfc_generate_block_data): Add prototype.
749 * trans-decl.c (gfc_generate_block_data): New function.
751 2004-08-29 Richard Henderson <rth@redhat.com>
753 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
754 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
755 than two HOST_WIDE_INT.
757 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
760 * decl.c (free_variable, free_value, gfc_free_data, var_list,
761 var_element, top_var_list, match_data_constant, top_val_list,
762 gfc_match_data): Move here from match.c.
763 (match_old_style_init): New function.
764 (variable_decl): Match old-style initialization.
765 * expr.c (gfc_get_variable_expr): New function.
766 * gfortran.h (gfc_get_variable_expr): Add prototype.
767 * gfortran.texi: Start documentation for supported extensions.
768 * match.c: Remove the functions moved to decl.c.
769 * match.h (gfc_match_data): Move prototype to under decl.c.
770 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
773 2004-08-29 Steven G. Kargl <kargls@comcast.net>
774 Paul Brook <paul@codesourcery.com>
776 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
777 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
778 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
779 (build_builtin_fntypes): New function.
780 (gfc_init_builtin_functions): Use it.
781 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
782 and GFC_ISYM_ERF{,C}.
783 (gfc_c_int_kind): Declare.
784 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
785 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
786 gfc_resolve_g77_math1): Add prototypes.
787 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
788 * mathbuiltins.def: Add comment. Change third argument. Use
789 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
790 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
791 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
792 * trans-types.c (gfc_c_int_kind): Declare.
793 (gfc_init_kinds): Set it.
795 2004-08-29 Steven G. Kargl <kargls@comcast.net>
796 Paul Brook <paul@codesourcery.com>
798 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
799 (gfc_check_f, gfc_simplify_f): Add f0.
800 * intrinsic.c (do_check): Call f0. Flatten.
801 (add_sym_0): Fix prototype. Set f0.
802 (add_functions): Add getgid, getgid and getuid.
803 (resolve_intrinsic): Remove obsolete comment.
804 (do_simplify): Call f0.
805 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
806 gfc_resolve_getuid): Add prototypes.
807 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
808 gfc_resolve_getuid): New functions.
809 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
812 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
814 * error.c (gfc_error_init_1): Remove blank line in front of
815 function body. Add missing blank.
816 (gfc_buffer_error, error_char, error_string): Remove blank line in
817 front of function body.
818 (show_locus): Add comma in comment.
819 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
820 gfc_push_error, gfc_pop_error): Remove blank line in front of
822 (gfc_get_errors): Typo fix in comment in front of function. Remove
823 blank line in front of function body.
825 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
827 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
828 variable declaration of same name.
829 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
830 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
831 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
832 Replace all calls to gfc_default_*_kind with variable accesses.
833 * trans-types.c: Same as above.
834 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
835 static qualifier. Replace all occurences.
836 (gfc_default_*_kind): Remove functions.
838 2004-08-26 Richard Henderson <rth@redhat.com>
840 * arith.c: Include system.h, not real system headers.
841 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
842 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
843 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
844 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
845 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
846 gfc_index_integer_kind, gfc_default_integer_kind,
847 gfc_default_real_kind,gfc_default_double_kind,
848 gfc_default_character_kind, gfc_default_logical_kind,
849 gfc_default_complex_kind, validate_integer, validate_real,
850 validate_logical, validate_character,
851 gfc_validate_kind): Move to trans-types.c.
852 (gfc_set_model_kind): Use gfc_validate_kind.
853 (gfc_set_model): Just copy the current precision to default.
854 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
855 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
856 * gfortran.h: Update file commentary.
857 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
858 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
859 gfc_default_double_kind_1, gfc_default_character_kind_1,
860 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
861 (gfc_init_kinds): New.
862 (gfc_init_types): Don't set gfc_index_integer_kind here.
863 * trans-types.h (gfc_init_kinds): Declare.
864 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
866 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
868 * check.c (gfc_check_atan2): New function.
869 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
870 * intrinsic.h (gfc_check_atan2): Add prototype.
872 2004-08-25 Richard Henderson <rth@redhat.com>
874 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
875 false and we don't validate the kind.
876 (gfc_check_integer_range, gfc_check_real_range): Update to match.
877 * check.c (kind_check): Likewise.
878 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
879 (match_char_spec, match_logical_spec): Likewise.
880 * gfortran.h (gfc_validate_kind): Likewise.
881 * options.c (gfc_handle_option): Likewise.
882 * primary.c (match_integer_constant, match_real_constant,
883 match_string_constant, match_logical_constant,
884 match_const_complex_part): Likewise.
885 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
886 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
887 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
888 gfc_simplify_maxexponent, gfc_simplify_minexponent,
889 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
890 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
891 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
892 gfc_simplify_tiny): Likewise.
893 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
894 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
895 prepare_arg_info): Likewise.
897 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
899 * expr.c (gfc_check_assign): Add comment. Add new warning.
900 * trans-expr.c (gfc_conv_function_call): Correctly dereference
901 result of pointer valued function when not in pointer assignment.
903 2004-08-25 Paul Brook <paul@codesourcery.com>
905 * config-lang.in: Remove dead commented line.
906 * module.c: Replace g95 with gfortran in comment.
908 2004-08-25 Paul Brook <paul@codesourcery.com>
911 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
913 2004-08-25 Paul Brook <paul@codesourcery.com>
916 * trans-array.c (gfc_trans_allocate_temp_array): Remove
917 string_length argument.
918 (gfc_trans_array_ctor_element): New function.
919 (gfc_trans_array_constructor_subarray): Use it.
920 (gfc_trans_array_constructor_value): Ditto. Handle constant
922 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
923 (gfc_trans_array_constructor): Use them.
924 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
925 (gfc_conv_ss_descriptor): Remember section string length.
926 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
927 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
928 (gfc_conv_expr_descriptor): Ditto.
929 (gfc_conv_loop_setup): Ditto. Spelling fixes.
930 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
931 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
932 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
933 (gfc_conv_variable): Set string_length from section.
934 (gfc_conv_function_call): Remove extra argument.
935 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
936 * trans-types.c (gfc_get_character_type_len): New function.
937 (gfc_get_character_type): Use it.
938 (gfc_get_dtype): Return zero for internal types.
939 * trans-types.h (gfc_get_character_type_len): Add prototype.
940 * trans.h (struct gfc_ss): Move string_length out of union.
942 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
944 * trans.h (build2_v, build3_v): New macros.
946 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
948 * trans-array.c (gfc_conv_descriptor_data,
949 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
950 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
951 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
952 gfc_trans_allocate_temp_array,
953 gfc_trans_array_constructor_subarray,
954 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
955 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
956 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
957 gfc_conv_array_ref, gfc_trans_preloop_setup,
958 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
959 gfc_conv_loop_setup, gfc_array_init_size,
960 gfc_conv_array_initializer, gfc_trans_array_bounds,
961 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
962 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
963 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
964 of build and build_v as appropriate.
965 * trans-common.c (create_common): Same.
966 * trans-decl.c (gfc_trans_auto_character_variable,
967 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
968 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
969 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
970 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
971 gfc_conv_expr_op, gfc_conv_function_call,
972 gfc_trans_structure_assign): Same.
973 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
974 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
975 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
976 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
977 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
978 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
979 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
980 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
981 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
982 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
983 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
984 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
985 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
986 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
987 gfc_conv_intrinsic_iargc): Same.
988 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
989 set_flag, add_case, io_result, transfer_namelist_element,
990 transfer_expr): Same.
991 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
992 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
993 gfc_trans_integer_select, gfc_trans_logical_select,
994 gfc_trans_character_select, gfc_trans_forall_loop,
995 gfc_trans_nested_forall_loop, gfc_do_allocate,
996 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
997 compute_inner_temp_size, compute_overall_iter_number,
998 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
999 gfc_trans_forall_1, gfc_evaluate_where_mask,
1000 gfc_trans_where_assign, gfc_trans_allocate): Same.
1001 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1002 * trans.c (gfc_add_modify_expr, gfc_finish_block,
1003 gfc_build_array_ref, gfc_build_function_call,
1004 gfc_trans_runtime_check): Same.
1006 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1008 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1009 build_int_cst to build_int_cst_wide in accordance to Nathan's
1012 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1014 * trans-array.c (gfc_trans_array_constructor_value): Adjust
1015 build_int_cst calls.
1016 * trans-const.c (gfc_build_string_const, gfc_init_constants,
1017 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1018 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1019 gfc_trans_entry_master_switch): Likewise.
1020 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1021 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1022 * trans-io.c (add_case, set_error_locus,
1023 transfer_namelist_element, transfer_expr): Likewise.
1024 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1025 gfc_trans_stop, gfc_trans_character_select): Likewise.
1026 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1027 * trans.c (gfc_trans_runtime_check): Likewise.
1029 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1031 * trans-decl.c, trans-types.c: Add and remove blank lines as
1034 2004-08-24 Richard Henderson <rth@redhat.com>
1036 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1038 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1040 * resolve.c (merge_argument_lists): Revert unintentionally
1043 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1045 * trans-decl.c (build_function_decl): Fix spelling in comment.
1046 (build_entry_thunks): Remove code with no function.
1047 (gfc_build_intrinsic_function_decls): Remove empty line.
1049 * resolve.c (resolve_entries): Fix a bunch of comment typos.
1051 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1053 * f95-lang.c (gfc_init_decl_processing): Adjust
1054 build_common_tree_nodes call.
1056 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1058 * trans-types.c: Spelling and formatting fixes.
1060 2004-08-23 Richard Henderson <rth@redhat.com>
1062 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1063 of going through an intermediate string. Fix 32/64 int/long bug.
1065 2004-08-23 Eric Christopher <echristo@redhat.com>
1067 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1068 usage. Use build_vector_type_for_mode for vector types.
1070 2004-08-22 Richard Henderson <rth@redhat.com>
1073 * data.c (find_con_by_offset): Search ordered list; handle
1074 elements with repeat counts.
1075 (gfc_assign_data_value_range): New.
1076 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1077 (gfc_assign_data_value_range): Declare.
1078 * match.c (top_val_list): Extract repeat count into a temporary.
1079 * resolve.c (values): Make left unsigned.
1080 (next_data_value): Don't decrement left.
1081 (check_data_variable): Use gfc_assign_data_value_range.
1083 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1085 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1087 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1089 * check.c (gfc_check_reduction): Rename to ...
1090 (check_reduction): ... this. Make static. Don't check type of
1092 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1093 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1094 SUM to use new check functions.
1095 (check_specific): Change logic to call new functions.
1096 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1098 (gfc_check_reduction): Remove prototype.
1100 2004-08-20 Paul Brook <paul@codesourcery.com>
1101 Canqun Yang <canqun@nudt.edu.cn>
1104 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1105 for automatic arrays.
1106 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1108 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1112 * match.c (match_simple_forall, match_simple_where): Forward-declare.
1113 (gfc_match_if): Order statement list alphabetically, add WHERE and
1114 FORALL, remove double PAUSE.
1115 (gfc_match_simple_where, match_forall_header,
1116 gfc_match_simple_forall): New functions.
1117 (gfc_match_forall): Use match_forall_header.
1119 2004-08-19 Paul Brook <paul@codesourcery.com>
1122 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1123 * symbol.c (gfc_clear_attr): Use memset.
1125 2004-08-19 Paul Brook <paul@codesourcery.com>
1129 * data.c (assign_substring_data_value): Remove.
1130 (create_character_intializer): New function.
1131 (gfc_assign_data_value): Track the typespec for the current
1132 subobject. Use create_character_intializer.
1134 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
1137 * check.c (gfc_check_reduction): New function.
1138 (gfc_check_minval_maxval): Removed.
1139 (gfc_check_product): Removed.
1140 (gfc_check_sum): Removed.
1141 * intrinsic.h: Add/remove declarations for these.
1142 * gfortran.h: Add field f3red to union gfc_check_f.
1143 * intrinsic.c (add_sym_3red): New function.
1144 (add_functions): Register maxval, minval, product, and sum intrinsics
1145 through add_sym_3red.
1146 (check_specific): Handle f3red union field.
1147 * iresolve.c: Whitespace change.
1149 2004-08-18 Paul Brook <paul@codesourcery.com>
1151 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1153 2004-08-18 Victor Leikehman <lei@il.ibm.com>
1156 * trans-io.c (transfer_namelist_element): New. Recursively handle
1157 derived-type variables. Pass string lengths.
1158 (build_dt): Code moved to build_namelist, with some
1159 changes and additions.
1160 (gfc_build_io_library_fndecls): Declare the fifth
1161 argument in st_set_nml_var_char -- string_length.
1163 2004-08-17 Paul Brook <paul@codesourcery.com>
1164 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1167 * decl.c (get_proc_name): Update mystery comment.
1168 (gfc_match_entry): Check for errors earlier. Add entry point to list.
1169 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1170 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
1171 (struct gfc_entry_list): Define.
1172 (gfc_get_entry_list): Define.
1173 (struct gfc_namespace): Add refs and entries.
1174 (enum gfc_exec_op): Add EXEC_ENTRY.
1175 (struct gfc_code): Add ext.entry.
1176 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1177 (mio_symbol_attribute): Don't save/reture addr->entry.
1178 (mio_namespace_ref): Refcount namespaces.
1179 * parse.c (accept_statement): Handle ST_ENTRY.
1180 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1181 (parse_contained): Fixup sibling references to entry points
1182 after parsing the procedure body.
1183 * resolve.c (resolve_contained_fntype): New function.
1184 (merge_argument_lists, resolve_entries): New functions.
1185 (resolve_contained_functions): Use them.
1186 (resolve_code): Handle EXEC_ENTRY.
1187 (gfc_resolve): Call resolve_entries.
1188 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1189 * symbol.c (gfc_get_namespace): Refcount namespaces.
1190 (gfc_free_namespace): Ditto.
1191 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1192 optional when multiple entry points are present.
1193 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1194 (gfc_get_extern_function_decl): Add assertion. Fix coment.
1195 (create_function_arglist, trans_function_start, build_entry_thunks):
1197 (gfc_build_function_decl): Rename ...
1198 (build_function_decl): ... to this.
1199 (gfc_create_function_decl): New function.
1200 (gfc_generate_contained_functions): Use it.
1201 (gfc_trans_entry_master_switch): New function.
1202 (gfc_generate_function_code): Use new functions.
1203 * trans-stmt.c (gfc_trans_entry): New function.
1204 * trans-stmt.h (gfc_trans_entry): Add prototype.
1205 * trans-types.c (gfc_get_function_type): Add entry point argument.
1206 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1207 (gfc_generate_module_code): Call gfc_create_function_decl.
1208 * trans.h (gfc_build_function_decl): Remove.
1209 (gfc_create_function_decl): Add prototype.
1211 2004-08-15 Andrew Pinski <apinski@apple.com>
1214 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1215 for cabs{,f} and copysign{,f}.
1216 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1217 (gfor_fndecl_math_cabs): Delete.
1218 (gfor_fndecl_math_sign4): Delete.
1219 (gfor_fndecl_math_sign8): Delete.
1220 (gfc_build_intrinsic_function_decls): Remove the
1221 initializing of cabs{,f} and copysign{,f} functions.
1222 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
1223 instead of the functions definitions.
1224 (gfc_conv_intrinsic_sign): Likewise.
1225 * trans.h (gfor_fndecl_math_cabsf): Delete.
1226 (gfor_fndecl_math_cabs): Delete.
1227 (gfor_fndecl_math_sign4): Delete.
1228 (gfor_fndecl_math_sign8): Delete.
1230 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1232 * trans-array.c (gfc_trans_array_constructor_value): Use
1234 * trans-const.c (gfc_build_string_const,
1235 gfc_init_constants, gfc_conv_mpz_to_tree,
1236 gfc_conv_constant_to_tree): Likewise.
1237 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1238 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1239 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1240 * trans-io.c (add_case, set_error_locus, build_dt,
1241 transfer_expr): Likewise.
1242 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1243 gfc_trans_stop, gfc_trans_character_select): Likewise.
1244 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1245 * trans.c (gfc_trans_runtime_check): Likewise.
1247 2004-08-14 Paul Brook <paul@codesourcery.com>
1249 * trans-decl.c (gfc_build_function_decl): Remove dead code.
1251 2004-08-14 Paul Brook <paul@codesourcery.com>
1253 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1255 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1257 * gfortran.h: Add comments.
1258 * parse.c (parse_contained): Fix comment typo.
1259 * resolve.c (was_declared): Ditto.
1262 2004-08-11 Paul Brook <paul@codeourcery.com>
1265 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1267 2004-08-10 Richard Henderson <rth@redhat.com>
1269 * f95-lang.c (gfc_init_builtin_functions): Remove
1270 __builtin_stack_alloc, add __builtin_alloca.
1271 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1272 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1274 2004-08-10 Paul Brook <paul@codesourcery.com>
1276 * trans-io.c (transfer_expr): Handle pointters.
1278 2004-08-10 Paul Brook <paul@codesourcery.com>
1281 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1282 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1283 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1284 Handle GFC_SS_COMPONENT.
1285 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
1286 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1288 (gfc_conv_array_initializer): Call specific initializer routines.
1289 * trans-expr.c (gfc_trans_structure_assign): New function.
1290 (gfc_trans_subarray_assign): New function.
1291 (gfc_trans_subcomponent_assign): New fucntion
1292 (gfc_conv_structure): Use them.
1293 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1294 (gfc_ss): Add shape.
1296 2004-08-08 Victor Leikehman <lei@il.ibm.com>
1298 * simplify.c (gfc_simplify_shape): Bugfix.
1299 * expr.c (gfc_copy_shape_excluding): New function.
1300 * gfortran.h (gfc_get_shape): Bugfix.
1301 (gfc_copy_shape_excluding): Added declaration.
1302 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1303 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1304 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1305 time resolution of shape.
1307 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
1309 * intrinsic.c (add_subroutines): Add getenv and
1310 get_environment_variable. (add_sym_5s): New function.
1311 * intrinsic.h (gfc_resolve_get_environment_variable): Add
1313 * iresolve.c (gfc_resolve_get_environment_variable): New
1316 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
1318 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
1319 __builtin_pow[f] arguments.
1321 2004-08-06 Steven G. Kargl <kargls@comcast.net>
1323 * arith.c: Add #define for model numbers. Remove global GMP variables.
1324 (natural_logarithm,common_logarithm,exponential,sine,
1325 cosine,arctangent,hypercos,hypersine ): Remove.
1326 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
1327 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
1328 gfc_check_real_range, gfc_constant_result, gfc_range_check,
1329 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
1330 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
1331 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
1332 gfc_convert_complex,gfc_int2real,gfc_int2complex,
1333 gfc_real2int,gfc_real2real,gfc_real2complex,
1334 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
1335 to MPFR, use new functions.
1336 * arith.h: Remove extern global variables.
1337 (natural_logarithm,common_logarithm,exponential, sine, cosine,
1338 arctangent,hypercos,hypersine): Remove prototypes.
1339 (arctangent2): Update prototype from GMP to MPFR.
1340 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
1341 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
1342 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
1343 * gfortran.h (GFC_REAL_BITS): Remove.
1344 (arith): Add ARITH_NAN.
1345 Include mpfr.h. Define GFC_RND_MODE.
1346 Rename GCC_GFORTRAN_H GFC_GFC_H.
1347 (gfc_expr): Convert GMP to MPFR.
1348 * module.c: Add arith.h, correct type in comment.
1349 (mio_gmp_real): Convert GMP to MPFR.
1350 (mio_expr): Use gfc_set_model_kind().
1351 * primary.c: Update copyright date with 2004.
1352 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
1353 * simplify.c: Remove global GMP variables
1354 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
1355 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
1356 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
1357 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
1358 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
1359 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
1360 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
1361 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
1362 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
1363 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
1364 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
1365 gfc_simplify_rrspacing,gfc_simplify_scale,
1366 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
1367 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
1368 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
1369 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
1371 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
1372 gfc_conv_mpf_to_tree. Convert it to use MPFR
1373 (gfc_conv_constant_to_tree): Use it.
1374 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
1375 * trans-intrinsic.c: Add arith.h, remove gmp.h
1376 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
1378 2004-08-06 Victor Leikehman <lei@il.ibm.com>
1379 Paul Brook <paul@codesourcery.com>
1381 * trans-array.c (gfc_trans_allocate_array_storage,
1382 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1383 gfc_conv_loop_setup): For functions, if the shape of the result
1384 is not known in compile-time, generate an empty array descriptor for
1385 the result and let the callee to allocate the memory.
1386 (gfc_trans_dummy_array_bias): Do nothing for pointers.
1387 (gfc_conv_expr_descriptor): Use function return values directly.
1388 * trans-expr.c (gfc_conv_function_call): Always add byref call
1390 (gfc_trans_pointer_assignment): Add comments.
1391 (gfc_trans_arrayfunc_assign): Don't chain on expression.
1393 2004-08-01 Roger Sayle <roger@eyesopen.com>
1395 * options.c (gfc_init_options): Don't warn about the use GNU
1396 extensions by default.
1397 (gfc_post_options): Warn about GNU extensions with -pedantic.
1398 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1400 2004-07-30 Richard Henderson <rth@redhat.com>
1402 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1405 2004-07-25 Richard Henderson <rth@redhat.com>
1407 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1408 and DECL_IGNORED_P on RESULT_DECL.
1409 (gfc_generate_constructors): Likewise.
1411 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1414 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1416 (ffixed-line-length-80, ffixed-line-length-132): Remove.
1417 * options.c (gfc_handle_options): Deal with changed options.
1418 * scanner.c (load_line): Change second arg to 'char **',
1419 allocate if pointing to NULL. Keep track of buffer's length.
1420 Adapt buffer size to overlong lines. Pad lines to full length
1422 (load_file): Adapt to new interface of load_line.
1424 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1426 * trans.h (builtin_function): Declare.
1428 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1431 (parts ported from g95)
1432 * parse.h (gfc_state_data): New field do_variable.
1433 (gfc_check_do_variable): Add prototype.
1434 * parse.c (push_state): Initialize field 'do_variable'.
1435 (gfc_check_do_variable): New function.
1436 (parse_do_block): Remember do iterator variable.
1437 (parse_file): Initialize field 'do_variable'.
1438 * match.c (gfc_match_assignment, gfc_match_do,
1439 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1440 Add previously missing checks.
1441 (gfc_match_return): Reformat error message.
1442 * io.c (match_out_tag): New function.
1443 (match_open_element, match_close_element,
1444 match_file_element, match_dt_element): Call match_out_tag
1445 instead of match_vtag where appropriate.
1446 (match_io_iterator, match_io_element): Add missing check.
1447 (match_io): Reformat error message.
1448 (match_inquire_element): Call match_out_tag where appropriate.
1450 * parse.c (gfc_check_do_variable): Fix error locus.
1452 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1455 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1456 for every assumed length character dummy argument.
1459 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1462 * simplify.c (gfc_simplify_bound): Copy the bound expression.
1464 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1467 * trans-array.c gfc_trans_g77_array,
1468 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1469 for assumed length characters.
1470 (gfc_conv_expr_descriptor): Set se->string_length if dealing
1471 with a character expression.
1472 (gfc_cvonv_array_parameter): Pass string length when passing
1473 character array according to g77 conventions.
1475 2004-07-12 Paul Brook <paul@codesourcery.com>
1477 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1478 * trans-array.c (gfc_trans_auto_array_allocation): Remove
1479 initialization code.
1480 * trans-common.c (create_common): Use gfc_conv_initializer.
1481 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1482 * trans-expr.c (gfc_conv_initializer): New function.
1483 (gfc_conv_structure): Use it.
1484 * trans.h (gfc_conv_initializer): Add prototype.
1486 2004-07-11 Paul Brook <paul@codesourcery.com>
1489 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1491 (parse_contained): Mark contained symbols as referenced.
1493 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1496 * module.c (gfc_dump_module, gfc_use_module): Print locus
1497 when opening of module file fails.
1500 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
1503 * match.c (gfc_match_program): A program name is obligatory.
1504 (gfc_match_return): RETURN in main program is an extension.
1505 (gfc_match_block_data): A space is required before a block data
1509 * primary.c (match_boz_constant): Call gfc_notify_std only if
1510 we actually have a non-standard boz-literal-constant.
1513 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1514 warning if assigning NULL().
1516 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1518 * f95-lang.c (set_block): Remove.
1519 (gfc_clear_binding_stack): New.
1520 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1521 (struct binding_level): Remove block_created_by_back_end.
1522 (clear_binding_level): Likewise.
1523 (poplevel): Don't handle block_created_by_back_end.
1525 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1527 * trans-decl.c (gfc_create_module_variable): Nothing to do if
1528 symbol is in common, because we ...
1529 (gfc_generate_module_vars): Call gfc_trans_common.
1531 2004-07-10 Paul Brook <paul@codesourcery.com>
1533 * trans-array.c (gfc_build_null_descriptor): New function.
1534 (gfc_trans_static_array_pointer): Use it.
1535 * trans-array.h (gfc_build_null_descriptor): Add prototype.
1536 * trans-expr.c (gfc_conv_structure): Handle array pointers.
1538 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1541 * decl.c (gfc_match_save): Use-associated common block
1543 * gfortran.h (gfc_common_head): Add new field 'name'.
1544 Fix typo in comment after #endif.
1545 * match.c (gfc_get_common): Add new argument from_common,
1546 mangle name if flag is set, fill in new field in structure
1548 (match_common): Set new arg in call to gfc_get_common,
1549 use-associated common block doesn't collide.
1550 * match.h (gfc_get_common): Adapt prototype.
1551 * module.c (load_commons): Set new arg in call to
1553 * symbol.c (free_common_tree): New function.
1554 (gfc_free_namespace): Call new function.
1555 * trans-common.c (several functions): Remove argument
1556 'name', use name from gfc_common_head instead.
1558 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1560 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1561 and RHS match. Return early if the RHS is NULL().
1564 * match.c (match_common): Fix error reporting for used common.
1567 * trans-expr.c (gfc_conv_structure): Handle initialization
1568 of scalar pointer components.
1570 * parse.c (decode_statement): Fix matching of BLOCK DATA.
1572 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1573 by fix for PR 15481.
1575 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1577 * trans-common.c: Fix whitespace issues, make variable names
1579 (create_common): Additionally, make loop logic more obvious.
1581 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1582 Paul Brook <paul@codesourcery.com>
1585 * trans-common.c (calculate_length): Remove ...
1586 (get_segment_info): Merge into here. Save field type.
1587 (build_field): Use saved type.
1588 (create_common, new_condition, new_segment, finish_equivalences):
1589 Use new get_segment_info.
1590 * trans-types.c: Update comment.
1592 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1595 * moduele.c (mio_symbol): Don't I/O initial values unless
1596 symbol is a parameter.
1598 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1601 * resolve.c (resolve_symbol): Verify that the shape of a
1602 parameter array is not only explicit, but also constant.
1603 * array.c (gfc_is_compile_time_shape): New function.
1604 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1606 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1612 * module.c (write_symbol, write_symtree): Remove workaround.
1613 * primary.c (match_actual_arglist): Enhance comment.
1614 (gfc_match_rvalue): Handle function call with first argument
1615 a keyword argument correctly.
1616 * resolve.c (resolve_symbol): Change call to
1617 gfc_set_default_type to issue error if no implicit type
1619 * trans-decl.c (gfc_create_module_variable): Remove workaround.
1621 2004-07-08 Paul Brook <paul@codesourcery.com>
1623 * intrinsic.c (add_sym_4s): New function.
1624 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1626 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
1627 Paul Brook <paul@codesourcery.com>
1631 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1632 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1633 * intrinsic.c (add_functions): Identify iargc. Add
1634 command_argument_count.
1635 (add_subroutines): Resolve getarg. Add get_command and
1636 get_command_argument.
1637 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1638 gfc_resolve_get_command_argument): Add prototypes.
1639 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1640 gfc_resolve_get_command_argument): New functions.
1641 * trans-decl.c (gfor_fndecl_iargc): New variable.
1642 (gfc_build_intrinsic_function_decls): Set it.
1643 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1644 (gfc_conv_intrinsic_function): Use it.
1645 * trans.h (gfor_fndecl_iargc): Declare.
1647 2004-07-04 Matthias Klose <doko@debian.org>
1649 * Make-lang.in: Generate and install gfortran man page.
1650 * invoke.texi: Remove extra '@c man end'.
1652 2004-07-04 Richard Henderson <rth@redhat.com>
1654 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1656 2004-07-04 Paul Brook <paul@codesourcery.com>
1658 * decl.c (gfc_match_implicit_range): Don't use typespec.
1659 (gfc_match_implicit): Handle character selectors.
1660 * gfortran.h (gfc_set_implicit): Remove prototype.
1661 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1662 * parse.c (accept_statement): Don't call gfc_set_implicit.
1663 * symbol.c (new_ts): Remove.
1664 (gfc_set_implicit_none): Use same loop bounds as other functions.
1665 (gfc_set_implicit): Remove.
1666 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1667 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1669 2004-06-30 Richard Henderson <rth@redhat.com>
1671 * match.c (var_element): Remove unused variable.
1673 * trans-decl.c (gfc_generate_function_code): Don't set
1674 x_whole_function_mode_p.
1675 (gfc_generate_constructors): Likewise.
1677 2004-06-30 Richard Henderson <rth@redhat.com>
1679 * trans-decl.c (gfc_generate_function_code): Don't set
1680 immediate_size_expand.
1681 (gfc_generate_constructors): Likewise.
1683 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1686 * decl.c (gfc_match_type_spec): Rename second argument to
1687 'implicit_flag', reverse meaning. Don't match_char_spec if
1688 'implicit_flag' is set. Rename to ...
1689 (match_type_spec): ... this.
1690 (gfc_match_implicit_none, match_implicit_range): Move here
1692 (gfc_match_implicit): Move here from match.c, try to
1693 match_char_len if match_implicit_range doesn't succeed for
1694 CHARACTER implicits. Call renamed fucntion match_type_spec.
1695 (gfc_match_data_decl, match_prefix): Call renamed function
1697 * match.c (gfc_match_implicit_none, match_implicit_range,
1698 gfc_match_implicit): Move to decl.c.
1699 * match.h (gfc_match_implicit_none, gfc_match_implicit):
1700 Move protoypes to section 'decl.c'.
1701 (gfc_match_type_spec): Remove prototype.
1703 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1705 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
1708 2004-06-29 Steven Bosscher <stevenb@suse.de>
1710 Make sure types in assignments are compatible. Mostly mechanical.
1711 * trans-const.h (gfc_index_one_node): New define.
1712 * trans-array.c (gfc_trans_allocate_array_storage,
1713 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1714 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1715 gfc_conv_array_ubound, gfc_conv_array_ref,
1716 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1717 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1718 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1719 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1720 types in assignments, conversions and conditionals for expressions.
1721 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1722 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1723 gfc_conv_function_call, gfc_trans_pointer_assignment,
1724 gfc_trans_scalar_assign): Likewise.
1725 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1726 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1727 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1728 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1729 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1730 gfc_conv_allocated, gfc_conv_associated,
1731 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1732 * trans-io.c (set_string): Likewise.
1733 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1734 gfc_do_allocate, generate_loop_for_temp_to_lhs,
1735 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1736 compute_overall_iter_number, gfc_trans_assign_need_temp,
1737 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1738 gfc_evaluate_where_mask, gfc_trans_where_assign,
1739 gfc_trans_where_2): Likewise.
1740 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1741 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1743 * trans.c (gfc_add_modify_expr): Add sanity check that types
1744 for the lhs and rhs are the same for scalar assignments.
1746 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1748 * dump-parse-tree.c (show_common): New function.
1749 (gfc_show_namespace): Show commons.
1751 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1752 Andrew Vaught <andyv@firstinter.net>
1756 * decl.c (gfc_match_save): Adapt to new common structures,
1757 don't allow saving USE-associated common.
1758 * dump-parse-tree (gfc_show_attr): (saved_)common are not
1759 symbol attributes any longer.
1760 (gfc_show_symbol): Don't show old-style commons any longer.
1761 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
1763 * gfortran.h (symbol_attribute): Remove common and saved_common
1765 (gfc_symbol): Remove common_head element.
1766 (gfc_common_head): New struct.
1767 (gfc_get_common_head): New macro.
1768 (gfc_symtree): Add field 'common' to union.
1769 (gfc_namespace): Add field 'common_root'; change type of field
1770 'blank_common' to blank_common.
1771 (gfc_add_data): New prototype.
1772 (gfc_traverse_symtree): Expect a symtree as first argument
1773 instead of namespace.
1774 * match.c (gfc_get_common): New function.
1775 (match_common_name): Change to take char * as argument, adapt,
1776 fix bug with empty name.
1777 (gfc_match_common): Adapt to new data structures. Disallow
1778 redeclaration of USE-associated COMMON-block. Fix bug with
1780 (var_element): Adapt to new common structures.
1781 * match.h (gfc_get_common): Declare.
1782 * module.c: Add 2004 to copyright years, add commons to module
1783 file layout description.
1784 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
1785 for removed attributes.
1786 (mio_symbol): Adapt to new way of storing common relations.
1787 (load_commons): New function.
1788 (read_module): Skip common list on first pass, load_commons at
1790 (write_commons): New function.
1791 (write_module): Call write_commons().
1792 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
1793 functions related to removed attributes.
1794 (gfc_add_data): New function.
1795 (gfc_clear_attr): Don't set removed attributes.
1796 (gfc_copy_attr): Don't copy removed attributes.
1797 (traverse_symtree): Remove.
1798 (gfc_traverse_symtree): Don't traverse symbol
1799 tree of the passed namespace, but require a symtree to be passed
1800 instead. Unify with traverse_symtree.
1801 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
1803 (save_symbol): Remove setting of removed attribute.
1804 * trans-common.c (gfc_sym_mangled_common_id): Change to
1805 take 'char *' argument instead of 'gfc_symbol'.
1806 (build_common_decl, new_segment, translate_common): Adapt to new
1807 data structures, add new
1809 (create_common): Adapt to new data structures, add new
1810 argument name. Fix typo in intialization of derived types.
1811 (finish_equivalences): Add second argument in call to
1813 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
1814 (gfc_trans_common): Adapt to new data structures.
1815 * trans-decl.c (gfc_create_module_variables): Remove test for
1818 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1820 * io.c: Add 2004 to copyright years.
1822 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1823 Andrew Vaught <andyv@firstinter.net>
1825 * gfortran.h (gfc_gsymbol): New typedef.
1826 (gfc_gsym_root): New variable.
1827 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
1828 * parse.c (global_used): New function.
1829 (parse_block_data): Check for double empty BLOCK DATA,
1830 use global symbol table.
1831 (parse_module): Use global symbol table.
1832 (add_global_procedure, add_global_program): New functions.
1833 (gfc_parse_file): Use global symbol table.
1834 * symbol.c (gfc_gsym_root): New variable.
1835 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
1838 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1840 * module.c (mio_gmp_real): Correct writing of negative numbers.
1842 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1845 * expr.c (check_intrinsic_op): Allow comparison of characters.
1848 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1849 Andrew Vaught <andyv@firstinter.net>
1851 * decl.c (contained_procedure): New function.
1852 (match_end): Verify correctness of END STATEMENT in
1855 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1856 Andrew Vaught <andyv@firstinter.net>
1859 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
1860 (decode_statement): Enforce required space in free-form.
1862 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1864 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
1865 * trans-array.c (gfc_conv_descriptor_data): Add operand
1867 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
1868 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
1869 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
1870 * trans-common.c (create_common): Likewise.
1871 * trans-expr.c (gfc_conv_component_ref): Likewise.
1872 * trans-io.c (set_parameter_value): Likewise.
1873 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
1874 (transfer_expr): Likewise.
1875 * trans-decl.c (gfc_trans_auto_character_variable):
1876 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
1877 (gfc_gimplify_function): New function.
1878 (gfc_generate_function-code): Properly handle nested functions.
1879 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
1881 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
1884 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
1885 (gfc_resolve_inquire): Resolve the iolength tag. Return
1886 SUCCESS at end of function if no failure has occured.
1887 * resolve.c (resolve_code): Resolve if iolength is encountered.
1888 * trans-io.c: (ioparm_iolength, iocall_iolength,
1889 iocall_iolength_done): New variables.
1890 (last_dt): Add IOLENGTH.
1891 (gfc_build_io_library_fndecls ): Set iolength related variables.
1892 (gfc_trans_iolength): Implement.
1893 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
1895 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
1898 * scanner.c (load_line): Don't truncate preprocessor lines.
1899 Reformat error message.
1900 (preprocessor_line): Issue warning in case of malformed
1903 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1905 * resolve.c (resolve_symbol): Add comment in function body.
1906 (check_data_variable): Change type of mark to ar_type, adapt code
1909 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1911 * array.c (gfc_insert_constructor): Avoid redundant call to
1912 mpz_comp. Add 2004 to copyright years.
1914 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1916 * trans.h (stmtblock_t): Change has_scope to unsigned int.
1918 2004-06-20 Steven G. Kargl <kargls@comcast.net>
1920 * arith.c (gfc_range_check): correct complex underflow.
1922 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1925 * match.c (match_case_selector): Call gfc_match_init_expr
1926 instead of gfc_match_expr.
1927 * resolve.c (validate_case_label_expr): No need to check for
1928 constant, since it wouldn't have been matched with the fix to
1931 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1934 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
1937 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1940 * trans-deecl.c (generate_local_decl): Do not issue warning for
1941 unused variables if they're use associated.
1943 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1944 Andrew Vaught <andyv@firstinter.net>
1947 * gfortran.h (gfc_check_f): Add new field f3ml.
1948 * check.c (gfc_check_minloc_maxloc): Take argument list instead
1949 of individual arguments, reorder if necessary.
1950 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1951 * intrinsic.c (add_sym_3ml): New function.
1952 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
1953 (check_specific): Catch special case MINLOC, MAXLOC.
1955 2004-06-14 Paul Brook <paul@codesourcery.com>
1957 * intrinsic.c (add_sym_2s): Use correct function types.
1959 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1961 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
1962 * data.c (gfc_get_section_index): Remove dependency on trans.h.
1964 2004-06-12 Steven G. Kargl <kargls@comcast.net>
1966 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1967 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1968 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1969 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1970 * trans-intrinsic.c: Use symbols.
1971 * intrinsic.c (add_sym_2s): New function.
1972 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1973 * intrinsic.h: Function prototypes.
1974 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
1975 gfc_resolve_srand): New functions.
1977 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1980 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1981 contained procedure.
1983 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1986 * interface.c (compare_parameter, compare_actual_formal): Don't
1987 check types and array shapes for NULL()
1988 * trans-expr.c (conv_function_call): No double indirection for
1991 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
1993 * trans-expr.c (gfc_conv_cst_int_power): Compute
1994 x**(-n) by converting it to (1/x)**n instead of
1997 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2000 * module.c (write_symbol, write_symtree): Don't write symbols
2001 wrongly added to namespace.
2002 * trans-decl.c (gfc_create_module_variable): Don't create a
2003 backend decl for a symbol incorrectly added to namespace.
2005 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2008 * resolve.c (resolve_symbol): Verify that parameter array has an
2009 explicit shape. Fix typos and coding style issues in surrounding
2012 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2015 * gfortran.texi: The documentation doesn't contain infomration on
2016 how to report bugs, and shouldn't, so remove the line which
2019 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2021 * intrinsic.c (sort_actual): Keep track of type of missing
2022 arguments. (Missing from previous commit.)
2024 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2026 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2027 * interface.c (compare_actual_formal): Keep type of omitted
2029 * trans-expr.c (gfc_conv_function_call): Add string length
2030 argument for omitted string argument.
2032 2004-06-03 Paul Brook <paul@codesourcery.com>
2034 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2035 lists instead of compound expr chains.
2036 (gfc_trans_code): Annotate statement lists.
2038 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2040 * trans-array.c: Fix spelling in comments.
2042 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2045 * data.c (assign_substring_data_value): New function.
2046 (gfc_assign_data_value): Call the new function if we're dealing
2047 with a substring LHS.
2049 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2052 * gfortran.h (GFC_VERSION): Remove.
2053 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2056 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2058 * trans-types.c: Fix spelling & layout in comments.
2060 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2063 * trans-const.c (gfc_conv_string_init): Allow variable string
2064 length lower than initialization string length.
2066 2004-05-30 Paul Brook <paul@codesourcery.com>
2069 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2070 * trans-expr.c (gfc_trans_string_copy): New function.
2071 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
2073 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2074 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2075 * trans.h (struct gfc_saved_var): Define.
2076 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2078 2004-05-30 Steven G. Kargl <kargls@comcast.net>
2080 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2082 2004-05-29 Steven G. Kargl <kargls@comcast.net>
2084 * simplify.c (gfc_simplify_log): Remove useless line of code.
2086 2004-05-29 Paul Brook <paul@codesourcery.com>
2088 * trans-common.c (find_equivalence): Find multiple rules.
2090 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2092 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2093 (gfc_current_locus): Declare new global variable.
2094 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2095 (gfc_current_locus1): Rename ...
2096 (gfc_current_locus): ... to this.
2097 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2098 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2099 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2100 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2101 and gfc_current_locus(), respectively.
2102 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2103 match_array_cons_element, gfc_match_array_constructor):
2104 Read/modify gfc_current_locus instead of calling gfc_set_locus()
2105 and gfc_current_locus().
2106 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2107 match_attr_spec, gfc_match_function_decl, gfc_match_end,
2108 attr_decl1, gfc_match_save): Likewise.
2109 * error.c (error_print, gfc_internal_error): Likewise.
2110 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2111 * interface.c (gfc_add_interface): Likewise.
2112 * io.c (gfc_match_format, match_dt_format, match_dt_element,
2113 match_io_iterator, match_io): Likewise.
2114 * match.c (gfc_match_space, gfc_match_eos,
2115 gfc_match_small_literal_int, gfc_match_st_label,
2116 gfc_match_strings, gfc_match_name, gfc_match_iterator,
2117 gfc_match_char, gfc_match, gfc_match_assignment,
2118 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2119 gfc_match_nullify, gfc_match_call, match_implicit_range,
2120 gfc_match_implicit, gfc_match_data, match_case_selector,
2121 gfc_match_case, match_forall_iterator): Likewise.
2122 * matchexp.c (gfc_match_defined_op_name, next_operator,
2123 match_level_1, match_mult_operand, match_ext_mult_operand,
2124 match_add_operand, match_ext_add_operand, match_level_2,
2125 match_level_3, match_level_4, match_and_operand, match_or_operand,
2126 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2127 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2128 * parse.c (match_word, decode_statement, next_free, next_fixed,
2129 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2131 * primary.c (match_digits, match_integer_constant,
2132 match_boz_constant, match_real_constant, match_substring,
2133 next_string_char, match_charkind_name, match_string_constant,
2134 match_logical_constant, match_const_complex_part,
2135 match_complex_constant, match_actual_arg, match_keyword_arg,
2136 gfc_match_actual_arglist, gfc_match_structure_constructor,
2137 gfc_match_rvalue, gfc_match_variable): Likewise.
2138 * st.c (gfc_get_code): Likewise.
2139 * symbol.c (check_conflict, check_used, check_done,
2140 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2141 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2142 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2144 2004-05-26 Roger Sayle <roger@eyesopen.com>
2146 * io.c (format_asterisk): Silence compiler warnings by correcting
2147 the number of elements of a "locus" initializer.
2149 2004-05-25 Roger Sayle <roger@eyesopen.com>
2152 * matchexp.c: Allow unary operators after arithmetic operators
2154 (match_ext_mult_operand, match_ext_add_operand): New functions.
2155 (match_mult_operand): Tweak to call match_ext_mult_operand.
2156 (match_add_operand): Tweak to call match_ext_mult_operand.
2157 (match_level_2): Rearrange to call match_ext_add_operand.
2159 2004-05-25 Paul Brook <paul@codesourcery.com>
2161 * expr.c (check_inquiry): Remove bogus tests.
2163 2004-05-23 Paul Brook <paul@codesourcery.com>
2166 * expr.c (restricted_args): Remove redundant checks/argument.
2167 (external_spec_function): Update to match.
2168 (restricted_intrinsic): Rewrite.
2170 2004-05-23 Paul Brook <paul@codesourcery.com>
2171 Victor Leikehman <lei@haifasphere.co.il>
2173 * gfortran.h (struct gfc_symbol): Add equiv_built.
2174 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
2176 (current_length): Remove.
2177 (add_segments): New function.
2178 (build_equiv_decl): Create initialized common blocks.
2179 (build_common_decl): Always add decl to bindings.
2180 (create_common): Create initializers.
2181 (find_segment_info): Reformat to match coding conventions.
2182 (new_condition): Use add_segments.
2183 (add_condition, find_equivalence, add_equivalences): Move iteration
2184 inside functions. Only process each segment once.
2185 (new_segment, finish_equivalences, translate_common): Simplify.
2187 2004-05-23 Steven G. Kargl <kargls@comcast.net>
2189 * check.c (gfc_check_random_seed): Issue for too many arguments.
2191 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2193 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2195 2004-05-22 Paul Brook <paul@codesourcery.com>
2197 * dump-parse-tree.c (gfc_show_equiv): New function.
2198 (gfc_show_namespace): Use it.
2200 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
2203 * symbol.c (gfc_add_common): Disable checks to work around other more
2204 fundamental inadequacies.
2206 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2208 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2210 (gfc_build_function_decl): Likewise.
2212 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2214 * check.c (gfc_check_system_clock): New function.
2215 * intrinsic.c (add_sym_3s): New function.
2216 (add_subroutines): Use it.
2217 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2219 * iresolve.c (gfc_resolve_system_clock): New function.
2221 2004-05-22 Steven G. Kargl <kargls@comcast.net>
2223 * invoke.texi: Document -Wunderflow and spell check.
2224 * lang.opt: Add Wunderflow.
2225 * gfortran.h (gfc_option_t): Add warn_underflow option.
2226 * options.c (gfc_init_options, set_Wall): Use it.
2227 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
2228 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
2229 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
2230 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
2231 * arith.c (common_logarithm): Fix typo in comment.
2233 2004-05-21 Roger Sayle <roger@eyesopen.com>
2235 * io.c (check_format): As a GNU extension, allow the comma after a
2236 string literal to be optional in a format. Use gfc_notify_std to
2237 issue an error/warning as appropriate.
2239 2004-05-21 Roger Sayle <roger@eyesopen.com>
2241 * io.c (check_format): Use gfc_notify_std to determine whether to
2242 issue an error/warning for omitting the digits from the X format.
2244 2004-05-20 Roger Sayle <roger@eyesopen.com>
2246 * io.c (check_format): Allow the number before the X format to
2247 be optional when not -pedantic.
2249 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
2250 Paul Brook <paul@codesourcery.com>
2252 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
2253 Create decls for __builtin_pow{,f}.
2254 * gfortran.h (PREFIX_LEN): Define.
2255 * trans-decl.c (gfor_fndecl_math_powi): Add.
2256 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2257 (gfc_build_intrinsic_function_decls): Create decls for powi.
2258 * trans-expr.c (powi_table): Add.
2259 (gfc_conv_integer_power): Remove.
2260 (gfc_conv_powi): New function.
2261 (gfc_conv_cst_int_power): New function.
2262 (gfc_conv_power_op): Use new powi routines.
2263 * trans.h (struct gfc_powdecl_list): Add.
2264 (gfor_fndecl_math_powi): Add.
2265 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2267 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2269 * trans.c, trans-decl.c: Fix comment typos.
2271 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2273 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
2275 2004-05-18 Steve Kargl <kargls@comcast.net>
2277 * arith.c (gfc_int2complex): Fix incorrect range checking.
2279 2004-05-18 Paul Brook <paul@codesourcery.com>
2282 * decl.c (add_init_expr_to_sym): Remove incorrect check.
2283 (default_initializer): Move to expr.c.
2284 (variable_decl): Don't assign default initializer to variables.
2285 * expr.c (gfc_default_initializer): Move to here.
2286 * gfortran.h (gfc_default_initializer): Add prototype.
2287 * resolve.c (resolve_symbol): Check for illegal initializers.
2288 Assign default initializer.
2290 2004-05-17 Steve Kargl <kargls@comcast.net>
2292 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
2294 2004-05-17 Steve Kargl <kargls@comcast.net>
2296 * arith.c (gfc_real2complex): Range checking wrong part of complex
2299 2004-05-16 Paul Brook <paul@codesourcery.com>
2301 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
2303 2004-05-16 Paul Brook <paul@codesourcery.com>
2305 * arith.c (gfc_range_check): Fix logic error.
2307 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
2309 * arith.c: Fix comment typos.
2311 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2314 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
2315 not initialized in a disallowed fashion.
2316 * match.c (gfc_match_common): Likewise.
2317 (var_element): Verify that variable is not in the blank COMMON,
2318 if it is in a common.
2320 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
2322 * Make-lang.in (f95.generated-manpages): Remove.
2323 (f95.srcextra): New.
2324 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
2325 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
2328 (f95.install-info): Remove.
2329 (install-info): New.
2331 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
2333 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
2335 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2337 * primary.c (match_boz_constant): Use gfc_notify_std() for
2338 issuing a warning or an error.
2340 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2343 * primary.c (match_structure_constructor): Rename ...
2344 (gfc_match_structure_constructor): ... to this. Make non-static.
2345 (gfc_match_rvalue): Call renamed function.
2346 * match.h (gfc_match_structure_constructor): Declare.
2347 * match.c (gfc_match_data_constant): Handle structure
2350 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2354 * gfortran.h (gfc_linebuf): New typedef.
2356 (gfc_file): Revamped, use new gfc_linebuf.
2357 (locus): Revamped, use new types.
2358 (gfc_current_file): Remove.
2359 (gfc_current_form, gfc_source_file): New global variables.
2360 * match.c (gfc_match_space, gfc_match_strings): Use
2361 gfc_current_form to find source form.
2362 * module.c (gfc_dump_module): Use gfc_source_file when printing
2364 * error.c (show_locus, show_loci) Use new data structures to print
2366 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
2368 (file_head, current_file, gfc_current_form, line_head, line_tail,
2369 gfc_current_locus1, gfc_source_file): New global variables.
2370 (gfc_scanner_init1): Set new global variables.
2371 (gfc_scanner_done1): Free new data structures.
2372 (gfc_current_locus): Return pointer to gfc_current_locus1.
2373 (gfc_set_locus): Set gfc_current_locus1.
2374 (gfc_at_eof): Set new variables.
2375 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
2376 to new locus structure.
2377 (gfc_check_include): Remove.
2378 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
2379 (gfc_skip_comments): Use gfc_current_form, find locus with
2381 (gfc_next_char): Use gfc_current_form.
2382 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
2383 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
2385 (get_file): New function.
2386 (preprocessor_line, include_line): New functions.
2387 (load_file): Move down, rewrite to match new data structures.
2388 (gfc_new_file): Rewrite to match new data structures.
2389 * parse.c (next_statement): Remove code which is now useless. Use
2390 gfc_source_form and gfc_source_file where appropriate.
2391 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2392 when determining locus of frontend code.
2393 * trans-io.c (set_error_locus): Same.
2394 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2395 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2397 (all): Add missing initializers.
2399 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2401 * Make-lang.in (trans-common.o): Remove redundant dependency.
2402 (data.c): Replace object file name ...
2403 (data.o): ... by the correct one.
2405 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2407 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2408 for ranges when dumping array references.
2410 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
2412 * decl.c (variable_decl): Always apply default initializer.
2414 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2417 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2418 handle zero correctly.
2420 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2422 * match.c (gfc_match): Eliminate dead code.
2424 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2426 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2427 Detect bad continuation line in fixed form sources.
2429 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2432 * iresolve.c (gfc_resolve_nearest): Add new function.
2433 * intrinsic.h: ... declare it here.
2434 * intrinsic.c (add_functions): ... add it as resolving function
2437 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2440 * match.c (gfc_match_do): Allow infinite loops with
2441 label-do-stmt. Do not enforce space after comma.
2443 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2446 * parse.c (parse_interface): Allow empty INTERFACE, remove
2449 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2451 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2452 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2453 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2454 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2455 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2456 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2457 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2458 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2459 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2460 trans-types.h, trans.c, trans.h: Update copyright years and
2462 * data.c: Likewise, also removed two whitespace-only lines.
2463 * gfortranspec.c, lang.opt: Update copyright years.
2465 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2468 * trans-decl.c (generate_local_decl): Don't warn for unused
2469 variables which are in common blocks.
2471 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2473 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2474 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2475 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2477 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
2480 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2482 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
2484 * gfortran.texi: Use @table @emph instead of @itemize @emph.
2485 Remove "set DEVELOPMENT".
2486 (Compiling GFORTRAN): Remove.
2488 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2490 * array.c (match_subscript, match_array_ref): Add comments
2491 explaining argument 'init'.
2492 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2493 trans-expr.c, trans.c: Fix some typos in comments.
2494 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2495 * primary.c (match_digits, match_integer_constant): Add comment
2496 explaining signflag.
2498 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2501 * primary.c: Include system.h and flags.h, needed for pedantic.
2502 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
2505 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2508 * match.c (match_data_constant): Handle case where
2509 gfc_find_symbol sets sym to NULL
2511 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2513 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
2514 dependency on mathbuiltins.def
2516 2004-04-24 Victor Leikehman <lei@il.ibm.com>
2518 * trans-io.c (transfer_expr): Implemented recursive printing
2521 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
2523 * gfortranspec.c: Do not include multilib.h.
2525 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2527 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
2528 2004 to copyright years.
2529 * trans-expr.c, trans-decl.c: Comment update, we now generate
2530 GENERIC, not SIMPLE. Add 2004 to copyright years.
2532 2004-04-24 Paul Brook <paul@codesourcery.com>
2534 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
2536 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
2539 * arith.c (gfc_arith_divide): Fix complex divide.
2541 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
2543 * gfortranspec.c: Include the target headers.
2545 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
2549 * arith.c (arctangent2): New function.
2550 * arith.h (arctangent2): Add function prototype.
2551 * simplify.c (gfc_simplify_atan2): Use it.
2552 (gfc_simplify_log): Use it.
2554 2004-04-12 Diego Novillo <dnovillo@redhat.com>
2556 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
2557 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2559 2004-04-11 Bud Davis <bdavis9659@comcast.net>
2562 * trans-io.c (build_dt): Change REC to value.
2564 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2567 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
2568 the real value when converting mpf to string.
2570 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2573 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
2576 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2579 * simplify.c (simplify_min_max): Convert the type of the result.
2581 2004-04-11 Paul Brook <paul@codesourcery.com>
2583 * gfortran.texi: Use full target triplet.
2585 2004-04-11 Paul Brook <paul@codesourcery.com>
2587 * Make-lang.in (GFORTRAN_TEXI): Set it.
2588 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
2589 (fortran/gfortran.info): Ditto.
2590 * gfortran.texi: Major update.
2591 * invoke.texi: New file.
2593 2004-04-10 Paul Brook <paul@codesourcery.com>
2595 * trans-array.c (gfc_trans_allocate_temp_array,
2596 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
2597 * trans-decl.c (gfc_build_dummy_array_decl,
2598 gfc_get_symbol_decl, gfc_build_function_decl,
2599 gfc_create_module_variable): Ditto.
2600 * trans-expr.c (gfc_conv_variable): Ditto.
2601 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
2602 * trans.h (GFC_DECL_STRING): Remove.
2603 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
2604 GFC_DECL_ASSIGN): Renumber flags.
2606 2004-04-05 Paul Brook <paul@codesourcery.com>
2610 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
2612 * gfortran.h (struct gfc_charlen): Add backend_decl.
2613 * trans-array.c (gfc_trans_allocate_temp_array,
2614 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
2615 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
2616 Remove old, broken string handling.
2617 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2618 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2619 gfc_trans_deferred_array): Handle character arrays.
2620 * trans-const.c (gfc_conv_const_charlen): New function.
2621 * trans-const.h (gfc_conv_const_charlen): Add prototype.
2622 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
2624 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
2625 (gfc_create_string_length): New function.
2626 (gfc_get_symbol_decl): Create lengths for character variables.
2627 (gfc_get_fake_result_decl): Ditto.
2628 (gfc_build_function_decl): Only set length for assumed length
2629 character arguments.
2630 (gfc_trans_dummy_character): New function.
2631 (gfc_trans_auto_character_variable): Rewrite.
2632 (gfc_trans_deferred_vars): Handle more types of character variable.
2633 (gfc_create_module_variable): String lengths have moved.
2634 (gfc_generate_function_code): Initialize deferred var chain earlier.
2635 * trans-expr.c (gfc_conv_init_string_length): Rename ...
2636 (gfc_trans_init_string_length): ... to this.
2637 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
2638 gfc_conv_function_call): Update to new format for character variables.
2639 (gfc_conv_string_length): Remove.
2640 (gfc_conv_string_parameter): Update assertion.
2641 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
2642 * trans-io.c (set_string): Use new macro names.
2643 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
2644 * trans-types.c (gfc_get_character_type): Use existing length expr.
2645 (gfc_is_nodesc_array): Make public.
2646 (gfc_get_dtype_cst): Rename ...
2647 (gfc_get_dtype): ... to this. Handle unknown size arrays.
2648 (gfc_get_nodesc_array_type): Use new name.
2649 (gfc_sym_type): New character variable code.
2650 (gfc_get_derived_type): Ditto.
2651 (gfc_get_function_type): Evaluate character variable lengths.
2652 * trans-types.h (gfc_strlen_kind): Define.
2653 (gfc_is_nodesc_array): Add prototype.
2654 * trans.h: Update prototypes.
2655 (struct lang_type): Update comments.
2656 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
2657 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
2659 2004-04-04 Paul Brook <paul@codesourcery.com>
2661 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
2662 * options.c (gfc_init.options, gfc_handle_option): Ditto.
2663 * trans-expr.c (gfc_conv_function_call): Ditto.
2664 * trans-types.c (gfc_is_nodesc_array): Ditto
2665 * lang.opt (fg77-calls): Remove.
2667 2004-04-04 Paul Brook <paul@codesourcery.com>
2669 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
2670 (gfc_conv_descriptor_base): Rename ...
2671 (gfc_conv_descriptor_offset): ... to this.
2672 (gfc_trans_allocate_array_storage): Set offset to zero.
2673 (gfc_conv_array_base): Rename ...
2674 (gfc_conv_array_offset): ... to this.
2675 (gfc_conv_array_index_ref): Add offset parameter.
2676 (gfc_conv_array_ref): Include offset.
2677 (gfc_trans_preloop_setup): Use existing offset.
2678 (gfc_trans_allocate_temp_array, gfc_array_allocate,
2679 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2680 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2681 gfc_conf_ss_descriptor): Set offset.
2682 * trans-array.h: Rename prototypes.
2683 * trans-const.h (gfc_index_zero_node): Define.
2684 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
2685 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2686 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
2688 2004-03-25 Diego Novillo <dnovillo@redhat.com>
2690 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
2692 2004-03-24 Bud Davis <bdavis9659@comcast.net>
2695 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
2696 before conversion by gmp library call.
2698 2004-03-24 Bud Davis <bdavis9659@comcast.net>
2701 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
2703 2004-02-24 Richard Henderson <rth@redhat.com>
2705 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
2707 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
2709 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
2710 (fortran/gfortran.info): ... to here.
2713 2004-02-16 Richard Henderson <rth@redhat.com>
2715 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
2716 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
2717 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
2718 (gfc_expand_function): Rename from expand_function_body, make static,
2719 don't do anything except invoke tree_rest_of_compilation.
2720 (gfc_be_parse_file): Invoke cgraph.
2721 (gfc_expand_decl): Remove.
2722 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
2723 __builtin_adjust_trampoline.
2724 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
2725 (gfc_finalize): New.
2726 (gfc_generate_function_code): Use it. Lower nested functions.
2727 * trans-expr.c (gfc_conv_function_call): Add static chain operand
2729 * trans.c (gfc_build_function_call): Likewise.
2730 * trans.h (expand_function_body): Remove.
2732 2004-02-15 Victor Leikehman <lei@il.ibm.com>
2735 * trans-decl.c (gfc_build_function_decl) For functions
2736 returning CHARACTER pass an extra length argument,
2737 following g77 calling conventions.
2738 * trans-types.c (gfc_get_function_type) Ditto.
2739 * trans-expr.c (gfc_conv_function_call) Ditto.
2741 2004-02-14 Paul Brook <paul@codesourcery.com>
2743 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
2745 2004-02-12 Paul Brook <paul@nowt.org>
2749 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
2751 * gfortran.texi: Fix typos.
2753 2004-02-07 Bud Davis <bdavis9659@comcast.net>
2756 * intrinsic.c (add_conversions) Use logical conversion instead
2758 * trans-types.c (gfc_get_logical_type) implemented logical*1
2761 2004-01-17 Paul Brook <paul@codesourcery.com>
2763 * lang-specs.h: Remove %<fixed-form.
2765 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
2767 * lang-specs.h: Enable preprocessing of source files
2768 ending in .F, .fpp, .FPP, .F90 and .F95.
2770 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
2773 * lang-specs.h: Enable compilation of files ending
2774 in .f, .for and .FOR.
2776 2004-01-11 Paul Brook <paul@codesourcery.com>
2778 * trans-stmt.c (gfc_trans_if_1): New function.
2779 (gfc_trans_if): Use it.
2781 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
2783 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
2784 (gfc_option_t): Add max_identifier_length.
2785 * lang.opt: Add fmax-identifier-length.
2786 * match.c (parse_name): Use limit.
2787 * options.c (gfc_init_options): Set max_identifier_length.
2788 (gfc_handle_option): Ditto.
2790 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
2792 * intrinsic.c (add_functions): Add resolve function to dcmplx.
2793 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
2794 * iresolve.c (gfc_resolve_dcmplx): New function.
2796 2004-01-10 Paul Brook <paul@codesourcery.com>
2798 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
2799 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
2800 (gfc_return_by_reference): Correct condition.
2801 (gfc_get_function_type): Ditto.
2803 2004-01-10 Paul Brook <paul@codesourcery.com>
2805 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
2808 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
2810 * iresolve.c: Use correct kind.
2812 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
2815 * trans-decl.c (gfc_create_module_variable): Output array valued
2818 2004-01-10 Paul Brook <paul@codesourcery.com>
2820 * resolve.c (resolve_branch): Get error message right way round.
2822 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
2824 * trans-array (gfc_conv_loop_setup): Adjust comment to track
2826 (gfc_array_allocate): Don't count size of element twice.
2828 2004-01-04 Paul Brook <paul@codesourcery.com>
2830 * lang.opt (i8, r8, std=*): Remove RejectNegative.
2832 2004-01-04 Paul Brook <paul@codesourcery.com>
2834 * error.c (gfc_notify_std): New function.
2835 * gfortran.h (gfc_notify_std): Declare.
2836 (GFC_STD_*): Define.
2837 (gfc_option_t): Add warn_std and allow_std.
2838 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
2839 (gfc_intrinsic_func_interface): Use gfc_notify_std.
2840 * check.c (check_rest): Use gfc_notify_std.
2841 * match.c (gfc_match_pause): Ditto.
2842 (gfc_match_assign): Ditto.
2843 (gfc_match_goto): Ditto.
2844 * resolve.c (resolve_branch): Ditto.
2845 * lang.opt: Add std=<foo> and w.
2846 * options.c (gfc_init_options): Set allow_std and warn_std.
2847 (gfc_handle_option): Handle OPT_std_* and OPT_w.
2849 2004-01-01 Paul Brook <paul@codesourcery.com>
2851 * array.c (gfc_append_constructor): Take constructor, not expression.
2852 * data.c (struct gfc_expr_stack): Remove.
2853 (expr_stack): Remove.
2854 (find_con_by_offset): Rename from find_expr_in_con.
2855 (find_con_by_component): Rename from find_component_in_con.
2856 (gfc_get_expr_stack): Remove.
2857 (gfc_assign_data_value): Rewrite.
2858 (gfc_expr_push): Remove.
2859 (gfc_expr_pop): Remove.
2860 (gfc_advance_section): Rename from
2861 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
2862 (gfc_get_section_index): Handle unbounded sections.
2863 * gfortran.h: Update prototypes.
2864 * resolve.c (check_data_variable): Array section maight not be the
2867 2004-01-01 Paul Brook <paul@codesourcery.com>
2870 * resolve.c (resolve_symbol): Allow assumed length function results.
2872 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
2874 * match.c (gfc_match_pause): Fix spelling.
2876 2004-01-01 Steven Bosscher <stevenb@suse.de>
2879 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
2880 reference from the expression.
2882 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
2884 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
2886 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
2887 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
2888 (symbol_attribute):New variable attribute: assign.
2889 * io.c (resolve_tag):Integer variable is allowed.
2890 (match_dt_format): Add ASSIGN statement. Set assign flag.
2891 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
2892 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
2893 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
2894 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
2895 (next_statement): Add ST_LABEL_ASSIGNMENT.
2896 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
2897 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
2898 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
2899 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
2900 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
2901 assign. Put them into the stuct lang_decl.
2902 * trans-io.c (set_string): Add the assign statement.
2903 * trans-stmt.c (gfc_trans_label_assign): New function.
2904 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
2905 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
2906 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
2907 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
2908 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
2909 (GFC_DECL_ASSIGN(node)): New macro to access flag.
2911 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
2914 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
2917 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
2919 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
2920 that arguments to subroutines/functions can't alias themselves, nor global
2923 2003-12-20 Steven Bosscher <stevenb@suse.de>
2925 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
2926 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
2928 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
2930 * primary.c (match_substring): Fix substring bug for start point
2931 or end point is NULL.
2932 * trans-expr.c (gfc_conv_substring): Ditto
2933 * trans-types.c (gfc_sym_type): Get correct type of scalar
2934 character variables.
2935 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
2938 2003-12-10 Richard Henderson <rth@redhat.com>
2940 * options.c (gfc_post_options): Don't ever use rtl inlining.
2942 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
2944 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
2945 * trans-equivalence.c: Remove.
2946 * trans-decl.c (gfc_get_symbol_decl): Update to match.
2947 (gfc_generate_function_code): Ditto.
2948 * trans-array.c (gfc_conv_array_parameter): Ditto.
2949 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
2950 (F95_ADDITIONAL_OBJS): Add stor-layout.o
2951 * trans.h (gfc_trans_equivalence): Remove.
2952 * gfortran.h (struct gfc_equiv): Add used field.
2953 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
2954 equiv_offset fields.
2956 2003-12-05 Richard Henderson <rth@redhat.com>
2958 * trans.c (gfc_build_addr_expr): New.
2959 (gfc_build_indirect_ref, gfc_build_array_ref): New.
2960 * trans.h: Declare them.
2961 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2962 trans-stmt.c, trans.c (*): Use them.
2964 * f95-lang.c (gfc_post_options): Remove dead prototype.
2965 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
2966 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
2969 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
2971 * io.c (gfc_match_format): Check for missing format label.
2973 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
2976 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
2977 from interfaces in modules.
2979 2003-11-30 Paul Brook <paul@nowt.org>
2981 * trans-array.c (gfc_trans_g77_array): Make non-static.
2982 (gfc_trans_assumed_size): Remove.
2983 (gfc_trans_dummy_array_bias): Explicitly free temporary.
2984 * trans-array.h (gfc_trans_g77_array): Add prototype.
2985 (gfc_trans_assumed_size): Remove.
2986 * trans-decls.c (gfor_fndecl_push_context): Remove.
2987 (gfor_fndecl_pop_context): Remove.
2988 (gfc_build_function)decls): Don't create them.
2989 (gfc_trans_deferred_vars): Update to match. Remove dead code.
2990 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
2992 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
2994 * trans-array.c (gfc_conv_array_parameter): Simplify
2995 array argument passing for array name actual argument.
2996 * trans-expr.c (gfc_conv_function_call): Ditto
2997 * trans-types.c (gfc_is_nodesc_array):Ditto.
2999 2003-11-30 Paul Brook <paul@nowt.org>
3001 * f95-lang.c (gfc_post_options): Move ...
3002 * options.c (gfc_post_options): .. to here. Handle inlining options.
3003 * gfortran.h (gfc_post_options): Add prototype.
3005 2003-11-28 Richard Henderson <rth@redhat.com>
3007 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3009 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3011 * trans.h (has_alternate_specifier): New global variable.
3012 * match.c (gfc_match_call): Handle actual arguments associated with
3013 alternate return indicators.
3014 * trans-expr.c (gfc_conv_function_call): Ditto
3015 * trans-stmt.c (gfc_trans_call): Ditto
3016 (gfc_trans_return): Handle return statement with value.
3017 * trans-decl.c (gfc_generate_function_code): Handle functions with
3019 (gfc_get_fake_result_decl): Ditto
3020 * trans-types.c (gfc_get_function_type): Ditto
3021 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3022 (resolve_formal_arglist): Check asterisk dummy.
3024 2003-11-27 Paul Brook <paul@nowt.org>
3026 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3027 allocation interface.
3028 (gfc_conv_ array_parameter): Ditto.
3029 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3030 * trans-array.c: Update prototype.
3031 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3032 (gfc_trans_auto_character_variable): Use new memory alloc interface.
3033 * trans-expr.c (gfc_conv_string_tmp): Ditto.
3034 (gfc_conv_function_call): Use gfc_conv_string_tmp.
3035 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
3036 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3037 * trans.h (gfc_ss_info): Remove unused pdata field.
3038 * trans.c (gfc_create_var_np): Change T to V.
3040 2003-11-26 Richard Henderson <rth@redhat.com>
3042 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3043 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
3044 FRACTION, NEAREST, SET_EXPONENT.
3045 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3046 Fix GTY marking. Remove unnecessary const's.
3047 (LIBM_FUNCTION): Rename from I_LIB.
3048 (LIBF_FUNCTION): New.
3049 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3050 conventions. Assume the expr signature is correct. Mark const.
3051 (gfc_conv_intrinsic_exponent): Use library functions.
3052 (gfc_conv_intrinsic_set_exponent): Remove.
3053 (gfc_conv_intrinsic_scale): Remove.
3054 (gfc_conv_intrinsic_nearest): Remove.
3055 (gfc_conv_intrinsic_fraction): Remove.
3056 (gfc_conv_intrinsic_function): Update.
3057 * trans-decl.c (gfor_fndecl_math_exponent4): New.
3058 (gfor_fndecl_math_exponent8): New.
3059 (gfc_build_intrinsic_function_decls): Set them.
3060 * trans.h: Declare them.
3062 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
3064 * trans-common.c (gfc_layout_global_equiv): Locate the error for
3065 underflow COMMON block.
3066 (gfc_trans_one_common): Fix bug for size of COMMON block containing
3067 EQUIVALENCE object. Also fix typo in an error message.
3069 2003-11-25 Diego Novillo <dnovillo@redhat.com>
3071 * Make-lang.in: Add check-gfortran to lang_checks.
3072 (check-f95): Alias for check-gfortran.
3074 2003-11-25 Jason Merrill <jason@redhat.com>
3076 * Make-lang.in (f95.tags): Create TAGS.sub files in each
3077 directory and TAGS files that include them for each front end.
3079 2003-11-24 Paul Brook <paul@nowt.org>
3082 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3084 2003-11-24 Paul Brook <paul@nowt.org>
3086 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3088 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3090 2003-11-24 Paul Brook <paul@nowt.org>
3093 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3094 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3096 2003-11-20 Richard Henderson <rth@redhat.com>
3098 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3099 (gfc_conv_array_base): Likewise.
3100 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3101 * trans-expr.c (gfc_conv_string_tmp): Likewise.
3102 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3103 * trans-stmt.c (gfc_trans_character_select): Likewise.
3105 2003-11-13 Paul Brook <paul@nowt.org>
3107 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3109 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
3111 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
3112 (resolve_equivalence): New function.
3113 (resolve_equivalence_derived): New function.
3115 2003-11-12 Richard Henderson <rth@redhat.com>
3117 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
3118 annotate_all_with_locus.
3120 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
3122 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
3123 * trans-decl.c (gfc_finish_var_decl): Modified.
3125 2003-11-08 Paul Brook <paul@nowt.org>
3128 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
3131 2003-11-06 Paul Brook <paul@nowt.org>
3133 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
3135 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
3137 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
3139 2003-10-27 Anthony Green <green@redhat.com>
3141 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
3142 (f95.stagefeedback): Ditto.
3144 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
3147 * Make-lang.in (f95.stageprofile): Add.
3148 (f95.stagefeedback): Add.
3150 2003-10-23 Richard Henderson <rth@redhat.com>
3152 * f96-lang.c (gfc_gimplify_expr): Remove.
3153 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
3154 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
3156 2003-10-23 Richard Henderson <rth@redhat.com>
3158 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
3160 2003-10-20 Paul Brook <paul@nowt.org>
3162 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
3163 * trans-stmt.c (gfc_trans_do_while): Ditto.
3165 2003-10-17 Paul Brook <paul@nowt.org>
3167 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
3169 2003-10-17 Paul Brook <paul@nowt.org>
3171 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
3173 2003-10-17 Feng Wang <wf_cs@yahoo.com>
3175 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
3176 (gfc_resolve_minloc): Ditto.
3177 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
3178 Return the value after subtracting the lower bound.
3180 2003-10-16 Richard Henderson <rth@redhat.com>
3182 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
3184 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
3186 * lang.c: Remove -M option for now, it's in the way for C.
3188 2003-10-14 Jason Merrill <jason@redhat.com>
3190 * Make-lang.in (f95.tags): New rule.
3192 2003-10-13 Richard Henderson <rth@redhat.com>
3194 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
3196 2003-10-13 Paul Brook <paul@nowt.org>
3198 * trans-decl.c (generate_local_decl): Don't create junk variables.
3200 2003-10-13 Paul Brook <paul@nowt.org>
3202 * resolve.c (resolve_formal_arglist): Use function result decl in
3203 preference to function decl.
3205 2003-10-12 Richard Henderson <rth@redhat.com>
3207 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
3208 TREE_READONLY. Update all callers.
3210 2003-10-12 Feng Wang <wf_cs@yahoo.com>
3212 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
3213 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
3214 (gfc_is_intrinsic_libcall): Add CSHIFT.
3216 2003-10-12 Richard Henderson <rth@redhat.com>
3218 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
3219 (gfc_trans_array_constructor_value): Likewise.
3220 (gfc_conv_array_initializer): Likewise.
3221 * trans-stmt.c (gfc_trans_character_select): Likewise.
3223 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
3225 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
3227 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3229 * check.c (gfc_check_repeat): Check arguments are scalar.
3230 (gfc_check_trim): New function.
3231 * intrinsic.h (gfc_check_trim): Add prototype.
3232 * intrinsic.c (add_functions): Use it.
3233 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
3235 * trans-decl.c: Ditto.
3236 (gfc_build_intrinsic_fucntion_decls): Set them.
3237 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
3238 (gfc_conv_intrinsic_trim): New function.
3239 (gfc_conv_intrinsic_repeat): New function.
3240 (gfc_conv_intrinsic_function): Use them.
3242 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3244 * trans-types.c (gfc_sym_type): Handle result variables.
3246 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
3248 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
3249 gfc_get_character_type.
3251 2003-10-11 Feng Wang <wf_cs@yahoo.com>
3253 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
3255 2003-10-11 Paul Brook <paul@nowt.org>
3257 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
3258 (gfc_resolve_dprod): New function.
3259 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
3260 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
3261 (gfc_resolve_dprod): Declare.
3262 * intrinsic.c (add_functions): Use them.
3263 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
3265 2003-10-06 Richard Henderson <rth@redhat.com>
3267 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
3268 * trans-intrinsic.c (call_builtin_clz): Use it.
3270 2003-10-05 Paul Brook <paul@nowt.org>
3272 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
3273 * trans-decl.c (gfc_generate_function_code): Set
3274 cfun->function_end_locus.
3276 2003-09-24 Jason Merrill <jason@redhat.com>
3278 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
3281 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
3282 Paul Brook <paul@nowt.org>
3284 * Make-lang.in (F95_OBJS): Add fortran/data.o.
3285 * array.c (gfc_inser_constructor): New function.
3286 (gfc_get_constructor): New function.
3287 (gfc_free_constructor): Initialize offset and repeat.
3288 (iterator_stack): Remove.
3289 (expand_info): Add offset, component and repeat fields.
3290 (expand_constructor): Set them.
3291 (expand): Set new fields.
3292 (gfc_copy_constructor): Ditto. Avoid recursion.
3293 * gfortran.h: Add prototypes for new functions.
3294 (gfc_constructor): Add offset, component and repeat.
3295 (iteratio_stack): Move to here.
3296 * resolve.c (check_data_variable): Convert data values into variable
3298 (traverse_data_list): Build implicit loop chain.
3299 (gfc_resolve): Ditto.
3300 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
3301 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
3302 * trans-expr.c (gfc_conv_structure): Handle array initializers.
3303 (gfc_conv_expr): Update to match.
3304 * trans.h (gfc_conv_structure): Declare.
3307 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
3309 * trans.h: Add declarations for gfor_fndecl_si_kind and
3310 gfor_fndecl_sr_kind.
3311 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3312 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
3313 (g95_conv_intrinsic_sr_kind): New function.
3314 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
3317 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
3319 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
3320 instead of _4 and _8 as postfix for libgfortran calls.
3322 2003-09-16 Paul Brook <paul@nowt.org>
3324 * array.c (compare_bounds): New function.
3325 (gfc_compare_array_spec): Use it.
3327 2003-09-14 Paul Brook <paul@nowt.org>
3329 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
3330 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
3332 2003-09-14 Paul Brook <paul@nowt.org>
3334 * check.c (dim_rank_check): Allow assumed bounds if requested.
3335 (gfc_check_lbound): Call it.
3336 (gfc_check_ubound): Ditto.
3337 (gfc_check_size): Change to match.
3338 * simplify.c (gfc_simplify_bound): New function.
3339 (gfc_simplify_lbound): New function.
3340 (gfc_simplify_ubound): New function.
3341 * intrinsic.h: Declare them.
3342 * intrinsic.c (add_functions): Use them.
3344 2003-09-14 Paul Brook <paul@nowt.org>
3346 * io.c (format_lex): Initialize negative_flag.
3347 (check_format): Intialize repeat.
3348 * trans-io.c (gfc_new_nml_name_expr): Declare static.
3349 (gfc_new_var_expr): Ditto.
3351 2003-09-14 Paul Brook <paul@nowt.org>
3353 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
3354 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
3356 2003-09-12 Paul Brook <paul@nowt.org>
3358 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
3360 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3362 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
3363 for a correct expression.
3365 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
3367 * trans-intrinsic.c (real_compnt_info): New struct.
3368 (prepare_arg_info): New function.
3369 (gfc_conv_intrinsic_set_exponent): New function.
3370 (gfc_conv_intrinsic_scale): New function.
3371 (gfc_conv_intrinsic_nearest): New function.
3372 (gfc_conv_intrinsic_fraction): New function.
3373 (gfc_conv_intrinsic_exponent): New function.
3374 (gfc_conv_intrinsic_spacing): New function.
3375 (gfc_conv_intrinsic_rrspacing): New function.
3376 (gfc_conv_intrinsic_function): Use them.
3378 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
3380 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
3381 build_int_2 changed from (high, low) to (low, high).
3382 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
3383 ioparm_namelist_read_mode, iocall_set_nml_val_int,
3384 iocall_set_nml_val_float, iocall_set_nml_val_char,
3385 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
3386 (gfc_build_io_library_fndecls): Add variable initialization.
3387 (gfc_new_nml_name_expr, get_new_var_expr): New function.
3388 (build_dt): Add namelist support.
3389 * io.c (value): New variable.
3390 (check_format): Support FMT_H now.
3392 2003-09-07 Paul Brook <paul@nowt.org>
3394 * io.c (gfc_resolve_dt): Error if format label is not defined.
3396 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3398 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
3399 about case_switch's break. The other is about building the condition
3400 statement tree, which judges the argument in the range of the
3401 corresponding integer type.
3402 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
3403 for the large values.
3405 2003-09-05 Paul Brook <paul@nowt.org>
3407 * f95-lang.c (expand_function_body): Gimplify the function.
3409 2003-09-04 Jeff Law <law@redhat.com>
3411 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
3414 2003-09-04 Paul Brook <paul@nowt.org>
3416 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
3417 (gfc_expand_stmt): New function.
3418 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
3419 (expand_function_body): Use tree_rest_of_compilation.
3420 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
3422 2003-09-03 Jeff Law <law@redhat.com>
3424 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
3427 2003-08-30 Paul Brook <paul@nowt.org>
3429 * f95-lang.c (builtin_function): Remove #if 0 code.
3430 (gfc_define_builtin): New function.
3431 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
3432 * mathbuiltins.def: New file.
3433 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
3434 (gfc_intrinsic_map): Use mathbuiltins.def.
3435 (gfc_intrinsic_builtin_t): Remove.
3436 (gfc_build_intrinsic_lib_fndecls): Update.
3437 * trans-types.c (gfc_init_types): Remove redundant initilaization of
3438 signed_size_type_node.
3440 2003-08-29 Paul Brook <paul@nowt.org>
3442 * arith.c (gfc_real_kinds): Use correct minimum exponents.
3444 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
3446 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
3447 (gfc_conv_intrinsic_function): Add MODULO.
3449 2003-08-22 Jason Merrill <jason@redhat.com>
3451 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
3453 2003-08-22 Andreas Jaeger <aj@suse.de>
3455 * Make-lang.in (f95.install-common): Add DESTDIR support.
3456 * (f95.install-info): Likewise.
3457 (f95.uninstall): Likewise.
3459 2003-08-19 Diego Novillo <dnovillo@redhat.com>
3461 * trans-types.c (gfc_init_types): Initialize
3462 signed_size_type_node with size_type_node.
3464 2003-08-18 Paul Brook <paul@nowt.org>
3466 * dependency.c (gfc_dependency): New enum.
3467 (check_another_array_ref): Remove.
3468 (gfc_get_array_from_component): Remove.
3470 (get_range): Remove.
3471 (get_no_of_elements): Use mpz_t, not mpf_t.
3472 (transform_sections): New function.
3473 (gfc_check_range_range): Rename ...
3474 (gfc_check_section_vs_section): ... to this. Use new function.
3475 (gfc_is_inside_range): Rewrite to match.
3476 (gfc_check_element_vs_section): Ditto.
3477 (gfc_check_element_vs_element): Ditto.
3479 (gfc_dep_resolver): Ditto. Remove unused parameter.
3480 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
3481 gfc_check_element_vs_element, gfc_is_inside_range,
3482 gfc_get_array_from_component): Remove prototypes for static functions.
3483 (gfc_dep_resolver): Update prototype.
3484 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
3486 2003-08-15 Paul Brook <paul@nowt.org>
3488 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
3489 return values to parent scope.
3490 (gfc_build_dummy_array_decl): Ditto.
3492 2003-08-14 Paul Brook <paul@nowt.org>
3494 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
3495 size of the type, not the pointer.
3496 * resolve.c (resolve_symbol): Give more accurate error message.
3498 2003-08-10 Paul Brook <paul@nowt.org>
3500 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
3502 2003-08-10 Paul Brook <paul@nowt.org>
3504 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
3507 2003-08-10 Chun Huang <compiler@sohu.com>
3509 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
3510 (resolve_symbol): Ditto.
3511 * trans-expr.c (gfc_conv_statement_function): New function.
3512 (gfc_conv_function_expr): Use it.
3514 2003-08-10 Paul Brook <paul@nowt.org>
3516 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
3517 (walk_function_expr): Set section rank.
3518 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
3520 2003-08-10 Paul Brook <paul@nowt.org>
3522 * intrinsic.c (add_sym): Prefix names with correct string.
3523 (add_sym_0s): New function.
3524 (add_subroutines): Register abort.
3526 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
3528 * gfortran.h: Introduce options to control the mangling.
3529 * lang.opt: Likewise.
3530 * options.c (gfc_init_options): Handle the options.
3531 * trans-common.c (gfc_sym_mangled_common_id): New function.
3532 (gfc_build_common_decl): Call it.
3533 * trans-decl.c (gfc_sym_mangled_function_id): New function.
3534 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
3536 2003-08-09 Paul Brook <paul@nowt.org>
3538 * module.c (mio_symbol): Always ouput a namespace for formal args.
3539 (load_needed): Namespace now belong to their proper symbol.
3540 (gfc_dump_module): Change G95=>GFORTRAN.
3542 2003-08-05 Paul Brook <paul@nowt.org>
3544 * options.c: Force -fg77-calls.
3546 2003-08-02 Paul Brook <paul@nowt.org>
3548 * Makelang.in: Rename G95_* to GFORTRAN_*.
3549 * All sources: Rename G95_* to GFC_*.
3551 2003-08-01 Paul Brook <paul@nowt.org>
3553 * fortran/Make-lang.in: Use GMPLIBS.
3554 * fortran/config-lang.in: Set need_gmp.
3555 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
3557 2003-07-27 Andreas Jaeger <aj@suse.de>
3559 * trans-decl.c (gfc_generate_constructors): Convert prototype to
3561 * trans-const.c (gfc_init_constants): Likewise.
3562 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
3564 * gfortranspec.c: Convert to ISO C90.
3565 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
3567 2003-07-26 Paul Brook <paul@nowt.org>
3569 * lang.opt: Add -fdump-parse-tree.
3570 * options.c (gfc_handle_option): Ditto.
3571 * resolve.c (resolve_forall_iterators): Convert to proper type.
3572 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
3574 2003-07-26 Paul Brook <paul@nowt.org>
3576 * Makefile.in: Add build dependencies on files common with rest of gcc.
3578 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
3580 * trans.h: Declare g95_trans_pointer_assignment.
3581 * trans-expr.c (g95_trans_pointer_assignment): New function.
3582 (g95_trans_pointer_assign): Use it.
3583 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
3584 (g95_trans_pointer_assign_need_temp): New function.
3586 2003-07-26 Paul Brook <paul@nowt.org>
3588 * gfortran.texi: Replace references to g95.
3590 2003-07-26 Paul Brook <paul@nowt.org>
3592 Rename g95_* to gfc_*.
3594 2003-07-25 Paul Brook <paul@nowt.org>
3596 * gfortran.h: Rename from g95.h.
3597 * trans-types.c (boolean_type_node, booelan_true_node,
3598 boolean_false_node): Remove.
3599 * trans-types.h: Ditto.
3601 2003-07-25 Chun Huang <compiler@sohu.com>
3603 * parse.c (accept_statement): Implement BLOCK DATA statement.
3604 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
3607 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
3609 * trans-stmt.c (temporary_list): Define.
3610 (g95_trans_assign_need_temp): New function.
3611 (g95_trans_forall_1): Modified for WHERE.
3612 (g95_trans_where_assign): Modified.
3613 (g95_trans_where_2): Modified.
3614 (g95_evaluate_where_mask): Modified.
3615 (g95_trans_where): Modified.
3616 (g95_get_temp_expr): Removed.
3617 (g95_add_to_where_stmt_list): Removed.
3618 (compute_overall_iter_number): Modified for WHERE.
3619 * trans.h: Remove where_stmt_list.
3621 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3623 * lang.opt: Correct description of options -J and -M.
3625 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
3627 * lang.opt: Move help text to here.
3628 * lang-options.h: Remove.
3630 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3631 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
3632 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
3635 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
3636 Paul Brook <paul@nowt.org>
3638 * check.c (check_rest): Use global pedantic flag.
3639 * io.c (data_desc): Ditto.
3640 * error.c (g95_warning, g95_warning_now): Use global flag.
3641 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
3642 (expand_function_body): Update to new prototypes.
3643 (g95_init): Use new option names.
3644 * g95.h (g95_option_t): Standardize names.
3645 (g95_init_options, g95_handle_option): Update prototypes.
3646 * interface.c: Use new option names.
3653 * simplify.c: Ditto.
3655 * trans-array.c: Ditto.
3656 * trans-expr.c: Ditto.
3657 * trans-types.c: Ditto.
3658 * trans-decl.c: Ditto.
3659 (g95_build_library_function_decl): Remove obsolete VPARAMS.
3661 * options.c (g95_display_help): Remove.
3662 (g95_init_options): Convert to new scheme.
3664 (g95module_option): Ditto, rename from g95_parse_arg.
3665 (g95_handle_module_path_options): New function.
3666 * trans-equivalence.c: Fix error message.
3667 * lang.opt: Corrections.
3669 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
3671 * lang.opt: New file.
3673 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3675 * decl.c (match_attr_spec): Set colon_seen.
3677 2003-07-14 Paul Brook <paul@nowt.org>
3679 * trans-array.c: Update comment.
3680 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
3681 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
3682 minmaxloc,minmaxval): Ditto.
3683 * trans-io.c (g95_trans_transfer): Ditto.
3684 * trans-stmt.c: Remove unneeded prototypes.
3685 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
3686 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
3687 (compute_inner_temp_size): Remove bits of dead code. Add comments.
3688 Don't share loopinfo.
3689 (compute_overall_iter_number): Declare as static.
3690 (allocate_temp_for_forall_nest): Ditto.
3691 (g95_trans_forall_1): Don't pass shared loopinfo.
3692 * trans.c (g95_start_block): Expand comment.
3694 2003-07-12 Paul Brook <paul@nowt.org>
3696 * arith.c (g95_index_integer_kind): Remove unused initializer.
3697 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
3698 index by size of element.
3699 (generate_loop_for_rhs_to_temp): Ditto.
3700 (allocate_temp_for_forall_nest): Use element size, not index size.
3702 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3704 * arith.c (g95_index_integer_kind): Add a TODO.
3705 * simplify.c (g95_simplify_nearest): Add a TODO.
3707 2003-07-09 Chun Huang <compiler@sohu.com>
3709 * trans.h: Add declarations for gfor_fndecl_string_scan and
3710 gfor_fndecl_string_verify.
3711 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3712 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
3713 (g95_conv_intrinsic_verify): New function.
3714 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
3715 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
3716 of parameter 'BACK=.TRUE.'
3718 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
3720 * trans-stmt.c (iter_info, forall_info): Define.
3721 (g95_trans_forall_block): Remove.
3722 (g95_trans_forall_loop): Use forall info blocks.
3723 (g95_trans_nested_forall_loop): New function.
3724 (g95_do_allocate): Handle things other than logical masks.
3725 (generate_loop_for_temp_to_lhs): New function.
3726 (generate_loop_for_rsh_to_temp): New function.
3727 (compute_inner_temp_size): New function.
3728 (compute_overall_iter_number): New function.
3729 (allocate_temp_for_forall_nest): New function.
3730 (g95_trans_forall): Move body ...
3731 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
3733 2003-07-02 Paul Brook <paul@nowt.org>
3735 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
3736 in correct scope. Change callers to match.
3737 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
3738 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
3740 2003-07-02 Paul Brook <paul@nowt.org>
3742 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
3743 expression shape for all expressions.
3744 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
3746 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3748 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
3749 g95_parse_arg), intrinsic.c (g95_convert_type): support of
3751 * intrinsic.c, g95.h: Add g95_convert_type_warn,
3752 * resolve.c (g95_resolve_index): Call it.
3754 2003-07-02 Paul Brook <paul@nowt.org>
3756 * iresolve.c (g95_resolve_reshape): Set expression shape.
3757 (g95_resolve_shape): Ditto.
3758 * simplify.c (g95_simplify_shape): Move common code outside condition.
3759 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
3761 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3763 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
3766 2003-06-29 Paul Brook <paul@nowt.org>
3768 * array.c (g95_simplify_iterator_var): Don't bother with return value.
3769 * expr.c (find_array_element, find_component_ref): New functions.
3770 (remove_subobject_ref): New function.
3771 (simplify_const_ref): Use them. Rename from simplify_component_ref.
3772 (simplify_ref_chain): New function.
3773 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
3774 (g95_specification_expr): Simplify the expression.
3775 * resolve.c (resolve_operator): Check simplifications return code.
3776 (g95_resolve_expr): Ditto.
3778 2003-06-26 Paul Brook <paul@nowt.org>
3780 * expr.c (simplify_component_ref): New function.
3781 (g95_simplify_expr): Use it.
3782 * resolve.c (resolve_structure_cons): Handle references.
3784 2003-06-25 Paul Brook <paul@nowt.org>
3786 * trans-io.c (build_dt): Handle internal units.
3788 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
3790 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
3791 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
3792 Use g95_array_index_type instead of integer_type_node.
3793 (g95_build_common_decl, g95_set_common_master_type): Use
3794 g95_character1_type_node instead of char_type_node.
3795 * trans-equivalence.c (g95_layout_local_equiv): As above.
3797 2003-06-24 Steven G. Kargl <kargls@attbi.com>
3799 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
3800 remove last remains of -fquiet.
3802 2003-06-22 Paul Brook <paul@nowt.org>
3804 * resolve.c (resolve_operator): Don't fail if we can't simplify.
3805 (g95_resolve_expr): Ditto.
3806 (resolce_code): Mark as static.
3807 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
3808 gimplifer doesn't (yet).
3810 2003-06-20 Paul Brook <paul@nowt.org>
3812 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
3813 * match.c (g95_match_if): Add ST_PAUSE.
3814 (g95_match_stopcode): New function.
3815 (g95_match_pause, g95_match_stop): Use it.
3816 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
3817 (decode_stmt, next_statement, parse_executable): Ditto.
3818 * resolve.c (resolve_code): Ditto.
3819 * st.c (g95_free_statement): Ditto.
3820 * trans-stmt.c (g95_trans_pause): New function.
3821 * trans-stmt.h: Declare it.
3822 * trans.c (g95_trans_code): Use it.
3823 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
3825 (g95_build_builtin_function_decls): Initialize them.
3827 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
3829 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3831 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
3832 match_filepos): Fix error handling.
3834 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3836 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
3837 Add assertions on arguments.
3838 * resolve.c (expression_shape): Remove useless &.
3839 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
3840 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
3841 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
3842 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
3843 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
3844 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
3845 (g95_simplify_not, g95_simplify_scale): Add assertions.
3847 2003-06-15 Paul Brook <paul@nowt.org>
3849 Clean up stuff to work with the ssa optimizers.
3850 * convert.c (convert): Handle BOOLEAN_TYPEs.
3851 * f95-lang.c (g95_truthvalue_conversion): Implement.
3852 * trans-array.c (g95_trans_array_constructor_value): Group multiple
3854 * trans.h (g95_truthvalue_conversion): Declare.
3855 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
3856 * trans-stmt.c (g95_trans_character_select): Don't create array
3857 assignments. Mark labels as indirect jump targets.
3858 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
3859 (g95_get_dtype_cst): Handle LOGICAL types.
3861 2003-06-14 Paul Brook <paul@nowt.org>
3863 * f95-lang.c (g95_gimplify_expr): New function.
3864 * trans-array.c (g95_trans_array_constructor_value): Don't create
3866 (g95_conv_expr_descriptor): Rename simple->gimple.
3867 * trans-expr.c (conv_expr_op): Use proper logical operators.
3868 * trans-intrinsic.c (build_fixbound_expr): New function.
3869 (build_fix_expr): Ditto.
3870 (g95_conv_intinsic_aint): Use them. Use builtin functions.
3871 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
3873 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3875 * array.c (g95_compare_array_spec): Remove unreachable code.
3876 * expr.c (g95_copy_expr): Likewise.
3877 * intrinsic.c (g95_convert_type): Likewise.
3878 * misc.c (g95_code2string): Likewise.
3879 * simplify.c (g95_simplify_ishft, g95_simplify_real,
3880 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
3881 * trans-stmt.c (g95_trans_select): Likewise.
3882 * primary.c (extend_ref): Add an assertion.
3883 * simplify.c (g95_convert_constant): Add const.
3884 * intrinsic.h: Remove g95_check_x_ni.
3885 * f95-lang.c (g95_finish): Call g95_release_include_path.
3887 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3889 * resolve.c (resolve_contained_functions): Fix typo introduced on
3892 2003-06-09 Paul Brook <paul@nowt.org>
3894 * g95.h: Include system.h not hwint.h.
3895 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
3896 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
3898 2003-06-09 Paul Brook <paul@nowt.org>
3900 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
3901 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
3902 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
3903 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
3904 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
3906 * trans.h (g95_trans_equivalence, g95_trans_common,
3907 g95_add_decl_to_function): Declare.
3908 * trans-common.c, trans-equivalence.c: New files.
3910 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
3912 * intrinsic.c (g95_intrinsic_extension): Remove.
3913 (add_functions): Substitute g95_check_x for g95_check_x_ni
3915 (g95_init_expr_extensions): New function.
3916 (g95_intrinsic_func_interface): Use it.
3917 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
3918 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
3919 g95_check_precision, g95_check_present, g95_check_radix,
3920 g95_check_range, g95_check_selected_real_kind): Do not set
3921 g95_intrinsic_extension.
3922 (g95_check_x_ni): Remove now duplicate of g95_check_x.
3924 * expr.c (check_inquiry): Add FIXME, fixup some code style.
3926 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3928 * g95.h (ref_type): Name this type explicitly.
3929 * module.c (MIO_NAME): Add specialisations of mio_name.
3930 (mio_symbol_attribute, mio_typespec, mio_array_ref,
3931 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
3932 (ab_attribute): Name this type explicitly.
3933 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
3935 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
3937 * trans-intrinsic.c (g95_conv_allocated): New function.
3938 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
3940 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3942 * f95-lang.c: Don't include g95-support.h
3943 (g95_mark_addressable): Add prototype.
3944 (g95_init_decl_processing): Remove C front end hack.
3945 * f95-tree.c: Remove file.
3946 * support.c: Remove file.
3947 * g95-support.h: Remove file.
3948 * trans-types.c (g95_init_types): Set up boolean
3949 type related tree nodes.
3950 * Make-lang.in: Remove rules for dead files and
3951 dependencies on them.
3953 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3955 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
3956 C front end dependency. Also, convert.c does not depend on
3957 g95-support.h anymore.
3958 * convert.c: Don't include c-common.h and g95-support.h
3959 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
3960 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
3961 stmts_are_full_exprs_p, current_stmt_tree,
3962 current_scope_stmt_stack): Remove.
3963 * g95-support.h (unsigned_conversion_warning): Kill proto.
3964 (boolean_type_node, boolean_true_node, boolean_false_node):
3965 Don't define here. Instead, make then true tree nodes in
3967 * support.c (c_global_trees): Die, C front end, die!!!
3968 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
3969 uintmax_type_node, string_type_node and const_string_type_node.
3970 (decl_constant_value, overflow_warning): Make static functions.
3971 They are in death row too, though.
3972 (default_conversion, c_expand_asm_operands): Remove.
3973 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
3974 trans.c: Don't include c-common.h.
3975 * trans-types.c (boolean_type_node, boolean_true_node,
3976 boolean_false_node): Make them real tree nodes.
3977 * trans-types.h (intmax_type_node, string_type_node,
3978 const_string_type_node): Hack to work around C dependencies
3979 in builtin-types.def.
3981 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3983 * decl.c (decl_types): Add some iterators-like sentinels.
3984 * decl.c (match_attr_spec): Use them.
3985 Use "decl_types" instead of "int".
3986 Add cast in call to g95_match_strings.
3987 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
3989 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
3990 (g95_interface_info): Use "g95_intrinsic_op".
3991 * dump-parse-tree.c (g95_show_namespace): Use them.
3992 * interface.c (g95_check_interfaces): Use them.
3993 * module.c (read_module, write_module): Use them.
3994 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
3995 Use "g95_intrinsic_op".
3996 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
3997 Add a default case in switch statement.
3998 * intrinsic.h (g95_generic_isym_id): Moved to...
3999 * g95.h (g95_generic_isym_id): here.
4000 (g95_intrinsic_sym): Use "g95_generic_isym_id".
4001 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4002 * trans-intrinsic.c (g95_intrinsic_map_t,
4003 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4004 * match.c (g95_match_intrinsic_op): Add cast in call to
4007 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
4009 * support.c (skip_evaluation, warn_conversion, lvalue_p,
4010 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4011 constant_fits_type_p, convert_and_check,
4012 unsigned_conversion_warning): Remove these ugly remnants
4013 we inherited from the C front end.
4014 (function_types_compatible): Remove '#if 0'-edcode.
4015 (build_modify_expr): Likewise.
4016 (convert_for_assignment): Don't use the deceased functions.
4017 The parameter fundecl is now unused.
4018 (decl_constant_value): Always just return decl. In fact
4019 this function is not used at present, but it might be in
4020 the future, when we start using the tree inliner.
4021 (overflow_warning, default_conversion, c_expand_asm_operands):
4022 Abort when these are called, they are part of the C type
4023 checking implementation and therefore poison to Fortran.
4025 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
4027 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4028 c-pretty-print.o and c-dump.o. Add a comment on why we
4029 depend on c-semantics.c.
4030 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4031 Don't use the C front end tree dumper hook to dump the
4032 language specific tree representation -- we don't have
4033 one. So instead, inherit the default langhook.
4035 2003-06-02 Paul Brook <paul@nowt.org>
4037 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4039 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4041 * check.c (g95_check_associated): Use proper types. Remove
4042 extraneous argument in call to g95_error().
4044 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4046 * resolve.c (resolve_operator): Make logical operands convert to the
4047 type with higher kind.
4049 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4051 * check.c (g95_check_associated): Make sure both pointer and target has
4052 the same type and rank. Null pointer or array section with vector
4053 subscript as target are not allowed.
4054 * trans.h: Declare gfor_fndecl_associated.
4055 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4056 gfor_fndecl_associated.
4057 * trans-intrinsic.c (g95_conv_associated): New function.
4058 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4060 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
4062 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4063 according to POINTER itself rather than TARGET.
4064 (g95_conv_expr_descriptor): Make lbound start at 1.
4065 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4067 2003-06-01 Paul Brook <paul@nowt.org>
4069 * expr.c (g95_type_convert_binary): Make it match the standard.
4070 * g95.texi: Remove dead link.
4072 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
4074 * g95.texi: Cleanup somewhat in preparation for inclusion
4077 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4078 Canqun Yang <canqun@yahoo.com.cn>
4080 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4082 (g95_find_forall_index): Return proper value.
4083 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4084 compare the return value from g95_find_forall_index.
4086 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4087 * g95.h, io.c (g95_st_label): Remove "length".
4088 (g95_symtree): Remove "link".
4089 (g95_case): Remove "code".
4090 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4091 g95_convert_real): Make an argument pointer to const.
4092 * decl.c (colon_seen): Add a TODO.
4093 * interface.c (g95_compare_types): Fix typo.
4094 * interface.c (compare_interfaces): Preserve value of "p".
4095 * intrinsic.c (sort_actual): Remove "i".
4096 * match.c (g95_match_assign): Proper type in call to g95_match().
4097 * parse.c (next_free): Avoid duplicate call due to macro.
4098 * parse.c (check_statement_label): wrong type in call to g95_error.
4099 * primary.c (match_real_constant): Add a TODO.
4100 * resolve.c (resolve_select): Remove useless conditional.
4101 * simplify.c (g95_simplify_repeat): Proper assignment to
4102 "value.character.string".
4103 * simplify.c (g95_simplify_reshape): Wrong variable in call to
4106 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
4108 * trans-stmt.c: Remove unnecessary include file defaults.h.
4110 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
4112 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
4114 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
4115 actual variables used as FORALL indexes.
4117 2003-05-15 Paul Brook <paul@nowt.org>
4119 * trans-array.c (g95_trans_static_array_pointer): Use
4121 (g95_trans_deferred_array): Initialize static array pointers.
4122 * trans-expr.c (g95_conv_function_call): Use formal arglist to
4123 correctly pass POINTER and absent CHARACTER arguments.
4125 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
4127 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
4128 (g95_resolve_forall_body): Resolve FORALL body.
4129 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
4130 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
4131 (g95_find_forall_index): Check whether the FORALL index appears in
4132 the expression or not.
4133 (resolve_code): Modified.
4135 2003-05-14 Paul Brook <paul@nowt.org>
4137 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
4139 2003-05-13 Paul Brook <paul@nowt.org>
4141 * trans-types.c (g95_max_array_element_size): Now a tree node.
4142 (g95_init_types): Work out max size properly.
4143 (g95_get_dtype_cst): Modify to match.
4145 2003-05-11 Paul Brook <paul@nowt.org>
4147 * trans-io.c (add_case): Create a label decl for case labels.
4149 2003-05-11 Paul Brook <paul@nowt.org>
4151 * arith.c (g95_integer_index_kind): New variable.
4152 * f95-lang.c (g95_init): Move frontend initialization here ...
4153 (g95_post_options): ... from here.
4154 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
4155 * intrinsic.c (add_functions): Use index kinds.
4156 * iresolve.c: Convert to index_kind where needed.
4157 * resolve.c (g95_resolve_index): Make public, use index_kind.
4158 (resolve_array_ref): Adjust to match.
4159 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
4160 * trans-stmt.c: Ditto.
4161 * trans-types.c: Ditto.
4162 * trans-types.h (g95_array_index_kind): Remove declaration.
4163 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
4165 2003-05-07 Paul Brook <paul@nowt.org>
4167 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
4168 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
4171 2003-05-07 Paul Brook <paul@nowt.org>
4173 * trans-array.c (trans_static_array_pointer,
4174 g95_trans_array_constructor_value, g95_conv_array_initializer,
4175 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
4176 (g95_add_loop_ss_code): Convert subscripts to the correct type.
4177 * trans-stmt.c (g95_trans_character_select): Ditto.
4178 * trans-types.c (g95_init_types): Ditto.
4180 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
4182 * f95-lang.c (expand_function_body): Use input_line, not lineno.
4183 * trans-decl.c (g95_generate_function_code,
4184 g95_generate_constructors): Likewise.
4185 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
4186 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
4189 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4190 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
4191 with components point to the DERIVED type itself, and two DERIVED
4192 type with components point to each other.
4193 * trans-expr.c (g95_conv_componet_ref): Modified
4195 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4196 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
4198 (g95_trans_pointer_assign): Implement Nullify.
4200 2003-05-01 Paul Brook <paul@nowt.org>
4202 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
4203 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
4205 2003-05-01 Paul Brook <paul@nowr.org>
4207 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
4208 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
4211 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
4213 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
4216 2003-04-28 Paul Brook <paul@nowt.org>
4218 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
4219 as their kind suggests.
4220 (g95_resolve_reshape): Ditto.
4222 2003-04-28 Chun Huang <compiler@sohu.com>
4224 * trans-expr.c (g95_conv_substring_expr): New function.
4225 (g95_conv_expr): Use it.
4227 2003-04-28 Paul Brook <paul@nowt.org>
4229 * iresolve.c (g95_resolve_transpose): Make it match the
4231 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
4233 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4235 * trans-types.c (g95_add_field_to_struct): New function to
4236 add a field to a UNION_TYPE or RECORD_TYPE.
4237 * trans-types.h (g95_add_field_to_struct): Prototype.
4238 (g95_get_derived_type): Use g95_add_field_to_struct to add
4240 * trans-io.c (g95_add_field): Remove.
4241 (ADD_FIELD): Use new g95_add_field_to_struct function.
4242 (ADD_STRING): Likewise.
4243 * trans-stmt.c (g95_trans_select): Likewise.
4244 (g95_add_field): Remove duplicated function.
4246 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
4248 Port implementation for CHARACTER SELECT from Andy's tree.
4249 * trans-stmt.c (g95_trans_character_select): Implement character
4250 select. (g95_add_field): New function.
4251 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
4252 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
4253 * g95.h (struct g95_case): Add field 'int n'.
4254 * trans.h: Declare 'gfor_fndecl_select_string'.
4256 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
4258 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
4259 (g95_insert_bbd): Die on duplicates.
4260 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
4262 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
4264 * g95.texi: Require GMP 4.0 -- like we actually
4265 do. Explain the testsuite and what-goes-where.
4266 Don't use undefined texinfo symbol. Break very
4267 long line. Remove finished item from the list
4270 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
4272 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
4275 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4277 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
4278 (g95_trans_forall_body): New function.
4280 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
4282 * resolve.c (resove_where): New function.
4283 (resolve_where_shape): New function.
4284 (resolve_code): Add call to 'resolve_where'
4285 * trans-stmt.c (g95_trans_where): Modified.
4286 (g95_trans_where_2): New function.
4287 (g95_trans_where_assign): New function.
4288 (g95_evaluate_where_mask): New function.
4289 (g95_add_to_stmt_list): New function.
4290 (g95_get_temp_expr): New function.
4291 * trans.h (where_stmt_list): New structure.
4293 2003-04-10 Paul Brook <paul@nowt.org>
4295 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
4296 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
4298 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
4300 Update after mainline -> tree-ssa-branch merge.
4301 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
4303 (g95_init): Update for new lang_hooks definition.
4304 (g95_post_options): New langhook.
4305 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
4306 * scanner.c (g95_new_file): Comment update.
4308 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4310 * g95.h, lang-options.h: Add -Wimplicit-interface.
4311 * options.c (g95_init_options, g95_parse_arg): Set it.
4312 * interface.c (check_intents): Warn about call with implicit
4314 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
4317 2003-04-05 Paul Brook <paul@nowt.org>
4319 * iresolve.c (g95_resolve_spread): Don't resole based on type.
4320 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
4322 2003-03-29 Paul Brook <paul@nowt.org>
4324 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
4325 (g95_resolve_unpack): Ditto.
4326 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
4327 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
4328 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
4330 2003-03-25 Paul Brook <paul@nowt.org>
4332 * arith.c (g95_unary_user, g95_user): Remove dead functions.
4334 * array.c (g95_free_array_ref): Ditto.
4336 * symbol.c (g95_use_derived_tree): Ditto.
4337 * intrinsic.c (add_functions): Use simplification for SCALE.
4338 * primary.c (g95_match_rvalue): Test sym, not symtree.
4340 2003-03-25 Paul Brook <paul@nowt.org>
4342 * trans-decl.c (build_function_decl): Add parameter before it gets
4343 turned into a constant.
4344 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
4345 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
4346 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
4348 2003-03-22 Paul Brook <paul@nowt.org>
4350 * trans-array.c (g95_conv_array_initializer): Allow scalar
4352 * trans-decl.c (g95_finish_var_decl): Result variables are not
4354 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
4355 (g95_conv_intrinsic_function): Use it.
4356 * trans-types.h (g95_type_spec): Remove dead declaration.
4358 2003-03-21 Paul Brook <paul@nowt.org>
4360 * trans-decl.c (g95_build_function_decl): Mark string parameters.
4362 2003-03-20 Paul Brook <paul@nowt.org>
4364 * trans-decl.c (g95_build_function_decl): Put character length
4365 parameters at the end of the function declaration.
4366 * trans-expr.c (g95_conv_function_call): Ditto.
4367 * trans-types.c (g95_get_function_type): Ditto.
4369 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4371 * resolve.c (resolve_formal_arglist): Don't impose intent for
4372 procedure arguments of pure functions.
4373 (resolve_select): Remove redundant assignment.
4375 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4377 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
4379 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
4380 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
4382 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
4384 * symbol.c (g95_add_type): Fix typo in comment.
4387 2003-03-16 Paul Brook <paul@nowt.org>
4389 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
4390 * expr.c (g95_build_call): Remove.
4391 * f95-lang.c (puchdecl_top_level): New function.
4392 * g95.h (g95_code): Store resolved symbol, not just the name.
4393 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
4394 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
4395 (g95_get_intrinsic_sub_symbol): New function.
4396 * iresolve.c (g95_resolve_cpu_time): Use it.
4397 (g95_resolve_random_number): Ditto.
4398 * resolve.c: Set code->resolved_sym instead of code->sub_name.
4399 * trans-decl.c (g95_get_extern_function_decl): Give external decls
4400 the correct DECL_CONTEXT. Add global symbold to the global scope.
4401 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
4404 2003-03-16 Paul Brook <paul@nowt.org>
4406 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
4407 * options.c (g95_parse_arg): Ditto.
4408 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
4409 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
4410 for the procedure, not the parameter.
4411 * trans-array.c (g95_trans_g77_array): New function.
4412 (g95_trans_assumed_size): Use it.
4413 (g95_trans_dummy_array_bias): Ditto.
4414 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
4415 (g95_conv_expr_descriptor): ... to here. Update callers.
4416 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
4417 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
4418 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
4419 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
4420 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
4421 (g95_sym_type): Ditto.
4423 2003-03-15 Paul Brook <paul@nowt.org>
4425 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
4427 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
4429 2003-03-14 Paul Brook <paul@nowt.org>
4431 * trans-array.c (g95_array_is_packed): Remove.
4432 (g95_conv_array_base): Correctly handle all descriptorless cases.
4433 (g95_conv_array_stride): Use descriptorless strides.
4434 (g95_trans_dummy_array_bias): Don't always repack the array.
4435 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
4437 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
4438 dummy and non-dummy arrays...
4439 (g95_sym_type, g95_get_derived_type): ... like these.
4440 (g95_get_array_type_bounds): Allow discontiguous arrays.
4442 2003-03-12 Paul Brook <paul@nowt.org>
4444 * array.c (g95_resolve_array_spec): Fix comment.
4445 * g95.h (symbol_attributes): New flag always_explicit.
4446 * resolve.c (resolve_formal_arglist): Set it always_explicit.
4447 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
4448 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
4449 (g95_trans_array_bounds): Allow assumed shape arrays.
4450 (g95_trans_repack_array): Remove.
4451 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
4452 * trans-decl.c (g95_build_qualified_array): Only ignore absent
4453 bounds for assumed size arrays.
4454 (g95_build_dummy_array_decl): Use descriptorless arrays.
4455 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
4456 (g95_trans_pointer_assign): Fix typo.
4457 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
4459 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
4460 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
4461 Also modify callers.
4462 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
4464 2003-03-08 Paul Brook <paul@nowt.org>
4466 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
4467 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
4468 * resolve.c (compare_spec_to_ref): Allow full array sections.
4470 2003-03-08 Paul Brook <paul@nowt.org>
4472 * expr.c (g95_simplify_expr): Also simplify array index and
4473 substring expressions.
4474 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
4475 * trans-array.c (g95_trans_array_bounds): New function.
4476 (g95_trans_auto_array_allocation): Use it.
4477 (g95_trans_assumed_size): Rewrite.
4478 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4479 (gfor_fndecl_repack): Remove.
4480 (g95_build_qualified_array): Handle absent upper bounds.
4481 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
4482 (g95_get_symbol_decl): Update.
4483 (g95_build_intrinsic_function_decls): Initialize new decls.
4484 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4485 (gfor_fndecl_repack): Remove.
4486 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
4487 * trans-types.c: (g95_build_array_type): Merge duplicated code..
4488 (g95_get_nodesc_array_type): Handle absent bounds.
4489 * trans-types.h (g95_get_nodesc_array_type): Declare.
4491 2003-03-04 Paul Brook <paul@nowt.org>
4493 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
4496 2003-03-02 Paul Brook <paul@nowt.org>
4498 * options.c (g95_init_options): Drfault to 1.
4499 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
4500 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
4501 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
4502 Handle non-constant size automatic arrays.
4503 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
4504 generic bound functions.
4505 (g95_trans_auto_array_allocation): Don't create a descriptor.
4506 (g95_trans_assumed_size): New function (broken).
4507 (g95_trans_dummy_array_bias): Remove unused var.
4508 * trans-array.h (g95_trans_assumed_size): Declare.
4509 * trans-decl.c (create_index_var): New fuction.
4510 (g95_build_qualified_array): New function.
4511 (g95_get_symbol_decl): Use it.
4512 (g95_trans_deferred_vars): Handle assumed shape seperately.
4513 * trans-types.c (get_element_type): Handle heap allocated arrays.
4514 (g95_is_nodesc_array): Include non-const size arrays.
4515 (g95_get_nodesc_array_type): Ditto.
4517 2003-02-23 Paul Brook <paul@nowt.org>
4519 * trans-array.c (g95_array_init_size): Should use stride, not size of
4522 2003-02-18 Paul Brook <paul@nowt.org>
4524 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
4525 after intrinsic function check.
4527 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4529 * io.c (match_io): Fix missing return value and remove useless
4531 * match.c (g95_match): Remove useless assignment.
4532 * module.c (parse_string): Remove useless post increment.
4533 * simplify.c (g95_simplify_verify): Remove useless assignment.
4535 2003-02-15 Paul Brook <paul@nowt.org>
4537 * expr.c (restricted_intrinsic): Handle bad values gracefully.
4538 * g95.h (symbol_attribute): Add referenced member.
4539 (g95_symbol): Add dummy_order member.
4540 (g95_set_sym_referenced): Declare.
4541 * match.c (g95_match_assignment, g95_match_call): Use it
4542 * primary.c (match_actual_arg, g95_match_rvalue,
4543 g95_match_variable): Ditto.
4544 * symbol.c (next_dummy_order): New variable.
4545 (g95_set_sym_referenced): New function.
4546 (check_done): New function.
4547 (g95_add_*): Use it.
4548 * trans-decl.c: Make formatting conform to GCC standards.
4549 (g95_defer_symbol_init): Add dummy variables in the right order.
4550 (g95_get_symbol_decl): Only accept referenced variables.
4551 (g95_create_module_variable): Module variables are always required.
4552 (generatr_local_decls): New function.
4553 (generate_local_vars): New function.
4554 (g95_generate_function_code): Use it.
4556 2003-02-13 Paul Brook <paul@nowt.org>
4558 * trans-decl.c (g95_conv_struct_cons): Remove.
4559 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
4560 * trans-expr.c (g95_conv_structure): New function.
4561 (g95_conv_expr): Use it.
4563 2003-02-09 Paul Brook <paul@nowt.org>
4565 * trans-array.c (g95_array_init_size): Don't evaluate the linit
4566 expressions multiple times.
4567 (g95_trans_auto_arry_allocation): Use pointer not tmp.
4569 2003-02-08 Paul Brook <paul@nowt.org>
4571 * module.c (mio_symtree_ref): Declare as static.
4572 (mio_expr): Remove dead code.
4573 (read_module): Set the symtree link for fixups.
4574 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
4575 (build_round_expr): ... to this.
4576 (g95_conv_intrinsic_aint): New function.
4577 (g95_conv_intrinsic_function): Use it.
4579 2003-02-08 Paul Brook <paul@nowt.org>
4581 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
4582 offset after modificaton, not the increment expression.
4583 * dependency.c: Kill excess whitespace.
4585 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
4587 * dependency.h: Remove some function declarations.
4588 * dependency.c (get_no_of_elements): Change this function not to
4590 * other: Add comments for all modified functions.
4592 2003-02-06 Paul Brook <paul@nowt.org>
4594 * g95spec.c (lang_specific_functions): Fix initializer warning.
4595 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
4596 for structure type names.
4597 * trans-decl.c (g95_cons_structure_cons): New function.
4598 (g95_get_symbol_decl): Use it.
4599 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
4602 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4604 * resolve.c (compare_cases): Add const to casts.
4606 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4608 * g95.h (g95_check_f): Change a1 to f1m.
4609 * intrinsic.c (add_sym_1m, check_specific,
4610 g95_intrinsic_func_interface): Use it.
4612 * module.c (init_pi_tree): Remove useless cast.
4613 (fp2): Fix argument type.
4615 * parse.c (parse_select_block): Add comment.
4617 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
4619 * lang-options.h: Fix warning involving C90 concatenated
4622 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4623 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4625 * io.c (format_asterisk): Complete initializer to kill warning.
4626 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
4627 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
4628 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
4629 new defines to complete initializers. Kills all warnings.
4631 * Make-lang.in: Comment cleanup.
4633 2003-02-05 Paul Brook <paul@nowt.org>
4635 * array.c (g95_free_constructor): Handle NULL expressions.
4636 * resolve.c (resolve_structure_cons): Ditto.
4637 * decl.c (g95_match_null): New Function.
4638 (variable_decl): Use it.
4639 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
4640 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
4641 * trans-types.c (g95_set_decl_attributes): Remove empty function.
4643 2003-02-05 Paul Brook <paul@nowt.org>
4645 * trans.h (build1_v): New macro.
4646 (build_v): Remove pointless and incorrect prototype.
4647 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
4648 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
4650 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
4652 * Make-lang.in (F95_OBJS): Remove one more dead file.
4654 2003-02-01 Paul Brook <paul@nowt.org>
4656 * lang-specs.h: Don't pass -ffixed-form to the linker.
4657 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
4659 2003-02-01 Paul Brook <paul@nowt.org>
4661 * Make-lang.in (F95_OBJS): Remove dead files.
4662 * trans-array.c (g95_array_init_size): Do the right thing when
4664 * trans-decl.c (g95_generate_function_code): Initialize deffered
4665 symbol list before translating contained subroutines.
4666 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
4667 scalar invariant values here...
4668 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
4669 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
4671 2003-01-29 Paul Brook <paul@nowt.org>
4673 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
4674 (g95_walk_elemental_function_args): Reverse chains before adding.
4675 (g95_reverse_ss): Move about a bit.
4676 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
4679 2003-01-28 Paul Brook <paul@nowt.org>
4681 * intrinsic.c (resolve_intrinsic): Use correct union member.
4682 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
4684 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
4685 use associated variables.
4686 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
4687 * trans-expr.c (g95_conv_expr_present): ... to here.
4688 * trans.h: Declare it.
4689 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
4691 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4693 * array.c (expand_iterator): Suppress useless assignment.
4694 * decl.c (match_char_spec): Ditto.
4695 * io.c (match_io_iterator): Ditto.
4696 * primary.c (match_real_constant): Ditto.
4697 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
4698 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
4699 * matchexp.c (match_add_operand, match_level_5): Likewise.
4700 * module.c (parse_atom, find_enum): Likewise.
4701 * resolve.c: move #include <string.h>
4702 (resolve_select): Fix serious typo.
4704 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
4706 * Make-lang.in: Don't build with broken tree-ssa-pre.
4708 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
4710 * resolve.c (resolve_index): Add a TODO.
4711 * symbol.c: Remove useless "#include <ctype.h>".
4713 2003-01-27 Paul Brook <paul@nowt.org>
4715 * check.c (check_rest): Allow different type kinds as an extension.
4716 * g95.h (g95_resolve_f): Add f1m.
4717 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
4718 * intrinsic.h: Chenge prototypes for MIN and MAX.
4719 * iresolve.c (g95_resolve_minmax): New function.
4720 (g95_resolve_min, g95_resolve_max): Use it.
4721 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
4723 (g95_conv_intrinsic_present): Fix logic.
4725 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
4727 * g95.h (g95_case): Don't be a tree, be a double linked list.
4728 * match.c (match_case_selector): Remove redundant semantics check.
4729 Clean up a few goto's to make it a tiny little bit faster.
4730 * resolve.c (case_tree): Die.
4731 (compare_cases): Accept and compare unbounded cases too.
4732 (check_case_overlap): Don't build a tree. Instead, merge-sort the
4733 whole list of g95_cases passed from resolve_select.
4734 (sane_logical_select): Die.
4735 (check_case_expr): Return FAILURE if a CASE label is of the wrong
4737 (resolve_select): Fixup case expression for computed GOTOs, put it
4738 in expr, not expr2, for easier handing in the parse tree dumper and
4739 the code generator. Rewrite the rest of the function: Kill
4740 unreachable case labels and unreachable case blocks.
4741 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
4742 an EXEC_SELECT, not case2 anymore.
4743 * trans-const.c (g95_conv_constant_to_tree): New function.
4744 (g95_conv_constant): Use it.
4745 * trans-const.h: Declare prototype for the new function.
4746 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
4747 g95_trans_character_select): New static functions.
4748 (g95_trans_select): Rewrite.
4750 2003-01-26 Paul Brook <paul@nowt.org>
4752 * intrinsic.c (add_fnctions): Properly add dreal.
4753 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
4754 (g95_conv_intrinsic_function): Use it.
4755 * trans-io.c (build_dt): Abort on internal files (unimplemented).
4757 2003-01-26 Paul Brook <paul@nowt.org>
4759 Widespread changes to the handling of symbols in expressions. These
4760 are now linked via g95_symtree nodes.
4761 * parse.c (g95_fixup_sibling symbols): New function.
4762 (parse_contained): Use it.
4763 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
4764 contained procedure that has bee correctly fixed up.
4765 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
4767 2003-01-24 Paul Brook <paul@nowt.org>
4769 * trans-array.c (g95_walk_expr): Function result attributes are in
4771 * trans-expr.c (g95_conv_function_call,
4772 g95_trans_arrayfunc_assign): Ditto.
4773 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
4775 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
4777 * expr.c (check_restricted): Fix error message.
4778 * symbol.c (free_st_labels): Plug memleak.
4780 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
4782 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
4783 reduce_binary_aa, reduce_binary, eval_intrinsic,
4784 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
4785 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
4786 for typesafe intrinsics helper functions.
4787 (g95_intrinsic_sym): Use them.
4788 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
4789 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
4790 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
4791 check_specific, g95_intrinsic_func_interface,
4792 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
4794 * trans-decl.c (g95_get_extern_function_decl): Likewise.
4795 * Make-lang.in: Don't disable warnings for strict prototypes
4796 any longer, everything is typesafe now.
4798 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
4800 * bbt.c (duplicate_node): Make static.
4801 * module.c (module_name): Make static.
4802 * scanner.c (include_dirs): Make static.
4804 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
4806 Hard coded _gfor_'s should not show up anymore.
4807 * g95.h (PREFIX): New macro.
4808 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
4810 (g95_resolve_random_number): Likewise.
4811 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
4812 * trans-io.c: Remove 'prefix' macro. Replace all uses with
4813 the new PREFIX macro from g95.h.
4815 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
4817 The troubles of forking... Andy implemented this just now too.
4818 Let's stick to that and keep the trees close.
4819 * g95.h (g95_st_label): 'format' member is now a g95_expr.
4820 * io.c: Revert previous changes.
4821 (g95_match_format): Match the format string as a character
4823 * match.h (g95_statement_label): Declare external.
4824 * parse.c: Revert previous changes.
4825 * symbol.c (g95_free_st_label): Free a g95_expr instead
4827 * trans-io.c: Revert previous changes.
4828 (build_dt): Use set_string to set the format string.
4830 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
4832 * io.c (format_string): Make non-static.
4833 (g95_match_format): Remember the format string.
4834 (terminate_io): Add I/O termination for empty I/O lists.
4835 * match.h: Declare external format_string.
4836 * parse.c (check_statement_label): Attack the format string
4837 to a format label for FORMAT statements.
4838 * trans-io.c (g95_add_field): Define prefix macro. Replace
4839 all uses of PREFIX define with a use of this macro.
4840 (build_dt): Implement formatted I/O for format labels.
4842 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
4844 * lang-options.h: Kill "-std=F".
4845 * options.c: Remove unimplemented "-std=F". Modify
4847 * misc.c (g95_terminal_width): New function.
4848 * error.c (g95_error_init_1): Use g95_terminal_width.
4849 * g95.h: Add prototype for g95_terminal_width, remove
4852 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
4854 * Make-lang.in: Fix typo.
4856 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4858 * g95.h (struct g95_case): Remove unused cruft, new member
4859 'where' to keep track of the locus of the default case.
4860 * match.c (g95_match_case): Add locus to the current case.
4861 (match_case_selector): Likewise.
4862 * parse.c (parse_select_block): Move semantics check for
4863 multiple DEFAULT cases out of here to...
4864 * resolve.c (check_case_overlap): ...here. Return sooner
4866 (check_case_expr): Take two g95_cases now, use to sure the
4867 expression kinds are the same.
4868 (resolve_select): Cleanup.
4870 2003-01-18 Paul Brook <paul@nowt.org>
4872 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
4873 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
4875 (g95_get_extern_function_decl): Put decls in the correct context.
4877 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4879 * trans-io.c: Port changes from Andy to set ERR flag.
4881 2003-01-17 Paul Brook <paul@nowt.org>
4883 * trans-array.c: Add various comments.
4884 (g95_ss_terminator): Declare as const.
4885 (g95_walk_expr): Remove first parameter and update all callers.
4886 (g95_walk_op_expr): Initialize scalar SS properly.
4887 * trans-array.h (g95_walk_expr): Update prototype.
4888 * trans-expr.c: Update for new g95_walk_expr.
4889 * trans-intrinsic.c: Ditto.
4890 * trans-io.c: Ditto.
4891 * trans.h: Various comments for SS chains.
4893 2003-01-17 Paul Brook <paul@nowt.org>
4895 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
4897 * intrinsic.c (add_functions): Use them.
4898 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
4899 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
4901 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4903 Fallout of a small merge conflict:
4904 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
4906 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4908 * initrinsic.c: New add_sym_* functions for strong typing.
4909 (add_conv): Make prototype strict.
4910 * dump-parse-tree.c, dependency.c: Include config.h
4911 * resolve.c, trans-io.c: Fix typos.
4913 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4915 * dump-parse-tree.c (g95_show_code_node): Show the
4916 condition for a computed GOTO that was transformed
4917 to a SELECT CASE construct.
4918 * resolve.c (check_case_overlap): Revert previous switch
4919 to treaps, it was too slow and didn't catch all trouble.
4920 (resolve_symbol): Be more flexible about module procedures.
4921 * symbol.c (check_conflict): Point to relevant section in
4922 the standard for dubious conflict. Allow procedure
4923 dummy arguments to be optional again.
4924 * trans-io (add_field): Rename to g95_add_field. Change
4926 * trans-stmt (trans_select): Handle unbounded cases for
4927 integer SELECT CASE constructs. Fix/add more comment.
4929 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4931 * g95.h: Uses GCC's function attribute macros.
4932 * error.c, module.c, parse.c, g95.h: More function attributes.
4934 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
4936 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
4937 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
4940 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
4942 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
4944 * trans.c (g95_trans_code): Use annotate_all_with_file_line
4945 instead of nowdead wrap_all_with_wfl.
4947 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4949 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
4950 before generating code, so we can still see it even if the code
4951 generation phase dies.
4953 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4955 * decl.c (build_sym): Split out initialization expression parts...
4956 (add_init_expr_to_sym): ...to here.
4957 (variable_decl): Add the symbol following an attribute list to the
4958 symbol tree before parsing the optional initialization expression
4959 if the symbol is not of a derived type.
4960 * primary.c (g95_match_rvalue): Don't assume a symbol always has
4961 a value if it is a PARAMETER.
4963 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4965 * misc.c: Don't #include <mcheck.h>
4966 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
4967 ever was a glibc bug, then either this was never reported to
4968 glibc people, or it has been fixed for so long that there's
4969 no information you can find about it, anywhere.
4971 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4974 * module.c (attr_bits, bt_types, array_spec_types):
4975 Switch 'const' and 'static'.
4976 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
4978 GNU'ify source code:
4979 * trans-io.c: Numerous fixes, one fixed warning and a few
4980 TODO markers so that we don't forget about them.
4982 2003-01-13 Paul Brook <paul@nowt.org>
4984 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
4985 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
4987 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
4988 * match.c (g95_match_stop): Fix dumb == -> != error.
4990 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4992 * dump-parse-tree.c (show_indent): Add line breaks. This
4993 whole dumping process needs cleanups.
4994 * f95-lang.c (g95_mark_addressable): Fix prototype to match
4995 the langhook. Fix 'return's accordingly.
4996 * g95-support.h: Adjust prototype.
4997 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
4998 * lang-options.h: Add '-fsyntax-only'.
4999 * options.c (g95_init_options): Init 'no_backend'.
5000 (g95_parse_arg): Deal with '-fsyntax-only'.
5001 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5004 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5006 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5007 arguments. Also make sure that if a symbol is marked INTRINSIC,
5008 an intrinsic with the symbol's name actually exists.
5009 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5010 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5011 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5013 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
5015 * resolve.c (resolve_contained_functions): Fix condition, don't
5016 throw internal_error if a child namespace has no name. Apparently
5017 this can be the case?
5019 2003-01-11 Paul Brook <paul@nowt.org>
5021 Port changes from Andy's tree:
5022 * g95.h (g95_code): Add stop_code.
5023 * match.c (g95_match_stop): Detter syntax checking.
5024 * resolve.c (resolve_generic_f0): Return match type.
5025 (resolve_generic_f): Remove dead/duplicated code.
5026 (resolve_specific_f): Ditto.
5027 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5028 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5029 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5031 2003-01-11 Paul Brook <paul@nowt.org>
5033 * trans-array.c: Various documentation/comment changes.
5034 * trans-stmt.c: Ditto.
5037 2003-01-10 Paul Brook <paul@nowt.org>
5039 * options.c/h: Add -fdump-parse-tree as alias of -v.
5041 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5043 * dump-parse-tree.c (g95_show_namespace): Fixed another
5044 typo. Sorry, it's Friday...
5046 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5049 * trans-array.c, trans-array.h, trans.c, trans-const.c,
5050 trans-const.h, trans-decl.c, trans-expr.c, trans.h
5051 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5052 trans-types.c: Fix bogus copyright years, add 2003.
5053 * trans-types.h: Give copyright header.
5055 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5057 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5058 * expr.c, options.c, scanner.c: Add some more 'const' markers.
5059 * intrinsic.c: Some constant strings moved to read-only memory.
5060 * io.c (format_asterisk): Move to...
5063 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5065 * dump-parse-tree.c (g95_show_namespace): Dump implicit
5066 types for ranges instead of per-letter. Indent the
5067 'CONTAINS' just like everything else.
5068 * resolve.c (resolve_contained_functions): Clarify comment.
5069 Explain non-obvious conditional expression. Improve
5070 diagnostics if tyoe cannot be resolved.
5071 Port semi-fix from Andy's tree:
5072 (was_declared): Move up before first use.
5073 (generic_sym, specific_sym): New functions. Code moved
5074 out if procedure_kind.
5075 (procedure_kind): Simplify using new functions.
5076 (resolve_generic_f): Make sure the functions we find in
5077 a parent namespace is generic.
5078 (resolve_specific_f): Ditto for specific functions.
5080 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5082 * trans-stmt.c, trans.c: Fix some code style issues. Add
5083 some more comment (but still not enough!).
5085 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
5087 * symbol.c (flavors, procedures, intents, acces_types,
5088 access_types, ifsrc_types): Make const.
5089 * misc.c (g95_string2code): Make 'm' param 'const'.
5090 * module.c (find_enum, write_atom, mio_name): Make
5092 (attr_bits, bt_types, array_spec_types, array_ref_types,
5093 ref_types, expr_types): Make const.
5094 * g95.h: Adjust external decls.
5096 2003-01-09 Paul Brook <paul@nowt.org>
5098 * Testsuite: Add a load of new cases.
5100 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5102 * Make-file.in: Add dependency on back end header files;
5103 a parallel build should work now.
5104 * f95-lang-c (lang_identifier): Remove bogus comment.
5105 (g95_be_parse_file): Fix prototype.
5106 (g95_init): Make static.
5107 (g95_finish): Make static.
5108 * error.c (g95_syntax_error): Kill. Make define in...
5109 * g95.h (g95_syntax_error): Define.
5110 (g95.options): Make 'source' member 'const'.
5111 * interface.c (g95_match_interface): Explain
5112 hard-to-read condition.
5113 (g95_match_end_interface): Ditto.
5114 * trans_const.c (g95_build_string_const): Make 's' parameter
5116 * trans_const.h: Adjust protoype accordingly.
5117 * trans-decl.c: Include tree-dump.h
5118 (g95_generate_function_code): Build fixes for recent changes
5119 in the tree-ssa branch.
5121 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5123 * format.c: Kill, move code from here...
5125 * Make-lang.in: Adjust.
5128 * BUGS: Mention where to submit bugs. Move old content...
5129 * TODO: ...to here. New file.
5131 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
5132 Fix most warnings, and suppress the ones we can't fix for now.
5133 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
5134 these warnings just clutter the screen and there's not much
5135 we can do about them for now anyway.
5136 * check.c, iresolve.c: Mark unused function parameters.
5137 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
5138 they should be resolved before they get here.
5139 * error.c: Remove unused FILE *status_out.
5140 * f95-lang.c (g95_init): Remove bogus cast.
5141 * Many files: Make things 'const' where required.
5142 * g95.h: Fix prototypes for all modified functions above.
5143 (g95_options): Remove 'object' member.
5145 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5147 * Make-file.in: Cleanup bogus targets. Add more comment.
5148 * lang-options.h: New option '-w'.
5149 * g95.h: add no_options field to struct g95_options.
5150 * options.c (g95_init_options): Default no_warnings to off.
5151 (g95_parse_arg): Recognise the '-w' switch and its alias,
5153 * error.c (g95_warning, g95_warning_now): Don't emit warning if
5154 no_warning option is set.
5155 * iresolve.c (g95_resolve_shape): Fix warning.
5157 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5159 * primary.c (g95_next_string_char): Rename next_string_char, and
5160 make static. Adjust callers accordingly.
5161 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
5162 callers accordingly.
5163 * g95.h: Split out all g95_match* functions to...
5164 * match.h: ...here. New file.
5165 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
5166 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
5168 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
5170 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
5171 g95_merge_new_implicit): New functions.
5172 (g95_match_implicit_none, g95_match_implicit): Move from here...
5173 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
5174 Modify to use the new functions in symbol.c.
5175 * g95.h: Add and move prototypes.
5177 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5179 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
5180 node compare function.
5181 (g95_insert_bbt): Likewise.
5182 (g95_insert_bbt_with_overlap): Likewise.
5183 (g95_delete_bbt): Likewise.
5184 (delete_treap): Likewise. Also fix a potential bug when calling it.
5185 * module.c (compare_pointers): Change proto to compare_fn.
5186 (compare_integers): Likewise.
5187 (compare_true_names): Likewise.
5188 (find_true_name): Adjust call to compare_true_names to match proto.
5189 (require_atom, write_atom, mio_name): Fix 'const' warnings.
5190 (init_pi_tree): Make compare a compare_fn instead of (int *).
5191 * resolve.c (compare_cases): Change proto to compare_fn.
5192 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
5193 it static, and rename to compare_symtree.
5194 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
5196 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
5197 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
5199 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5200 * Make-lang.in: Fix spaces/tabs issues from previous patch.
5201 * patch.options: Blow away Paul's checkin mistake :-)
5202 * io.c (terminate_io): Fix memory leak (Arnaud).
5204 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5206 * Make-lang.in: Teach about building DVI, info manual.
5207 * g95.texi: New file.
5209 2003-01-02 Paul Brook <paul@nowt.org>
5211 * trans-array.c (g95_reverse_ss): Make static and don't use.
5212 (g95_conv_ss_descriptor): Don't use g95_loopinfo
5213 (g95_conv_array_parameters): Modify for pointer assignments.
5214 (g95_walk_subexpr): New function.
5215 (g95_walk_expr*): Use it.
5216 * trans-array.h (g95_reverse_ss): Remove prototype.
5217 * trans-expr.c (g95_trans_pointer_assign): Implement.
5218 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
5219 * trans-intrinsic.c: Sync with scalarizer changes.
5220 * trans-io.c: Ditto.
5222 2002-12-29 Paul Brook <paul@nowt.org>
5224 * trans-array.c: Document calling convention for arrays.
5226 2002-12-19 Paul Brook <paul@nowt.org>
5228 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
5229 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
5230 optional parameters for some intrinsics.
5231 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
5232 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
5233 optional parameters.
5234 * trans.h (g95_se): Add ignore_optional flag.
5236 2002-12-15 Paul Brook <paul@nowt.org>
5238 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
5239 * trans-decl.c (g95_generate_function_code): Use TDI_original.
5241 2002-12-14 Paul Brook <paul@nowt.org>
5243 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
5245 2002-12-12 Paul Brook <paul@nowt.org>
5247 * trans-array.c (g95_trans_array_constructor_subarray): Fully
5248 initialize the scalarizer.
5249 (various): Update to new format of g95_expr->value.constructor.
5251 2002-12-08 Paul Brook <paul@nowt.org>
5253 * trans-array.c (g95_put_offset_into_var): New function.
5254 (g95_trans_array_constructor_subarray): New function.
5255 (g95_trans_array_constructor_value): Use it.
5256 (g95_array_cons_size): Don't abort() on array components.
5258 2002-12-08 Paul Brook <paul@nowt.org>
5260 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
5261 * support.c: Update #includes.
5262 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
5263 * trans-array.c: Update #includes.
5265 * trans-const.c: Ditto.
5266 * trans-io.c: Ditto.
5267 * trans-types.c: Ditto.
5268 (g95_init_types): Set size_type_node.
5269 * trans-decl.c: Update #includes.
5270 (gfor_fndecl_adjust{l,r}): Declare and initialize.
5271 * trans-stmt.c: Update #includes.
5272 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
5273 (g95_trans_select): Fix check for unbounded ranges.
5274 * trans-expr.c: Update #includes.
5275 (g95_conv_string_tmp): New function.
5276 (g95_conv_concat_op): Use it.
5277 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
5278 * Trans-intrisic.c: Update #includes.
5279 (g95_conv_intrinsic_strcmp): New function.
5280 (g95_conv_intrinsic_adjust): Ditto.
5281 (g95_conv_intrinsic_function: Use them.
5283 2002-11-30 Paul Brook <paul@nowt.org>
5285 * trans-array.c (g95_walk_function_expr): Handle non-array return by
5287 * trans-dec.c (g95_build_function_decl): Handle character return
5289 (g95_get_fake_result_decl): Ditto.
5290 (g95_trans_deferred_vars): Ditto.
5291 * trans-expr.c (g95_conv_function_call): Ditto.
5292 (g95_trans_arrayfunc_assign) Limit to array valued functions.
5293 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
5294 (g95_conv_intrinsic_function): Use it.
5295 * trans-types.c (g95_sym_type): Handle functions returning strings.
5296 (g95_return_by_reference): Ditto.
5297 (g95_get_function_type): Ditto.
5299 2002-11-18 Paul Brook <paul@nowt.org>
5301 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
5302 requires a temporary.
5303 (g95_trans_select): Handle computed gotos.
5304 * trans-types.c (g95_build_array_type): Warn about non-functional
5305 assumed shape arrays.
5306 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
5308 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
5309 (g95_conv_intrinsic_int): New function.
5310 (g95_conv_intrinsic_mod): New function.
5311 (g95_conv_intrinsic_ichar): New function.
5312 (g95_conv_intrinsic_function): Use them.
5313 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
5315 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
5317 * trans-types.c (g95_build_array_type): Assumed
5318 sized arrays can have rank > 1.
5319 * trans.c (g95_trans_code): Remove erroneous
5320 warning about CONTINUE.
5321 * trans-expr.c (g95_conv_variable): Remove
5324 2002-11-15 Paul Brook <paul@nowt.org>
5326 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
5328 2002-10-31 Paul Brook <paul@nowt.org>
5330 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
5331 * trans-expr.c (g95_conv_component_ref): Handle character string
5333 (g95_conv_string_parameter): Ditto.
5334 * trans-types.c (g95_get_derived_type): Add length decl to caracter
5337 2002-10-10 Paul Brook <paul@nowt.org>
5339 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
5340 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
5342 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
5343 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
5344 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
5345 * trans-types.c (pvoid_type_node): Declare and initialize.
5346 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
5347 (g95_array_allocate): Fix when base==data.
5348 (g95_conv_array_parameter): Correctly handle reduced rank sections.
5349 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
5351 2002-10-09 Paul Brook <paul@nowt.org>
5353 * (g95_conv_expr_reference): Handle character strings correctly.
5355 2002-10-07 Paul Brook <paul@nowt.org>
5357 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
5359 * trans-array.c (g95_build_array_initializer): Remove.
5360 (g95_conv_array_initializer): New Function.
5361 (g95_trans_auto_arry_allocation): Cleanup.
5362 (g95_trans_init_character_array): Remove.
5363 * g95spec.c: Link in libgforbegin.
5364 * trans.c (g95_generate_code): Rename main function to MAIN__.
5365 (g95_create_var): New function.
5366 (g95_create_var_np): New function.
5367 (g95_evaluate_now): New function.
5368 (g95_start_block): New function.
5369 (g95_finish_block): New function.
5370 (g95_add_expr_to_block): New function.
5371 (g95_add_block_to_block): New function.
5372 * trans-expr.c (g95_conv_componen_ref): New function.
5373 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
5374 (F95_OBJS): Add dependency.o.
5375 * f95-lang.c (g95_is_simple_stmt): Remove.
5376 * f95-tree.c (mark_not_simple): New function.
5377 (unshare_all_trees): New function.
5378 (create_tmp_var, create_tmp_alias_var): Remove.
5379 * support.c (declare_tmp_vars, tree_last_decl): Remove.
5380 * trans*: Convert to new IR using GENERIC trees. Don't bother about
5381 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
5383 2002-10-01 Paul Brook <paul@nowt.org>
5385 * trans-array.c: Add support for descriptorless arrays.
5386 (g95_conv_array_data): New function.
5387 (g95_conv_array_base): New function.
5388 * trans-array.h: Declare these here.
5389 * trans-decl.c(g95_create_mopdule_variable): Perform variable
5390 initialization and creation here.
5391 (g95_create_module_vars): Instead of here.
5392 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
5393 * trans-intrinsic.c: Ditto.
5394 * trans-types.c (g95_is_nodesc_array): New function.
5395 (g95_get_nodesc_array_type): New function.
5396 (g95_sym_type, g95_get_derived_type): Use them.
5397 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
5399 2002-09-28 Paul Brook <paul@nowt.org>
5401 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
5402 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
5405 2002-09-24 Paul Brook <paul@nowt.org>
5407 * f95-lang.c (listify): Remove declaration.
5408 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
5410 * f95-tree.c (get_name): New function.
5411 * trans.c (module_namespace): Remove.
5412 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
5413 * trans-types.c: Ditto.
5415 2002-09-19 Paul Brook <paul@nowt.org>
5417 * trans-array.c (g95_get_array_cons_size): New Function.
5418 (g95_con_ss_startstride): Handle Array constructors.
5419 (g95_conv_loop_setup): Ditto.
5420 (g95_conv_array_parameter): Ditto.
5421 * tras-decl.c (g95_finish_var_decl): Make initializes variables
5424 2002-09-19 Paul Brook <paul@nowt.org>
5426 * trans.c (g95_simple_fold_tmp): Detect variables inside
5428 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
5430 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5432 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
5434 2002-09-14 Paul Brook <paul@nowt.org>
5436 * trans.c (g95_create_module_variable): Move to trans-decl.c.
5437 * trans-const.c (g95_conv_string_init): New Function.
5438 * trans-const.h: Declare it.
5439 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
5440 variables. Don't bail on intrinsic symbols.
5441 (get_extern_function_decl): Handle specific intrinsic functions.
5442 * trans-types.c (g95_sym_type): Dummy functions don't return
5444 * trans-array.c (g95_build_array_initializer): New Function.
5445 (g95_trans_auto_array_allocation): Build initializer for static decls.
5446 Don't use mpz_addmul, it's GMP4 only.
5448 2002-09-12 Paul Brook <paul@nowt.org>
5450 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
5451 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
5452 assembler names for module procedures.
5454 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
5456 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
5459 2002-09-10 Paul Brook <paul@nowt.org>
5461 * trans-array.c: Change format of G95_SS_TEMP strictures.
5462 (g95_check_fncall_dependancy): New function.
5463 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
5465 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
5467 (g95_build_function_decl): Don't assume result arrays are packed.
5468 (g95_trans-deferred-vars): Handle array result variables.
5469 (g95_generate_fuction_code): Clear saved_function_decls.
5470 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
5472 (g95_trans_arrayfunc_assign): New function.
5473 (g95_trans_assignment): Use it.
5474 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
5475 (g95_se): Add direct_byref.
5476 * trans-types.c: Use sym->result rather than sym where appropriate.
5477 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
5478 Update other functions to use this.
5479 (g95_is_intrinsic_libcall): New function.
5480 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
5481 (g95_walk_intrinsic_function): Ditto.
5483 2002-09-08 Paul Brook <paul@nowt.org>
5485 * trans-types.c: Change rank field to dtype field in array descriptor.
5486 * trans-array.c: Implement filling of dtype array descriptor field.
5487 * trans-intrinsic.c: Fix broken LEN intrinsic.
5489 2002-09-07 Paul Brook <paul@nowt.org>
5491 * trans-intrinsic.c: Remove outdated todo intrinsic list.
5492 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
5493 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
5495 2002-09-06 Paul Brook <paul@nowt.org>
5497 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
5498 (gt-f95-trans-types.h): Add dependancy information.
5499 * config-lang.in (gtfiles): Add trans-types.c
5500 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
5501 back to top-level code.
5502 * trans-array.c, trans-types.c: Change format of array descriptor.
5503 (g95_conv_descriptor_dimension): New function.
5504 * trans-types.h (g95_conv_descriptor_rank): define.
5505 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
5508 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5510 * trans-array.c, trans-types.c: Add rank information to descriptor.
5512 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
5514 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
5516 2002-09-04 Paul Brook <paul@nowt.org>
5518 * f95-lang.c (g95_create_decls): New function.
5519 (g95_init): Move initialization of external decls to above, and call
5520 from g95_be_parse_file.
5521 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
5522 * trans-types.c (g95_init_types): Always name integer and char types.
5523 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
5525 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
5527 * Make-lang.in: Add options.c to F95_PARSER_OBJS
5529 2002-09-02 Paul Brook <paul@nowt.org>
5531 * g95_generate_code: Clear the attr for __fortran_main.
5532 * trans-types.c (g95_finish_type): New function.
5533 * g95_init_io_state_type: Use g95_finish_type.
5534 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
5536 2002-09-01 Paul Brook <paul@nowt.org>
5538 * README.backend: Warn about the dangers of extra config.h files.
5539 Remove obsolete libgfor stuff.
5540 * config-lang.in: Add target-libgfor dependancy.
5541 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
5543 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
5545 * g95_conv_mpz_to_tree: Free storage pointed to by q,
5548 2002-08-30 Paul Brook <paul@nowt.org>
5550 * trans-intrinsic.c (g95_conv_intrinsic_function,
5551 g95_walk_intrinsic_function): Added ANY and ALL.
5552 (g95_conv_intrinsic_anyall): New function.
5553 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in