]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
re PR fortran/20954 (gfortran - internal compiler error with -fdefault-integer-8)
[gcc.git] / gcc / fortran / ChangeLog
1 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
2
3 PR fortran/20954
4 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
5 build character length.
6
7 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
8
9 * trans-types.c (gfc_array_range_type): New variable.
10 (gfc_init_types): Initialize gfc_array_range_type.
11 (gfc_get_array_type_bounds): Use gfc_array_range_type.
12
13 2005-05-17 Jakub Jelinek <jakub@redhat.com>
14
15 PR fortran/15080
16 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
17 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
18 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
19 just that as index.
20 (generate_loop_for_rhs_to_temp): Likewise.
21 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
22 It non-NULL, add it to body.
23 (allocate_temp_for_forall_nest_1): New function, split from
24 allocate_temp_for_forall_nest.
25 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
26 propagate it down to compute_overall_iter_number. Use
27 allocate_temp_for_forall_nest_1.
28 (gfc_trans_assign_need_temp): Remove COUNT2. Call
29 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
30 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
31 and generate_loop_for_temp_to_lhs.
32 (gfc_trans_pointer_assign_need_temp): Adjust calls to
33 allocate_temp_for_forall_nest.
34 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
35 stmtblock_t. Call compute_overall_iter_number just once, then
36 allocate_temp_for_forall_nest_1 twice with the same size.
37 Initialize mask indexes if nested_forall_info != NULL.
38 (gfc_trans_where_2): Initialize mask indexes before calling
39 gfc_trans_nested_forall_loop.
40
41 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
42 Jerry DeLisle <jvdelisle@verizon.net>
43
44 PR fortran/17432
45 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
46 resolve ICE on assign of format label.
47 * trans-io.c (set_string): add fold-convert to properly
48 handle assigned format label in write.
49
50 2005-05-13 Paul Brook <paul@codesourcery.com>
51
52 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
53
54 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
55
56 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
57
58 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
59
60 PR fortran/21260
61 * io.c (check_format): Look for literal characters inside
62 hollerith constant.
63
64 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
65
66 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
67 attribute from result symbol to function symbol.
68 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
69 instead of sym->result->attr.dimension.
70
71 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
72
73 PR fortran/20178
74 * gfortran.h (gfc_option): Add flag_f2c.
75 * invoke.texi: Document '-ff2c' command line option. Adapt
76 documentation for '-fno-second-underscore' and '-fno-underscoring'.
77 * lang.opt (ff2c): New entry.
78 * options.c (gfc-init_options): Set default calling convention
79 to -fno-f2c. Mark -fsecond-underscore unset.
80 (gfc_post_options): Set -fsecond-underscore if not explicitly set
81 by user.
82 (handle_options): Set gfc_option.flag_f2c according to requested
83 calling convention.
84 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
85 intrinsics where necessary.
86 (gfc_trans_deferred_vars): Change todo error to assertion.
87 * trans-expr.c (gfc_conv_variable): Dereference access
88 to hidden result argument.
89 (gfc_conv_function_call): Add hidden result argument to argument
90 list if f2c calling conventions requested. Slightly restructure
91 tests. Convert result of default REAL function to requested type
92 if f2c calling conventions are used. Dereference COMPLEX result
93 if f2c cc are used.
94 * trans-types.c (gfc_sym_type): Return double for default REAL
95 function if f2c cc are used.
96 (gfc_return_by_reference): Slightly restructure logic. Return
97 COMPLEX by reference depending on calling conventions.
98 (gfc_get_function_type): Correctly make hidden result argument a
99 pass-by-reference argument for COMPLEX. Remove old code which does
100 this for derived types.
101
102 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
103
104 * match.c (gfc_match_return): Only require space after keyword when
105 it is obligatory. Only give stdwarn to after matching is successful.
106 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
107
108 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
109
110 * intrinsic.texi: Fix typos.
111
112 2005-05-07 Steven G. Kargl <kargls@comcast.net>
113
114 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
115 description to include information about scalar arguments.
116
117 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
118
119 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
120 match.h, trans-array.h: Update copyright.
121
122 2005-04-29 Tom Tromey <tromey@redhat.com>
123
124 * f95-lang.c (poplevel): Updated for change to build_block.
125
126 2005-04-29 Jakub Jelinek <jakub@redhat.com>
127
128 PR fortran/13082
129 PR fortran/18824
130 * trans-expr.c (gfc_conv_variable): Handle return values in functions
131 with alternate entry points.
132 * resolve.c (resolve_entries): Remove unnecessary string termination
133 after snprintf. Set result of entry master.
134 If all entries have the same type, set entry master's type
135 to that common type, otherwise set mixed_entry_master attribute.
136 * trans-types.c (gfc_get_mixed_entry_union): New function.
137 (gfc_get_function_type): Use it for mixed_entry_master functions.
138 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
139 * decl.c (gfc_match_entry): Set entry->result properly for
140 function ENTRY.
141 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
142 __entry argument.
143 (build_entry_thunks): Handle return values in entry thunks.
144 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
145 shared between multiple contexts.
146 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
147 current_function_decl instead of sym->backend_decl. Skip over
148 entry master's entry id argument. For mixed_entry_master entries or
149 their results, return a COMPONENT_REF of the fake result.
150 (gfc_trans_deferred_vars): Don't warn about missing return value if
151 at least one entry point uses RESULT.
152 (gfc_generate_function_code): For entry master returning
153 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
154 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
155 values optional just because they are in entry master.
156
157 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
158
159 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
160 Tobias forgot this in previous commit.
161
162 2005-04-29 Paul Brook <paul@codesourcery.com>
163
164 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
165 comment.
166
167 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
168
169 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
170 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
171 IMPLICIT NONE, set seen_implicit_none.
172 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
173
174 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
175
176 * gfortran.h (gfc_gsymbol): Make name a const char *.
177 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
178 gfc_get_string.
179
180 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
181
182 PR fortran/20865
183 * resolve.c (resolve_actual_arglist): Issue an error if a statement
184 functions is used as actual argument.
185
186 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
187
188 PR fortran/21177
189 * interface.c (compare_parameter): Ignore type for EXPR_NULL
190 only if type is BT_UNKNOWN.
191
192 2005-04-25 Paul Brook <paul@codesourcery.com>
193 Steven G. Kargl <kargls@comcast.net>
194
195 PR fortran/20879
196 * check.c (gfc_check_ichar_iachar): New function.
197 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
198 * intrinsic.c (add_functions): Use it.
199 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
200 character expression lengths.
201
202 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
203
204 PR fortran/20059
205 * trans-common.c (translate_common): Cast offset and
206 common_segment->offset to type int for warning message.
207
208 2005-04-23 DJ Delorie <dj@redhat.com>
209
210 * trans-decl.c: Adjust warning() callers.
211
212 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
213
214 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
215 intermediate representation. Fix typo in comment.
216
217 2005-04-21 Steven G. Kargl <kargls@comcast.net>
218
219 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
220 simplify logic; Add a gcc_assert.
221
222 2005-04-19 Steven G. Kargl <kargls@comcast.net>
223
224 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
225
226 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
227 Steven G. Kargl <kargls@comcast.net>
228
229 * invoke.texi: Update -Waliasing description
230
231 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
232
233 PR fortran/16861
234 * resolve.c (resolve_variable): If e->symtree is not set, this
235 ought to be a FAILURE, and not a segfault.
236
237 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
238
239 PR fortran/17472
240 PR fortran/18209
241 PR fortran/18396
242 PR fortran/19467
243 PR fortran/19657
244 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
245 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
246 declarations of old namelist functions.
247 (build_dt): Simplified call to transfer_namelist_element.
248 (nml_get_addr_expr): Generates address expression for start of
249 object data. New function.
250 (nml_full_name): Qualified name for derived type components. New
251 function.
252 (transfer_namelist_element): Modified for calls to new functions
253 and improved derived type handling.
254
255 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
256
257 * scanner.c (gfc_next_char_literal): Reset truncation flag
258 for lines ending in a comment for both fixed and free form.
259 (load_line): Do not set truncated flag if only truncating
260 the EOL marker.
261
262 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
263
264 PR fortran/14569
265 * gfortran.h (gfc_linebuf): Add truncated field.
266 * parse.c (next_statement): Handle warning for truncated
267 lines.
268 * scanner.c (load_line): Return if line was truncated.
269 No longer warn for truncated lines. Remove unused parameters.
270 (load_file): Store load_line return value to linebuf.
271 (gfc_error_recovery): Do not advance line at the end.
272
273 2005-04-14 Steven G. Kargl <kargls@comcast.net>
274
275 * gfortran.h (gfc_real_info): Add subnormal struct member.
276 * arith.c (gfc_arith_init_1): Set it.
277 (gfc_check_real_range): Use it.
278 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
279
280 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
281
282 * simplify.c: Fix a comment typo.
283
284 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
285
286 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
287
288 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
289
290 * simplify.c (gfc_simplify_nearest): Overhaul.
291
292 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
293
294 * interface.c: Fix a comment typo.
295
296 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
297
298 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
299 Fortran 95.
300
301 2005-04-09 Steven G. Kargl <kargls@comcast.net>
302
303 * simplify.c (gfc_simplify_anint): Use mpfr_round()
304 (gfc_simplify_dnint): ditto.
305 (gfc_simplify_nint): ditto.
306
307 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
308
309 PR fortran/13257
310 * io.c (check_format): Allow an optional comma
311 between descriptors.
312
313 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
314
315 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
316 comment according to GNU coding style.
317 (gfc_match_if): Remove gfc_ prefix in call to
318 match_arithmetic_if.
319
320 2005-04-08 Diego Novillo <dnovillo@redhat.com>
321
322 * match.c (gfc_match_arithmetic_if): Declare static.
323
324 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
325
326 PR fortran/17229
327 * match.c (gfc_match_arithmetic_if): New function to match an
328 arithmetic IF statement.
329 (gfc_match_if): Use gfc_match_arithmetic_if to match an
330 arithmetic IF statement embedded in a simple IF statement.
331
332 2005-04-07 Steven G. Kargl <kargls@comcast.net>
333
334 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
335
336 2005-04-06 Steven G. Kargl <kargls@comcast.net>
337
338 * invoke.texi: Remove documentation of -std=f90
339
340 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
341
342 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
343 non-pointer assignment.
344
345 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
346
347 PR fortran/15959
348 PR fortran/20713
349
350 * array.c (resolve_character_array_constructor): New function. Set
351 constant character array's character length.
352 (gfc_resolve_array_constructor): Use it.
353 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
354 length.
355 (gfc_set_constant_character_len): New function. Set constant character
356 expression according the given length.
357 * match.h (gfc_set_constant_character_len): Add prototype.
358
359 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
360
361 * intrinsic.texi: BES?? functions are not in the f95 standard.
362
363 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
364
365 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
366
367 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
368
369 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
370 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
371
372 2005-04-02 Steven G. Kargl <kargls@comcast.net>
373
374 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
375
376 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
377
378 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
379 trans.h: Fix comment typos.
380
381 2005-03-29 Steven G. Kargl <kargls@comcast.net>
382
383 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
384 flag_default_integer, flag_default_real
385 * invoke.texi: Update documentation
386 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
387 fdefault-integer-8, and fdefault-real-8 definitions.
388 * options.c (gfc_init_options): Set option defaults
389 (gfc_handle_option): Handle command line options.
390 * trans-types.c (gfc_init_kinds): Use options.
391
392 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
393
394 * f95-lang.c (builtin_function): Process the attrs parameter
395 and apply the "const" attribute to the builtin if found.
396
397 2005-03-27 Steven G. Kargl <kargls@comcast.net>
398
399 * intrinsic.texi: Document AIMAG, AINT, ALL
400
401 2005-03-26 Steven G. Kargl <kargls@comcast.net>
402
403 * arith.c (check_result): Fix illogical logic.
404
405 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
406
407 * trans-common.c (create_common): Build RECORD_NODE for common blocks
408 contain no equivalence objects.
409 (add_equivalences): New argument saw_equiv.
410 (trans_common): New local variable saw_equiv.
411 (finish_equivalences): Add a local variable dummy, Always pass true
412 for the 3rd parameter to create_common.
413
414 2005-03-25 Steven G. Kargl <kargls@comcast.net>
415
416 * intrinsic.texi: Fix "make dvi"
417
418 2005-03-24 Steven G. Kargl <kargls@comcast.net>
419
420 * intrinsic.texi: New file.
421 * gfortran.texi: Include it; white space change; fix typo.
422
423 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
424
425 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
426
427 2005-03-23 Steven Bosscher <stevenb@suse.de>
428
429 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
430 * trans-array.c (gfc_trans_allocate_array_storage,
431 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
432 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
433 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
434 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
435 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
436 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
437 gfc_conv_expr_descriptor): Likewise.
438 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
439 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
440 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
441 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
442 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
443 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
444 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
445 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
446 gfc_conv_intrinsic_merge, prepare_arg_info,
447 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
448 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
449 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
450 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
451 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
452 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
453 Likewise.
454 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
455 * trans.c (gfc_add_modify_expr): Likewise.
456
457 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
458
459 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
460 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
461 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
462 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
463 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
464 gfc_check_perror): new functions to check newly implemented
465 g77 intrinsics.
466 * gfortran.h: adding symbols for new intrinsics.
467 * intrinsic.c (add_functions): adding new intrinsics.
468 (add_subroutines): adding new intrinsics.
469 * intrinsic.h: prototype for all checking and resolving
470 functions.
471 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
472 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
473 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
474 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
475 gfc_resolve_kill_sub, gfc_resolve_link_sub,
476 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
477 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
478 gfc_resolve_perror): new functions to resolve intrinsics.
479 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
480 for new symbols.
481
482 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
483
484 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
485 in which the variable is declared.
486
487 PR fortran/18525
488 * resolve.c (was_declared): Also check for dummy attribute.
489
490 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
491
492 * gfortran.h (arith): Remove ARITH_0TO0.
493 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
494 (gfc_arith_power): Remove special casing of zero to integral
495 power zero.
496
497 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
498
499 * Make-lang.in (fortran-warn): Remove -Wno-error.
500 (expr.o-warn, resolve.o-warn, simplify.o-warn,
501 trans-common.o-warn): Specify -Wno-error.
502
503 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
504
505 * trans-array.c (gfc_trans_static_array_pointer,
506 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
507 comment and formatting typos.
508
509 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
510
511 * invoke.texi: Fix typos.
512
513 2005-03-15 Zack Weinberg <zack@codesourcery.com>
514
515 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
516
517 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
518
519 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
520 to zero on label_tree.
521
522 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
523
524 PR fortran/18827
525 * io.c (resolve_tag): Add checking on assigned label.
526 (match_dt_format): Does not set symbol assign attribute.
527 * match.c (gfc_match_goto):Does not set symbol assign attribute.
528 * resolve.c (resolve_code): Add checking on assigned label.
529 * trans-common.c (build_field): Deals with common variable assigned
530 a label.
531 * trans-stmt.c (gfc_conv_label_variable): New function.
532 (gfc_trans_label_assign): Use it.
533 (gfc_trans_goto): Ditto.
534 * trans-io.c (set_string): Ditto.
535 * trans.h (gfc_conv_label_variable): Add prototype.
536
537 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
538
539 PR fortran/20467
540 * symbol.c (check_conflict): A dummy argument can't be a statement
541 function.
542
543 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
544
545 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
546 the argument of the shift to the unsigned type.
547
548 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
549
550 PR fortran/16907
551 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
552
553 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
554
555 PR fortran/20323
556 * resolve.c (gfc_resolve): Check if character lengths are
557 specification expressions.
558
559 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
560
561 PR fortran/20361
562 * trans-array.c (gfc_stack_space_left): Remove unused variable.
563 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
564 code.
565 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
566 Remove declaration / prototype.
567 * trans-common.c (build_equiv_decl): Give union a name. Check if
568 it can be put on the stack.
569 * trans-decl.c (gfc_stack_space_left): Move function here.
570 (gfc_build_qualified_array): Fix comment typo.
571 * trans.h (gfc_put_var_on_stack): Add prototype.
572
573 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
574
575 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
576 * decl.c, trans.c: Don't use C++ style comments.
577 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
578 ifsrc): Give names to enums and use ENUM_BITFIELD.
579 (gfc_access): Remove trailing comma.
580
581 2005-03-05 Steven G. Kargl <kargls@comcast.net>
582
583 PR 19936
584 * primary.c (match_complex_constant): Mangled complex constant may
585 be an implied do-loop. Give implied do-loop matcher a chance.
586
587 2005-03-05 Steven G. Kargl <kargls@comcast.net>
588
589 PR fortran/19754
590 * resolve.c (compare_shapes): New function.
591 (resolve_operator): Use it.
592
593 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
594
595 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
596 type for COMPLEX constants.
597
598 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
599
600 PR fortran/19673
601 * trans-expr.c (gfc_conv_function_call): Correctly dereference
602 argument from a pointer function also if it has a result clause.
603
604 2005-03-04 Steven G. Kargl <kargls@comcast.net>
605
606 * expr.c (gfc_copy_shape_excluding): Change && to ||.
607
608 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
609
610 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
611 clarify comment.
612
613 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
614 (port from g95)
615
616 PR fortran/19479
617 * simplify.c (gfc_simplify_bound): Rename to ...
618 (simplify_bound): ... this and overhaul.
619
620 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
621
622 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
623 (gfc_conv_intrinsic_function): update function calls
624
625 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
626
627 PR fortran/20058
628 * trans-types.c (gfc_max_integer_kind): Declare
629 (gfc_init_kinds): Initialize it.
630 * gfortran.h (gfc_max_integer_kind): extern it.
631 * primary.c (match_boz_constant): Use it; remove gfortran extension
632 of kind suffixes on BOZ literal constants
633
634
635 2005-02-27 Steven G. Kargl <kargls@comcast.net>
636
637 * arith.c (gfc_check_real_range): Remove multiple returns
638 (check_result): New function.
639 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
640 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
641
642
643 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
644
645 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
646
647
648 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
649
650 Unrevert previously reverted patch. Adding this fix:
651 * module.c (find_true_name): Deal with NULL module.
652
653 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
654
655 Revert yesterday's patch:
656 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
657
658 * gfortran.h (gfc_component, gfc_actual_arglist, ...
659 ... argument. Copy string instead of pointing to it.
660
661 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
662
663 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
664 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
665 gfc_get_namespace.
666 * module.c (mio_namespace_ref, load_needed): Likewise.
667 * parse.c (parse_interface, parse_contained): Likewise. Here the
668 correct second argument matters.
669 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
670 parent's implicit types if this is set.
671 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
672 * trans-common.c (build_common_decl): Likewise.
673
674 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
675 formatting.
676 * symbol.c (gfc_set_default_type): Issue error only once, by setting
677 and checking 'untyped' attribute.
678
679 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
680 fields into new struct 'op' inside the 'value' union.
681 * arith.c (eval_intrinsic): Adapt all users.
682 * dependency.c (gfc_check_dependency): Likewise.
683 * dump-parse-tree.c (gfc_show_expr): Likewise.
684 * expr.c (gfc_get_expr): Don't clear removed fields.
685 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
686 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
687 check_intrinsic_op): Adapt to new field names.
688 * interface.c (gfc_extend_expr): Likewise. Also explicitly
689 nullify 'esym' and 'isym' fields of new function call.
690 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
691 Adapt to renamed structure fields.
692 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
693 * module.c (mio_expr): Likewise.
694 * resolve.c (resolve_operator): Likewise.
695 (gfc_find_forall_index): Likewise. Only look through operands
696 if dealing with EXPR_OP
697 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
698 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
699 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
700
701 [ Reverted ]
702 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
703 'name' a 'const char *'.
704 (gfc_symbol): Likewise, also for 'module'.
705 (gfc_symtree): Make 'name' a 'const char *'.
706 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
707 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
708 'char *' argument.
709 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
710 initialize 'SYM->module'.
711 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
712 pointer instead of empty string.
713 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
714 * interface.c (gfc_compare_types): Adapt check to account for possible
715 NULL pointer.
716 (compare_actual_formal): Check for NULL pointer instead of empty
717 string.
718 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
719 Add 'const' qualifier.
720 (conv_name): Return a heap allocated string.
721 (find_conv): Add 'const' qualifier to 'target'.
722 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
723 (make_generic): Check for NULL pointer instead of empty string.
724 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
725 (add_conv): No need to strcpy result from 'conv_name'.
726 (sort_actual): Check for NULL pointer instead of empty string.
727 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
728 Adapt prototype.
729 * module.c (compare_true_names): Compare pointers instead of strings
730 for 'module' member.
731 (find_true_name): Initialize string fields with gfc_get_string.
732 (mio_pool_string): New function.
733 (mio_internal_string): Adapt comment.
734 (mio_component_ref, mio_component, mio_actual_arg): Use
735 'mio_pool_string' instead of 'mio_internal_string'.
736 (mio_symbol_interface): Add 'const' qualifier to string arguments.
737 Add level of indirection. Use 'mio_pool_string' instead of
738 'mio_internal_string'.
739 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
740 (write_common, write_symbol): Use 'mio_pool_string' instead of
741 'mio_internal_string'.
742 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
743 instead of empty string.
744 (write_operator, write_generic): Pass correct type variable to
745 'mio_symbol_interface'.
746 (write_symtree): Use 'mio_pool_string' instead of
747 'mio_internal_string'.
748 * primary.c (match_keyword_arg): Adapt check to possible
749 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
750 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
751 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
752 'strcpy'.
753 (ambiguous_symbol): Check for NULL pointer instead of empty string.
754 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
755 arguments.
756 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
757 pointer instead of empty string.
758 * trans-decl.c (gfc_sym_mangled_identifier,
759 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
760 gfc_get_symbol_decl): Likewise.
761 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
762 argument. Copy string instead of pointing to it.
763
764 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
765
766 * intrinsic.h, st.c: Update copyright.
767
768 2005-02-20 Steven G. Kargl <kargls@comcast.net>
769
770 * symbol.c: Typos in comments.
771
772 2005-02-20 Steven G. Kargl <kargls@comcast.net>
773
774 * expr.c (gfc_type_convert_binary): Typo in comment.
775
776 2005-02-19 Steven G. Kargl <kargls@comcast.net>
777
778 * check.c (gfc_check_selected_int_kind): New function.
779 * intrinsic.h: Prototype it.
780 * intrinsic.c (add_function): Use it.
781 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
782 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
783
784 2005-02-19 Steven G. Kargl <kargls@comcast.net>
785
786 * check.c (gfc_check_int): improve checking of optional kind
787 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
788
789 2005-02-19 Steven G. Kargl <kargls@comcast.net>
790
791 * check.c (gfc_check_achar): New function
792 * intrinsic.h: Prototype it.
793 * intrinsic.c (add_function): Use it.
794
795 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
796
797 * trans-stmt.c (generate_loop_for_temp_to_lhs,
798 generate_loop_for_rhs_to_temp): Remove if whose condition is
799 always true.
800
801 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
802
803 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
804 (gfc_use_derived): ... this function.
805
806 2005-02-09 Richard Henderson <rth@redhat.com>
807
808 * f95-lang.c (gfc_init_builtin_functions): Call
809 build_common_builtin_nodes; do not define any functions handled
810 by it.
811
812 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
813
814 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
815 EXPR_SUBSTRING.
816 (gfc_is_constant_expr): Check 'ref' to determine if substring
817 reference is constant.
818 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
819 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
820 and 'op2'.
821 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
822
823 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
824
825 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
826 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
827 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
828 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
829 gfc_add_procedure): Add argument.
830 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
831 gfc_match_null, match_type_spec, match_attr_spec,
832 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
833 Update callers to match.
834 (gfc_match_entry) : Likewise, fix comment typo.
835 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
836 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
837 gfc_match_derived_decl): Update callers.
838 * interface.c (gfc_match_interface): Likewise.
839 * match.c (gfc_match_label, gfc_add_flavor,
840 gfc_match_call, gfc_match_common, gfc_match_block_data,
841 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
842 Likewise.
843 * parse.c (parse_derived, parse_interface, parse_contained),
844 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
845 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
846 * symbol.c (check_conflict, check_used): Add new 'name' argument,
847 use when printing error message.
848 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
849 gfc_add_generic, gfc_add_in_common, gfc_add_data,
850 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
851 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
852 gfc_add_procedure): Add new 'name' argument. Pass along to
853 check_conflict and check_used.
854 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
855 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
856 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
857 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
858 argument in calls to any of the modified functions.
859
860 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
861
862 * gfortran.texi: Don't give last update date.
863
864 2006-01-30 Richard Henderson <rth@redhat.com>
865
866 * options.c (gfc_init_options): Zero flag_errno_math.
867
868 2005-01-29 Paul Brook <paul@codesourcery.com>
869
870 PR fortran/18565
871 * check.c (real_or_complex_check): New function.
872 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
873 * intrinsic.c (add_functions): Use new check functions.
874 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
875 Add prototypes.
876
877 2005-01-29 Steven G. Kargl <kargls@comcast.net>
878
879 PR fortran/19589
880 * expr.c (gfc_check_assign): Check for conformance of logical operands
881
882 2004-01-27 Steven Bosscher <stevenb@suse.de>
883
884 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
885 TREE_USED for all labels.
886 (gfc_trans_entry_master_switch): Use it instead of building a
887 label by hand.
888 * trans-io.c (add_case): Likewise.
889 * trans-stmt.c (gfc_trans_integer_select): Likewise.
890
891 2004-01-23 Paul Brook <paul@codesourcery.com>
892 Steven G. Kargl <kargls@comcast.net>
893
894 PR fortran/17941
895 * arith.c (gfc_convert_real): Remove sign handling.
896 * primary.c (match_digits): Allow whitespace after initial sign.
897 (match_real_const): Handle signs here. Allow whitespace after
898 initial sign. Remove dead code.
899 (match_const_complex_part): Remove.
900 (match_complex_part): Use match_{real,integer}_const.
901 (match_complex_constant): Cross-promote integer types.
902
903 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
904
905 PR fortran/19294
906 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
907 transpose_c8 for complex types.
908
909 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
910
911 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
912 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
913 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
914 Follow spelling conventions.
915
916 2005-01-22 Bud Davis <bdavis9659@comcast.net>
917
918 PR fortran/19313
919 * trans-io.c (gfc_trans_inquire): Added code to support
920 pad.
921
922 2005-01-22 Steven G. Kargl <kargls@comcast.net>
923
924 * intrinsic.c (make_alias): Add standard argument.
925 (add_functions): Update make_alias calls.
926
927 2005-01-22 Paul Brook <paul@codesourcery.com>
928
929 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
930
931 2005-01-22 Paul Brook <paul@codesourcery.com>
932
933 * gfortran.h (gfc_check_access): Add prototype.
934 * match.c (gfc_match_namelist): Remove TODO.
935 * module.c (check_access): Rename ...
936 (gfc_check_access): ... to this. Boolify. Update callers.
937 * resolve.c (resolve_symbol): Check for private objects in public
938 namelists.
939
940 2005-01-22 Paul Brook <paul@codesourcery.com>
941
942 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
943 does not have an explicit type.
944 (gfc_match_variable): Resolve implicit derived types in all cases.
945 Resolve contained function types from their own namespace, not the
946 parent.
947 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
948 checking. Resolve from the contained namespace, not the parent.
949
950 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
951
952 PR fortran/19543
953 * trans-const.c (gfc_conv_constant_to_tree): Give logical
954 constants the correct type.
955
956 PR fortran/19194
957 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
958 length parameters.
959 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
960 pointer fields.
961
962 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
963
964 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
965 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
966 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
967 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
968 trans-io.c, trans-stmt.c, trans.c: Update copyright.
969
970 2005-01-17 Ira Rosen <irar@il.ibm.com>
971
972 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
973
974 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
975
976 PR fortran/19182
977 * error.c (error_char): Line-buffer errors / warnings.
978
979 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
980
981 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
982 unsigned issue. Use build_int_cst instead of converting
983 integer_zero_node. Remove unnecessary conversion.
984
985 * trans-types.c (gfc_get_character_type_len): : Use
986 gfc_charlen_type_node as basic type for the range field.
987
988 * trans-intrinsic.c (build_fixbound_expr,
989 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
990 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
991 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
992 of converting 'integer_zero_node' or 'integer_one_node'
993 respectively.
994 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
995 evade re-building.
996 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
997 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
998 'build_int_cst' instead of converting 'integer_zero_node' or
999 'integer_one_node' respectively.
1000
1001 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1002 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1003 'gfc'-prefix from local variable, remove dead code, use correct
1004 type when inserting argument.
1005
1006 * trans-intrinsic.c, trans-types.c: Update copyright years.
1007
1008 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1009
1010 PR 19168
1011 * resolve.c (check_case_overlap): Typo in comment.
1012 (validate_case_label_expr): Fix up kinds of case values
1013 (resolve_select): Properly handle kind mismatches.
1014
1015 2004-01-16 Paul Brook <paul@codesourcery.com>
1016
1017 PR fortran/17675
1018 * trans-common.c (translate_common): Remove duplicate function call.
1019 (finish_equivalences): Preserve alignment when biasing offsets.
1020
1021 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1022
1023 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1024 ASCII-like character encoding.
1025
1026 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1027
1028 * resolve.c (compare_case): Cleanup.
1029
1030 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1031
1032 * resolve.c (compare_case): Give arguments correct type.
1033
1034 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1035
1036 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1037 typos.
1038
1039 2005-01-09 Paul Brook <paul@codesourcery.com>
1040
1041 PR fortran/17675
1042 * trans-common.c (current_common, current_offset): Remove.
1043 (create_common): Add head argument.
1044 (align_segment): New function.
1045 (apply_segment_offset): New function.
1046 (translate_common): Merge code from new_segment. Handle alignment.
1047 (new_segment): Remove.
1048 (finish_equivalences): Ensure proper alignment.
1049
1050 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1051
1052 * trans-const.c: Don't include unused math.h.
1053
1054 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1055 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1056 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1057 trailing whitespace.
1058 (prepare_arg_info): Fix formatting, indenting and remove trailing
1059 whitespace.
1060 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1061 trailing whitespace.
1062
1063 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1064 gfc_constant_result, gfc_range_check, gfc_arith_power,
1065 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1066 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1067 gfc_complex2complex): Fix whitespace issues.
1068 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1069 logical_array_check, array_check, scalar_check, nonoptional_check,
1070 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1071 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1072 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1073 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1074 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1075 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1076 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1077 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1078 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1079 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1080 gfc_check_lbound, gfc_check_logical, min_max_args,
1081 gfc_check_min_max_integer, gfc_check_min_max_real,
1082 gfc_check_min_max_double, gfc_check_matmul,
1083 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1084 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1085 gfc_check_range, gfc_check_real, gfc_check_repeat,
1086 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1087 gfc_check_set_exponent): Fix formatting issues.
1088 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1089 remove whitespace-only line.
1090 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1091 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1092 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1093 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1094 gfc_check_random_number, gfc_check_random_seed,
1095 gfc_check_second_sub, gfc_check_system_clock,
1096 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1097 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1098 gfc_check_unlink_sub): Fix formatting issues.
1099
1100 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1101
1102 * gfortran.h: Remove outdated comment. Don't include stdio.h
1103 explicitly.
1104
1105 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1106
1107 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1108 output of 'gfortran --version'.
1109
1110 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1111
1112 * arith.c: Add system.h; remove string.h
1113 * decl.c: Ditto
1114 * matchexp.c: Ditto
1115 * parse.c: Ditto
1116 * resolve.c: Ditto
1117 * st.c: Ditto
1118 * check.c: Remove stdlib.h and stdarg.h
1119 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1120 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1121 * f95-lang.c: Add system.h; remove stdio.h
1122 * interface.c: Add system.h; remove stdlib.h and string.h
1123 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1124 * io.c: Remove string.h
1125 * simplify.c: Ditto
1126 * match.c: Remove stdarg.h and string.h
1127 * misc.c: Update copyright; add system.h; remove stdlib.h,
1128 string.h, and sys/stat.h
1129 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1130 unistd.h, and time.h
1131 * option.c: Remove string.h and stdlib.h
1132 * primary.c: Ditto
1133 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1134 stdio.h, string.h, and strings.h
1135 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1136 * trans-array.c: Remove stdio.h and gmp.h
1137 * trans-const.c: Ditto
1138 * trans-expr.c: Ditto
1139 * trans-io.c: Ditto
1140 * trans-stmt.c: Ditto
1141 * trans.c: Ditto
1142 * trans-intrinsic.c: Remove stdio.h and string.h
1143
1144 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1145
1146 * gfortran.h (gfc_case): fix typo in comment.
1147
1148 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1149
1150 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1151 logical shift. Call fold. Remove 0-bit shift shortcut.
1152 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1153 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1154 result if width(arg 1) < 4 bytes. Call fold.
1155
1156 PR fortran/19032
1157 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1158 in front of function to match the standard. Correct handling
1159 of MODULO.
1160
1161 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1162
1163 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1164 flag_unsafe_math_optimizations if we have a float type.
1165
1166 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1167
1168 * gfortran.texi: Fix typo.
1169
1170 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1171
1172 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1173 comment typo.
1174
1175 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1176
1177 PR fortran/18993
1178 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1179 (gfc_match_nullify): Make sure that ')' is in front of the end of
1180 statement.
1181
1182 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1183 function.
1184
1185 2004-12-14 Richard Henderson <rth@redhat.com>
1186
1187 * gfortran.h (gfc_expr.function.name): Make const.
1188 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1189 (gfc_get_string): Update prototype.
1190 * iresolve.c: Include tree.h.
1191 (string_node, HASH_SIZE, string_head, hash): Remove.
1192 (gfc_get_string): Use vsnprintf, get_identifier.
1193 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1194 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1195 (gfc_done_1): Don't call gfc_iresolve_done_1.
1196 * module.c (mio_allocated_string): Take and return const char *,
1197 instead of modifying char**.
1198 (mio_expr): Update to match.
1199 * resolve.c (pure_function): Constify name argument.
1200 (resolve_function): Constify name.
1201 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1202
1203 2004-12-12 Richard Henderson <rth@redhat.com>
1204
1205 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1206 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1207 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1208 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1209 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1210 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1211 gfc_resolve_unpack: Use PREFIX.
1212
1213 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1214
1215 PR fortran/18869
1216 * match.c (gfc_match_common): Skip whitespace.
1217
1218 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1219
1220 PR fortran/16581
1221 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1222 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1223 integer kind check; Issue error for -std=f95 when needed.
1224 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1225 GFC_STD_F95.
1226 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1227 Promote arguments to same kind.
1228
1229 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1230 Paul Brook <paul@codesourcery.com>
1231
1232 PR fortran/16222
1233 * resolve.c (gfc_resolve_iterator_expr): New function.
1234 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1235 start, end and stride to correct type.
1236 (resolve_code): Pass extra argument.
1237 * array.c (resolve_array_list): Pass extra argument.
1238 * gfortran.h (gfc_resolve): Add prototype.
1239 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1240 Handle real type iterators.
1241
1242 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1243
1244 PR fortran/17175
1245 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1246 same kind as C's 'int'.
1247 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1248
1249 2004-12-08 Richard Henderson <rth@redhat.com>
1250
1251 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1252 to the output expression.
1253 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1254 warning conversion.
1255 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1256 to index kind.
1257
1258 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1259
1260 PR fortran/18826
1261 * resolve.c (resolve_code): Impose correct restrictions on
1262 assigned variable.
1263
1264 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1265
1266 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1267 Paul Brook <paul@codesourcery.com>
1268
1269 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1270 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1271 (gfc_check_stat, gfc_check_stat_sub): New functions.
1272 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1273 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1274 fstat, and stat to intrinsics symbol tables.
1275 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1276 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1277 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1278 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1279 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1280 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1281
1282 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1283
1284 * intrinsic.c: Fix and add comments, fix function declarations
1285 (OPTIONAL,REQUIRED): New symbols
1286 (add_functions,add_subroutines): Use symbols
1287 (gmp.h): Remove unused include
1288
1289 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1290
1291 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1292 in diagnostics.
1293
1294 2004-11-24 Steven Bosscher <stevenb@suse.de>
1295
1296 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1297
1298 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1299
1300 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1301
1302 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1303 gfc_check_unlink,gfc_check_unlink_sub): New functions
1304 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1305 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1306 exit to intrinsics symbol tables.
1307 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1308 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1309 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1310 gfc_resolve_unlink_sub): Add and sort prototypes.
1311 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1312 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1313 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1314
1315 2004-11-16 Paul Brook <paul@codesourcery.com>
1316
1317 PR fortran/13010
1318 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1319 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1320 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1321 type.
1322 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1323 (gfc_get_array_type_bounds): Ditto.
1324 (gfc_get_derived_type): Recurse into derived type pointers.
1325 * trans-types.h (gfc_get_dtype): Add prototype.
1326 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1327
1328 2004-11-15 Paul Brook <paul@codesourcery.com>
1329
1330 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1331
1332 2004-11-10 Paul Brook <paul@codesourcery.com>
1333
1334 PR fortran/18375
1335 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1336 * trans-io.c (transfer_array_component): Ditto.
1337
1338 2004-11-10 Paul Brook <paul@codesourcery.com>
1339
1340 * invoke.texi: Fix typo.
1341
1342 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1343
1344 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1345 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1346 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1347 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1348 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1349
1350 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1351
1352 PR fortran/18023
1353 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1354
1355 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1356
1357 * gfortranspec.c: Replace GNU CC with GCC.
1358
1359 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1360
1361 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1362
1363 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1364
1365 PR fortran/18111
1366 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1367 hidden parameters.
1368
1369 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1370
1371 PR fortran/15164
1372 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1373 module procedures as if they were module variables.
1374
1375 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1376
1377 PR fortran/17535
1378 PR fortran/17583
1379 PR fortran/17713
1380 * module.c (write_symbol1): Set module_name for dummy arguments.
1381
1382 2004-11-02 Paul Brook <paul@codesourcery.com>
1383
1384 * intrinsic.c (check_intrinsic_standard): Include error locus.
1385 Remove VLA.
1386 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1387 locus to check_intrinsic_standard.
1388
1389 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1390
1391 PR fortran/17590
1392 * gfortran.h: Change GFC_STD_* flags to more appropriate
1393 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1394 gfc_option_t): Add field for warning about use of nonstandard
1395 intrinsics.
1396 * intrinsic.c (add_sym): Add parameter for standard version, check
1397 this against current standard.
1398 (add_sym_0): Pass standard parameter to add_sym.
1399 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1400 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1401 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1402 (make_generic): Add parameter for standard, check this
1403 against currently selected standard.
1404 (add_functions, add_subroutines): Add parameter to tell which
1405 standard an intrinsic belongs to.
1406 (check_intrinsic_standard): New function.
1407 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1408 (gfc_intrinsic_sub_interface): Ditto.
1409 * lang.opt: Add Wnonstd-intrinsics option.
1410 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1411 init new warning.
1412 (set_Wall): Add warning about nonstd intrinsics.
1413 (gfc_handle_option): Change to use new GFC_STD_* flags,
1414 handle new warning.
1415 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1416
1417 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1418
1419 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1420
1421 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1422
1423 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1424
1425 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1426
1427 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1428 comment typo.
1429
1430 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1431
1432 * check.c (gfc_check_rand): Allow missing optional argument.
1433 (gfc_check_irand): Ditto.
1434 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1435
1436 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1437
1438 PR fortran/13490, PR fortran/17912
1439 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1440 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1441 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1442 warning when compiling with pedantic.
1443 * gcc/fortran/arith.c: Set minimum integer values to reflect
1444 realities of two's complement signed integers. Added
1445 pedantic minimum.
1446
1447 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1448
1449 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1450 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1451 link it in.
1452
1453 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1454
1455 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1456 typo.
1457 (gfc_generate_function_code): Fix formatting issue.
1458
1459 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1460
1461 * module.c: Fix formatting issues.
1462
1463 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1464
1465 * module.c (mio_interface_rest): Set where member of interface
1466 while loading.
1467
1468 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1469
1470 PR fortran/17901
1471 * options.c (gfc_handle_option): Add break after handing the
1472 J/M option.
1473
1474 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1475
1476 * arith.c: Fix formatting issues.
1477
1478 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1479
1480 PR fortran/17676
1481 * resolve.c (resolve_operator): Use correct operator name in message.
1482
1483 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1484
1485 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1486 Move standard warning further to the front.
1487
1488 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1489
1490 * trans-stmt.c: Fix a comment typo.
1491
1492 2004-10-07 Paul Brook <paul@codesourcery.com>
1493
1494 PR fortran/17678
1495 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1496 variables alone.
1497
1498 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1499
1500 PR fortran/17568
1501 * simplify.c (twos_complement): New function.
1502 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1503
1504 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1505
1506 2004-10-06 Paul Brook <paul@codesourcery.com>
1507
1508 * trans-stmt.c (gfc_trans_simple_do): New function.
1509 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1510 loop. Update comments.
1511
1512 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1513
1514 PR fortran/17283
1515 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1516 is scalar.
1517
1518 PR fortran/17631
1519 * intrinsic.c (add_sym_5): Remove.
1520 (add_subroutines): Add resolution function for MVBITS.
1521 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1522 MVBITS
1523 * iresolve.c (gfc_resolve_mvbits): New function.
1524 (gfc_resolve_random_number): Remove empty line at end of function.
1525
1526 * trans-const.c (gfc_build_cstring_const): New function.
1527 (gfc_init_cst): Use new function.
1528 * trans-const.h (gfc_build_cstring_const): Add prototype.
1529 * trans-io.c (set_string, set_error_locus): Use new function.
1530 * trans-stmt.c (gfc_trans_goto): Use new function.
1531
1532 PR fortran/17708
1533 * parse.c (accept_statement): Don't treat END DO like END IF and
1534 END SELECT.
1535 (parse_do_block): Generate possible END DO label inside END DO
1536 block.
1537
1538 PR fortran/17776
1539 * check.c (gfc_check_system_sub): New function.
1540 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1541 * intrinsic.c (add_functions): Add 'system'.
1542 (add_subroutines): Add 'system'.
1543 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1544 Move prototypes to other suborutines.
1545 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1546 Add prototype.
1547 (gfc_resolve_system_clock): Fix formatting of prototype.
1548 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1549 functions.
1550 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1551 GFC_ISYM_SYSTEM.
1552
1553 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1554
1555 * scanner.c (preprocessor_line): Accept preprocessor lines without
1556 file names. Check file names for closing quotes. Handle escaped
1557 quotes in file names.
1558
1559 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1560 Paul Brook <paul@codesourcery.com>
1561
1562 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1563 Use gfc_get_expr_charlen.
1564 * trans-expr.c (gfc_get_expr_charlen): New function.
1565 * trans.h (gfc_get_expr_charlen): Add prototype.
1566
1567 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1568
1569 * trans-intrinsic.c: Fix a comment typo.
1570
1571 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1572
1573 * simplify.c (range_check): Remove blank line at beginning of function.
1574 (gfc_simplify_dint): Same at end of function.
1575 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1576 (gfc_simplify_bound): Fix indentation.
1577 (gfc_simplify_log10): Simplify calculation.
1578 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1579 of function.
1580 (gfc_simplify_nearest): Same at end of function.
1581 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1582 function.
1583 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1584 gfc_simplify_spacing): Simplify calulations.
1585
1586 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1587
1588 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1589 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1590
1591 2004-10-01 Jan Hubicka <jh@suse.cz>
1592
1593 * f95-lang.c (gfc_expand_function): Update call of
1594 tree_rest_of_compilation.
1595 * trans-decl.c (gfc_generate_constructors): Likewise.
1596
1597 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1598
1599 * trans-intrinsic.c: Comment fixes.
1600
1601 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1602
1603 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1604
1605 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1606
1607 * trans-types.c (gfc_return_by_reference): Remove superfluous
1608 assertion.
1609
1610 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1611 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1612
1613 PR fortran/17615
1614 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1615 function to determine return type.
1616
1617 2004-09-20 Jan Hubicka <jh@suse.cz>
1618
1619 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1620 tree.
1621 (gfc_generate_function_code): Likewise.
1622
1623 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1624
1625 PR fortran/15957
1626 * simplify.c (gfc_simplify_reshape): Set shape of return value
1627 correctly.
1628
1629 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1630 Zack Weinberg <zack@codesourcery.com>
1631
1632 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1633 enumeration constants.
1634
1635 2004-09-17 Paul Brook <paul@codesourcery.com>
1636
1637 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1638 (gfc_linebuf_header_size): Define.
1639 * scanner.c (load_file): Use it.
1640
1641 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1642
1643 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1644 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1645 resolve.c, scanner.c, trans-array.c, trans-array.h,
1646 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1647 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1648 trans.h: Fix comment typos. Follow spelling conventions.
1649
1650 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1651
1652 PR/15364
1653 * trans-io.c (transfer_array_component): New function.
1654 (transfer_expr): For array fields, call transfer_array_component.
1655
1656 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1657
1658 * gfortran.texi: Fix a typo.
1659
1660 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1661
1662 * parse.c (eof_buf): Rename eof to eof_buf.
1663 (unexpected_eof): Same.
1664 (gfc_parse_file): Same.
1665
1666 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1667
1668 * check.c (gfc_check_getcwd_sub): New function.
1669 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1670 * intrinsic.c (add_functions): Add function definition;
1671 Use symbol.
1672 * intrinsic.c (add_subroutines): Add subroutine definitions.
1673 * intrinsic.h: Add prototypes.
1674 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1675 New functions.
1676 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1677
1678 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1679
1680 PR fortran/16485
1681 * module.c (write_symbol): Don't fill in module name here.
1682 (write_symbol0): Fill in here instead.
1683
1684 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1685
1686 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1687 trans-array.c, trans-common.c, trans-expr.c,
1688 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1689 comment typos. Follow spelling conventions.
1690
1691 2004-09-09 Paul Brook <paul@codesourcery.com>
1692
1693 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1694
1695 2004-09-08 Paul Brook <paul@codesourcery.com>
1696
1697 * array.c: Don't include assert.h.
1698 * data.c: Don't include assert.h. Replace assert and abort with
1699 gcc_assert and gcc_unreachable.
1700 * dependency.c: Ditto.
1701 * f95-lang.c: Ditto.
1702 * iresolve.c: Ditto.
1703 * resolve.c: Ditto.
1704 * simplify.c: Ditto.
1705 * symbol.c: Ditto.
1706 * trans-array.c: Ditto.
1707 * trans-common.c: Ditto.
1708 * trans-const.c: Ditto.
1709 * trans-decl.c: Ditto.
1710 * trans-expr.c: Ditto.
1711 * trans-intrinsic.c: Ditto.
1712 * trans-io.c: Ditto.
1713 * trans-stmt.c: Ditto.
1714 * trans-types.c: Ditto.
1715 * trans.c: Ditto.
1716
1717 2004-09-07 Per Bothner <per@bothner.com>
1718 Paul Brook <paul@codesourcery.com>
1719
1720 * error.c (show_locus): Handle mapped locations.
1721 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1722 * gfortran.h: Include input.h.
1723 (struct gfc_linebuf): Use source_location.
1724 * scanner.c (get_file): Initialize linemap.
1725 (preprocessor_line): Pass extra argument to get_file.
1726 (load_file): Ditto. Setup linemap.
1727 (gfc_new_file): Handle mapped locations.
1728 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1729 Set decl source locations.
1730 (gfc_trans_common): Set blank common block location.
1731 * trans-decl.c (gfc_set_decl_location): New function.
1732 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1733 (trans_function_start): Move call to gfc_set_backend_locus..
1734 (build_function_decl): ... to here.
1735 (build_entry_thunks): Set and restore the backend locus.
1736 (gfc_generate_constructors): Remove excess arguments to
1737 init_function_start.
1738 (gfc_generate_block_data): Add comments. Set the decl locus.
1739 * trans-io.c (set_error_locus): Handle mapped locations.
1740 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1741 (gfc_trans_code): Use SET_EXPR_LOCATION.
1742 (gfc_generate_code): Override the location of the new symbol.
1743 * trans.h (gfc_set_decl_location): Add prototype.
1744
1745 2004-08-31 Paul Brook <paul@codesourcery.com>
1746
1747 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1748
1749 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1750
1751 PR fortran/15327
1752 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1753 strings.
1754
1755 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1756
1757 PR fortran/16400
1758 PR fortran/16404
1759 (port from g95)
1760 * resolve.c (resolve_transfer): New function.
1761 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1762
1763 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1764
1765 PR fortran/16579
1766 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1767 unsigned char.
1768
1769 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1770
1771 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1772
1773 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1774
1775 PR fortran/17244
1776 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1777 add comment pointing out possible issue WRT compatibility with g77.
1778
1779 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1780
1781 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
1782 all occurences of 'gfc_strlen_type_node' by
1783 'gfc_charlen_type_node'.
1784 * trans-types.h: Same. Also update comment accordingly.
1785
1786 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1787
1788 * primary.c: Update copyright boilerplate to say GCC.
1789 * f95-lang.c: Change initial comment to say gfortran.
1790
1791 2004-08-31 Paul Brook <paul@codesourcery.com>
1792
1793 * trans-types.h: Add comments.
1794 (intmax_type_node, string_type_node, const_string_type_node): Remove.
1795
1796 2004-08-30 Richard Henderson <rth@redhat.com>
1797
1798 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
1799 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
1800 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
1801 c_long, c_long_long.
1802 (gfc_logical_info): Add c_bool.
1803 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
1804 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
1805 rather than gfc_int[48]_type_node for allocate choice.
1806 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
1807 local copies of some kind type nodes.
1808 (gfc_build_builtin_function_decls): Likewise.
1809 * trans-expr.c (gfc_conv_power_op): Likewise.
1810 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1811 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
1812 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
1813 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
1814 gfc_trans_character_select, gfc_trans_allocate): Likewise.
1815 * trans-io.c (gfc_pint4_type_node): Move into ...
1816 (gfc_build_io_library_fndecls): ... here. Cache local copies of
1817 some kind type nodes.
1818 * trans-types.c (gfc_type_nodes): Remove.
1819 (gfc_character1_type_node, gfc_strlen_type_node): New.
1820 (gfc_integer_types, gfc_logical_types): New.
1821 (gfc_real_types, gfc_complex_types): New.
1822 (gfc_init_kinds): Fill in real mode_precision.
1823 (gfc_build_int_type, gfc_build_real_type): New.
1824 (gfc_build_complex_type, gfc_build_logical_type): New.
1825 (c_size_t_size): New.
1826 (gfc_init_types): Loop over kinds.
1827 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
1828 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
1829 (gfc_get_character_type_len): Likewise.
1830 (gfc_type_for_size): Loop over kinds; use a reduced set of
1831 unsigned type nodes.
1832 (gfc_type_for_mode): Loop over kinds.
1833 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
1834 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
1835 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
1836 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
1837 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
1838 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
1839 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
1840 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
1841 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
1842 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
1843 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
1844 gfc_complex8_type_node, gfc_complex16_type_node,
1845 gfc_logical1_type_node, gfc_logical2_type_node,
1846 gfc_logical4_type_node, gfc_logical8_type_node,
1847 gfc_logical16_type_node, gfc_strlen_kind): Remove.
1848 (gfc_character1_type_node): Turn in to a variable.
1849 (gfc_strlen_type_node): Likewise.
1850
1851 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1852
1853 * gfortran.h (gfc_namespace): Add new field is_block_data.
1854 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
1855 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
1856 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
1857 * trans.h (gfc_generate_block_data): Add prototype.
1858 * trans-decl.c (gfc_generate_block_data): New function.
1859
1860 2004-08-29 Richard Henderson <rth@redhat.com>
1861
1862 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
1863 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
1864 than two HOST_WIDE_INT.
1865
1866 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1867
1868 PR fortran/13910
1869 * decl.c (free_variable, free_value, gfc_free_data, var_list,
1870 var_element, top_var_list, match_data_constant, top_val_list,
1871 gfc_match_data): Move here from match.c.
1872 (match_old_style_init): New function.
1873 (variable_decl): Match old-style initialization.
1874 * expr.c (gfc_get_variable_expr): New function.
1875 * gfortran.h (gfc_get_variable_expr): Add prototype.
1876 * gfortran.texi: Start documentation for supported extensions.
1877 * match.c: Remove the functions moved to decl.c.
1878 * match.h (gfc_match_data): Move prototype to under decl.c.
1879 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1880 comments.
1881
1882 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1883 Paul Brook <paul@codesourcery.com>
1884
1885 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1886 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1887 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1888 (build_builtin_fntypes): New function.
1889 (gfc_init_builtin_functions): Use it.
1890 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1891 and GFC_ISYM_ERF{,C}.
1892 (gfc_c_int_kind): Declare.
1893 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1894 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1895 gfc_resolve_g77_math1): Add prototypes.
1896 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1897 * mathbuiltins.def: Add comment. Change third argument. Use
1898 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
1899 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1900 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1901 * trans-types.c (gfc_c_int_kind): Declare.
1902 (gfc_init_kinds): Set it.
1903
1904 2004-08-29 Steven G. Kargl <kargls@comcast.net>
1905 Paul Brook <paul@codesourcery.com>
1906
1907 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1908 (gfc_check_f, gfc_simplify_f): Add f0.
1909 * intrinsic.c (do_check): Call f0. Flatten.
1910 (add_sym_0): Fix prototype. Set f0.
1911 (add_functions): Add getgid, getgid and getuid.
1912 (resolve_intrinsic): Remove obsolete comment.
1913 (do_simplify): Call f0.
1914 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1915 gfc_resolve_getuid): Add prototypes.
1916 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1917 gfc_resolve_getuid): New functions.
1918 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1919 GFC_ISYM_GET?ID.
1920
1921 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1922
1923 * error.c (gfc_error_init_1): Remove blank line in front of
1924 function body. Add missing blank.
1925 (gfc_buffer_error, error_char, error_string): Remove blank line in
1926 front of function body.
1927 (show_locus): Add comma in comment.
1928 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1929 gfc_push_error, gfc_pop_error): Remove blank line in front of
1930 function body.
1931 (gfc_get_errors): Typo fix in comment in front of function. Remove
1932 blank line in front of function body.
1933
1934 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1935
1936 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1937 variable declaration of same name.
1938 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1939 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1940 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1941 Replace all calls to gfc_default_*_kind with variable accesses.
1942 * trans-types.c: Same as above.
1943 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1944 static qualifier. Replace all occurences.
1945 (gfc_default_*_kind): Remove functions.
1946
1947 2004-08-26 Richard Henderson <rth@redhat.com>
1948
1949 * arith.c: Include system.h, not real system headers.
1950 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1951 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1952 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1953 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1954 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1955 gfc_index_integer_kind, gfc_default_integer_kind,
1956 gfc_default_real_kind,gfc_default_double_kind,
1957 gfc_default_character_kind, gfc_default_logical_kind,
1958 gfc_default_complex_kind, validate_integer, validate_real,
1959 validate_logical, validate_character,
1960 gfc_validate_kind): Move to trans-types.c.
1961 (gfc_set_model_kind): Use gfc_validate_kind.
1962 (gfc_set_model): Just copy the current precision to default.
1963 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1964 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1965 * gfortran.h: Update file commentary.
1966 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1967 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1968 gfc_default_double_kind_1, gfc_default_character_kind_1,
1969 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1970 (gfc_init_kinds): New.
1971 (gfc_init_types): Don't set gfc_index_integer_kind here.
1972 * trans-types.h (gfc_init_kinds): Declare.
1973 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1974
1975 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1976
1977 * check.c (gfc_check_atan2): New function.
1978 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1979 * intrinsic.h (gfc_check_atan2): Add prototype.
1980
1981 2004-08-25 Richard Henderson <rth@redhat.com>
1982
1983 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1984 false and we don't validate the kind.
1985 (gfc_check_integer_range, gfc_check_real_range): Update to match.
1986 * check.c (kind_check): Likewise.
1987 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1988 (match_char_spec, match_logical_spec): Likewise.
1989 * gfortran.h (gfc_validate_kind): Likewise.
1990 * options.c (gfc_handle_option): Likewise.
1991 * primary.c (match_integer_constant, match_real_constant,
1992 match_string_constant, match_logical_constant,
1993 match_const_complex_part): Likewise.
1994 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1995 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1996 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1997 gfc_simplify_maxexponent, gfc_simplify_minexponent,
1998 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1999 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2000 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2001 gfc_simplify_tiny): Likewise.
2002 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2003 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2004 prepare_arg_info): Likewise.
2005
2006 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2007
2008 * expr.c (gfc_check_assign): Add comment. Add new warning.
2009 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2010 result of pointer valued function when not in pointer assignment.
2011
2012 2004-08-25 Paul Brook <paul@codesourcery.com>
2013
2014 * config-lang.in: Remove dead commented line.
2015 * module.c: Replace g95 with gfortran in comment.
2016
2017 2004-08-25 Paul Brook <paul@codesourcery.com>
2018
2019 PR fortran/17190
2020 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2021
2022 2004-08-25 Paul Brook <paul@codesourcery.com>
2023
2024 PR fortran/17144
2025 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2026 string_length argument.
2027 (gfc_trans_array_ctor_element): New function.
2028 (gfc_trans_array_constructor_subarray): Use it.
2029 (gfc_trans_array_constructor_value): Ditto. Handle constant
2030 character arrays.
2031 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2032 (gfc_trans_array_constructor): Use them.
2033 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2034 (gfc_conv_ss_descriptor): Remember section string length.
2035 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2036 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2037 (gfc_conv_expr_descriptor): Ditto.
2038 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2039 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2040 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2041 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2042 (gfc_conv_variable): Set string_length from section.
2043 (gfc_conv_function_call): Remove extra argument.
2044 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2045 * trans-types.c (gfc_get_character_type_len): New function.
2046 (gfc_get_character_type): Use it.
2047 (gfc_get_dtype): Return zero for internal types.
2048 * trans-types.h (gfc_get_character_type_len): Add prototype.
2049 * trans.h (struct gfc_ss): Move string_length out of union.
2050
2051 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2052
2053 * trans.h (build2_v, build3_v): New macros.
2054 (build_v): Remove.
2055 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2056 build.
2057 * trans-array.c (gfc_conv_descriptor_data,
2058 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2059 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2060 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2061 gfc_trans_allocate_temp_array,
2062 gfc_trans_array_constructor_subarray,
2063 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2064 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2065 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2066 gfc_conv_array_ref, gfc_trans_preloop_setup,
2067 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2068 gfc_conv_loop_setup, gfc_array_init_size,
2069 gfc_conv_array_initializer, gfc_trans_array_bounds,
2070 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2071 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2072 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2073 of build and build_v as appropriate.
2074 * trans-common.c (create_common): Same.
2075 * trans-decl.c (gfc_trans_auto_character_variable,
2076 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2077 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2078 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2079 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2080 gfc_conv_expr_op, gfc_conv_function_call,
2081 gfc_trans_structure_assign): Same.
2082 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2083 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2084 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2085 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2086 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2087 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2088 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2089 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2090 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2091 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2092 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2093 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2094 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2095 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2096 gfc_conv_intrinsic_iargc): Same.
2097 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2098 set_flag, add_case, io_result, transfer_namelist_element,
2099 transfer_expr): Same.
2100 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2101 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2102 gfc_trans_integer_select, gfc_trans_logical_select,
2103 gfc_trans_character_select, gfc_trans_forall_loop,
2104 gfc_trans_nested_forall_loop, gfc_do_allocate,
2105 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2106 compute_inner_temp_size, compute_overall_iter_number,
2107 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2108 gfc_trans_forall_1, gfc_evaluate_where_mask,
2109 gfc_trans_where_assign, gfc_trans_allocate): Same.
2110 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2111 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2112 gfc_build_array_ref, gfc_build_function_call,
2113 gfc_trans_runtime_check): Same.
2114
2115 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2116
2117 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2118 build_int_cst to build_int_cst_wide in accordance to Nathan's
2119 previous patch.
2120
2121 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2122
2123 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2124 build_int_cst calls.
2125 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2126 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2127 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2128 gfc_trans_entry_master_switch): Likewise.
2129 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2130 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2131 * trans-io.c (add_case, set_error_locus,
2132 transfer_namelist_element, transfer_expr): Likewise.
2133 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2134 gfc_trans_stop, gfc_trans_character_select): Likewise.
2135 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2136 * trans.c (gfc_trans_runtime_check): Likewise.
2137
2138 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2139
2140 * trans-decl.c, trans-types.c: Add and remove blank lines as
2141 required.
2142
2143 2004-08-24 Richard Henderson <rth@redhat.com>
2144
2145 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2146
2147 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2148
2149 * resolve.c (merge_argument_lists): Revert unintentionally
2150 committed change.
2151
2152 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2153
2154 * trans-decl.c (build_function_decl): Fix spelling in comment.
2155 (build_entry_thunks): Remove code with no function.
2156 (gfc_build_intrinsic_function_decls): Remove empty line.
2157
2158 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2159
2160 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2161
2162 * f95-lang.c (gfc_init_decl_processing): Adjust
2163 build_common_tree_nodes call.
2164
2165 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2166
2167 * trans-types.c: Spelling and formatting fixes.
2168
2169 2004-08-23 Richard Henderson <rth@redhat.com>
2170
2171 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2172 of going through an intermediate string. Fix 32/64 int/long bug.
2173
2174 2004-08-23 Eric Christopher <echristo@redhat.com>
2175
2176 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2177 usage. Use build_vector_type_for_mode for vector types.
2178
2179 2004-08-22 Richard Henderson <rth@redhat.com>
2180
2181 PR 13465
2182 * data.c (find_con_by_offset): Search ordered list; handle
2183 elements with repeat counts.
2184 (gfc_assign_data_value_range): New.
2185 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2186 (gfc_assign_data_value_range): Declare.
2187 * match.c (top_val_list): Extract repeat count into a temporary.
2188 * resolve.c (values): Make left unsigned.
2189 (next_data_value): Don't decrement left.
2190 (check_data_variable): Use gfc_assign_data_value_range.
2191
2192 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2193
2194 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2195
2196 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2197
2198 * check.c (gfc_check_reduction): Rename to ...
2199 (check_reduction): ... this. Make static. Don't check type of
2200 first argument.
2201 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2202 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2203 SUM to use new check functions.
2204 (check_specific): Change logic to call new functions.
2205 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2206 Add prototypes.
2207 (gfc_check_reduction): Remove prototype.
2208
2209 2004-08-20 Paul Brook <paul@codesourcery.com>
2210 Canqun Yang <canqun@nudt.edu.cn>
2211
2212 PR fortran/17077
2213 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2214 for automatic arrays.
2215 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2216
2217 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2218 (Port from g95)
2219
2220 PR fortran/17074
2221 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2222 (gfc_match_if): Order statement list alphabetically, add WHERE and
2223 FORALL, remove double PAUSE.
2224 (gfc_match_simple_where, match_forall_header,
2225 gfc_match_simple_forall): New functions.
2226 (gfc_match_forall): Use match_forall_header.
2227
2228 2004-08-19 Paul Brook <paul@codesourcery.com>
2229
2230 PR fortran/17091
2231 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2232 * symbol.c (gfc_clear_attr): Use memset.
2233
2234 2004-08-19 Paul Brook <paul@codesourcery.com>
2235
2236 PR fortran/14976
2237 PR fortran/16228
2238 * data.c (assign_substring_data_value): Remove.
2239 (create_character_intializer): New function.
2240 (gfc_assign_data_value): Track the typespec for the current
2241 subobject. Use create_character_intializer.
2242
2243 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2244
2245 PR fortran/16946
2246 * check.c (gfc_check_reduction): New function.
2247 (gfc_check_minval_maxval): Removed.
2248 (gfc_check_product): Removed.
2249 (gfc_check_sum): Removed.
2250 * intrinsic.h: Add/remove declarations for these.
2251 * gfortran.h: Add field f3red to union gfc_check_f.
2252 * intrinsic.c (add_sym_3red): New function.
2253 (add_functions): Register maxval, minval, product, and sum intrinsics
2254 through add_sym_3red.
2255 (check_specific): Handle f3red union field.
2256 * iresolve.c: Whitespace change.
2257
2258 2004-08-18 Paul Brook <paul@codesourcery.com>
2259
2260 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2261
2262 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2263
2264 PR fortran/13278
2265 * trans-io.c (transfer_namelist_element): New. Recursively handle
2266 derived-type variables. Pass string lengths.
2267 (build_dt): Code moved to build_namelist, with some
2268 changes and additions.
2269 (gfc_build_io_library_fndecls): Declare the fifth
2270 argument in st_set_nml_var_char -- string_length.
2271
2272 2004-08-17 Paul Brook <paul@codesourcery.com>
2273 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2274
2275 PR fortran/13082
2276 * decl.c (get_proc_name): Update mystery comment.
2277 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2278 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2279 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2280 (struct gfc_entry_list): Define.
2281 (gfc_get_entry_list): Define.
2282 (struct gfc_namespace): Add refs and entries.
2283 (enum gfc_exec_op): Add EXEC_ENTRY.
2284 (struct gfc_code): Add ext.entry.
2285 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2286 (mio_symbol_attribute): Don't save/reture addr->entry.
2287 (mio_namespace_ref): Refcount namespaces.
2288 * parse.c (accept_statement): Handle ST_ENTRY.
2289 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2290 (parse_contained): Fixup sibling references to entry points
2291 after parsing the procedure body.
2292 * resolve.c (resolve_contained_fntype): New function.
2293 (merge_argument_lists, resolve_entries): New functions.
2294 (resolve_contained_functions): Use them.
2295 (resolve_code): Handle EXEC_ENTRY.
2296 (gfc_resolve): Call resolve_entries.
2297 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2298 * symbol.c (gfc_get_namespace): Refcount namespaces.
2299 (gfc_free_namespace): Ditto.
2300 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2301 optional when multiple entry points are present.
2302 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2303 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2304 (create_function_arglist, trans_function_start, build_entry_thunks):
2305 New functions.
2306 (gfc_build_function_decl): Rename ...
2307 (build_function_decl): ... to this.
2308 (gfc_create_function_decl): New function.
2309 (gfc_generate_contained_functions): Use it.
2310 (gfc_trans_entry_master_switch): New function.
2311 (gfc_generate_function_code): Use new functions.
2312 * trans-stmt.c (gfc_trans_entry): New function.
2313 * trans-stmt.h (gfc_trans_entry): Add prototype.
2314 * trans-types.c (gfc_get_function_type): Add entry point argument.
2315 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2316 (gfc_generate_module_code): Call gfc_create_function_decl.
2317 * trans.h (gfc_build_function_decl): Remove.
2318 (gfc_create_function_decl): Add prototype.
2319
2320 2004-08-15 Andrew Pinski <apinski@apple.com>
2321
2322 PR fortran/17030
2323 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2324 for cabs{,f} and copysign{,f}.
2325 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2326 (gfor_fndecl_math_cabs): Delete.
2327 (gfor_fndecl_math_sign4): Delete.
2328 (gfor_fndecl_math_sign8): Delete.
2329 (gfc_build_intrinsic_function_decls): Remove the
2330 initializing of cabs{,f} and copysign{,f} functions.
2331 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2332 instead of the functions definitions.
2333 (gfc_conv_intrinsic_sign): Likewise.
2334 * trans.h (gfor_fndecl_math_cabsf): Delete.
2335 (gfor_fndecl_math_cabs): Delete.
2336 (gfor_fndecl_math_sign4): Delete.
2337 (gfor_fndecl_math_sign8): Delete.
2338
2339 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2340
2341 * trans-array.c (gfc_trans_array_constructor_value): Use
2342 build_int_cst.
2343 * trans-const.c (gfc_build_string_const,
2344 gfc_init_constants, gfc_conv_mpz_to_tree,
2345 gfc_conv_constant_to_tree): Likewise.
2346 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2347 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2348 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2349 * trans-io.c (add_case, set_error_locus, build_dt,
2350 transfer_expr): Likewise.
2351 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2352 gfc_trans_stop, gfc_trans_character_select): Likewise.
2353 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2354 * trans.c (gfc_trans_runtime_check): Likewise.
2355
2356 2004-08-14 Paul Brook <paul@codesourcery.com>
2357
2358 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2359
2360 2004-08-14 Paul Brook <paul@codesourcery.com>
2361
2362 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2363
2364 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2365
2366 * gfortran.h: Add comments.
2367 * parse.c (parse_contained): Fix comment typo.
2368 * resolve.c (was_declared): Ditto.
2369 * symbol.c: Ditto.
2370
2371 2004-08-11 Paul Brook <paul@codeourcery.com>
2372
2373 PR fortran/16917
2374 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2375
2376 2004-08-10 Richard Henderson <rth@redhat.com>
2377
2378 * f95-lang.c (gfc_init_builtin_functions): Remove
2379 __builtin_stack_alloc, add __builtin_alloca.
2380 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2381 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2382
2383 2004-08-10 Paul Brook <paul@codesourcery.com>
2384
2385 * trans-io.c (transfer_expr): Handle pointters.
2386
2387 2004-08-10 Paul Brook <paul@codesourcery.com>
2388
2389 PR fortran/16919
2390 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2391 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2392 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2393 Handle GFC_SS_COMPONENT.
2394 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2395 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2396 Use ss->shape.
2397 (gfc_conv_array_initializer): Call specific initializer routines.
2398 * trans-expr.c (gfc_trans_structure_assign): New function.
2399 (gfc_trans_subarray_assign): New function.
2400 (gfc_trans_subcomponent_assign): New fucntion
2401 (gfc_conv_structure): Use them.
2402 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2403 (gfc_ss): Add shape.
2404
2405 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2406
2407 * simplify.c (gfc_simplify_shape): Bugfix.
2408 * expr.c (gfc_copy_shape_excluding): New function.
2409 * gfortran.h (gfc_get_shape): Bugfix.
2410 (gfc_copy_shape_excluding): Added declaration.
2411 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2412 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2413 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2414 time resolution of shape.
2415
2416 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2417
2418 * intrinsic.c (add_subroutines): Add getenv and
2419 get_environment_variable. (add_sym_5s): New function.
2420 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2421 prototype.
2422 * iresolve.c (gfc_resolve_get_environment_variable): New
2423 function.
2424
2425 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2426
2427 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2428 __builtin_pow[f] arguments.
2429
2430 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2431
2432 * arith.c: Add #define for model numbers. Remove global GMP variables.
2433 (natural_logarithm,common_logarithm,exponential,sine,
2434 cosine,arctangent,hypercos,hypersine ): Remove.
2435 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2436 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2437 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2438 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2439 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2440 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2441 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2442 gfc_real2int,gfc_real2real,gfc_real2complex,
2443 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2444 to MPFR, use new functions.
2445 * arith.h: Remove extern global variables.
2446 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2447 arctangent,hypercos,hypersine): Remove prototypes.
2448 (arctangent2): Update prototype from GMP to MPFR.
2449 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2450 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2451 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2452 * gfortran.h (GFC_REAL_BITS): Remove.
2453 (arith): Add ARITH_NAN.
2454 Include mpfr.h. Define GFC_RND_MODE.
2455 Rename GCC_GFORTRAN_H GFC_GFC_H.
2456 (gfc_expr): Convert GMP to MPFR.
2457 * module.c: Add arith.h, correct type in comment.
2458 (mio_gmp_real): Convert GMP to MPFR.
2459 (mio_expr): Use gfc_set_model_kind().
2460 * primary.c: Update copyright date with 2004.
2461 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2462 * simplify.c: Remove global GMP variables
2463 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2464 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2465 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2466 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2467 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2468 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2469 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2470 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2471 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2472 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2473 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2474 gfc_simplify_rrspacing,gfc_simplify_scale,
2475 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2476 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2477 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2478 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2479 Use new functions.
2480 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2481 gfc_conv_mpf_to_tree. Convert it to use MPFR
2482 (gfc_conv_constant_to_tree): Use it.
2483 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2484 * trans-intrinsic.c: Add arith.h, remove gmp.h
2485 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2486
2487 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2488 Paul Brook <paul@codesourcery.com>
2489
2490 * trans-array.c (gfc_trans_allocate_array_storage,
2491 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2492 gfc_conv_loop_setup): For functions, if the shape of the result
2493 is not known in compile-time, generate an empty array descriptor for
2494 the result and let the callee to allocate the memory.
2495 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2496 (gfc_conv_expr_descriptor): Use function return values directly.
2497 * trans-expr.c (gfc_conv_function_call): Always add byref call
2498 insn to pre chain.
2499 (gfc_trans_pointer_assignment): Add comments.
2500 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2501
2502 2004-08-01 Roger Sayle <roger@eyesopen.com>
2503
2504 * options.c (gfc_init_options): Don't warn about the use GNU
2505 extensions by default.
2506 (gfc_post_options): Warn about GNU extensions with -pedantic.
2507 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2508
2509 2004-07-30 Richard Henderson <rth@redhat.com>
2510
2511 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2512 for TREE_CONSTANTs.
2513
2514 2004-07-25 Richard Henderson <rth@redhat.com>
2515
2516 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2517 and DECL_IGNORED_P on RESULT_DECL.
2518 (gfc_generate_constructors): Likewise.
2519
2520 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2521
2522 PR fortran/16465
2523 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2524 options.
2525 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2526 * options.c (gfc_handle_options): Deal with changed options.
2527 * scanner.c (load_line): Change second arg to 'char **',
2528 allocate if pointing to NULL. Keep track of buffer's length.
2529 Adapt buffer size to overlong lines. Pad lines to full length
2530 in fixed form.
2531 (load_file): Adapt to new interface of load_line.
2532
2533 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2534
2535 * trans.h (builtin_function): Declare.
2536
2537 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2538
2539 PR fortran/16404
2540 (parts ported from g95)
2541 * parse.h (gfc_state_data): New field do_variable.
2542 (gfc_check_do_variable): Add prototype.
2543 * parse.c (push_state): Initialize field 'do_variable'.
2544 (gfc_check_do_variable): New function.
2545 (parse_do_block): Remember do iterator variable.
2546 (parse_file): Initialize field 'do_variable'.
2547 * match.c (gfc_match_assignment, gfc_match_do,
2548 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2549 Add previously missing checks.
2550 (gfc_match_return): Reformat error message.
2551 * io.c (match_out_tag): New function.
2552 (match_open_element, match_close_element,
2553 match_file_element, match_dt_element): Call match_out_tag
2554 instead of match_vtag where appropriate.
2555 (match_io_iterator, match_io_element): Add missing check.
2556 (match_io): Reformat error message.
2557 (match_inquire_element): Call match_out_tag where appropriate.
2558
2559 * parse.c (gfc_check_do_variable): Fix error locus.
2560
2561 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2562
2563 PR fortran/15129
2564 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2565 for every assumed length character dummy argument.
2566
2567 PR fortran/15140
2568 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2569
2570 PR fortran/13792
2571 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2572
2573 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2574
2575 PR fortran/15324
2576 * trans-array.c gfc_trans_g77_array,
2577 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2578 for assumed length characters.
2579 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2580 with a character expression.
2581 (gfc_cvonv_array_parameter): Pass string length when passing
2582 character array according to g77 conventions.
2583
2584 2004-07-12 Paul Brook <paul@codesourcery.com>
2585
2586 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2587 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2588 initialization code.
2589 * trans-common.c (create_common): Use gfc_conv_initializer.
2590 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2591 * trans-expr.c (gfc_conv_initializer): New function.
2592 (gfc_conv_structure): Use it.
2593 * trans.h (gfc_conv_initializer): Add prototype.
2594
2595 2004-07-11 Paul Brook <paul@codesourcery.com>
2596
2597 PR fortran/15986
2598 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2599 variables.
2600 (parse_contained): Mark contained symbols as referenced.
2601
2602 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2603
2604 PR fortran/16455
2605 * module.c (gfc_dump_module, gfc_use_module): Print locus
2606 when opening of module file fails.
2607
2608 PR fortran/16404
2609 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2610
2611 PR fortran/16404
2612 * match.c (gfc_match_program): A program name is obligatory.
2613 (gfc_match_return): RETURN in main program is an extension.
2614 (gfc_match_block_data): A space is required before a block data
2615 name.
2616
2617 PR fortran/16433
2618 * primary.c (match_boz_constant): Call gfc_notify_std only if
2619 we actually have a non-standard boz-literal-constant.
2620
2621 PR fortran/15754
2622 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2623 warning if assigning NULL().
2624
2625 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2626
2627 * f95-lang.c (set_block): Remove.
2628 (gfc_clear_binding_stack): New.
2629 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2630 (struct binding_level): Remove block_created_by_back_end.
2631 (clear_binding_level): Likewise.
2632 (poplevel): Don't handle block_created_by_back_end.
2633
2634 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2635
2636 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2637 symbol is in common, because we ...
2638 (gfc_generate_module_vars): Call gfc_trans_common.
2639
2640 2004-07-10 Paul Brook <paul@codesourcery.com>
2641
2642 * trans-array.c (gfc_build_null_descriptor): New function.
2643 (gfc_trans_static_array_pointer): Use it.
2644 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2645 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2646
2647 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2648
2649 PR fortran/16336
2650 * decl.c (gfc_match_save): Use-associated common block
2651 doesn't collide.
2652 * gfortran.h (gfc_common_head): Add new field 'name'.
2653 Fix typo in comment after #endif.
2654 * match.c (gfc_get_common): Add new argument from_common,
2655 mangle name if flag is set, fill in new field in structure
2656 gfc_common_head.
2657 (match_common): Set new arg in call to gfc_get_common,
2658 use-associated common block doesn't collide.
2659 * match.h (gfc_get_common): Adapt prototype.
2660 * module.c (load_commons): Set new arg in call to
2661 gfc_get_common.
2662 * symbol.c (free_common_tree): New function.
2663 (gfc_free_namespace): Call new function.
2664 * trans-common.c (several functions): Remove argument
2665 'name', use name from gfc_common_head instead.
2666
2667 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2668
2669 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2670 and RHS match. Return early if the RHS is NULL().
2671
2672 PR fortran/16336
2673 * match.c (match_common): Fix error reporting for used common.
2674
2675 PR fortran/15969
2676 * trans-expr.c (gfc_conv_structure): Handle initialization
2677 of scalar pointer components.
2678
2679 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2680
2681 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2682 by fix for PR 15481.
2683
2684 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2685
2686 * trans-common.c: Fix whitespace issues, make variable names
2687 more readable.
2688 (create_common): Additionally, make loop logic more obvious.
2689
2690 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2691 Paul Brook <paul@codesourcery.com>
2692
2693 PR fortran/13415
2694 * trans-common.c (calculate_length): Remove ...
2695 (get_segment_info): Merge into here. Save field type.
2696 (build_field): Use saved type.
2697 (create_common, new_condition, new_segment, finish_equivalences):
2698 Use new get_segment_info.
2699 * trans-types.c: Update comment.
2700
2701 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2702
2703 PR fortran/14077
2704 * moduele.c (mio_symbol): Don't I/O initial values unless
2705 symbol is a parameter.
2706
2707 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2708
2709 PR fortran/13201
2710 * resolve.c (resolve_symbol): Verify that the shape of a
2711 parameter array is not only explicit, but also constant.
2712 * array.c (gfc_is_compile_time_shape): New function.
2713 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2714
2715 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2716
2717 PR fortran/15481
2718 PR fortran/13372
2719 PR fortran/13575
2720 PR fortran/15978
2721 * module.c (write_symbol, write_symtree): Remove workaround.
2722 * primary.c (match_actual_arglist): Enhance comment.
2723 (gfc_match_rvalue): Handle function call with first argument
2724 a keyword argument correctly.
2725 * resolve.c (resolve_symbol): Change call to
2726 gfc_set_default_type to issue error if no implicit type
2727 can be found.
2728 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2729
2730 2004-07-08 Paul Brook <paul@codesourcery.com>
2731
2732 * intrinsic.c (add_sym_4s): New function.
2733 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2734
2735 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2736 Paul Brook <paul@codesourcery.com>
2737
2738 PR fortran/15280
2739 PR fortran/15665
2740 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2741 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2742 * intrinsic.c (add_functions): Identify iargc. Add
2743 command_argument_count.
2744 (add_subroutines): Resolve getarg. Add get_command and
2745 get_command_argument.
2746 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2747 gfc_resolve_get_command_argument): Add prototypes.
2748 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2749 gfc_resolve_get_command_argument): New functions.
2750 * trans-decl.c (gfor_fndecl_iargc): New variable.
2751 (gfc_build_intrinsic_function_decls): Set it.
2752 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2753 (gfc_conv_intrinsic_function): Use it.
2754 * trans.h (gfor_fndecl_iargc): Declare.
2755
2756 2004-07-04 Matthias Klose <doko@debian.org>
2757
2758 * Make-lang.in: Generate and install gfortran man page.
2759 * invoke.texi: Remove extra '@c man end'.
2760
2761 2004-07-04 Richard Henderson <rth@redhat.com>
2762
2763 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2764
2765 2004-07-04 Paul Brook <paul@codesourcery.com>
2766
2767 * decl.c (gfc_match_implicit_range): Don't use typespec.
2768 (gfc_match_implicit): Handle character selectors.
2769 * gfortran.h (gfc_set_implicit): Remove prototype.
2770 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2771 * parse.c (accept_statement): Don't call gfc_set_implicit.
2772 * symbol.c (new_ts): Remove.
2773 (gfc_set_implicit_none): Use same loop bounds as other functions.
2774 (gfc_set_implicit): Remove.
2775 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2776 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2777
2778 2004-06-30 Richard Henderson <rth@redhat.com>
2779
2780 * match.c (var_element): Remove unused variable.
2781
2782 * trans-decl.c (gfc_generate_function_code): Don't set
2783 x_whole_function_mode_p.
2784 (gfc_generate_constructors): Likewise.
2785
2786 2004-06-30 Richard Henderson <rth@redhat.com>
2787
2788 * trans-decl.c (gfc_generate_function_code): Don't set
2789 immediate_size_expand.
2790 (gfc_generate_constructors): Likewise.
2791
2792 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2793
2794 PR fortran/16161
2795 * decl.c (gfc_match_type_spec): Rename second argument to
2796 'implicit_flag', reverse meaning. Don't match_char_spec if
2797 'implicit_flag' is set. Rename to ...
2798 (match_type_spec): ... this.
2799 (gfc_match_implicit_none, match_implicit_range): Move here
2800 from match.c.
2801 (gfc_match_implicit): Move here from match.c, try to
2802 match_char_len if match_implicit_range doesn't succeed for
2803 CHARACTER implicits. Call renamed fucntion match_type_spec.
2804 (gfc_match_data_decl, match_prefix): Call renamed function
2805 match_type_spec.
2806 * match.c (gfc_match_implicit_none, match_implicit_range,
2807 gfc_match_implicit): Move to decl.c.
2808 * match.h (gfc_match_implicit_none, gfc_match_implicit):
2809 Move protoypes to section 'decl.c'.
2810 (gfc_match_type_spec): Remove prototype.
2811
2812 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2813
2814 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
2815 copyright years.
2816
2817 2004-06-29 Steven Bosscher <stevenb@suse.de>
2818
2819 Make sure types in assignments are compatible. Mostly mechanical.
2820 * trans-const.h (gfc_index_one_node): New define.
2821 * trans-array.c (gfc_trans_allocate_array_storage,
2822 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
2823 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
2824 gfc_conv_array_ubound, gfc_conv_array_ref,
2825 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
2826 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
2827 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
2828 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
2829 types in assignments, conversions and conditionals for expressions.
2830 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2831 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
2832 gfc_conv_function_call, gfc_trans_pointer_assignment,
2833 gfc_trans_scalar_assign): Likewise.
2834 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
2835 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2836 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
2837 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
2838 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
2839 gfc_conv_allocated, gfc_conv_associated,
2840 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
2841 * trans-io.c (set_string): Likewise.
2842 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
2843 gfc_do_allocate, generate_loop_for_temp_to_lhs,
2844 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2845 compute_overall_iter_number, gfc_trans_assign_need_temp,
2846 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2847 gfc_evaluate_where_mask, gfc_trans_where_assign,
2848 gfc_trans_where_2): Likewise.
2849 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
2850 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
2851
2852 * trans.c (gfc_add_modify_expr): Add sanity check that types
2853 for the lhs and rhs are the same for scalar assignments.
2854
2855 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2856
2857 * dump-parse-tree.c (show_common): New function.
2858 (gfc_show_namespace): Show commons.
2859
2860 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2861 Andrew Vaught <andyv@firstinter.net>
2862
2863 PR fortran/13249
2864 PR fortran/15481
2865 * decl.c (gfc_match_save): Adapt to new common structures,
2866 don't allow saving USE-associated common.
2867 * dump-parse-tree (gfc_show_attr): (saved_)common are not
2868 symbol attributes any longer.
2869 (gfc_show_symbol): Don't show old-style commons any longer.
2870 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2871 interface.
2872 * gfortran.h (symbol_attribute): Remove common and saved_common
2873 attributes.
2874 (gfc_symbol): Remove common_head element.
2875 (gfc_common_head): New struct.
2876 (gfc_get_common_head): New macro.
2877 (gfc_symtree): Add field 'common' to union.
2878 (gfc_namespace): Add field 'common_root'; change type of field
2879 'blank_common' to blank_common.
2880 (gfc_add_data): New prototype.
2881 (gfc_traverse_symtree): Expect a symtree as first argument
2882 instead of namespace.
2883 * match.c (gfc_get_common): New function.
2884 (match_common_name): Change to take char * as argument, adapt,
2885 fix bug with empty name.
2886 (gfc_match_common): Adapt to new data structures. Disallow
2887 redeclaration of USE-associated COMMON-block. Fix bug with
2888 empty common.
2889 (var_element): Adapt to new common structures.
2890 * match.h (gfc_get_common): Declare.
2891 * module.c: Add 2004 to copyright years, add commons to module
2892 file layout description.
2893 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2894 for removed attributes.
2895 (mio_symbol): Adapt to new way of storing common relations.
2896 (load_commons): New function.
2897 (read_module): Skip common list on first pass, load_commons at
2898 second.
2899 (write_commons): New function.
2900 (write_module): Call write_commons().
2901 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2902 functions related to removed attributes.
2903 (gfc_add_data): New function.
2904 (gfc_clear_attr): Don't set removed attributes.
2905 (gfc_copy_attr): Don't copy removed attributes.
2906 (traverse_symtree): Remove.
2907 (gfc_traverse_symtree): Don't traverse symbol
2908 tree of the passed namespace, but require a symtree to be passed
2909 instead. Unify with traverse_symtree.
2910 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2911 interface.
2912 (save_symbol): Remove setting of removed attribute.
2913 * trans-common.c (gfc_sym_mangled_common_id): Change to
2914 take 'char *' argument instead of 'gfc_symbol'.
2915 (build_common_decl, new_segment, translate_common): Adapt to new
2916 data structures, add new
2917 argument name.
2918 (create_common): Adapt to new data structures, add new
2919 argument name. Fix typo in intialization of derived types.
2920 (finish_equivalences): Add second argument in call to
2921 create_common.
2922 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2923 (gfc_trans_common): Adapt to new data structures.
2924 * trans-decl.c (gfc_create_module_variables): Remove test for
2925 removed attribute.
2926
2927 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2928
2929 * io.c: Add 2004 to copyright years.
2930
2931 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2932 Andrew Vaught <andyv@firstinter.net>
2933
2934 * gfortran.h (gfc_gsymbol): New typedef.
2935 (gfc_gsym_root): New variable.
2936 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2937 * parse.c (global_used): New function.
2938 (parse_block_data): Check for double empty BLOCK DATA,
2939 use global symbol table.
2940 (parse_module): Use global symbol table.
2941 (add_global_procedure, add_global_program): New functions.
2942 (gfc_parse_file): Use global symbol table.
2943 * symbol.c (gfc_gsym_root): New variable.
2944 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2945 functions.
2946
2947 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2948
2949 * module.c (mio_gmp_real): Correct writing of negative numbers.
2950
2951 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2952
2953 PR fortran/15963
2954 * expr.c (check_intrinsic_op): Allow comparison of characters.
2955 Make logic easier.
2956
2957 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2958 Andrew Vaught <andyv@firstinter.net>
2959
2960 * decl.c (contained_procedure): New function.
2961 (match_end): Verify correctness of END STATEMENT in
2962 all cases.
2963
2964 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2965 Andrew Vaught <andyv@firstinter.net>
2966
2967 PR fortran/15190
2968 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2969 (decode_statement): Enforce required space in free-form.
2970
2971 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2972
2973 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2974 * trans-array.c (gfc_conv_descriptor_data): Add operand
2975 for COMPONENT_REF.
2976 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2977 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2978 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2979 * trans-common.c (create_common): Likewise.
2980 * trans-expr.c (gfc_conv_component_ref): Likewise.
2981 * trans-io.c (set_parameter_value): Likewise.
2982 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2983 (transfer_expr): Likewise.
2984 * trans-decl.c (gfc_trans_auto_character_variable):
2985 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2986 (gfc_gimplify_function): New function.
2987 (gfc_generate_function-code): Properly handle nested functions.
2988 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2989
2990 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
2991
2992 PR fortran/15750
2993 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2994 (gfc_resolve_inquire): Resolve the iolength tag. Return
2995 SUCCESS at end of function if no failure has occured.
2996 * resolve.c (resolve_code): Resolve if iolength is encountered.
2997 * trans-io.c: (ioparm_iolength, iocall_iolength,
2998 iocall_iolength_done): New variables.
2999 (last_dt): Add IOLENGTH.
3000 (gfc_build_io_library_fndecls ): Set iolength related variables.
3001 (gfc_trans_iolength): Implement.
3002 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3003
3004 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
3005
3006 PR fortran/15511
3007 * scanner.c (load_line): Don't truncate preprocessor lines.
3008 Reformat error message.
3009 (preprocessor_line): Issue warning in case of malformed
3010 preprocessor line.
3011
3012 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3013
3014 * resolve.c (resolve_symbol): Add comment in function body.
3015 (check_data_variable): Change type of mark to ar_type, adapt code
3016 accordingly.
3017
3018 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3019
3020 * array.c (gfc_insert_constructor): Avoid redundant call to
3021 mpz_comp. Add 2004 to copyright years.
3022
3023 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3024
3025 * trans.h (stmtblock_t): Change has_scope to unsigned int.
3026
3027 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3028
3029 * arith.c (gfc_range_check): correct complex underflow.
3030
3031 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3032
3033 PR fortran/15962
3034 * match.c (match_case_selector): Call gfc_match_init_expr
3035 instead of gfc_match_expr.
3036 * resolve.c (validate_case_label_expr): No need to check for
3037 constant, since it wouldn't have been matched with the fix to
3038 match.c.
3039
3040 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3041
3042 PR fortran/15211
3043 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3044 of strings.
3045
3046 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3047
3048 PR fortran/15510
3049 * trans-deecl.c (generate_local_decl): Do not issue warning for
3050 unused variables if they're use associated.
3051
3052 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3053 Andrew Vaught <andyv@firstinter.net>
3054
3055 PR fortran/14928
3056 * gfortran.h (gfc_check_f): Add new field f3ml.
3057 * check.c (gfc_check_minloc_maxloc): Take argument list instead
3058 of individual arguments, reorder if necessary.
3059 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3060 * intrinsic.c (add_sym_3ml): New function.
3061 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3062 (check_specific): Catch special case MINLOC, MAXLOC.
3063
3064 2004-06-14 Paul Brook <paul@codesourcery.com>
3065
3066 * intrinsic.c (add_sym_2s): Use correct function types.
3067
3068 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3069
3070 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
3071 * data.c (gfc_get_section_index): Remove dependency on trans.h.
3072
3073 2004-06-12 Steven G. Kargl <kargls@comcast.net>
3074
3075 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3076 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3077 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3078 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3079 * trans-intrinsic.c: Use symbols.
3080 * intrinsic.c (add_sym_2s): New function.
3081 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3082 * intrinsic.h: Function prototypes.
3083 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3084 gfc_resolve_srand): New functions.
3085
3086 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3087
3088 PR fortran/14957
3089 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3090 contained procedure.
3091
3092 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3093
3094 PR fortran/12841
3095 * interface.c (compare_parameter, compare_actual_formal): Don't
3096 check types and array shapes for NULL()
3097 * trans-expr.c (conv_function_call): No double indirection for
3098 NULL()
3099
3100 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3101
3102 * trans-expr.c (gfc_conv_cst_int_power): Compute
3103 x**(-n) by converting it to (1/x)**n instead of
3104 1/x**n.
3105
3106 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3107
3108 PR fortran/13372
3109 * module.c (write_symbol, write_symtree): Don't write symbols
3110 wrongly added to namespace.
3111 * trans-decl.c (gfc_create_module_variable): Don't create a
3112 backend decl for a symbol incorrectly added to namespace.
3113
3114 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3115
3116 PR fortran/13201
3117 * resolve.c (resolve_symbol): Verify that parameter array has an
3118 explicit shape. Fix typos and coding style issues in surrounding
3119 lines.
3120
3121 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3122
3123 PR fortran/15478
3124 * gfortran.texi: The documentation doesn't contain infomration on
3125 how to report bugs, and shouldn't, so remove the line which
3126 says it does.
3127
3128 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3129
3130 * intrinsic.c (sort_actual): Keep track of type of missing
3131 arguments. (Missing from previous commit.)
3132
3133 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3134
3135 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3136 * interface.c (compare_actual_formal): Keep type of omitted
3137 optional arguments.
3138 * trans-expr.c (gfc_conv_function_call): Add string length
3139 argument for omitted string argument.
3140
3141 2004-06-03 Paul Brook <paul@codesourcery.com>
3142
3143 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3144 lists instead of compound expr chains.
3145 (gfc_trans_code): Annotate statement lists.
3146
3147 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3148
3149 * trans-array.c: Fix spelling in comments.
3150
3151 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3152
3153 PR fortran/15557
3154 * data.c (assign_substring_data_value): New function.
3155 (gfc_assign_data_value): Call the new function if we're dealing
3156 with a substring LHS.
3157
3158 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3159
3160 PR fortran/15477
3161 * gfortran.h (GFC_VERSION): Remove.
3162 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3163 where used.
3164
3165 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3166
3167 * trans-types.c: Fix spelling & layout in comments.
3168
3169 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3170
3171 PR fortran/14067
3172 * trans-const.c (gfc_conv_string_init): Allow variable string
3173 length lower than initialization string length.
3174
3175 2004-05-30 Paul Brook <paul@codesourcery.com>
3176
3177 PR fortran/15620
3178 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3179 * trans-expr.c (gfc_trans_string_copy): New function.
3180 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3181 character lengths.
3182 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3183 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3184 * trans.h (struct gfc_saved_var): Define.
3185 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3186
3187 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3188
3189 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3190
3191 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3192
3193 * simplify.c (gfc_simplify_log): Remove useless line of code.
3194
3195 2004-05-29 Paul Brook <paul@codesourcery.com>
3196
3197 * trans-common.c (find_equivalence): Find multiple rules.
3198
3199 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3200
3201 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3202 (gfc_current_locus): Declare new global variable.
3203 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3204 (gfc_current_locus1): Rename ...
3205 (gfc_current_locus): ... to this.
3206 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3207 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3208 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3209 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3210 and gfc_current_locus(), respectively.
3211 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3212 match_array_cons_element, gfc_match_array_constructor):
3213 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3214 and gfc_current_locus().
3215 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3216 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3217 attr_decl1, gfc_match_save): Likewise.
3218 * error.c (error_print, gfc_internal_error): Likewise.
3219 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3220 * interface.c (gfc_add_interface): Likewise.
3221 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3222 match_io_iterator, match_io): Likewise.
3223 * match.c (gfc_match_space, gfc_match_eos,
3224 gfc_match_small_literal_int, gfc_match_st_label,
3225 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3226 gfc_match_char, gfc_match, gfc_match_assignment,
3227 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3228 gfc_match_nullify, gfc_match_call, match_implicit_range,
3229 gfc_match_implicit, gfc_match_data, match_case_selector,
3230 gfc_match_case, match_forall_iterator): Likewise.
3231 * matchexp.c (gfc_match_defined_op_name, next_operator,
3232 match_level_1, match_mult_operand, match_ext_mult_operand,
3233 match_add_operand, match_ext_add_operand, match_level_2,
3234 match_level_3, match_level_4, match_and_operand, match_or_operand,
3235 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3236 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3237 * parse.c (match_word, decode_statement, next_free, next_fixed,
3238 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3239 Likewise.
3240 * primary.c (match_digits, match_integer_constant,
3241 match_boz_constant, match_real_constant, match_substring,
3242 next_string_char, match_charkind_name, match_string_constant,
3243 match_logical_constant, match_const_complex_part,
3244 match_complex_constant, match_actual_arg, match_keyword_arg,
3245 gfc_match_actual_arglist, gfc_match_structure_constructor,
3246 gfc_match_rvalue, gfc_match_variable): Likewise.
3247 * st.c (gfc_get_code): Likewise.
3248 * symbol.c (check_conflict, check_used, check_done,
3249 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3250 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3251 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3252
3253 2004-05-26 Roger Sayle <roger@eyesopen.com>
3254
3255 * io.c (format_asterisk): Silence compiler warnings by correcting
3256 the number of elements of a "locus" initializer.
3257
3258 2004-05-25 Roger Sayle <roger@eyesopen.com>
3259
3260 PR fortran/13912
3261 * matchexp.c: Allow unary operators after arithmetic operators
3262 as a GNU extension.
3263 (match_ext_mult_operand, match_ext_add_operand): New functions.
3264 (match_mult_operand): Tweak to call match_ext_mult_operand.
3265 (match_add_operand): Tweak to call match_ext_mult_operand.
3266 (match_level_2): Rearrange to call match_ext_add_operand.
3267
3268 2004-05-25 Paul Brook <paul@codesourcery.com>
3269
3270 * expr.c (check_inquiry): Remove bogus tests.
3271
3272 2004-05-23 Paul Brook <paul@codesourcery.com>
3273
3274 PR fortran/13773
3275 * expr.c (restricted_args): Remove redundant checks/argument.
3276 (external_spec_function): Update to match.
3277 (restricted_intrinsic): Rewrite.
3278
3279 2004-05-23 Paul Brook <paul@codesourcery.com>
3280 Victor Leikehman <lei@haifasphere.co.il>
3281
3282 * gfortran.h (struct gfc_symbol): Add equiv_built.
3283 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3284 messages.
3285 (current_length): Remove.
3286 (add_segments): New function.
3287 (build_equiv_decl): Create initialized common blocks.
3288 (build_common_decl): Always add decl to bindings.
3289 (create_common): Create initializers.
3290 (find_segment_info): Reformat to match coding conventions.
3291 (new_condition): Use add_segments.
3292 (add_condition, find_equivalence, add_equivalences): Move iteration
3293 inside functions. Only process each segment once.
3294 (new_segment, finish_equivalences, translate_common): Simplify.
3295
3296 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3297
3298 * check.c (gfc_check_random_seed): Issue for too many arguments.
3299
3300 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3301
3302 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3303
3304 2004-05-22 Paul Brook <paul@codesourcery.com>
3305
3306 * dump-parse-tree.c (gfc_show_equiv): New function.
3307 (gfc_show_namespace): Use it.
3308
3309 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3310
3311 PR fortran/13249
3312 * symbol.c (gfc_add_common): Disable checks to work around other more
3313 fundamental inadequacies.
3314
3315 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3316
3317 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3318 only for functions.
3319 (gfc_build_function_decl): Likewise.
3320
3321 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3322
3323 * check.c (gfc_check_system_clock): New function.
3324 * intrinsic.c (add_sym_3s): New function.
3325 (add_subroutines): Use it.
3326 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3327 Add prototypes.
3328 * iresolve.c (gfc_resolve_system_clock): New function.
3329
3330 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3331
3332 * invoke.texi: Document -Wunderflow and spell check.
3333 * lang.opt: Add Wunderflow.
3334 * gfortran.h (gfc_option_t): Add warn_underflow option.
3335 * options.c (gfc_init_options, set_Wall): Use it.
3336 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3337 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3338 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3339 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3340 * arith.c (common_logarithm): Fix typo in comment.
3341
3342 2004-05-21 Roger Sayle <roger@eyesopen.com>
3343
3344 * io.c (check_format): As a GNU extension, allow the comma after a
3345 string literal to be optional in a format. Use gfc_notify_std to
3346 issue an error/warning as appropriate.
3347
3348 2004-05-21 Roger Sayle <roger@eyesopen.com>
3349
3350 * io.c (check_format): Use gfc_notify_std to determine whether to
3351 issue an error/warning for omitting the digits from the X format.
3352
3353 2004-05-20 Roger Sayle <roger@eyesopen.com>
3354
3355 * io.c (check_format): Allow the number before the X format to
3356 be optional when not -pedantic.
3357
3358 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3359 Paul Brook <paul@codesourcery.com>
3360
3361 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3362 Create decls for __builtin_pow{,f}.
3363 * gfortran.h (PREFIX_LEN): Define.
3364 * trans-decl.c (gfor_fndecl_math_powi): Add.
3365 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3366 (gfc_build_intrinsic_function_decls): Create decls for powi.
3367 * trans-expr.c (powi_table): Add.
3368 (gfc_conv_integer_power): Remove.
3369 (gfc_conv_powi): New function.
3370 (gfc_conv_cst_int_power): New function.
3371 (gfc_conv_power_op): Use new powi routines.
3372 * trans.h (struct gfc_powdecl_list): Add.
3373 (gfor_fndecl_math_powi): Add.
3374 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3375
3376 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3377
3378 * trans.c, trans-decl.c: Fix comment typos.
3379
3380 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3381
3382 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3383
3384 2004-05-18 Steve Kargl <kargls@comcast.net>
3385
3386 * arith.c (gfc_int2complex): Fix incorrect range checking.
3387
3388 2004-05-18 Paul Brook <paul@codesourcery.com>
3389
3390 PR fortran/13930
3391 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3392 (default_initializer): Move to expr.c.
3393 (variable_decl): Don't assign default initializer to variables.
3394 * expr.c (gfc_default_initializer): Move to here.
3395 * gfortran.h (gfc_default_initializer): Add prototype.
3396 * resolve.c (resolve_symbol): Check for illegal initializers.
3397 Assign default initializer.
3398
3399 2004-05-17 Steve Kargl <kargls@comcast.net>
3400
3401 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3402
3403 2004-05-17 Steve Kargl <kargls@comcast.net>
3404
3405 * arith.c (gfc_real2complex): Range checking wrong part of complex
3406 number.
3407
3408 2004-05-16 Paul Brook <paul@codesourcery.com>
3409
3410 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3411
3412 2004-05-16 Paul Brook <paul@codesourcery.com>
3413
3414 * arith.c (gfc_range_check): Fix logic error.
3415
3416 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3417
3418 * arith.c: Fix comment typos.
3419
3420 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3421
3422 PR fortran/13742
3423 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3424 not initialized in a disallowed fashion.
3425 * match.c (gfc_match_common): Likewise.
3426 (var_element): Verify that variable is not in the blank COMMON,
3427 if it is in a common.
3428
3429 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3430
3431 * Make-lang.in (f95.generated-manpages): Remove.
3432 (f95.srcextra): New.
3433 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3434 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3435 (f95.dvi): Remove.
3436 (dvi): New.
3437 (f95.install-info): Remove.
3438 (install-info): New.
3439
3440 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3441
3442 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3443
3444 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3445
3446 * primary.c (match_boz_constant): Use gfc_notify_std() for
3447 issuing a warning or an error.
3448
3449 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3450
3451 PR fortran/13826
3452 * primary.c (match_structure_constructor): Rename ...
3453 (gfc_match_structure_constructor): ... to this. Make non-static.
3454 (gfc_match_rvalue): Call renamed function.
3455 * match.h (gfc_match_structure_constructor): Declare.
3456 * match.c (gfc_match_data_constant): Handle structure
3457 constructor.
3458
3459 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3460
3461 PR fortran/13702
3462 (Port from g95)
3463 * gfortran.h (gfc_linebuf): New typedef.
3464 (linebuf): Remove.
3465 (gfc_file): Revamped, use new gfc_linebuf.
3466 (locus): Revamped, use new types.
3467 (gfc_current_file): Remove.
3468 (gfc_current_form, gfc_source_file): New global variables.
3469 * match.c (gfc_match_space, gfc_match_strings): Use
3470 gfc_current_form to find source form.
3471 * module.c (gfc_dump_module): Use gfc_source_file when printing
3472 module header.
3473 * error.c (show_locus, show_loci) Use new data structures to print
3474 locus.
3475 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3476 Remove.
3477 (file_head, current_file, gfc_current_form, line_head, line_tail,
3478 gfc_current_locus1, gfc_source_file): New global variables.
3479 (gfc_scanner_init1): Set new global variables.
3480 (gfc_scanner_done1): Free new data structures.
3481 (gfc_current_locus): Return pointer to gfc_current_locus1.
3482 (gfc_set_locus): Set gfc_current_locus1.
3483 (gfc_at_eof): Set new variables.
3484 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3485 to new locus structure.
3486 (gfc_check_include): Remove.
3487 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3488 (gfc_skip_comments): Use gfc_current_form, find locus with
3489 gfc_current_locus1.
3490 (gfc_next_char): Use gfc_current_form.
3491 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3492 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3493 comment formatting.
3494 (get_file): New function.
3495 (preprocessor_line, include_line): New functions.
3496 (load_file): Move down, rewrite to match new data structures.
3497 (gfc_new_file): Rewrite to match new data structures.
3498 * parse.c (next_statement): Remove code which is now useless. Use
3499 gfc_source_form and gfc_source_file where appropriate.
3500 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3501 when determining locus of frontend code.
3502 * trans-io.c (set_error_locus): Same.
3503 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3504 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3505 preprocessor flags.
3506 (all): Add missing initializers.
3507
3508 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3509
3510 * Make-lang.in (trans-common.o): Remove redundant dependency.
3511 (data.c): Replace object file name ...
3512 (data.o): ... by the correct one.
3513
3514 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3515
3516 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3517 for ranges when dumping array references.
3518
3519 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3520
3521 * decl.c (variable_decl): Always apply default initializer.
3522
3523 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3524
3525 PR fortran/15206
3526 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3527 handle zero correctly.
3528
3529 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3530
3531 * match.c (gfc_match): Eliminate dead code.
3532
3533 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3534
3535 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3536 Detect bad continuation line in fixed form sources.
3537
3538 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3539
3540 PR fortran/15205
3541 * iresolve.c (gfc_resolve_nearest): Add new function.
3542 * intrinsic.h: ... declare it here.
3543 * intrinsic.c (add_functions): ... add it as resolving function
3544 for NEAREST.
3545
3546 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3547
3548 PR fortran/14066
3549 * match.c (gfc_match_do): Allow infinite loops with
3550 label-do-stmt. Do not enforce space after comma.
3551
3552 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3553
3554 PR fortran/15051
3555 * parse.c (parse_interface): Allow empty INTERFACE, remove
3556 seen_body.
3557
3558 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3559
3560 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3561 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3562 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3563 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3564 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3565 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3566 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3567 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3568 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3569 trans-types.h, trans.c, trans.h: Update copyright years and
3570 boilerplate.
3571 * data.c: Likewise, also removed two whitespace-only lines.
3572 * gfortranspec.c, lang.opt: Update copyright years.
3573
3574 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3575
3576 PR fortran/14568
3577 * trans-decl.c (generate_local_decl): Don't warn for unused
3578 variables which are in common blocks.
3579
3580 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3581
3582 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3583 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3584 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3585
3586 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3587
3588 PR fortran/15314
3589 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3590
3591 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3592
3593 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3594 Remove "set DEVELOPMENT".
3595 (Compiling GFORTRAN): Remove.
3596
3597 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3598
3599 * array.c (match_subscript, match_array_ref): Add comments
3600 explaining argument 'init'.
3601 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3602 trans-expr.c, trans.c: Fix some typos in comments.
3603 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3604 * primary.c (match_digits, match_integer_constant): Add comment
3605 explaining signflag.
3606
3607 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3608
3609 PR fortran/13940
3610 * primary.c: Include system.h and flags.h, needed for pedantic.
3611 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3612 pedantic is set.
3613
3614 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3615
3616 PR fortran/13940
3617 * match.c (match_data_constant): Handle case where
3618 gfc_find_symbol sets sym to NULL
3619
3620 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3621
3622 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3623 dependency on mathbuiltins.def
3624
3625 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3626
3627 * trans-io.c (transfer_expr): Implemented recursive printing
3628 of derived types.
3629
3630 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3631
3632 * gfortranspec.c: Do not include multilib.h.
3633
3634 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3635
3636 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3637 2004 to copyright years.
3638 * trans-expr.c, trans-decl.c: Comment update, we now generate
3639 GENERIC, not SIMPLE. Add 2004 to copyright years.
3640
3641 2004-04-24 Paul Brook <paul@codesourcery.com>
3642
3643 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3644
3645 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3646
3647 PR 14817
3648 * arith.c (gfc_arith_divide): Fix complex divide.
3649
3650 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3651
3652 * gfortranspec.c: Include the target headers.
3653
3654 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3655
3656 PR fortran/14921
3657 PR fortran/14540
3658 * arith.c (arctangent2): New function.
3659 * arith.h (arctangent2): Add function prototype.
3660 * simplify.c (gfc_simplify_atan2): Use it.
3661 (gfc_simplify_log): Use it.
3662
3663 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3664
3665 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3666 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3667
3668 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3669
3670 PR fortran/14872
3671 * trans-io.c (build_dt): Change REC to value.
3672
3673 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3674
3675 PR 14394
3676 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3677 the real value when converting mpf to string.
3678
3679 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3680
3681 PR 14395
3682 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3683 the result.
3684
3685 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3686
3687 PR fortran/14377
3688 * simplify.c (simplify_min_max): Convert the type of the result.
3689
3690 2004-04-11 Paul Brook <paul@codesourcery.com>
3691
3692 * gfortran.texi: Use full target triplet.
3693
3694 2004-04-11 Paul Brook <paul@codesourcery.com>
3695
3696 * Make-lang.in (GFORTRAN_TEXI): Set it.
3697 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3698 (fortran/gfortran.info): Ditto.
3699 * gfortran.texi: Major update.
3700 * invoke.texi: New file.
3701
3702 2004-04-10 Paul Brook <paul@codesourcery.com>
3703
3704 * trans-array.c (gfc_trans_allocate_temp_array,
3705 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3706 * trans-decl.c (gfc_build_dummy_array_decl,
3707 gfc_get_symbol_decl, gfc_build_function_decl,
3708 gfc_create_module_variable): Ditto.
3709 * trans-expr.c (gfc_conv_variable): Ditto.
3710 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3711 * trans.h (GFC_DECL_STRING): Remove.
3712 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3713 GFC_DECL_ASSIGN): Renumber flags.
3714
3715 2004-04-05 Paul Brook <paul@codesourcery.com>
3716
3717 PR 13252
3718 PR 14081
3719 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3720 and stack_restore.
3721 * gfortran.h (struct gfc_charlen): Add backend_decl.
3722 * trans-array.c (gfc_trans_allocate_temp_array,
3723 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3724 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3725 Remove old, broken string handling.
3726 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3727 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3728 gfc_trans_deferred_array): Handle character arrays.
3729 * trans-const.c (gfc_conv_const_charlen): New function.
3730 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3731 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3732 as static.
3733 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3734 (gfc_create_string_length): New function.
3735 (gfc_get_symbol_decl): Create lengths for character variables.
3736 (gfc_get_fake_result_decl): Ditto.
3737 (gfc_build_function_decl): Only set length for assumed length
3738 character arguments.
3739 (gfc_trans_dummy_character): New function.
3740 (gfc_trans_auto_character_variable): Rewrite.
3741 (gfc_trans_deferred_vars): Handle more types of character variable.
3742 (gfc_create_module_variable): String lengths have moved.
3743 (gfc_generate_function_code): Initialize deferred var chain earlier.
3744 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3745 (gfc_trans_init_string_length): ... to this.
3746 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3747 gfc_conv_function_call): Update to new format for character variables.
3748 (gfc_conv_string_length): Remove.
3749 (gfc_conv_string_parameter): Update assertion.
3750 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3751 * trans-io.c (set_string): Use new macro names.
3752 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3753 * trans-types.c (gfc_get_character_type): Use existing length expr.
3754 (gfc_is_nodesc_array): Make public.
3755 (gfc_get_dtype_cst): Rename ...
3756 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3757 (gfc_get_nodesc_array_type): Use new name.
3758 (gfc_sym_type): New character variable code.
3759 (gfc_get_derived_type): Ditto.
3760 (gfc_get_function_type): Evaluate character variable lengths.
3761 * trans-types.h (gfc_strlen_kind): Define.
3762 (gfc_is_nodesc_array): Add prototype.
3763 * trans.h: Update prototypes.
3764 (struct lang_type): Update comments.
3765 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3766 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3767
3768 2004-04-04 Paul Brook <paul@codesourcery.com>
3769
3770 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3771 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3772 * trans-expr.c (gfc_conv_function_call): Ditto.
3773 * trans-types.c (gfc_is_nodesc_array): Ditto
3774 * lang.opt (fg77-calls): Remove.
3775
3776 2004-04-04 Paul Brook <paul@codesourcery.com>
3777
3778 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3779 (gfc_conv_descriptor_base): Rename ...
3780 (gfc_conv_descriptor_offset): ... to this.
3781 (gfc_trans_allocate_array_storage): Set offset to zero.
3782 (gfc_conv_array_base): Rename ...
3783 (gfc_conv_array_offset): ... to this.
3784 (gfc_conv_array_index_ref): Add offset parameter.
3785 (gfc_conv_array_ref): Include offset.
3786 (gfc_trans_preloop_setup): Use existing offset.
3787 (gfc_trans_allocate_temp_array, gfc_array_allocate,
3788 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3789 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3790 gfc_conf_ss_descriptor): Set offset.
3791 * trans-array.h: Rename prototypes.
3792 * trans-const.h (gfc_index_zero_node): Define.
3793 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
3794 * trans-types.c (gfc_get_array_type_bounds): Ditto.
3795 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
3796
3797 2004-03-25 Diego Novillo <dnovillo@redhat.com>
3798
3799 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
3800
3801 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3802
3803 PR 14055
3804 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
3805 before conversion by gmp library call.
3806
3807 2004-03-24 Bud Davis <bdavis9659@comcast.net>
3808
3809 PR 12921
3810 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
3811
3812 2004-02-24 Richard Henderson <rth@redhat.com>
3813
3814 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
3815
3816 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
3817
3818 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
3819 (fortran/gfortran.info): ... to here.
3820 (f95.srcinfo): New.
3821
3822 2004-02-16 Richard Henderson <rth@redhat.com>
3823
3824 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
3825 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
3826 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
3827 (gfc_expand_function): Rename from expand_function_body, make static,
3828 don't do anything except invoke tree_rest_of_compilation.
3829 (gfc_be_parse_file): Invoke cgraph.
3830 (gfc_expand_decl): Remove.
3831 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
3832 __builtin_adjust_trampoline.
3833 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
3834 (gfc_finalize): New.
3835 (gfc_generate_function_code): Use it. Lower nested functions.
3836 * trans-expr.c (gfc_conv_function_call): Add static chain operand
3837 to call_expr.
3838 * trans.c (gfc_build_function_call): Likewise.
3839 * trans.h (expand_function_body): Remove.
3840
3841 2004-02-15 Victor Leikehman <lei@il.ibm.com>
3842
3843 PR gfortran/13433
3844 * trans-decl.c (gfc_build_function_decl) For functions
3845 returning CHARACTER pass an extra length argument,
3846 following g77 calling conventions.
3847 * trans-types.c (gfc_get_function_type) Ditto.
3848 * trans-expr.c (gfc_conv_function_call) Ditto.
3849
3850 2004-02-14 Paul Brook <paul@codesourcery.com>
3851
3852 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
3853
3854 2004-02-12 Paul Brook <paul@nowt.org>
3855
3856 * BUGS: Remove.
3857
3858 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
3859
3860 * gfortran.texi: Fix typos.
3861
3862 2004-02-07 Bud Davis <bdavis9659@comcast.net>
3863
3864 PR gfortran/13909
3865 * intrinsic.c (add_conversions) Use logical conversion instead
3866 of real.
3867 * trans-types.c (gfc_get_logical_type) implemented logical*1
3868 and logical*2.
3869
3870 2004-01-17 Paul Brook <paul@codesourcery.com>
3871
3872 * lang-specs.h: Remove %<fixed-form.
3873
3874 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
3875
3876 * lang-specs.h: Enable preprocessing of source files
3877 ending in .F, .fpp, .FPP, .F90 and .F95.
3878
3879 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
3880
3881 PR fortran/12912
3882 * lang-specs.h: Enable compilation of files ending
3883 in .f, .for and .FOR.
3884
3885 2004-01-11 Paul Brook <paul@codesourcery.com>
3886
3887 * trans-stmt.c (gfc_trans_if_1): New function.
3888 (gfc_trans_if): Use it.
3889
3890 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
3891
3892 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3893 (gfc_option_t): Add max_identifier_length.
3894 * lang.opt: Add fmax-identifier-length.
3895 * match.c (parse_name): Use limit.
3896 * options.c (gfc_init_options): Set max_identifier_length.
3897 (gfc_handle_option): Ditto.
3898
3899 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
3900
3901 * intrinsic.c (add_functions): Add resolve function to dcmplx.
3902 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3903 * iresolve.c (gfc_resolve_dcmplx): New function.
3904
3905 2004-01-10 Paul Brook <paul@codesourcery.com>
3906
3907 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3908 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3909 (gfc_return_by_reference): Correct condition.
3910 (gfc_get_function_type): Ditto.
3911
3912 2004-01-10 Paul Brook <paul@codesourcery.com>
3913
3914 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3915 types.
3916
3917 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3918
3919 * iresolve.c: Use correct kind.
3920
3921 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
3922
3923 PR fortran/13467
3924 * trans-decl.c (gfc_create_module_variable): Output array valued
3925 parameters.
3926
3927 2004-01-10 Paul Brook <paul@codesourcery.com>
3928
3929 * resolve.c (resolve_branch): Get error message right way round.
3930
3931 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
3932
3933 * trans-array (gfc_conv_loop_setup): Adjust comment to track
3934 reality.
3935 (gfc_array_allocate): Don't count size of element twice.
3936
3937 2004-01-04 Paul Brook <paul@codesourcery.com>
3938
3939 * lang.opt (i8, r8, std=*): Remove RejectNegative.
3940
3941 2004-01-04 Paul Brook <paul@codesourcery.com>
3942
3943 * error.c (gfc_notify_std): New function.
3944 * gfortran.h (gfc_notify_std): Declare.
3945 (GFC_STD_*): Define.
3946 (gfc_option_t): Add warn_std and allow_std.
3947 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3948 (gfc_intrinsic_func_interface): Use gfc_notify_std.
3949 * check.c (check_rest): Use gfc_notify_std.
3950 * match.c (gfc_match_pause): Ditto.
3951 (gfc_match_assign): Ditto.
3952 (gfc_match_goto): Ditto.
3953 * resolve.c (resolve_branch): Ditto.
3954 * lang.opt: Add std=<foo> and w.
3955 * options.c (gfc_init_options): Set allow_std and warn_std.
3956 (gfc_handle_option): Handle OPT_std_* and OPT_w.
3957
3958 2004-01-01 Paul Brook <paul@codesourcery.com>
3959
3960 * array.c (gfc_append_constructor): Take constructor, not expression.
3961 * data.c (struct gfc_expr_stack): Remove.
3962 (expr_stack): Remove.
3963 (find_con_by_offset): Rename from find_expr_in_con.
3964 (find_con_by_component): Rename from find_component_in_con.
3965 (gfc_get_expr_stack): Remove.
3966 (gfc_assign_data_value): Rewrite.
3967 (gfc_expr_push): Remove.
3968 (gfc_expr_pop): Remove.
3969 (gfc_advance_section): Rename from
3970 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
3971 (gfc_get_section_index): Handle unbounded sections.
3972 * gfortran.h: Update prototypes.
3973 * resolve.c (check_data_variable): Array section maight not be the
3974 last ref.
3975
3976 2004-01-01 Paul Brook <paul@codesourcery.com>
3977
3978 PR fortran/13432
3979 * resolve.c (resolve_symbol): Allow assumed length function results.
3980
3981 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
3982
3983 * match.c (gfc_match_pause): Fix spelling.
3984
3985 2004-01-01 Steven Bosscher <stevenb@suse.de>
3986
3987 PR fortran/13251
3988 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3989 reference from the expression.
3990
3991 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
3992
3993 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3994 dumping.
3995 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3996 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3997 (symbol_attribute):New variable attribute: assign.
3998 * io.c (resolve_tag):Integer variable is allowed.
3999 (match_dt_format): Add ASSIGN statement. Set assign flag.
4000 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4001 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4002 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4003 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4004 (next_statement): Add ST_LABEL_ASSIGNMENT.
4005 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4006 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4007 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4008 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4009 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4010 assign. Put them into the stuct lang_decl.
4011 * trans-io.c (set_string): Add the assign statement.
4012 * trans-stmt.c (gfc_trans_label_assign): New function.
4013 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4014 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4015 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4016 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4017 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4018 (GFC_DECL_ASSIGN(node)): New macro to access flag.
4019
4020 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
4021
4022 PR fortran/13434
4023 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4024 minval/maxval.
4025
4026 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
4027
4028 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4029 that arguments to subroutines/functions can't alias themselves, nor global
4030 memory.
4031
4032 2003-12-20 Steven Bosscher <stevenb@suse.de>
4033
4034 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4035 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4036
4037 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
4038
4039 * primary.c (match_substring): Fix substring bug for start point
4040 or end point is NULL.
4041 * trans-expr.c (gfc_conv_substring): Ditto
4042 * trans-types.c (gfc_sym_type): Get correct type of scalar
4043 character variables.
4044 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4045 derived type.
4046
4047 2003-12-10 Richard Henderson <rth@redhat.com>
4048
4049 * options.c (gfc_post_options): Don't ever use rtl inlining.
4050
4051 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
4052
4053 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4054 * trans-equivalence.c: Remove.
4055 * trans-decl.c (gfc_get_symbol_decl): Update to match.
4056 (gfc_generate_function_code): Ditto.
4057 * trans-array.c (gfc_conv_array_parameter): Ditto.
4058 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4059 (F95_ADDITIONAL_OBJS): Add stor-layout.o
4060 * trans.h (gfc_trans_equivalence): Remove.
4061 * gfortran.h (struct gfc_equiv): Add used field.
4062 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4063 equiv_offset fields.
4064
4065 2003-12-05 Richard Henderson <rth@redhat.com>
4066
4067 * trans.c (gfc_build_addr_expr): New.
4068 (gfc_build_indirect_ref, gfc_build_array_ref): New.
4069 * trans.h: Declare them.
4070 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4071 trans-stmt.c, trans.c (*): Use them.
4072
4073 * f95-lang.c (gfc_post_options): Remove dead prototype.
4074 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4075 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4076 allocation size.
4077
4078 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
4079
4080 * io.c (gfc_match_format): Check for missing format label.
4081
4082 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4083
4084 PR fortran/13155
4085 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4086 from interfaces in modules.
4087
4088 2003-11-30 Paul Brook <paul@nowt.org>
4089
4090 * trans-array.c (gfc_trans_g77_array): Make non-static.
4091 (gfc_trans_assumed_size): Remove.
4092 (gfc_trans_dummy_array_bias): Explicitly free temporary.
4093 * trans-array.h (gfc_trans_g77_array): Add prototype.
4094 (gfc_trans_assumed_size): Remove.
4095 * trans-decls.c (gfor_fndecl_push_context): Remove.
4096 (gfor_fndecl_pop_context): Remove.
4097 (gfc_build_function)decls): Don't create them.
4098 (gfc_trans_deferred_vars): Update to match. Remove dead code.
4099 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4100
4101 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4102
4103 * trans-array.c (gfc_conv_array_parameter): Simplify
4104 array argument passing for array name actual argument.
4105 * trans-expr.c (gfc_conv_function_call): Ditto
4106 * trans-types.c (gfc_is_nodesc_array):Ditto.
4107
4108 2003-11-30 Paul Brook <paul@nowt.org>
4109
4110 * f95-lang.c (gfc_post_options): Move ...
4111 * options.c (gfc_post_options): .. to here. Handle inlining options.
4112 * gfortran.h (gfc_post_options): Add prototype.
4113
4114 2003-11-28 Richard Henderson <rth@redhat.com>
4115
4116 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4117
4118 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4119
4120 * trans.h (has_alternate_specifier): New global variable.
4121 * match.c (gfc_match_call): Handle actual arguments associated with
4122 alternate return indicators.
4123 * trans-expr.c (gfc_conv_function_call): Ditto
4124 * trans-stmt.c (gfc_trans_call): Ditto
4125 (gfc_trans_return): Handle return statement with value.
4126 * trans-decl.c (gfc_generate_function_code): Handle functions with
4127 asterisk dummy.
4128 (gfc_get_fake_result_decl): Ditto
4129 * trans-types.c (gfc_get_function_type): Ditto
4130 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4131 (resolve_formal_arglist): Check asterisk dummy.
4132
4133 2003-11-27 Paul Brook <paul@nowt.org>
4134
4135 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4136 allocation interface.
4137 (gfc_conv_ array_parameter): Ditto.
4138 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4139 * trans-array.c: Update prototype.
4140 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4141 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4142 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4143 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4144 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4145 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4146 * trans.h (gfc_ss_info): Remove unused pdata field.
4147 * trans.c (gfc_create_var_np): Change T to V.
4148
4149 2003-11-26 Richard Henderson <rth@redhat.com>
4150
4151 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4152 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4153 FRACTION, NEAREST, SET_EXPONENT.
4154 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4155 Fix GTY marking. Remove unnecessary const's.
4156 (LIBM_FUNCTION): Rename from I_LIB.
4157 (LIBF_FUNCTION): New.
4158 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4159 conventions. Assume the expr signature is correct. Mark const.
4160 (gfc_conv_intrinsic_exponent): Use library functions.
4161 (gfc_conv_intrinsic_set_exponent): Remove.
4162 (gfc_conv_intrinsic_scale): Remove.
4163 (gfc_conv_intrinsic_nearest): Remove.
4164 (gfc_conv_intrinsic_fraction): Remove.
4165 (gfc_conv_intrinsic_function): Update.
4166 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4167 (gfor_fndecl_math_exponent8): New.
4168 (gfc_build_intrinsic_function_decls): Set them.
4169 * trans.h: Declare them.
4170
4171 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4172
4173 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4174 underflow COMMON block.
4175 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4176 EQUIVALENCE object. Also fix typo in an error message.
4177
4178 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4179
4180 * Make-lang.in: Add check-gfortran to lang_checks.
4181 (check-f95): Alias for check-gfortran.
4182
4183 2003-11-25 Jason Merrill <jason@redhat.com>
4184
4185 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4186 directory and TAGS files that include them for each front end.
4187
4188 2003-11-24 Paul Brook <paul@nowt.org>
4189
4190 PR fortran/13154
4191 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4192
4193 2003-11-24 Paul Brook <paul@nowt.org>
4194
4195 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4196 handle.
4197 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4198
4199 2003-11-24 Paul Brook <paul@nowt.org>
4200
4201 PR fortran/13105
4202 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4203 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4204
4205 2003-11-20 Richard Henderson <rth@redhat.com>
4206
4207 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4208 (gfc_conv_array_base): Likewise.
4209 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4210 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4211 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4212 * trans-stmt.c (gfc_trans_character_select): Likewise.
4213
4214 2003-11-13 Paul Brook <paul@nowt.org>
4215
4216 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4217
4218 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4219
4220 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4221 (resolve_equivalence): New function.
4222 (resolve_equivalence_derived): New function.
4223
4224 2003-11-12 Richard Henderson <rth@redhat.com>
4225
4226 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4227 annotate_all_with_locus.
4228
4229 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4230
4231 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4232 * trans-decl.c (gfc_finish_var_decl): Modified.
4233
4234 2003-11-08 Paul Brook <paul@nowt.org>
4235
4236 PR fortran/12704
4237 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4238 arrays.
4239
4240 2003-11-06 Paul Brook <paul@nowt.org>
4241
4242 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4243
4244 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4245
4246 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4247
4248 2003-10-27 Anthony Green <green@redhat.com>
4249
4250 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4251 (f95.stagefeedback): Ditto.
4252
4253 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4254
4255 PR fortran/12682
4256 * Make-lang.in (f95.stageprofile): Add.
4257 (f95.stagefeedback): Add.
4258
4259 2003-10-23 Richard Henderson <rth@redhat.com>
4260
4261 * f96-lang.c (gfc_gimplify_expr): Remove.
4262 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4263 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4264
4265 2003-10-23 Richard Henderson <rth@redhat.com>
4266
4267 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4268
4269 2003-10-20 Paul Brook <paul@nowt.org>
4270
4271 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4272 * trans-stmt.c (gfc_trans_do_while): Ditto.
4273
4274 2003-10-17 Paul Brook <paul@nowt.org>
4275
4276 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4277
4278 2003-10-17 Paul Brook <paul@nowt.org>
4279
4280 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4281
4282 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4283
4284 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4285 (gfc_resolve_minloc): Ditto.
4286 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4287 Return the value after subtracting the lower bound.
4288
4289 2003-10-16 Richard Henderson <rth@redhat.com>
4290
4291 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4292
4293 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4294
4295 * lang.c: Remove -M option for now, it's in the way for C.
4296
4297 2003-10-14 Jason Merrill <jason@redhat.com>
4298
4299 * Make-lang.in (f95.tags): New rule.
4300
4301 2003-10-13 Richard Henderson <rth@redhat.com>
4302
4303 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4304
4305 2003-10-13 Paul Brook <paul@nowt.org>
4306
4307 * trans-decl.c (generate_local_decl): Don't create junk variables.
4308
4309 2003-10-13 Paul Brook <paul@nowt.org>
4310
4311 * resolve.c (resolve_formal_arglist): Use function result decl in
4312 preference to function decl.
4313
4314 2003-10-12 Richard Henderson <rth@redhat.com>
4315
4316 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4317 TREE_READONLY. Update all callers.
4318
4319 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4320
4321 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4322 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4323 (gfc_is_intrinsic_libcall): Add CSHIFT.
4324
4325 2003-10-12 Richard Henderson <rth@redhat.com>
4326
4327 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4328 (gfc_trans_array_constructor_value): Likewise.
4329 (gfc_conv_array_initializer): Likewise.
4330 * trans-stmt.c (gfc_trans_character_select): Likewise.
4331
4332 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4333
4334 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4335
4336 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4337
4338 * check.c (gfc_check_repeat): Check arguments are scalar.
4339 (gfc_check_trim): New function.
4340 * intrinsic.h (gfc_check_trim): Add prototype.
4341 * intrinsic.c (add_functions): Use it.
4342 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4343 Decalare.
4344 * trans-decl.c: Ditto.
4345 (gfc_build_intrinsic_fucntion_decls): Set them.
4346 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4347 (gfc_conv_intrinsic_trim): New function.
4348 (gfc_conv_intrinsic_repeat): New function.
4349 (gfc_conv_intrinsic_function): Use them.
4350
4351 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4352
4353 * trans-types.c (gfc_sym_type): Handle result variables.
4354
4355 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4356
4357 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4358 gfc_get_character_type.
4359
4360 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4361
4362 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4363
4364 2003-10-11 Paul Brook <paul@nowt.org>
4365
4366 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4367 (gfc_resolve_dprod): New function.
4368 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4369 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4370 (gfc_resolve_dprod): Declare.
4371 * intrinsic.c (add_functions): Use them.
4372 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4373
4374 2003-10-06 Richard Henderson <rth@redhat.com>
4375
4376 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4377 * trans-intrinsic.c (call_builtin_clz): Use it.
4378
4379 2003-10-05 Paul Brook <paul@nowt.org>
4380
4381 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4382 * trans-decl.c (gfc_generate_function_code): Set
4383 cfun->function_end_locus.
4384
4385 2003-09-24 Jason Merrill <jason@redhat.com>
4386
4387 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4388 TREE_LOCUS.
4389
4390 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4391 Paul Brook <paul@nowt.org>
4392
4393 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4394 * array.c (gfc_inser_constructor): New function.
4395 (gfc_get_constructor): New function.
4396 (gfc_free_constructor): Initialize offset and repeat.
4397 (iterator_stack): Remove.
4398 (expand_info): Add offset, component and repeat fields.
4399 (expand_constructor): Set them.
4400 (expand): Set new fields.
4401 (gfc_copy_constructor): Ditto. Avoid recursion.
4402 * gfortran.h: Add prototypes for new functions.
4403 (gfc_constructor): Add offset, component and repeat.
4404 (iteratio_stack): Move to here.
4405 * resolve.c (check_data_variable): Convert data values into variable
4406 initializers.
4407 (traverse_data_list): Build implicit loop chain.
4408 (gfc_resolve): Ditto.
4409 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4410 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4411 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4412 (gfc_conv_expr): Update to match.
4413 * trans.h (gfc_conv_structure): Declare.
4414 * data.c: New file.
4415
4416 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4417
4418 * trans.h: Add declarations for gfor_fndecl_si_kind and
4419 gfor_fndecl_sr_kind.
4420 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4421 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4422 (g95_conv_intrinsic_sr_kind): New function.
4423 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4424 SELECTED_REAL_KIND.
4425
4426 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4427
4428 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4429 instead of _4 and _8 as postfix for libgfortran calls.
4430
4431 2003-09-16 Paul Brook <paul@nowt.org>
4432
4433 * array.c (compare_bounds): New function.
4434 (gfc_compare_array_spec): Use it.
4435
4436 2003-09-14 Paul Brook <paul@nowt.org>
4437
4438 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4439 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4440
4441 2003-09-14 Paul Brook <paul@nowt.org>
4442
4443 * check.c (dim_rank_check): Allow assumed bounds if requested.
4444 (gfc_check_lbound): Call it.
4445 (gfc_check_ubound): Ditto.
4446 (gfc_check_size): Change to match.
4447 * simplify.c (gfc_simplify_bound): New function.
4448 (gfc_simplify_lbound): New function.
4449 (gfc_simplify_ubound): New function.
4450 * intrinsic.h: Declare them.
4451 * intrinsic.c (add_functions): Use them.
4452
4453 2003-09-14 Paul Brook <paul@nowt.org>
4454
4455 * io.c (format_lex): Initialize negative_flag.
4456 (check_format): Intialize repeat.
4457 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4458 (gfc_new_var_expr): Ditto.
4459
4460 2003-09-14 Paul Brook <paul@nowt.org>
4461
4462 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4463 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4464
4465 2003-09-12 Paul Brook <paul@nowt.org>
4466
4467 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4468
4469 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4470
4471 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4472 for a correct expression.
4473
4474 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4475
4476 * trans-intrinsic.c (real_compnt_info): New struct.
4477 (prepare_arg_info): New function.
4478 (gfc_conv_intrinsic_set_exponent): New function.
4479 (gfc_conv_intrinsic_scale): New function.
4480 (gfc_conv_intrinsic_nearest): New function.
4481 (gfc_conv_intrinsic_fraction): New function.
4482 (gfc_conv_intrinsic_exponent): New function.
4483 (gfc_conv_intrinsic_spacing): New function.
4484 (gfc_conv_intrinsic_rrspacing): New function.
4485 (gfc_conv_intrinsic_function): Use them.
4486
4487 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4488
4489 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4490 build_int_2 changed from (high, low) to (low, high).
4491 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4492 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4493 iocall_set_nml_val_float, iocall_set_nml_val_char,
4494 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4495 (gfc_build_io_library_fndecls): Add variable initialization.
4496 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4497 (build_dt): Add namelist support.
4498 * io.c (value): New variable.
4499 (check_format): Support FMT_H now.
4500
4501 2003-09-07 Paul Brook <paul@nowt.org>
4502
4503 * io.c (gfc_resolve_dt): Error if format label is not defined.
4504
4505 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4506
4507 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4508 about case_switch's break. The other is about building the condition
4509 statement tree, which judges the argument in the range of the
4510 corresponding integer type.
4511 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4512 for the large values.
4513
4514 2003-09-05 Paul Brook <paul@nowt.org>
4515
4516 * f95-lang.c (expand_function_body): Gimplify the function.
4517
4518 2003-09-04 Jeff Law <law@redhat.com>
4519
4520 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4521 index zero!
4522
4523 2003-09-04 Paul Brook <paul@nowt.org>
4524
4525 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4526 (gfc_expand_stmt): New function.
4527 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4528 (expand_function_body): Use tree_rest_of_compilation.
4529 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4530
4531 2003-09-03 Jeff Law <law@redhat.com>
4532
4533 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4534 index zero!
4535
4536 2003-08-30 Paul Brook <paul@nowt.org>
4537
4538 * f95-lang.c (builtin_function): Remove #if 0 code.
4539 (gfc_define_builtin): New function.
4540 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4541 * mathbuiltins.def: New file.
4542 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4543 (gfc_intrinsic_map): Use mathbuiltins.def.
4544 (gfc_intrinsic_builtin_t): Remove.
4545 (gfc_build_intrinsic_lib_fndecls): Update.
4546 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4547 signed_size_type_node.
4548
4549 2003-08-29 Paul Brook <paul@nowt.org>
4550
4551 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4552
4553 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4554
4555 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4556 (gfc_conv_intrinsic_function): Add MODULO.
4557
4558 2003-08-22 Jason Merrill <jason@redhat.com>
4559
4560 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4561
4562 2003-08-22 Andreas Jaeger <aj@suse.de>
4563
4564 * Make-lang.in (f95.install-common): Add DESTDIR support.
4565 * (f95.install-info): Likewise.
4566 (f95.uninstall): Likewise.
4567
4568 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4569
4570 * trans-types.c (gfc_init_types): Initialize
4571 signed_size_type_node with size_type_node.
4572
4573 2003-08-18 Paul Brook <paul@nowt.org>
4574
4575 * dependency.c (gfc_dependency): New enum.
4576 (check_another_array_ref): Remove.
4577 (gfc_get_array_from_component): Remove.
4578 (get_x): Remove.
4579 (get_range): Remove.
4580 (get_no_of_elements): Use mpz_t, not mpf_t.
4581 (transform_sections): New function.
4582 (gfc_check_range_range): Rename ...
4583 (gfc_check_section_vs_section): ... to this. Use new function.
4584 (gfc_is_inside_range): Rewrite to match.
4585 (gfc_check_element_vs_section): Ditto.
4586 (gfc_check_element_vs_element): Ditto.
4587 (get_deps): Ditto.
4588 (gfc_dep_resolver): Ditto. Remove unused parameter.
4589 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4590 gfc_check_element_vs_element, gfc_is_inside_range,
4591 gfc_get_array_from_component): Remove prototypes for static functions.
4592 (gfc_dep_resolver): Update prototype.
4593 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4594
4595 2003-08-15 Paul Brook <paul@nowt.org>
4596
4597 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4598 return values to parent scope.
4599 (gfc_build_dummy_array_decl): Ditto.
4600
4601 2003-08-14 Paul Brook <paul@nowt.org>
4602
4603 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4604 size of the type, not the pointer.
4605 * resolve.c (resolve_symbol): Give more accurate error message.
4606
4607 2003-08-10 Paul Brook <paul@nowt.org>
4608
4609 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4610
4611 2003-08-10 Paul Brook <paul@nowt.org>
4612
4613 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4614 type components.
4615
4616 2003-08-10 Chun Huang <compiler@sohu.com>
4617
4618 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4619 (resolve_symbol): Ditto.
4620 * trans-expr.c (gfc_conv_statement_function): New function.
4621 (gfc_conv_function_expr): Use it.
4622
4623 2003-08-10 Paul Brook <paul@nowt.org>
4624
4625 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4626 (walk_function_expr): Set section rank.
4627 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4628
4629 2003-08-10 Paul Brook <paul@nowt.org>
4630
4631 * intrinsic.c (add_sym): Prefix names with correct string.
4632 (add_sym_0s): New function.
4633 (add_subroutines): Register abort.
4634
4635 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4636
4637 * gfortran.h: Introduce options to control the mangling.
4638 * lang.opt: Likewise.
4639 * options.c (gfc_init_options): Handle the options.
4640 * trans-common.c (gfc_sym_mangled_common_id): New function.
4641 (gfc_build_common_decl): Call it.
4642 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4643 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4644
4645 2003-08-09 Paul Brook <paul@nowt.org>
4646
4647 * module.c (mio_symbol): Always ouput a namespace for formal args.
4648 (load_needed): Namespace now belong to their proper symbol.
4649 (gfc_dump_module): Change G95=>GFORTRAN.
4650
4651 2003-08-05 Paul Brook <paul@nowt.org>
4652
4653 * options.c: Force -fg77-calls.
4654
4655 2003-08-02 Paul Brook <paul@nowt.org>
4656
4657 * Makelang.in: Rename G95_* to GFORTRAN_*.
4658 * All sources: Rename G95_* to GFC_*.
4659
4660 2003-08-01 Paul Brook <paul@nowt.org>
4661
4662 * fortran/Make-lang.in: Use GMPLIBS.
4663 * fortran/config-lang.in: Set need_gmp.
4664 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4665
4666 2003-07-27 Andreas Jaeger <aj@suse.de>
4667
4668 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4669 ISO C90.
4670 * trans-const.c (gfc_init_constants): Likewise.
4671 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4672
4673 * gfortranspec.c: Convert to ISO C90.
4674 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4675
4676 2003-07-26 Paul Brook <paul@nowt.org>
4677
4678 * lang.opt: Add -fdump-parse-tree.
4679 * options.c (gfc_handle_option): Ditto.
4680 * resolve.c (resolve_forall_iterators): Convert to proper type.
4681 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4682
4683 2003-07-26 Paul Brook <paul@nowt.org>
4684
4685 * Makefile.in: Add build dependencies on files common with rest of gcc.
4686
4687 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4688
4689 * trans.h: Declare g95_trans_pointer_assignment.
4690 * trans-expr.c (g95_trans_pointer_assignment): New function.
4691 (g95_trans_pointer_assign): Use it.
4692 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4693 (g95_trans_pointer_assign_need_temp): New function.
4694
4695 2003-07-26 Paul Brook <paul@nowt.org>
4696
4697 * gfortran.texi: Replace references to g95.
4698
4699 2003-07-26 Paul Brook <paul@nowt.org>
4700
4701 Rename g95_* to gfc_*.
4702
4703 2003-07-25 Paul Brook <paul@nowt.org>
4704
4705 * gfortran.h: Rename from g95.h.
4706 * trans-types.c (boolean_type_node, booelan_true_node,
4707 boolean_false_node): Remove.
4708 * trans-types.h: Ditto.
4709
4710 2003-07-25 Chun Huang <compiler@sohu.com>
4711
4712 * parse.c (accept_statement): Implement BLOCK DATA statement.
4713 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4714 variables.
4715
4716 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4717
4718 * trans-stmt.c (temporary_list): Define.
4719 (g95_trans_assign_need_temp): New function.
4720 (g95_trans_forall_1): Modified for WHERE.
4721 (g95_trans_where_assign): Modified.
4722 (g95_trans_where_2): Modified.
4723 (g95_evaluate_where_mask): Modified.
4724 (g95_trans_where): Modified.
4725 (g95_get_temp_expr): Removed.
4726 (g95_add_to_where_stmt_list): Removed.
4727 (compute_overall_iter_number): Modified for WHERE.
4728 * trans.h: Remove where_stmt_list.
4729
4730 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4731
4732 * lang.opt: Correct description of options -J and -M.
4733
4734 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4735
4736 * lang.opt: Move help text to here.
4737 * lang-options.h: Remove.
4738
4739 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4740 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4741 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4742 on kind.
4743
4744 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4745 Paul Brook <paul@nowt.org>
4746
4747 * check.c (check_rest): Use global pedantic flag.
4748 * io.c (data_desc): Ditto.
4749 * error.c (g95_warning, g95_warning_now): Use global flag.
4750 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4751 (expand_function_body): Update to new prototypes.
4752 (g95_init): Use new option names.
4753 * g95.h (g95_option_t): Standardize names.
4754 (g95_init_options, g95_handle_option): Update prototypes.
4755 * interface.c: Use new option names.
4756 * match.c: Ditto.
4757 * module.c: Ditto.
4758 * parse.c: Ditto.
4759 * primary.c: Ditto.
4760 * resolve.c: Ditto.
4761 * scanner.c: Ditto.
4762 * simplify.c: Ditto.
4763 * symbol.c: Ditto.
4764 * trans-array.c: Ditto.
4765 * trans-expr.c: Ditto.
4766 * trans-types.c: Ditto.
4767 * trans-decl.c: Ditto.
4768 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4769 * trans.h: Ditto.
4770 * options.c (g95_display_help): Remove.
4771 (g95_init_options): Convert to new scheme.
4772 (set_Wall): Ditto
4773 (g95module_option): Ditto, rename from g95_parse_arg.
4774 (g95_handle_module_path_options): New function.
4775 * trans-equivalence.c: Fix error message.
4776 * lang.opt: Corrections.
4777
4778 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4779
4780 * lang.opt: New file.
4781
4782 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4783
4784 * decl.c (match_attr_spec): Set colon_seen.
4785
4786 2003-07-14 Paul Brook <paul@nowt.org>
4787
4788 * trans-array.c: Update comment.
4789 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
4790 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
4791 minmaxloc,minmaxval): Ditto.
4792 * trans-io.c (g95_trans_transfer): Ditto.
4793 * trans-stmt.c: Remove unneeded prototypes.
4794 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
4795 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
4796 (compute_inner_temp_size): Remove bits of dead code. Add comments.
4797 Don't share loopinfo.
4798 (compute_overall_iter_number): Declare as static.
4799 (allocate_temp_for_forall_nest): Ditto.
4800 (g95_trans_forall_1): Don't pass shared loopinfo.
4801 * trans.c (g95_start_block): Expand comment.
4802
4803 2003-07-12 Paul Brook <paul@nowt.org>
4804
4805 * arith.c (g95_index_integer_kind): Remove unused initializer.
4806 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
4807 index by size of element.
4808 (generate_loop_for_rhs_to_temp): Ditto.
4809 (allocate_temp_for_forall_nest): Use element size, not index size.
4810
4811 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4812
4813 * arith.c (g95_index_integer_kind): Add a TODO.
4814 * simplify.c (g95_simplify_nearest): Add a TODO.
4815
4816 2003-07-09 Chun Huang <compiler@sohu.com>
4817
4818 * trans.h: Add declarations for gfor_fndecl_string_scan and
4819 gfor_fndecl_string_verify.
4820 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4821 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
4822 (g95_conv_intrinsic_verify): New function.
4823 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
4824 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
4825 of parameter 'BACK=.TRUE.'
4826
4827 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
4828
4829 * trans-stmt.c (iter_info, forall_info): Define.
4830 (g95_trans_forall_block): Remove.
4831 (g95_trans_forall_loop): Use forall info blocks.
4832 (g95_trans_nested_forall_loop): New function.
4833 (g95_do_allocate): Handle things other than logical masks.
4834 (generate_loop_for_temp_to_lhs): New function.
4835 (generate_loop_for_rsh_to_temp): New function.
4836 (compute_inner_temp_size): New function.
4837 (compute_overall_iter_number): New function.
4838 (allocate_temp_for_forall_nest): New function.
4839 (g95_trans_forall): Move body ...
4840 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
4841
4842 2003-07-02 Paul Brook <paul@nowt.org>
4843
4844 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
4845 in correct scope. Change callers to match.
4846 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
4847 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
4848
4849 2003-07-02 Paul Brook <paul@nowt.org>
4850
4851 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
4852 expression shape for all expressions.
4853 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
4854
4855 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4856
4857 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
4858 g95_parse_arg), intrinsic.c (g95_convert_type): support of
4859 -Wconversion.
4860 * intrinsic.c, g95.h: Add g95_convert_type_warn,
4861 * resolve.c (g95_resolve_index): Call it.
4862
4863 2003-07-02 Paul Brook <paul@nowt.org>
4864
4865 * iresolve.c (g95_resolve_reshape): Set expression shape.
4866 (g95_resolve_shape): Ditto.
4867 * simplify.c (g95_simplify_shape): Move common code outside condition.
4868 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4869
4870 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4871
4872 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4873 conformance checks.
4874
4875 2003-06-29 Paul Brook <paul@nowt.org>
4876
4877 * array.c (g95_simplify_iterator_var): Don't bother with return value.
4878 * expr.c (find_array_element, find_component_ref): New functions.
4879 (remove_subobject_ref): New function.
4880 (simplify_const_ref): Use them. Rename from simplify_component_ref.
4881 (simplify_ref_chain): New function.
4882 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
4883 (g95_specification_expr): Simplify the expression.
4884 * resolve.c (resolve_operator): Check simplifications return code.
4885 (g95_resolve_expr): Ditto.
4886
4887 2003-06-26 Paul Brook <paul@nowt.org>
4888
4889 * expr.c (simplify_component_ref): New function.
4890 (g95_simplify_expr): Use it.
4891 * resolve.c (resolve_structure_cons): Handle references.
4892
4893 2003-06-25 Paul Brook <paul@nowt.org>
4894
4895 * trans-io.c (build_dt): Handle internal units.
4896
4897 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
4898
4899 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4900 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4901 Use g95_array_index_type instead of integer_type_node.
4902 (g95_build_common_decl, g95_set_common_master_type): Use
4903 g95_character1_type_node instead of char_type_node.
4904 * trans-equivalence.c (g95_layout_local_equiv): As above.
4905
4906 2003-06-24 Steven G. Kargl <kargls@attbi.com>
4907
4908 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4909 remove last remains of -fquiet.
4910
4911 2003-06-22 Paul Brook <paul@nowt.org>
4912
4913 * resolve.c (resolve_operator): Don't fail if we can't simplify.
4914 (g95_resolve_expr): Ditto.
4915 (resolce_code): Mark as static.
4916 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4917 gimplifer doesn't (yet).
4918
4919 2003-06-20 Paul Brook <paul@nowt.org>
4920
4921 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4922 * match.c (g95_match_if): Add ST_PAUSE.
4923 (g95_match_stopcode): New function.
4924 (g95_match_pause, g95_match_stop): Use it.
4925 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4926 (decode_stmt, next_statement, parse_executable): Ditto.
4927 * resolve.c (resolve_code): Ditto.
4928 * st.c (g95_free_statement): Ditto.
4929 * trans-stmt.c (g95_trans_pause): New function.
4930 * trans-stmt.h: Declare it.
4931 * trans.c (g95_trans_code): Use it.
4932 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4933 Declare.
4934 (g95_build_builtin_function_decls): Initialize them.
4935 * trans.h: Ditto.
4936 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4937
4938 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4939
4940 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4941 match_filepos): Fix error handling.
4942
4943 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4944
4945 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4946 Add assertions on arguments.
4947 * resolve.c (expression_shape): Remove useless &.
4948 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4949 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4950 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4951 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4952 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4953 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4954 (g95_simplify_not, g95_simplify_scale): Add assertions.
4955
4956 2003-06-15 Paul Brook <paul@nowt.org>
4957
4958 Clean up stuff to work with the ssa optimizers.
4959 * convert.c (convert): Handle BOOLEAN_TYPEs.
4960 * f95-lang.c (g95_truthvalue_conversion): Implement.
4961 * trans-array.c (g95_trans_array_constructor_value): Group multiple
4962 scalar values.
4963 * trans.h (g95_truthvalue_conversion): Declare.
4964 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4965 * trans-stmt.c (g95_trans_character_select): Don't create array
4966 assignments. Mark labels as indirect jump targets.
4967 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4968 (g95_get_dtype_cst): Handle LOGICAL types.
4969
4970 2003-06-14 Paul Brook <paul@nowt.org>
4971
4972 * f95-lang.c (g95_gimplify_expr): New function.
4973 * trans-array.c (g95_trans_array_constructor_value): Don't create
4974 array assignments.
4975 (g95_conv_expr_descriptor): Rename simple->gimple.
4976 * trans-expr.c (conv_expr_op): Use proper logical operators.
4977 * trans-intrinsic.c (build_fixbound_expr): New function.
4978 (build_fix_expr): Ditto.
4979 (g95_conv_intinsic_aint): Use them. Use builtin functions.
4980 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4981
4982 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4983
4984 * array.c (g95_compare_array_spec): Remove unreachable code.
4985 * expr.c (g95_copy_expr): Likewise.
4986 * intrinsic.c (g95_convert_type): Likewise.
4987 * misc.c (g95_code2string): Likewise.
4988 * simplify.c (g95_simplify_ishft, g95_simplify_real,
4989 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4990 * trans-stmt.c (g95_trans_select): Likewise.
4991 * primary.c (extend_ref): Add an assertion.
4992 * simplify.c (g95_convert_constant): Add const.
4993 * intrinsic.h: Remove g95_check_x_ni.
4994 * f95-lang.c (g95_finish): Call g95_release_include_path.
4995
4996 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4997
4998 * resolve.c (resolve_contained_functions): Fix typo introduced on
4999 2003-01-13.
5000
5001 2003-06-09 Paul Brook <paul@nowt.org>
5002
5003 * g95.h: Include system.h not hwint.h.
5004 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
5005 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5006
5007 2003-06-09 Paul Brook <paul@nowt.org>
5008
5009 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5010 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5011 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5012 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5013 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5014 objects.
5015 * trans.h (g95_trans_equivalence, g95_trans_common,
5016 g95_add_decl_to_function): Declare.
5017 * trans-common.c, trans-equivalence.c: New files.
5018
5019 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
5020
5021 * intrinsic.c (g95_intrinsic_extension): Remove.
5022 (add_functions): Substitute g95_check_x for g95_check_x_ni
5023 everywhere.
5024 (g95_init_expr_extensions): New function.
5025 (g95_intrinsic_func_interface): Use it.
5026 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5027 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5028 g95_check_precision, g95_check_present, g95_check_radix,
5029 g95_check_range, g95_check_selected_real_kind): Do not set
5030 g95_intrinsic_extension.
5031 (g95_check_x_ni): Remove now duplicate of g95_check_x.
5032
5033 * expr.c (check_inquiry): Add FIXME, fixup some code style.
5034
5035 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5036
5037 * g95.h (ref_type): Name this type explicitly.
5038 * module.c (MIO_NAME): Add specialisations of mio_name.
5039 (mio_symbol_attribute, mio_typespec, mio_array_ref,
5040 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5041 (ab_attribute): Name this type explicitly.
5042 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5043
5044 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
5045
5046 * trans-intrinsic.c (g95_conv_allocated): New function.
5047 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5048
5049 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5050
5051 * f95-lang.c: Don't include g95-support.h
5052 (g95_mark_addressable): Add prototype.
5053 (g95_init_decl_processing): Remove C front end hack.
5054 * f95-tree.c: Remove file.
5055 * support.c: Remove file.
5056 * g95-support.h: Remove file.
5057 * trans-types.c (g95_init_types): Set up boolean
5058 type related tree nodes.
5059 * Make-lang.in: Remove rules for dead files and
5060 dependencies on them.
5061
5062 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5063
5064 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5065 C front end dependency. Also, convert.c does not depend on
5066 g95-support.h anymore.
5067 * convert.c: Don't include c-common.h and g95-support.h
5068 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5069 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5070 stmts_are_full_exprs_p, current_stmt_tree,
5071 current_scope_stmt_stack): Remove.
5072 * g95-support.h (unsigned_conversion_warning): Kill proto.
5073 (boolean_type_node, boolean_true_node, boolean_false_node):
5074 Don't define here. Instead, make then true tree nodes in
5075 trans-types.
5076 * support.c (c_global_trees): Die, C front end, die!!!
5077 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5078 uintmax_type_node, string_type_node and const_string_type_node.
5079 (decl_constant_value, overflow_warning): Make static functions.
5080 They are in death row too, though.
5081 (default_conversion, c_expand_asm_operands): Remove.
5082 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5083 trans.c: Don't include c-common.h.
5084 * trans-types.c (boolean_type_node, boolean_true_node,
5085 boolean_false_node): Make them real tree nodes.
5086 * trans-types.h (intmax_type_node, string_type_node,
5087 const_string_type_node): Hack to work around C dependencies
5088 in builtin-types.def.
5089
5090 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5091
5092 * decl.c (decl_types): Add some iterators-like sentinels.
5093 * decl.c (match_attr_spec): Use them.
5094 Use "decl_types" instead of "int".
5095 Add cast in call to g95_match_strings.
5096 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
5097 instead of "int".
5098 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5099 (g95_interface_info): Use "g95_intrinsic_op".
5100 * dump-parse-tree.c (g95_show_namespace): Use them.
5101 * interface.c (g95_check_interfaces): Use them.
5102 * module.c (read_module, write_module): Use them.
5103 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5104 Use "g95_intrinsic_op".
5105 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5106 Add a default case in switch statement.
5107 * intrinsic.h (g95_generic_isym_id): Moved to...
5108 * g95.h (g95_generic_isym_id): here.
5109 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5110 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5111 * trans-intrinsic.c (g95_intrinsic_map_t,
5112 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5113 * match.c (g95_match_intrinsic_op): Add cast in call to
5114 g95_match_strings.
5115
5116 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5117
5118 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5119 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5120 constant_fits_type_p, convert_and_check,
5121 unsigned_conversion_warning): Remove these ugly remnants
5122 we inherited from the C front end.
5123 (function_types_compatible): Remove '#if 0'-edcode.
5124 (build_modify_expr): Likewise.
5125 (convert_for_assignment): Don't use the deceased functions.
5126 The parameter fundecl is now unused.
5127 (decl_constant_value): Always just return decl. In fact
5128 this function is not used at present, but it might be in
5129 the future, when we start using the tree inliner.
5130 (overflow_warning, default_conversion, c_expand_asm_operands):
5131 Abort when these are called, they are part of the C type
5132 checking implementation and therefore poison to Fortran.
5133
5134 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5135
5136 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5137 c-pretty-print.o and c-dump.o. Add a comment on why we
5138 depend on c-semantics.c.
5139 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5140 Don't use the C front end tree dumper hook to dump the
5141 language specific tree representation -- we don't have
5142 one. So instead, inherit the default langhook.
5143
5144 2003-06-02 Paul Brook <paul@nowt.org>
5145
5146 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5147
5148 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5149
5150 * check.c (g95_check_associated): Use proper types. Remove
5151 extraneous argument in call to g95_error().
5152
5153 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5154
5155 * resolve.c (resolve_operator): Make logical operands convert to the
5156 type with higher kind.
5157
5158 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5159
5160 * check.c (g95_check_associated): Make sure both pointer and target has
5161 the same type and rank. Null pointer or array section with vector
5162 subscript as target are not allowed.
5163 * trans.h: Declare gfor_fndecl_associated.
5164 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5165 gfor_fndecl_associated.
5166 * trans-intrinsic.c (g95_conv_associated): New function.
5167 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5168
5169 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5170
5171 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5172 according to POINTER itself rather than TARGET.
5173 (g95_conv_expr_descriptor): Make lbound start at 1.
5174 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5175
5176 2003-06-01 Paul Brook <paul@nowt.org>
5177
5178 * expr.c (g95_type_convert_binary): Make it match the standard.
5179 * g95.texi: Remove dead link.
5180
5181 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5182
5183 * g95.texi: Cleanup somewhat in preparation for inclusion
5184 in GCC CVS.
5185
5186 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5187 Canqun Yang <canqun@yahoo.com.cn>
5188
5189 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5190 type.
5191 (g95_find_forall_index): Return proper value.
5192 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5193 compare the return value from g95_find_forall_index.
5194
5195 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5196 * g95.h, io.c (g95_st_label): Remove "length".
5197 (g95_symtree): Remove "link".
5198 (g95_case): Remove "code".
5199 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5200 g95_convert_real): Make an argument pointer to const.
5201 * decl.c (colon_seen): Add a TODO.
5202 * interface.c (g95_compare_types): Fix typo.
5203 * interface.c (compare_interfaces): Preserve value of "p".
5204 * intrinsic.c (sort_actual): Remove "i".
5205 * match.c (g95_match_assign): Proper type in call to g95_match().
5206 * parse.c (next_free): Avoid duplicate call due to macro.
5207 * parse.c (check_statement_label): wrong type in call to g95_error.
5208 * primary.c (match_real_constant): Add a TODO.
5209 * resolve.c (resolve_select): Remove useless conditional.
5210 * simplify.c (g95_simplify_repeat): Proper assignment to
5211 "value.character.string".
5212 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5213 g95_error.
5214
5215 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5216
5217 * trans-stmt.c: Remove unnecessary include file defaults.h.
5218
5219 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5220
5221 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5222 stride.
5223 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5224 actual variables used as FORALL indexes.
5225
5226 2003-05-15 Paul Brook <paul@nowt.org>
5227
5228 * trans-array.c (g95_trans_static_array_pointer): Use
5229 null_pointer_node.
5230 (g95_trans_deferred_array): Initialize static array pointers.
5231 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5232 correctly pass POINTER and absent CHARACTER arguments.
5233
5234 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5235
5236 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5237 (g95_resolve_forall_body): Resolve FORALL body.
5238 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5239 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5240 (g95_find_forall_index): Check whether the FORALL index appears in
5241 the expression or not.
5242 (resolve_code): Modified.
5243
5244 2003-05-14 Paul Brook <paul@nowt.org>
5245
5246 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5247
5248 2003-05-13 Paul Brook <paul@nowt.org>
5249
5250 * trans-types.c (g95_max_array_element_size): Now a tree node.
5251 (g95_init_types): Work out max size properly.
5252 (g95_get_dtype_cst): Modify to match.
5253
5254 2003-05-11 Paul Brook <paul@nowt.org>
5255
5256 * trans-io.c (add_case): Create a label decl for case labels.
5257
5258 2003-05-11 Paul Brook <paul@nowt.org>
5259
5260 * arith.c (g95_integer_index_kind): New variable.
5261 * f95-lang.c (g95_init): Move frontend initialization here ...
5262 (g95_post_options): ... from here.
5263 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5264 * intrinsic.c (add_functions): Use index kinds.
5265 * iresolve.c: Convert to index_kind where needed.
5266 * resolve.c (g95_resolve_index): Make public, use index_kind.
5267 (resolve_array_ref): Adjust to match.
5268 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5269 * trans-stmt.c: Ditto.
5270 * trans-types.c: Ditto.
5271 * trans-types.h (g95_array_index_kind): Remove declaration.
5272 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5273
5274 2003-05-07 Paul Brook <paul@nowt.org>
5275
5276 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5277 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5278 of bound indices.
5279
5280 2003-05-07 Paul Brook <paul@nowt.org>
5281
5282 * trans-array.c (trans_static_array_pointer,
5283 g95_trans_array_constructor_value, g95_conv_array_initializer,
5284 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5285 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5286 * trans-stmt.c (g95_trans_character_select): Ditto.
5287 * trans-types.c (g95_init_types): Ditto.
5288
5289 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5290
5291 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5292 * trans-decl.c (g95_generate_function_code,
5293 g95_generate_constructors): Likewise.
5294 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5295 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5296 Likewise.
5297
5298 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5299 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5300 with components point to the DERIVED type itself, and two DERIVED
5301 type with components point to each other.
5302 * trans-expr.c (g95_conv_componet_ref): Modified
5303
5304 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5305 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5306 null_pointer_node.
5307 (g95_trans_pointer_assign): Implement Nullify.
5308
5309 2003-05-01 Paul Brook <paul@nowt.org>
5310
5311 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5312 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5313
5314 2003-05-01 Paul Brook <paul@nowr.org>
5315
5316 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5317 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5318 IS_EMPTY_STMT.
5319
5320 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5321
5322 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5323 CASE_LABEL_EXPR.
5324
5325 2003-04-28 Paul Brook <paul@nowt.org>
5326
5327 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5328 as their kind suggests.
5329 (g95_resolve_reshape): Ditto.
5330
5331 2003-04-28 Chun Huang <compiler@sohu.com>
5332
5333 * trans-expr.c (g95_conv_substring_expr): New function.
5334 (g95_conv_expr): Use it.
5335
5336 2003-04-28 Paul Brook <paul@nowt.org>
5337
5338 * iresolve.c (g95_resolve_transpose): Make it match the
5339 implementation.
5340 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5341
5342 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5343
5344 * trans-types.c (g95_add_field_to_struct): New function to
5345 add a field to a UNION_TYPE or RECORD_TYPE.
5346 * trans-types.h (g95_add_field_to_struct): Prototype.
5347 (g95_get_derived_type): Use g95_add_field_to_struct to add
5348 components.
5349 * trans-io.c (g95_add_field): Remove.
5350 (ADD_FIELD): Use new g95_add_field_to_struct function.
5351 (ADD_STRING): Likewise.
5352 * trans-stmt.c (g95_trans_select): Likewise.
5353 (g95_add_field): Remove duplicated function.
5354
5355 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5356
5357 Port implementation for CHARACTER SELECT from Andy's tree.
5358 * trans-stmt.c (g95_trans_character_select): Implement character
5359 select. (g95_add_field): New function.
5360 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5361 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5362 * g95.h (struct g95_case): Add field 'int n'.
5363 * trans.h: Declare 'gfor_fndecl_select_string'.
5364
5365 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5366
5367 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5368 (g95_insert_bbd): Die on duplicates.
5369 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5370
5371 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5372
5373 * g95.texi: Require GMP 4.0 -- like we actually
5374 do. Explain the testsuite and what-goes-where.
5375 Don't use undefined texinfo symbol. Break very
5376 long line. Remove finished item from the list
5377 of open projects.
5378
5379 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5380
5381 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5382 LOGICAL type.
5383
5384 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5385
5386 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5387 (g95_trans_forall_body): New function.
5388
5389 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5390
5391 * resolve.c (resove_where): New function.
5392 (resolve_where_shape): New function.
5393 (resolve_code): Add call to 'resolve_where'
5394 * trans-stmt.c (g95_trans_where): Modified.
5395 (g95_trans_where_2): New function.
5396 (g95_trans_where_assign): New function.
5397 (g95_evaluate_where_mask): New function.
5398 (g95_add_to_stmt_list): New function.
5399 (g95_get_temp_expr): New function.
5400 * trans.h (where_stmt_list): New structure.
5401
5402 2003-04-10 Paul Brook <paul@nowt.org>
5403
5404 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5405 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5406
5407 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5408
5409 Update after mainline -> tree-ssa-branch merge.
5410 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5411 call.
5412 (g95_init): Update for new lang_hooks definition.
5413 (g95_post_options): New langhook.
5414 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5415 * scanner.c (g95_new_file): Comment update.
5416
5417 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5418
5419 * g95.h, lang-options.h: Add -Wimplicit-interface.
5420 * options.c (g95_init_options, g95_parse_arg): Set it.
5421 * interface.c (check_intents): Warn about call with implicit
5422 interface.
5423 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5424 g95_procedure_use.
5425
5426 2003-04-05 Paul Brook <paul@nowt.org>
5427
5428 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5429 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5430
5431 2003-03-29 Paul Brook <paul@nowt.org>
5432
5433 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5434 (g95_resolve_unpack): Ditto.
5435 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5436 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5437 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5438
5439 2003-03-25 Paul Brook <paul@nowt.org>
5440
5441 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5442 * arith.h: Ditto.
5443 * array.c (g95_free_array_ref): Ditto.
5444 * g95.h: Ditto.
5445 * symbol.c (g95_use_derived_tree): Ditto.
5446 * intrinsic.c (add_functions): Use simplification for SCALE.
5447 * primary.c (g95_match_rvalue): Test sym, not symtree.
5448
5449 2003-03-25 Paul Brook <paul@nowt.org>
5450
5451 * trans-decl.c (build_function_decl): Add parameter before it gets
5452 turned into a constant.
5453 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5454 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5455 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5456
5457 2003-03-22 Paul Brook <paul@nowt.org>
5458
5459 * trans-array.c (g95_conv_array_initializer): Allow scalar
5460 expressions.
5461 * trans-decl.c (g95_finish_var_decl): Result variables are not
5462 module variables.
5463 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5464 (g95_conv_intrinsic_function): Use it.
5465 * trans-types.h (g95_type_spec): Remove dead declaration.
5466
5467 2003-03-21 Paul Brook <paul@nowt.org>
5468
5469 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5470
5471 2003-03-20 Paul Brook <paul@nowt.org>
5472
5473 * trans-decl.c (g95_build_function_decl): Put character length
5474 parameters at the end of the function declaration.
5475 * trans-expr.c (g95_conv_function_call): Ditto.
5476 * trans-types.c (g95_get_function_type): Ditto.
5477
5478 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5479
5480 * resolve.c (resolve_formal_arglist): Don't impose intent for
5481 procedure arguments of pure functions.
5482 (resolve_select): Remove redundant assignment.
5483
5484 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5485
5486 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5487 Remove option l1.
5488 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5489 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5490 const.
5491 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5492 Order list.
5493 * symbol.c (g95_add_type): Fix typo in comment.
5494
5495
5496 2003-03-16 Paul Brook <paul@nowt.org>
5497
5498 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5499 * expr.c (g95_build_call): Remove.
5500 * f95-lang.c (puchdecl_top_level): New function.
5501 * g95.h (g95_code): Store resolved symbol, not just the name.
5502 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5503 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5504 (g95_get_intrinsic_sub_symbol): New function.
5505 * iresolve.c (g95_resolve_cpu_time): Use it.
5506 (g95_resolve_random_number): Ditto.
5507 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5508 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5509 the correct DECL_CONTEXT. Add global symbold to the global scope.
5510 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5511 fixed.
5512
5513 2003-03-16 Paul Brook <paul@nowt.org>
5514
5515 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5516 * options.c (g95_parse_arg): Ditto.
5517 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5518 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5519 for the procedure, not the parameter.
5520 * trans-array.c (g95_trans_g77_array): New function.
5521 (g95_trans_assumed_size): Use it.
5522 (g95_trans_dummy_array_bias): Ditto.
5523 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5524 (g95_conv_expr_descriptor): ... to here. Update callers.
5525 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5526 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5527 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5528 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5529 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5530 (g95_sym_type): Ditto.
5531
5532 2003-03-15 Paul Brook <paul@nowt.org>
5533
5534 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5535 first chain.
5536 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5537
5538 2003-03-14 Paul Brook <paul@nowt.org>
5539
5540 * trans-array.c (g95_array_is_packed): Remove.
5541 (g95_conv_array_base): Correctly handle all descriptorless cases.
5542 (g95_conv_array_stride): Use descriptorless strides.
5543 (g95_trans_dummy_array_bias): Don't always repack the array.
5544 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5545 packed.
5546 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5547 dummy and non-dummy arrays...
5548 (g95_sym_type, g95_get_derived_type): ... like these.
5549 (g95_get_array_type_bounds): Allow discontiguous arrays.
5550
5551 2003-03-12 Paul Brook <paul@nowt.org>
5552
5553 * array.c (g95_resolve_array_spec): Fix comment.
5554 * g95.h (symbol_attributes): New flag always_explicit.
5555 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5556 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5557 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5558 (g95_trans_array_bounds): Allow assumed shape arrays.
5559 (g95_trans_repack_array): Remove.
5560 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5561 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5562 bounds for assumed size arrays.
5563 (g95_build_dummy_array_decl): Use descriptorless arrays.
5564 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5565 (g95_trans_pointer_assign): Fix typo.
5566 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5567 code.
5568 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5569 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5570 Also modify callers.
5571 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5572
5573 2003-03-08 Paul Brook <paul@nowt.org>
5574
5575 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5576 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5577 * resolve.c (compare_spec_to_ref): Allow full array sections.
5578
5579 2003-03-08 Paul Brook <paul@nowt.org>
5580
5581 * expr.c (g95_simplify_expr): Also simplify array index and
5582 substring expressions.
5583 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5584 * trans-array.c (g95_trans_array_bounds): New function.
5585 (g95_trans_auto_array_allocation): Use it.
5586 (g95_trans_assumed_size): Rewrite.
5587 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5588 (gfor_fndecl_repack): Remove.
5589 (g95_build_qualified_array): Handle absent upper bounds.
5590 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5591 (g95_get_symbol_decl): Update.
5592 (g95_build_intrinsic_function_decls): Initialize new decls.
5593 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5594 (gfor_fndecl_repack): Remove.
5595 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5596 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5597 (g95_get_nodesc_array_type): Handle absent bounds.
5598 * trans-types.h (g95_get_nodesc_array_type): Declare.
5599
5600 2003-03-04 Paul Brook <paul@nowt.org>
5601
5602 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5603 builtin-types.def.
5604
5605 2003-03-02 Paul Brook <paul@nowt.org>
5606
5607 * options.c (g95_init_options): Drfault to 1.
5608 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5609 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5610 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5611 Handle non-constant size automatic arrays.
5612 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5613 generic bound functions.
5614 (g95_trans_auto_array_allocation): Don't create a descriptor.
5615 (g95_trans_assumed_size): New function (broken).
5616 (g95_trans_dummy_array_bias): Remove unused var.
5617 * trans-array.h (g95_trans_assumed_size): Declare.
5618 * trans-decl.c (create_index_var): New fuction.
5619 (g95_build_qualified_array): New function.
5620 (g95_get_symbol_decl): Use it.
5621 (g95_trans_deferred_vars): Handle assumed shape seperately.
5622 * trans-types.c (get_element_type): Handle heap allocated arrays.
5623 (g95_is_nodesc_array): Include non-const size arrays.
5624 (g95_get_nodesc_array_type): Ditto.
5625
5626 2003-02-23 Paul Brook <paul@nowt.org>
5627
5628 * trans-array.c (g95_array_init_size): Should use stride, not size of
5629 last dimension.
5630
5631 2003-02-18 Paul Brook <paul@nowt.org>
5632
5633 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5634 after intrinsic function check.
5635
5636 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5637
5638 * io.c (match_io): Fix missing return value and remove useless
5639 assignment.
5640 * match.c (g95_match): Remove useless assignment.
5641 * module.c (parse_string): Remove useless post increment.
5642 * simplify.c (g95_simplify_verify): Remove useless assignment.
5643
5644 2003-02-15 Paul Brook <paul@nowt.org>
5645
5646 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5647 * g95.h (symbol_attribute): Add referenced member.
5648 (g95_symbol): Add dummy_order member.
5649 (g95_set_sym_referenced): Declare.
5650 * match.c (g95_match_assignment, g95_match_call): Use it
5651 * primary.c (match_actual_arg, g95_match_rvalue,
5652 g95_match_variable): Ditto.
5653 * symbol.c (next_dummy_order): New variable.
5654 (g95_set_sym_referenced): New function.
5655 (check_done): New function.
5656 (g95_add_*): Use it.
5657 * trans-decl.c: Make formatting conform to GCC standards.
5658 (g95_defer_symbol_init): Add dummy variables in the right order.
5659 (g95_get_symbol_decl): Only accept referenced variables.
5660 (g95_create_module_variable): Module variables are always required.
5661 (generatr_local_decls): New function.
5662 (generate_local_vars): New function.
5663 (g95_generate_function_code): Use it.
5664
5665 2003-02-13 Paul Brook <paul@nowt.org>
5666
5667 * trans-decl.c (g95_conv_struct_cons): Remove.
5668 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5669 * trans-expr.c (g95_conv_structure): New function.
5670 (g95_conv_expr): Use it.
5671
5672 2003-02-09 Paul Brook <paul@nowt.org>
5673
5674 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5675 expressions multiple times.
5676 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5677
5678 2003-02-08 Paul Brook <paul@nowt.org>
5679
5680 * module.c (mio_symtree_ref): Declare as static.
5681 (mio_expr): Remove dead code.
5682 (read_module): Set the symtree link for fixups.
5683 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5684 (build_round_expr): ... to this.
5685 (g95_conv_intrinsic_aint): New function.
5686 (g95_conv_intrinsic_function): Use it.
5687
5688 2003-02-08 Paul Brook <paul@nowt.org>
5689
5690 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5691 offset after modificaton, not the increment expression.
5692 * dependency.c: Kill excess whitespace.
5693
5694 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5695
5696 * dependency.h: Remove some function declarations.
5697 * dependency.c (get_no_of_elements): Change this function not to
5698 return int.
5699 * other: Add comments for all modified functions.
5700
5701 2003-02-06 Paul Brook <paul@nowt.org>
5702
5703 * g95spec.c (lang_specific_functions): Fix initializer warning.
5704 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5705 for structure type names.
5706 * trans-decl.c (g95_cons_structure_cons): New function.
5707 (g95_get_symbol_decl): Use it.
5708 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5709 referencing code.
5710
5711 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5712
5713 * resolve.c (compare_cases): Add const to casts.
5714
5715 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5716
5717 * g95.h (g95_check_f): Change a1 to f1m.
5718 * intrinsic.c (add_sym_1m, check_specific,
5719 g95_intrinsic_func_interface): Use it.
5720
5721 * module.c (init_pi_tree): Remove useless cast.
5722 (fp2): Fix argument type.
5723
5724 * parse.c (parse_select_block): Add comment.
5725
5726 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5727
5728 * lang-options.h: Fix warning involving C90 concatenated
5729 strings.
5730
5731 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5732 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5733
5734 * io.c (format_asterisk): Complete initializer to kill warning.
5735 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5736 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5737 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5738 new defines to complete initializers. Kills all warnings.
5739
5740 * Make-lang.in: Comment cleanup.
5741
5742 2003-02-05 Paul Brook <paul@nowt.org>
5743
5744 * array.c (g95_free_constructor): Handle NULL expressions.
5745 * resolve.c (resolve_structure_cons): Ditto.
5746 * decl.c (g95_match_null): New Function.
5747 (variable_decl): Use it.
5748 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5749 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5750 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5751
5752 2003-02-05 Paul Brook <paul@nowt.org>
5753
5754 * trans.h (build1_v): New macro.
5755 (build_v): Remove pointless and incorrect prototype.
5756 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5757 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5758
5759 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5760
5761 * Make-lang.in (F95_OBJS): Remove one more dead file.
5762
5763 2003-02-01 Paul Brook <paul@nowt.org>
5764
5765 * lang-specs.h: Don't pass -ffixed-form to the linker.
5766 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5767
5768 2003-02-01 Paul Brook <paul@nowt.org>
5769
5770 * Make-lang.in (F95_OBJS): Remove dead files.
5771 * trans-array.c (g95_array_init_size): Do the right thing when
5772 ubound=NULL.
5773 * trans-decl.c (g95_generate_function_code): Initialize deffered
5774 symbol list before translating contained subroutines.
5775 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5776 scalar invariant values here...
5777 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5778 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5779
5780 2003-01-29 Paul Brook <paul@nowt.org>
5781
5782 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
5783 (g95_walk_elemental_function_args): Reverse chains before adding.
5784 (g95_reverse_ss): Move about a bit.
5785 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
5786 function arguments.
5787
5788 2003-01-28 Paul Brook <paul@nowt.org>
5789
5790 * intrinsic.c (resolve_intrinsic): Use correct union member.
5791 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
5792 parameters.
5793 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
5794 use associated variables.
5795 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
5796 * trans-expr.c (g95_conv_expr_present): ... to here.
5797 * trans.h: Declare it.
5798 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
5799
5800 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5801
5802 * array.c (expand_iterator): Suppress useless assignment.
5803 * decl.c (match_char_spec): Ditto.
5804 * io.c (match_io_iterator): Ditto.
5805 * primary.c (match_real_constant): Ditto.
5806 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
5807 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
5808 * matchexp.c (match_add_operand, match_level_5): Likewise.
5809 * module.c (parse_atom, find_enum): Likewise.
5810 * resolve.c: move #include <string.h>
5811 (resolve_select): Fix serious typo.
5812
5813 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
5814
5815 * Make-lang.in: Don't build with broken tree-ssa-pre.
5816
5817 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
5818
5819 * resolve.c (resolve_index): Add a TODO.
5820 * symbol.c: Remove useless "#include <ctype.h>".
5821
5822 2003-01-27 Paul Brook <paul@nowt.org>
5823
5824 * check.c (check_rest): Allow different type kinds as an extension.
5825 * g95.h (g95_resolve_f): Add f1m.
5826 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
5827 * intrinsic.h: Chenge prototypes for MIN and MAX.
5828 * iresolve.c (g95_resolve_minmax): New function.
5829 (g95_resolve_min, g95_resolve_max): Use it.
5830 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
5831 arguments once.
5832 (g95_conv_intrinsic_present): Fix logic.
5833
5834 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
5835
5836 * g95.h (g95_case): Don't be a tree, be a double linked list.
5837 * match.c (match_case_selector): Remove redundant semantics check.
5838 Clean up a few goto's to make it a tiny little bit faster.
5839 * resolve.c (case_tree): Die.
5840 (compare_cases): Accept and compare unbounded cases too.
5841 (check_case_overlap): Don't build a tree. Instead, merge-sort the
5842 whole list of g95_cases passed from resolve_select.
5843 (sane_logical_select): Die.
5844 (check_case_expr): Return FAILURE if a CASE label is of the wrong
5845 type kind.
5846 (resolve_select): Fixup case expression for computed GOTOs, put it
5847 in expr, not expr2, for easier handing in the parse tree dumper and
5848 the code generator. Rewrite the rest of the function: Kill
5849 unreachable case labels and unreachable case blocks.
5850 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
5851 an EXEC_SELECT, not case2 anymore.
5852 * trans-const.c (g95_conv_constant_to_tree): New function.
5853 (g95_conv_constant): Use it.
5854 * trans-const.h: Declare prototype for the new function.
5855 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
5856 g95_trans_character_select): New static functions.
5857 (g95_trans_select): Rewrite.
5858
5859 2003-01-26 Paul Brook <paul@nowt.org>
5860
5861 * intrinsic.c (add_fnctions): Properly add dreal.
5862 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
5863 (g95_conv_intrinsic_function): Use it.
5864 * trans-io.c (build_dt): Abort on internal files (unimplemented).
5865
5866 2003-01-26 Paul Brook <paul@nowt.org>
5867
5868 Widespread changes to the handling of symbols in expressions. These
5869 are now linked via g95_symtree nodes.
5870 * parse.c (g95_fixup_sibling symbols): New function.
5871 (parse_contained): Use it.
5872 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
5873 contained procedure that has bee correctly fixed up.
5874 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5875
5876 2003-01-24 Paul Brook <paul@nowt.org>
5877
5878 * trans-array.c (g95_walk_expr): Function result attributes are in
5879 sym->result.
5880 * trans-expr.c (g95_conv_function_call,
5881 g95_trans_arrayfunc_assign): Ditto.
5882 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5883
5884 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
5885
5886 * expr.c (check_restricted): Fix error message.
5887 * symbol.c (free_st_labels): Plug memleak.
5888
5889 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5890
5891 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5892 reduce_binary_aa, reduce_binary, eval_intrinsic,
5893 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5894 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5895 for typesafe intrinsics helper functions.
5896 (g95_intrinsic_sym): Use them.
5897 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5898 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5899 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5900 check_specific, g95_intrinsic_func_interface,
5901 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5902 helper functions.
5903 * trans-decl.c (g95_get_extern_function_decl): Likewise.
5904 * Make-lang.in: Don't disable warnings for strict prototypes
5905 any longer, everything is typesafe now.
5906
5907 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
5908
5909 * bbt.c (duplicate_node): Make static.
5910 * module.c (module_name): Make static.
5911 * scanner.c (include_dirs): Make static.
5912
5913 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5914
5915 Hard coded _gfor_'s should not show up anymore.
5916 * g95.h (PREFIX): New macro.
5917 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5918 hard-coded "_gfor".
5919 (g95_resolve_random_number): Likewise.
5920 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5921 * trans-io.c: Remove 'prefix' macro. Replace all uses with
5922 the new PREFIX macro from g95.h.
5923
5924 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5925
5926 The troubles of forking... Andy implemented this just now too.
5927 Let's stick to that and keep the trees close.
5928 * g95.h (g95_st_label): 'format' member is now a g95_expr.
5929 * io.c: Revert previous changes.
5930 (g95_match_format): Match the format string as a character
5931 literal expression.
5932 * match.h (g95_statement_label): Declare external.
5933 * parse.c: Revert previous changes.
5934 * symbol.c (g95_free_st_label): Free a g95_expr instead
5935 if a 'char *'.
5936 * trans-io.c: Revert previous changes.
5937 (build_dt): Use set_string to set the format string.
5938
5939 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5940
5941 * io.c (format_string): Make non-static.
5942 (g95_match_format): Remember the format string.
5943 (terminate_io): Add I/O termination for empty I/O lists.
5944 * match.h: Declare external format_string.
5945 * parse.c (check_statement_label): Attack the format string
5946 to a format label for FORMAT statements.
5947 * trans-io.c (g95_add_field): Define prefix macro. Replace
5948 all uses of PREFIX define with a use of this macro.
5949 (build_dt): Implement formatted I/O for format labels.
5950
5951 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
5952
5953 * lang-options.h: Kill "-std=F".
5954 * options.c: Remove unimplemented "-std=F". Modify
5955 web address.
5956 * misc.c (g95_terminal_width): New function.
5957 * error.c (g95_error_init_1): Use g95_terminal_width.
5958 * g95.h: Add prototype for g95_terminal_width, remove
5959 fmode flag.
5960
5961 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
5962
5963 * Make-lang.in: Fix typo.
5964
5965 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5966
5967 * g95.h (struct g95_case): Remove unused cruft, new member
5968 'where' to keep track of the locus of the default case.
5969 * match.c (g95_match_case): Add locus to the current case.
5970 (match_case_selector): Likewise.
5971 * parse.c (parse_select_block): Move semantics check for
5972 multiple DEFAULT cases out of here to...
5973 * resolve.c (check_case_overlap): ...here. Return sooner
5974 when possible.
5975 (check_case_expr): Take two g95_cases now, use to sure the
5976 expression kinds are the same.
5977 (resolve_select): Cleanup.
5978
5979 2003-01-18 Paul Brook <paul@nowt.org>
5980
5981 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5982 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5983 variables.
5984 (g95_get_extern_function_decl): Put decls in the correct context.
5985
5986 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
5987
5988 * trans-io.c: Port changes from Andy to set ERR flag.
5989
5990 2003-01-17 Paul Brook <paul@nowt.org>
5991
5992 * trans-array.c: Add various comments.
5993 (g95_ss_terminator): Declare as const.
5994 (g95_walk_expr): Remove first parameter and update all callers.
5995 (g95_walk_op_expr): Initialize scalar SS properly.
5996 * trans-array.h (g95_walk_expr): Update prototype.
5997 * trans-expr.c: Update for new g95_walk_expr.
5998 * trans-intrinsic.c: Ditto.
5999 * trans-io.c: Ditto.
6000 * trans.h: Various comments for SS chains.
6001
6002 2003-01-17 Paul Brook <paul@nowt.org>
6003
6004 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6005 and RRSPACING.
6006 * intrinsic.c (add_functions): Use them.
6007 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6008 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6009
6010 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6011
6012 Fallout of a small merge conflict:
6013 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6014
6015 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6016
6017 * initrinsic.c: New add_sym_* functions for strong typing.
6018 (add_conv): Make prototype strict.
6019 * dump-parse-tree.c, dependency.c: Include config.h
6020 * resolve.c, trans-io.c: Fix typos.
6021
6022 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6023
6024 * dump-parse-tree.c (g95_show_code_node): Show the
6025 condition for a computed GOTO that was transformed
6026 to a SELECT CASE construct.
6027 * resolve.c (check_case_overlap): Revert previous switch
6028 to treaps, it was too slow and didn't catch all trouble.
6029 (resolve_symbol): Be more flexible about module procedures.
6030 * symbol.c (check_conflict): Point to relevant section in
6031 the standard for dubious conflict. Allow procedure
6032 dummy arguments to be optional again.
6033 * trans-io (add_field): Rename to g95_add_field. Change
6034 all callers.
6035 * trans-stmt (trans_select): Handle unbounded cases for
6036 integer SELECT CASE constructs. Fix/add more comment.
6037
6038 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6039
6040 * g95.h: Uses GCC's function attribute macros.
6041 * error.c, module.c, parse.c, g95.h: More function attributes.
6042
6043 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6044 Forgot a file...
6045 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6046 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6047 DECL_SOURCE_FILE.
6048
6049 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6050
6051 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6052 DECL_SOURCE_LINE.
6053 * trans.c (g95_trans_code): Use annotate_all_with_file_line
6054 instead of nowdead wrap_all_with_wfl.
6055
6056 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6057
6058 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6059 before generating code, so we can still see it even if the code
6060 generation phase dies.
6061
6062 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6063
6064 * decl.c (build_sym): Split out initialization expression parts...
6065 (add_init_expr_to_sym): ...to here.
6066 (variable_decl): Add the symbol following an attribute list to the
6067 symbol tree before parsing the optional initialization expression
6068 if the symbol is not of a derived type.
6069 * primary.c (g95_match_rvalue): Don't assume a symbol always has
6070 a value if it is a PARAMETER.
6071
6072 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6073
6074 * misc.c: Don't #include <mcheck.h>
6075 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
6076 ever was a glibc bug, then either this was never reported to
6077 glibc people, or it has been fixed for so long that there's
6078 no information you can find about it, anywhere.
6079
6080 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6081
6082 Fix warnings:
6083 * module.c (attr_bits, bt_types, array_spec_types):
6084 Switch 'const' and 'static'.
6085 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6086
6087 GNU'ify source code:
6088 * trans-io.c: Numerous fixes, one fixed warning and a few
6089 TODO markers so that we don't forget about them.
6090
6091 2003-01-13 Paul Brook <paul@nowt.org>
6092
6093 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6094 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6095 Add G95_ISYM_SCALE.
6096 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6097 * match.c (g95_match_stop): Fix dumb == -> != error.
6098
6099 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6100
6101 * dump-parse-tree.c (show_indent): Add line breaks. This
6102 whole dumping process needs cleanups.
6103 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6104 the langhook. Fix 'return's accordingly.
6105 * g95-support.h: Adjust prototype.
6106 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6107 * lang-options.h: Add '-fsyntax-only'.
6108 * options.c (g95_init_options): Init 'no_backend'.
6109 (g95_parse_arg): Deal with '-fsyntax-only'.
6110 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6111 is set.
6112
6113 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6114 Patch from Arnaud
6115 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6116 arguments. Also make sure that if a symbol is marked INTRINSIC,
6117 an intrinsic with the symbol's name actually exists.
6118 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6119 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6120 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6121
6122 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6123
6124 * resolve.c (resolve_contained_functions): Fix condition, don't
6125 throw internal_error if a child namespace has no name. Apparently
6126 this can be the case?
6127
6128 2003-01-11 Paul Brook <paul@nowt.org>
6129
6130 Port changes from Andy's tree:
6131 * g95.h (g95_code): Add stop_code.
6132 * match.c (g95_match_stop): Detter syntax checking.
6133 * resolve.c (resolve_generic_f0): Return match type.
6134 (resolve_generic_f): Remove dead/duplicated code.
6135 (resolve_specific_f): Ditto.
6136 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6137 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6138 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6139
6140 2003-01-11 Paul Brook <paul@nowt.org>
6141
6142 * trans-array.c: Various documentation/comment changes.
6143 * trans-stmt.c: Ditto.
6144
6145
6146 2003-01-10 Paul Brook <paul@nowt.org>
6147
6148 * options.c/h: Add -fdump-parse-tree as alias of -v.
6149
6150 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6151
6152 * dump-parse-tree.c (g95_show_namespace): Fixed another
6153 typo. Sorry, it's Friday...
6154
6155 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6156
6157 Spotted by Tobi:
6158 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6159 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6160 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6161 trans-types.c: Fix bogus copyright years, add 2003.
6162 * trans-types.h: Give copyright header.
6163
6164 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6165
6166 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6167 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6168 * intrinsic.c: Some constant strings moved to read-only memory.
6169 * io.c (format_asterisk): Move to...
6170 * g95.h: ...here.
6171
6172 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6173
6174 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6175 types for ranges instead of per-letter. Indent the
6176 'CONTAINS' just like everything else.
6177 * resolve.c (resolve_contained_functions): Clarify comment.
6178 Explain non-obvious conditional expression. Improve
6179 diagnostics if tyoe cannot be resolved.
6180 Port semi-fix from Andy's tree:
6181 (was_declared): Move up before first use.
6182 (generic_sym, specific_sym): New functions. Code moved
6183 out if procedure_kind.
6184 (procedure_kind): Simplify using new functions.
6185 (resolve_generic_f): Make sure the functions we find in
6186 a parent namespace is generic.
6187 (resolve_specific_f): Ditto for specific functions.
6188
6189 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6190
6191 * trans-stmt.c, trans.c: Fix some code style issues. Add
6192 some more comment (but still not enough!).
6193
6194 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6195
6196 * symbol.c (flavors, procedures, intents, acces_types,
6197 access_types, ifsrc_types): Make const.
6198 * misc.c (g95_string2code): Make 'm' param 'const'.
6199 * module.c (find_enum, write_atom, mio_name): Make
6200 'm' param 'const'.
6201 (attr_bits, bt_types, array_spec_types, array_ref_types,
6202 ref_types, expr_types): Make const.
6203 * g95.h: Adjust external decls.
6204
6205 2003-01-09 Paul Brook <paul@nowt.org>
6206
6207 * Testsuite: Add a load of new cases.
6208
6209 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6210
6211 * Make-file.in: Add dependency on back end header files;
6212 a parallel build should work now.
6213 * f95-lang-c (lang_identifier): Remove bogus comment.
6214 (g95_be_parse_file): Fix prototype.
6215 (g95_init): Make static.
6216 (g95_finish): Make static.
6217 * error.c (g95_syntax_error): Kill. Make define in...
6218 * g95.h (g95_syntax_error): Define.
6219 (g95.options): Make 'source' member 'const'.
6220 * interface.c (g95_match_interface): Explain
6221 hard-to-read condition.
6222 (g95_match_end_interface): Ditto.
6223 * trans_const.c (g95_build_string_const): Make 's' parameter
6224 'const'.
6225 * trans_const.h: Adjust protoype accordingly.
6226 * trans-decl.c: Include tree-dump.h
6227 (g95_generate_function_code): Build fixes for recent changes
6228 in the tree-ssa branch.
6229
6230 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6231
6232 * format.c: Kill, move code from here...
6233 * io.c: ...to here.
6234 * Make-lang.in: Adjust.
6235 * MANIFEST: Ditto.
6236 * match.h: Ditto.
6237 * BUGS: Mention where to submit bugs. Move old content...
6238 * TODO: ...to here. New file.
6239
6240 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6241 Fix most warnings, and suppress the ones we can't fix for now.
6242 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6243 these warnings just clutter the screen and there's not much
6244 we can do about them for now anyway.
6245 * check.c, iresolve.c: Mark unused function parameters.
6246 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6247 they should be resolved before they get here.
6248 * error.c: Remove unused FILE *status_out.
6249 * f95-lang.c (g95_init): Remove bogus cast.
6250 * Many files: Make things 'const' where required.
6251 * g95.h: Fix prototypes for all modified functions above.
6252 (g95_options): Remove 'object' member.
6253
6254 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6255
6256 * Make-file.in: Cleanup bogus targets. Add more comment.
6257 * lang-options.h: New option '-w'.
6258 * g95.h: add no_options field to struct g95_options.
6259 * options.c (g95_init_options): Default no_warnings to off.
6260 (g95_parse_arg): Recognise the '-w' switch and its alias,
6261 '-fno-warnings'.
6262 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6263 no_warning option is set.
6264 * iresolve.c (g95_resolve_shape): Fix warning.
6265
6266 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6267
6268 * primary.c (g95_next_string_char): Rename next_string_char, and
6269 make static. Adjust callers accordingly.
6270 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6271 callers accordingly.
6272 * g95.h: Split out all g95_match* functions to...
6273 * match.h: ...here. New file.
6274 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6275 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6276
6277 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6278
6279 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6280 g95_merge_new_implicit): New functions.
6281 (g95_match_implicit_none, g95_match_implicit): Move from here...
6282 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6283 Modify to use the new functions in symbol.c.
6284 * g95.h: Add and move prototypes.
6285
6286 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6287
6288 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6289 node compare function.
6290 (g95_insert_bbt): Likewise.
6291 (g95_insert_bbt_with_overlap): Likewise.
6292 (g95_delete_bbt): Likewise.
6293 (delete_treap): Likewise. Also fix a potential bug when calling it.
6294 * module.c (compare_pointers): Change proto to compare_fn.
6295 (compare_integers): Likewise.
6296 (compare_true_names): Likewise.
6297 (find_true_name): Adjust call to compare_true_names to match proto.
6298 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6299 (init_pi_tree): Make compare a compare_fn instead of (int *).
6300 * resolve.c (compare_cases): Change proto to compare_fn.
6301 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6302 it static, and rename to compare_symtree.
6303 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6304 function.
6305 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6306 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6307
6308 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6309 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6310 * patch.options: Blow away Paul's checkin mistake :-)
6311 * io.c (terminate_io): Fix memory leak (Arnaud).
6312
6313 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6314
6315 * Make-lang.in: Teach about building DVI, info manual.
6316 * g95.texi: New file.
6317
6318 2003-01-02 Paul Brook <paul@nowt.org>
6319
6320 * trans-array.c (g95_reverse_ss): Make static and don't use.
6321 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6322 (g95_conv_array_parameters): Modify for pointer assignments.
6323 (g95_walk_subexpr): New function.
6324 (g95_walk_expr*): Use it.
6325 * trans-array.h (g95_reverse_ss): Remove prototype.
6326 * trans-expr.c (g95_trans_pointer_assign): Implement.
6327 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6328 * trans-intrinsic.c: Sync with scalarizer changes.
6329 * trans-io.c: Ditto.
6330
6331 2002-12-29 Paul Brook <paul@nowt.org>
6332
6333 * trans-array.c: Document calling convention for arrays.
6334
6335 2002-12-19 Paul Brook <paul@nowt.org>
6336
6337 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6338 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6339 optional parameters for some intrinsics.
6340 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6341 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6342 optional parameters.
6343 * trans.h (g95_se): Add ignore_optional flag.
6344
6345 2002-12-15 Paul Brook <paul@nowt.org>
6346
6347 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6348 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6349
6350 2002-12-14 Paul Brook <paul@nowt.org>
6351
6352 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6353
6354 2002-12-12 Paul Brook <paul@nowt.org>
6355
6356 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6357 initialize the scalarizer.
6358 (various): Update to new format of g95_expr->value.constructor.
6359
6360 2002-12-08 Paul Brook <paul@nowt.org>
6361
6362 * trans-array.c (g95_put_offset_into_var): New function.
6363 (g95_trans_array_constructor_subarray): New function.
6364 (g95_trans_array_constructor_value): Use it.
6365 (g95_array_cons_size): Don't abort() on array components.
6366
6367 2002-12-08 Paul Brook <paul@nowt.org>
6368
6369 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6370 * support.c: Update #includes.
6371 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6372 * trans-array.c: Update #includes.
6373 * trans.c: Ditto.
6374 * trans-const.c: Ditto.
6375 * trans-io.c: Ditto.
6376 * trans-types.c: Ditto.
6377 (g95_init_types): Set size_type_node.
6378 * trans-decl.c: Update #includes.
6379 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6380 * trans-stmt.c: Update #includes.
6381 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6382 (g95_trans_select): Fix check for unbounded ranges.
6383 * trans-expr.c: Update #includes.
6384 (g95_conv_string_tmp): New function.
6385 (g95_conv_concat_op): Use it.
6386 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6387 * Trans-intrisic.c: Update #includes.
6388 (g95_conv_intrinsic_strcmp): New function.
6389 (g95_conv_intrinsic_adjust): Ditto.
6390 (g95_conv_intrinsic_function: Use them.
6391
6392 2002-11-30 Paul Brook <paul@nowt.org>
6393
6394 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6395 reference.
6396 * trans-dec.c (g95_build_function_decl): Handle character return
6397 parammeters.
6398 (g95_get_fake_result_decl): Ditto.
6399 (g95_trans_deferred_vars): Ditto.
6400 * trans-expr.c (g95_conv_function_call): Ditto.
6401 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6402 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6403 (g95_conv_intrinsic_function): Use it.
6404 * trans-types.c (g95_sym_type): Handle functions returning strings.
6405 (g95_return_by_reference): Ditto.
6406 (g95_get_function_type): Ditto.
6407
6408 2002-11-18 Paul Brook <paul@nowt.org>
6409
6410 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6411 requires a temporary.
6412 (g95_trans_select): Handle computed gotos.
6413 * trans-types.c (g95_build_array_type): Warn about non-functional
6414 assumed shape arrays.
6415 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6416 blocks.
6417 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6418 (g95_conv_intrinsic_int): New function.
6419 (g95_conv_intrinsic_mod): New function.
6420 (g95_conv_intrinsic_ichar): New function.
6421 (g95_conv_intrinsic_function): Use them.
6422 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6423
6424 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6425
6426 * trans-types.c (g95_build_array_type): Assumed
6427 sized arrays can have rank > 1.
6428 * trans.c (g95_trans_code): Remove erroneous
6429 warning about CONTINUE.
6430 * trans-expr.c (g95_conv_variable): Remove
6431 erroneous assert.
6432
6433 2002-11-15 Paul Brook <paul@nowt.org>
6434
6435 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6436
6437 2002-10-31 Paul Brook <paul@nowt.org>
6438
6439 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6440 * trans-expr.c (g95_conv_component_ref): Handle character string
6441 components.
6442 (g95_conv_string_parameter): Ditto.
6443 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6444 string components.
6445
6446 2002-10-10 Paul Brook <paul@nowt.org>
6447
6448 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6449 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6450 check.
6451 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6452 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6453 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6454 * trans-types.c (pvoid_type_node): Declare and initialize.
6455 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6456 (g95_array_allocate): Fix when base==data.
6457 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6458 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6459
6460 2002-10-09 Paul Brook <paul@nowt.org>
6461
6462 * (g95_conv_expr_reference): Handle character strings correctly.
6463
6464 2002-10-07 Paul Brook <paul@nowt.org>
6465
6466 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6467 langhook.
6468 * trans-array.c (g95_build_array_initializer): Remove.
6469 (g95_conv_array_initializer): New Function.
6470 (g95_trans_auto_arry_allocation): Cleanup.
6471 (g95_trans_init_character_array): Remove.
6472 * g95spec.c: Link in libgforbegin.
6473 * trans.c (g95_generate_code): Rename main function to MAIN__.
6474 (g95_create_var): New function.
6475 (g95_create_var_np): New function.
6476 (g95_evaluate_now): New function.
6477 (g95_start_block): New function.
6478 (g95_finish_block): New function.
6479 (g95_add_expr_to_block): New function.
6480 (g95_add_block_to_block): New function.
6481 * trans-expr.c (g95_conv_componen_ref): New function.
6482 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6483 (F95_OBJS): Add dependency.o.
6484 * f95-lang.c (g95_is_simple_stmt): Remove.
6485 * f95-tree.c (mark_not_simple): New function.
6486 (unshare_all_trees): New function.
6487 (create_tmp_var, create_tmp_alias_var): Remove.
6488 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6489 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6490 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6491
6492 2002-10-01 Paul Brook <paul@nowt.org>
6493
6494 * trans-array.c: Add support for descriptorless arrays.
6495 (g95_conv_array_data): New function.
6496 (g95_conv_array_base): New function.
6497 * trans-array.h: Declare these here.
6498 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6499 initialization and creation here.
6500 (g95_create_module_vars): Instead of here.
6501 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6502 * trans-intrinsic.c: Ditto.
6503 * trans-types.c (g95_is_nodesc_array): New function.
6504 (g95_get_nodesc_array_type): New function.
6505 (g95_sym_type, g95_get_derived_type): Use them.
6506 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6507
6508 2002-09-28 Paul Brook <paul@nowt.org>
6509
6510 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6511 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6512 parameters.
6513
6514 2002-09-24 Paul Brook <paul@nowt.org>
6515
6516 * f95-lang.c (listify): Remove declaration.
6517 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6518 (listify)
6519 * f95-tree.c (get_name): New function.
6520 * trans.c (module_namespace): Remove.
6521 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6522 * trans-types.c: Ditto.
6523
6524 2002-09-19 Paul Brook <paul@nowt.org>
6525
6526 * trans-array.c (g95_get_array_cons_size): New Function.
6527 (g95_con_ss_startstride): Handle Array constructors.
6528 (g95_conv_loop_setup): Ditto.
6529 (g95_conv_array_parameter): Ditto.
6530 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6531 static.
6532
6533 2002-09-19 Paul Brook <paul@nowt.org>
6534
6535 * trans.c (g95_simple_fold_tmp): Detect variables inside
6536 NON_LVALUE_EXPR.
6537 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6538
6539 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6540
6541 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6542
6543 2002-09-14 Paul Brook <paul@nowt.org>
6544
6545 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6546 * trans-const.c (g95_conv_string_init): New Function.
6547 * trans-const.h: Declare it.
6548 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6549 variables. Don't bail on intrinsic symbols.
6550 (get_extern_function_decl): Handle specific intrinsic functions.
6551 * trans-types.c (g95_sym_type): Dummy functions don't return
6552 reference types.
6553 * trans-array.c (g95_build_array_initializer): New Function.
6554 (g95_trans_auto_array_allocation): Build initializer for static decls.
6555 Don't use mpz_addmul, it's GMP4 only.
6556
6557 2002-09-12 Paul Brook <paul@nowt.org>
6558
6559 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6560 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6561 assembler names for module procedures.
6562
6563 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6564
6565 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6566 dependency/
6567
6568 2002-09-10 Paul Brook <paul@nowt.org>
6569
6570 * trans-array.c: Change format of G95_SS_TEMP strictures.
6571 (g95_check_fncall_dependancy): New function.
6572 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6573 offsets.
6574 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6575 result variables.
6576 (g95_build_function_decl): Don't assume result arrays are packed.
6577 (g95_trans-deferred-vars): Handle array result variables.
6578 (g95_generate_fuction_code): Clear saved_function_decls.
6579 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6580 reference.
6581 (g95_trans_arrayfunc_assign): New function.
6582 (g95_trans_assignment): Use it.
6583 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6584 (g95_se): Add direct_byref.
6585 * trans-types.c: Use sym->result rather than sym where appropriate.
6586 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6587 Update other functions to use this.
6588 (g95_is_intrinsic_libcall): New function.
6589 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6590 (g95_walk_intrinsic_function): Ditto.
6591
6592 2002-09-08 Paul Brook <paul@nowt.org>
6593
6594 * trans-types.c: Change rank field to dtype field in array descriptor.
6595 * trans-array.c: Implement filling of dtype array descriptor field.
6596 * trans-intrinsic.c: Fix broken LEN intrinsic.
6597
6598 2002-09-07 Paul Brook <paul@nowt.org>
6599
6600 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6601 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6602 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6603
6604 2002-09-06 Paul Brook <paul@nowt.org>
6605
6606 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6607 (gt-f95-trans-types.h): Add dependancy information.
6608 * config-lang.in (gtfiles): Add trans-types.c
6609 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6610 back to top-level code.
6611 * trans-array.c, trans-types.c: Change format of array descriptor.
6612 (g95_conv_descriptor_dimension): New function.
6613 * trans-types.h (g95_conv_descriptor_rank): define.
6614 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6615 intrinsics.
6616
6617 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6618
6619 * trans-array.c, trans-types.c: Add rank information to descriptor.
6620
6621 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6622
6623 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6624
6625 2002-09-04 Paul Brook <paul@nowt.org>
6626
6627 * f95-lang.c (g95_create_decls): New function.
6628 (g95_init): Move initialization of external decls to above, and call
6629 from g95_be_parse_file.
6630 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6631 * trans-types.c (g95_init_types): Always name integer and char types.
6632 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6633
6634 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6635
6636 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6637
6638 2002-09-02 Paul Brook <paul@nowt.org>
6639
6640 * g95_generate_code: Clear the attr for __fortran_main.
6641 * trans-types.c (g95_finish_type): New function.
6642 * g95_init_io_state_type: Use g95_finish_type.
6643 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6644
6645 2002-09-01 Paul Brook <paul@nowt.org>
6646
6647 * README.backend: Warn about the dangers of extra config.h files.
6648 Remove obsolete libgfor stuff.
6649 * config-lang.in: Add target-libgfor dependancy.
6650 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6651
6652 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6653
6654 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6655 not by buff.
6656
6657 2002-08-30 Paul Brook <paul@nowt.org>
6658
6659 * trans-intrinsic.c (g95_conv_intrinsic_function,
6660 g95_walk_intrinsic_function): Added ANY and ALL.
6661 (g95_conv_intrinsic_anyall): New function.
6662 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
6663 mangled name
This page took 4.308024 seconds and 6 git commands to generate.