]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
re PR libfortran/15280 (Fortran9x commandline not accessable)
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2 Paul Brook <paul@codesourcery.com>
3
4 PR fortran/15280
5 PR fortran/15665
6 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
7 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
8 * intrinsic.c (add_functions): Identify iargc. Add
9 command_argument_count.
10 (add_subroutines): Resolve getarg. Add get_command and
11 get_command_argument.
12 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
13 gfc_resolve_get_command_argument): Add prototypes.
14 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
15 gfc_resolve_get_command_argument): New functions.
16 * trans-decl.c (gfor_fndecl_iargc): New variable.
17 (gfc_build_intrinsic_function_decls): Set it.
18 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
19 (gfc_conv_intrinsic_function): Use it.
20 * trans.h (gfor_fndecl_iargc): Declare.
21
22 2004-07-04 Matthias Klose <doko@debian.org>
23
24 * Make-lang.in: Generate and install gfortran man page.
25 * invoke.texi: Remove extra '@c man end'.
26
27 2004-07-04 Richard Henderson <rth@redhat.com>
28
29 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
30
31 2004-07-04 Paul Brook <paul@codesourcery.com>
32
33 * decl.c (gfc_match_implicit_range): Don't use typespec.
34 (gfc_match_implicit): Handle character selectors.
35 * gfortran.h (gfc_set_implicit): Remove prototype.
36 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
37 * parse.c (accept_statement): Don't call gfc_set_implicit.
38 * symbol.c (new_ts): Remove.
39 (gfc_set_implicit_none): Use same loop bounds as other functions.
40 (gfc_set_implicit): Remove.
41 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
42 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
43
44 2004-06-30 Richard Henderson <rth@redhat.com>
45
46 * match.c (var_element): Remove unused variable.
47
48 * trans-decl.c (gfc_generate_function_code): Don't set
49 x_whole_function_mode_p.
50 (gfc_generate_constructors): Likewise.
51
52 2004-06-30 Richard Henderson <rth@redhat.com>
53
54 * trans-decl.c (gfc_generate_function_code): Don't set
55 immediate_size_expand.
56 (gfc_generate_constructors): Likewise.
57
58 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
59
60 PR fortran/16161
61 * decl.c (gfc_match_type_spec): Rename second argument to
62 'implicit_flag', reverse meaning. Don't match_char_spec if
63 'implicit_flag' is set. Rename to ...
64 (match_type_spec): ... this.
65 (gfc_match_implicit_none, match_implicit_range): Move here
66 from match.c.
67 (gfc_match_implicit): Move here from match.c, try to
68 match_char_len if match_implicit_range doesn't succeed for
69 CHARACTER implicits. Call renamed fucntion match_type_spec.
70 (gfc_match_data_decl, match_prefix): Call renamed function
71 match_type_spec.
72 * match.c (gfc_match_implicit_none, match_implicit_range,
73 gfc_match_implicit): Move to decl.c.
74 * match.h (gfc_match_implicit_none, gfc_match_implicit):
75 Move protoypes to section 'decl.c'.
76 (gfc_match_type_spec): Remove prototype.
77
78 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
79
80 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
81 copyright years.
82
83 2004-06-29 Steven Bosscher <stevenb@suse.de>
84
85 Make sure types in assignments are compatible. Mostly mechanical.
86 * trans-const.h (gfc_index_one_node): New define.
87 * trans-array.c (gfc_trans_allocate_array_storage,
88 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
89 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
90 gfc_conv_array_ubound, gfc_conv_array_ref,
91 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
92 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
93 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
94 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
95 types in assignments, conversions and conditionals for expressions.
96 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
97 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
98 gfc_conv_function_call, gfc_trans_pointer_assignment,
99 gfc_trans_scalar_assign): Likewise.
100 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
101 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
102 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
103 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
104 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
105 gfc_conv_allocated, gfc_conv_associated,
106 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
107 * trans-io.c (set_string): Likewise.
108 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
109 gfc_do_allocate, generate_loop_for_temp_to_lhs,
110 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
111 compute_overall_iter_number, gfc_trans_assign_need_temp,
112 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
113 gfc_evaluate_where_mask, gfc_trans_where_assign,
114 gfc_trans_where_2): Likewise.
115 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
116 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
117
118 * trans.c (gfc_add_modify_expr): Add sanity check that types
119 for the lhs and rhs are the same for scalar assignments.
120
121 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
122
123 * dump-parse-tree.c (show_common): New function.
124 (gfc_show_namespace): Show commons.
125
126 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
127 Andrew Vaught <andyv@firstinter.net>
128
129 PR fortran/13249
130 PR fortran/15481
131 * decl.c (gfc_match_save): Adapt to new common structures,
132 don't allow saving USE-associated common.
133 * dump-parse-tree (gfc_show_attr): (saved_)common are not
134 symbol attributes any longer.
135 (gfc_show_symbol): Don't show old-style commons any longer.
136 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
137 interface.
138 * gfortran.h (symbol_attribute): Remove common and saved_common
139 attributes.
140 (gfc_symbol): Remove common_head element.
141 (gfc_common_head): New struct.
142 (gfc_get_common_head): New macro.
143 (gfc_symtree): Add field 'common' to union.
144 (gfc_namespace): Add field 'common_root'; change type of field
145 'blank_common' to blank_common.
146 (gfc_add_data): New prototype.
147 (gfc_traverse_symtree): Expect a symtree as first argument
148 instead of namespace.
149 * match.c (gfc_get_common): New function.
150 (match_common_name): Change to take char * as argument, adapt,
151 fix bug with empty name.
152 (gfc_match_common): Adapt to new data structures. Disallow
153 redeclaration of USE-associated COMMON-block. Fix bug with
154 empty common.
155 (var_element): Adapt to new common structures.
156 * match.h (gfc_get_common): Declare.
157 * module.c: Add 2004 to copyright years, add commons to module
158 file layout description.
159 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
160 for removed attributes.
161 (mio_symbol): Adapt to new way of storing common relations.
162 (load_commons): New function.
163 (read_module): Skip common list on first pass, load_commons at
164 second.
165 (write_commons): New function.
166 (write_module): Call write_commons().
167 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
168 functions related to removed attributes.
169 (gfc_add_data): New function.
170 (gfc_clear_attr): Don't set removed attributes.
171 (gfc_copy_attr): Don't copy removed attributes.
172 (traverse_symtree): Remove.
173 (gfc_traverse_symtree): Don't traverse symbol
174 tree of the passed namespace, but require a symtree to be passed
175 instead. Unify with traverse_symtree.
176 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
177 interface.
178 (save_symbol): Remove setting of removed attribute.
179 * trans-common.c (gfc_sym_mangled_common_id): Change to
180 take 'char *' argument instead of 'gfc_symbol'.
181 (build_common_decl, new_segment, translate_common): Adapt to new
182 data structures, add new
183 argument name.
184 (create_common): Adapt to new data structures, add new
185 argument name. Fix typo in intialization of derived types.
186 (finish_equivalences): Add second argument in call to
187 create_common.
188 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
189 (gfc_trans_common): Adapt to new data structures.
190 * trans-decl.c (gfc_create_module_variables): Remove test for
191 removed attribute.
192
193 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
194
195 * io.c: Add 2004 to copyright years.
196
197 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
198 Andrew Vaught <andyv@firstinter.net>
199
200 * gfortran.h (gfc_gsymbol): New typedef.
201 (gfc_gsym_root): New variable.
202 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
203 * parse.c (global_used): New function.
204 (parse_block_data): Check for double empty BLOCK DATA,
205 use global symbol table.
206 (parse_module): Use global symbol table.
207 (add_global_procedure, add_global_program): New functions.
208 (gfc_parse_file): Use global symbol table.
209 * symbol.c (gfc_gsym_root): New variable.
210 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
211 functions.
212
213 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
214
215 * module.c (mio_gmp_real): Correct writing of negative numbers.
216
217 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
218
219 PR fortran/15963
220 * expr.c (check_intrinsic_op): Allow comparison of characters.
221 Make logic easier.
222
223 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
224 Andrew Vaught <andyv@firstinter.net>
225
226 * decl.c (contained_procedure): New function.
227 (match_end): Verify correctness of END STATEMENT in
228 all cases.
229
230 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
231 Andrew Vaught <andyv@firstinter.net>
232
233 PR fortran/15190
234 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
235 (decode_statement): Enforce required space in free-form.
236
237 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
238
239 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
240 * trans-array.c (gfc_conv_descriptor_data): Add operand
241 for COMPONENT_REF.
242 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
243 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
244 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
245 * trans-common.c (create_common): Likewise.
246 * trans-expr.c (gfc_conv_component_ref): Likewise.
247 * trans-io.c (set_parameter_value): Likewise.
248 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
249 (transfer_expr): Likewise.
250 * trans-decl.c (gfc_trans_auto_character_variable):
251 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
252 (gfc_gimplify_function): New function.
253 (gfc_generate_function-code): Properly handle nested functions.
254 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
255
256 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
257
258 PR fortran/15750
259 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
260 (gfc_resolve_inquire): Resolve the iolength tag. Return
261 SUCCESS at end of function if no failure has occured.
262 * resolve.c (resolve_code): Resolve if iolength is encountered.
263 * trans-io.c: (ioparm_iolength, iocall_iolength,
264 iocall_iolength_done): New variables.
265 (last_dt): Add IOLENGTH.
266 (gfc_build_io_library_fndecls ): Set iolength related variables.
267 (gfc_trans_iolength): Implement.
268 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
269
270 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
271
272 PR fortran/15511
273 * scanner.c (load_line): Don't truncate preprocessor lines.
274 Reformat error message.
275 (preprocessor_line): Issue warning in case of malformed
276 preprocessor line.
277
278 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
279
280 * resolve.c (resolve_symbol): Add comment in function body.
281 (check_data_variable): Change type of mark to ar_type, adapt code
282 accordingly.
283
284 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
285
286 * array.c (gfc_insert_constructor): Avoid redundant call to
287 mpz_comp. Add 2004 to copyright years.
288
289 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
290
291 * trans.h (stmtblock_t): Change has_scope to unsigned int.
292
293 2004-06-20 Steven G. Kargl <kargls@comcast.net>
294
295 * arith.c (gfc_range_check): correct complex underflow.
296
297 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
298
299 PR fortran/15962
300 * match.c (match_case_selector): Call gfc_match_init_expr
301 instead of gfc_match_expr.
302 * resolve.c (validate_case_label_expr): No need to check for
303 constant, since it wouldn't have been matched with the fix to
304 match.c.
305
306 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
307
308 PR fortran/15211
309 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
310 of strings.
311
312 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
313
314 PR fortran/15510
315 * trans-deecl.c (generate_local_decl): Do not issue warning for
316 unused variables if they're use associated.
317
318 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
319 Andrew Vaught <andyv@firstinter.net>
320
321 PR fortran/14928
322 * gfortran.h (gfc_check_f): Add new field f3ml.
323 * check.c (gfc_check_minloc_maxloc): Take argument list instead
324 of individual arguments, reorder if necessary.
325 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
326 * intrinsic.c (add_sym_3ml): New function.
327 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
328 (check_specific): Catch special case MINLOC, MAXLOC.
329
330 2004-06-14 Paul Brook <paul@codesourcery.com>
331
332 * intrinsic.c (add_sym_2s): Use correct function types.
333
334 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
335
336 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
337 * data.c (gfc_get_section_index): Remove dependency on trans.h.
338
339 2004-06-12 Steven G. Kargl <kargls@comcast.net>
340
341 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
342 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
343 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
344 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
345 * trans-intrinsic.c: Use symbols.
346 * intrinsic.c (add_sym_2s): New function.
347 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
348 * intrinsic.h: Function prototypes.
349 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
350 gfc_resolve_srand): New functions.
351
352 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
353
354 PR fortran/14957
355 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
356 contained procedure.
357
358 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
359
360 PR fortran/12841
361 * interface.c (compare_parameter, compare_actual_formal): Don't
362 check types and array shapes for NULL()
363 * trans-expr.c (conv_function_call): No double indirection for
364 NULL()
365
366 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
367
368 * trans-expr.c (gfc_conv_cst_int_power): Compute
369 x**(-n) by converting it to (1/x)**n instead of
370 1/x**n.
371
372 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
373
374 PR fortran/13372
375 * module.c (write_symbol, write_symtree): Don't write symbols
376 wrongly added to namespace.
377 * trans-decl.c (gfc_create_module_variable): Don't create a
378 backend decl for a symbol incorrectly added to namespace.
379
380 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
381
382 PR fortran/13201
383 * resolve.c (resolve_symbol): Verify that parameter array has an
384 explicit shape. Fix typos and coding style issues in surrounding
385 lines.
386
387 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
388
389 PR fortran/15478
390 * gfortran.texi: The documentation doesn't contain infomration on
391 how to report bugs, and shouldn't, so remove the line which
392 says it does.
393
394 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
395
396 * intrinsic.c (sort_actual): Keep track of type of missing
397 arguments. (Missing from previous commit.)
398
399 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
400
401 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
402 * interface.c (compare_actual_formal): Keep type of omitted
403 optional arguments.
404 * trans-expr.c (gfc_conv_function_call): Add string length
405 argument for omitted string argument.
406
407 2004-06-03 Paul Brook <paul@codesourcery.com>
408
409 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
410 lists instead of compound expr chains.
411 (gfc_trans_code): Annotate statement lists.
412
413 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
414
415 * trans-array.c: Fix spelling in comments.
416
417 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
418
419 PR fortran/15557
420 * data.c (assign_substring_data_value): New function.
421 (gfc_assign_data_value): Call the new function if we're dealing
422 with a substring LHS.
423
424 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
425
426 PR fortran/15477
427 * gfortran.h (GFC_VERSION): Remove.
428 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
429 where used.
430
431 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
432
433 * trans-types.c: Fix spelling & layout in comments.
434
435 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
436
437 PR fortran/14067
438 * trans-const.c (gfc_conv_string_init): Allow variable string
439 length lower than initialization string length.
440
441 2004-05-30 Paul Brook <paul@codesourcery.com>
442
443 PR fortran/15620
444 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
445 * trans-expr.c (gfc_trans_string_copy): New function.
446 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
447 character lengths.
448 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
449 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
450 * trans.h (struct gfc_saved_var): Define.
451 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
452
453 2004-05-30 Steven G. Kargl <kargls@comcast.net>
454
455 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
456
457 2004-05-29 Steven G. Kargl <kargls@comcast.net>
458
459 * simplify.c (gfc_simplify_log): Remove useless line of code.
460
461 2004-05-29 Paul Brook <paul@codesourcery.com>
462
463 * trans-common.c (find_equivalence): Find multiple rules.
464
465 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
466
467 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
468 (gfc_current_locus): Declare new global variable.
469 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
470 (gfc_current_locus1): Rename ...
471 (gfc_current_locus): ... to this.
472 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
473 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
474 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
475 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
476 and gfc_current_locus(), respectively.
477 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
478 match_array_cons_element, gfc_match_array_constructor):
479 Read/modify gfc_current_locus instead of calling gfc_set_locus()
480 and gfc_current_locus().
481 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
482 match_attr_spec, gfc_match_function_decl, gfc_match_end,
483 attr_decl1, gfc_match_save): Likewise.
484 * error.c (error_print, gfc_internal_error): Likewise.
485 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
486 * interface.c (gfc_add_interface): Likewise.
487 * io.c (gfc_match_format, match_dt_format, match_dt_element,
488 match_io_iterator, match_io): Likewise.
489 * match.c (gfc_match_space, gfc_match_eos,
490 gfc_match_small_literal_int, gfc_match_st_label,
491 gfc_match_strings, gfc_match_name, gfc_match_iterator,
492 gfc_match_char, gfc_match, gfc_match_assignment,
493 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
494 gfc_match_nullify, gfc_match_call, match_implicit_range,
495 gfc_match_implicit, gfc_match_data, match_case_selector,
496 gfc_match_case, match_forall_iterator): Likewise.
497 * matchexp.c (gfc_match_defined_op_name, next_operator,
498 match_level_1, match_mult_operand, match_ext_mult_operand,
499 match_add_operand, match_ext_add_operand, match_level_2,
500 match_level_3, match_level_4, match_and_operand, match_or_operand,
501 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
502 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
503 * parse.c (match_word, decode_statement, next_free, next_fixed,
504 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
505 Likewise.
506 * primary.c (match_digits, match_integer_constant,
507 match_boz_constant, match_real_constant, match_substring,
508 next_string_char, match_charkind_name, match_string_constant,
509 match_logical_constant, match_const_complex_part,
510 match_complex_constant, match_actual_arg, match_keyword_arg,
511 gfc_match_actual_arglist, gfc_match_structure_constructor,
512 gfc_match_rvalue, gfc_match_variable): Likewise.
513 * st.c (gfc_get_code): Likewise.
514 * symbol.c (check_conflict, check_used, check_done,
515 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
516 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
517 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
518
519 2004-05-26 Roger Sayle <roger@eyesopen.com>
520
521 * io.c (format_asterisk): Silence compiler warnings by correcting
522 the number of elements of a "locus" initializer.
523
524 2004-05-25 Roger Sayle <roger@eyesopen.com>
525
526 PR fortran/13912
527 * matchexp.c: Allow unary operators after arithmetic operators
528 as a GNU extension.
529 (match_ext_mult_operand, match_ext_add_operand): New functions.
530 (match_mult_operand): Tweak to call match_ext_mult_operand.
531 (match_add_operand): Tweak to call match_ext_mult_operand.
532 (match_level_2): Rearrange to call match_ext_add_operand.
533
534 2004-05-25 Paul Brook <paul@codesourcery.com>
535
536 * expr.c (check_inquiry): Remove bogus tests.
537
538 2004-05-23 Paul Brook <paul@codesourcery.com>
539
540 PR fortran/13773
541 * expr.c (restricted_args): Remove redundant checks/argument.
542 (external_spec_function): Update to match.
543 (restricted_intrinsic): Rewrite.
544
545 2004-05-23 Paul Brook <paul@codesourcery.com>
546 Victor Leikehman <lei@haifasphere.co.il>
547
548 * gfortran.h (struct gfc_symbol): Add equiv_built.
549 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
550 messages.
551 (current_length): Remove.
552 (add_segments): New function.
553 (build_equiv_decl): Create initialized common blocks.
554 (build_common_decl): Always add decl to bindings.
555 (create_common): Create initializers.
556 (find_segment_info): Reformat to match coding conventions.
557 (new_condition): Use add_segments.
558 (add_condition, find_equivalence, add_equivalences): Move iteration
559 inside functions. Only process each segment once.
560 (new_segment, finish_equivalences, translate_common): Simplify.
561
562 2004-05-23 Steven G. Kargl <kargls@comcast.net>
563
564 * check.c (gfc_check_random_seed): Issue for too many arguments.
565
566 2004-05-22 Steven G. Kargl <kargls@comcast.net>
567
568 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
569
570 2004-05-22 Paul Brook <paul@codesourcery.com>
571
572 * dump-parse-tree.c (gfc_show_equiv): New function.
573 (gfc_show_namespace): Use it.
574
575 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
576
577 PR fortran/13249
578 * symbol.c (gfc_add_common): Disable checks to work around other more
579 fundamental inadequacies.
580
581 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
582
583 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
584 only for functions.
585 (gfc_build_function_decl): Likewise.
586
587 2004-05-22 Steven G. Kargl <kargls@comcast.net>
588
589 * check.c (gfc_check_system_clock): New function.
590 * intrinsic.c (add_sym_3s): New function.
591 (add_subroutines): Use it.
592 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
593 Add prototypes.
594 * iresolve.c (gfc_resolve_system_clock): New function.
595
596 2004-05-22 Steven G. Kargl <kargls@comcast.net>
597
598 * invoke.texi: Document -Wunderflow and spell check.
599 * lang.opt: Add Wunderflow.
600 * gfortran.h (gfc_option_t): Add warn_underflow option.
601 * options.c (gfc_init_options, set_Wall): Use it.
602 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
603 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
604 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
605 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
606 * arith.c (common_logarithm): Fix typo in comment.
607
608 2004-05-21 Roger Sayle <roger@eyesopen.com>
609
610 * io.c (check_format): As a GNU extension, allow the comma after a
611 string literal to be optional in a format. Use gfc_notify_std to
612 issue an error/warning as appropriate.
613
614 2004-05-21 Roger Sayle <roger@eyesopen.com>
615
616 * io.c (check_format): Use gfc_notify_std to determine whether to
617 issue an error/warning for omitting the digits from the X format.
618
619 2004-05-20 Roger Sayle <roger@eyesopen.com>
620
621 * io.c (check_format): Allow the number before the X format to
622 be optional when not -pedantic.
623
624 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
625 Paul Brook <paul@codesourcery.com>
626
627 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
628 Create decls for __builtin_pow{,f}.
629 * gfortran.h (PREFIX_LEN): Define.
630 * trans-decl.c (gfor_fndecl_math_powi): Add.
631 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
632 (gfc_build_intrinsic_function_decls): Create decls for powi.
633 * trans-expr.c (powi_table): Add.
634 (gfc_conv_integer_power): Remove.
635 (gfc_conv_powi): New function.
636 (gfc_conv_cst_int_power): New function.
637 (gfc_conv_power_op): Use new powi routines.
638 * trans.h (struct gfc_powdecl_list): Add.
639 (gfor_fndecl_math_powi): Add.
640 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
641
642 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
643
644 * trans.c, trans-decl.c: Fix comment typos.
645
646 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
647
648 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
649
650 2004-05-18 Steve Kargl <kargls@comcast.net>
651
652 * arith.c (gfc_int2complex): Fix incorrect range checking.
653
654 2004-05-18 Paul Brook <paul@codesourcery.com>
655
656 PR fortran/13930
657 * decl.c (add_init_expr_to_sym): Remove incorrect check.
658 (default_initializer): Move to expr.c.
659 (variable_decl): Don't assign default initializer to variables.
660 * expr.c (gfc_default_initializer): Move to here.
661 * gfortran.h (gfc_default_initializer): Add prototype.
662 * resolve.c (resolve_symbol): Check for illegal initializers.
663 Assign default initializer.
664
665 2004-05-17 Steve Kargl <kargls@comcast.net>
666
667 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
668
669 2004-05-17 Steve Kargl <kargls@comcast.net>
670
671 * arith.c (gfc_real2complex): Range checking wrong part of complex
672 number.
673
674 2004-05-16 Paul Brook <paul@codesourcery.com>
675
676 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
677
678 2004-05-16 Paul Brook <paul@codesourcery.com>
679
680 * arith.c (gfc_range_check): Fix logic error.
681
682 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
683
684 * arith.c: Fix comment typos.
685
686 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
687
688 PR fortran/13742
689 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
690 not initialized in a disallowed fashion.
691 * match.c (gfc_match_common): Likewise.
692 (var_element): Verify that variable is not in the blank COMMON,
693 if it is in a common.
694
695 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
696
697 * Make-lang.in (f95.generated-manpages): Remove.
698 (f95.srcextra): New.
699 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
700 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
701 (f95.dvi): Remove.
702 (dvi): New.
703 (f95.install-info): Remove.
704 (install-info): New.
705
706 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
707
708 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
709
710 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
711
712 * primary.c (match_boz_constant): Use gfc_notify_std() for
713 issuing a warning or an error.
714
715 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
716
717 PR fortran/13826
718 * primary.c (match_structure_constructor): Rename ...
719 (gfc_match_structure_constructor): ... to this. Make non-static.
720 (gfc_match_rvalue): Call renamed function.
721 * match.h (gfc_match_structure_constructor): Declare.
722 * match.c (gfc_match_data_constant): Handle structure
723 constructor.
724
725 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
726
727 PR fortran/13702
728 (Port from g95)
729 * gfortran.h (gfc_linebuf): New typedef.
730 (linebuf): Remove.
731 (gfc_file): Revamped, use new gfc_linebuf.
732 (locus): Revamped, use new types.
733 (gfc_current_file): Remove.
734 (gfc_current_form, gfc_source_file): New global variables.
735 * match.c (gfc_match_space, gfc_match_strings): Use
736 gfc_current_form to find source form.
737 * module.c (gfc_dump_module): Use gfc_source_file when printing
738 module header.
739 * error.c (show_locus, show_loci) Use new data structures to print
740 locus.
741 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
742 Remove.
743 (file_head, current_file, gfc_current_form, line_head, line_tail,
744 gfc_current_locus1, gfc_source_file): New global variables.
745 (gfc_scanner_init1): Set new global variables.
746 (gfc_scanner_done1): Free new data structures.
747 (gfc_current_locus): Return pointer to gfc_current_locus1.
748 (gfc_set_locus): Set gfc_current_locus1.
749 (gfc_at_eof): Set new variables.
750 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
751 to new locus structure.
752 (gfc_check_include): Remove.
753 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
754 (gfc_skip_comments): Use gfc_current_form, find locus with
755 gfc_current_locus1.
756 (gfc_next_char): Use gfc_current_form.
757 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
758 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
759 comment formatting.
760 (get_file): New function.
761 (preprocessor_line, include_line): New functions.
762 (load_file): Move down, rewrite to match new data structures.
763 (gfc_new_file): Rewrite to match new data structures.
764 * parse.c (next_statement): Remove code which is now useless. Use
765 gfc_source_form and gfc_source_file where appropriate.
766 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
767 when determining locus of frontend code.
768 * trans-io.c (set_error_locus): Same.
769 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
770 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
771 preprocessor flags.
772 (all): Add missing initializers.
773
774 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
775
776 * Make-lang.in (trans-common.o): Remove redundant dependency.
777 (data.c): Replace object file name ...
778 (data.o): ... by the correct one.
779
780 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
781
782 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
783 for ranges when dumping array references.
784
785 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
786
787 * decl.c (variable_decl): Always apply default initializer.
788
789 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
790
791 PR fortran/15206
792 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
793 handle zero correctly.
794
795 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
796
797 * match.c (gfc_match): Eliminate dead code.
798
799 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
800
801 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
802 Detect bad continuation line in fixed form sources.
803
804 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
805
806 PR fortran/15205
807 * iresolve.c (gfc_resolve_nearest): Add new function.
808 * intrinsic.h: ... declare it here.
809 * intrinsic.c (add_functions): ... add it as resolving function
810 for NEAREST.
811
812 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
813
814 PR fortran/14066
815 * match.c (gfc_match_do): Allow infinite loops with
816 label-do-stmt. Do not enforce space after comma.
817
818 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
819
820 PR fortran/15051
821 * parse.c (parse_interface): Allow empty INTERFACE, remove
822 seen_body.
823
824 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
825
826 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
827 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
828 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
829 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
830 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
831 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
832 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
833 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
834 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
835 trans-types.h, trans.c, trans.h: Update copyright years and
836 boilerplate.
837 * data.c: Likewise, also removed two whitespace-only lines.
838 * gfortranspec.c, lang.opt: Update copyright years.
839
840 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841
842 PR fortran/14568
843 * trans-decl.c (generate_local_decl): Don't warn for unused
844 variables which are in common blocks.
845
846 2004-05-13 Diego Novillo <dnovillo@redhat.com>
847
848 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
849 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
850 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
851
852 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
853
854 PR fortran/15314
855 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
856
857 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
858
859 * gfortran.texi: Use @table @emph instead of @itemize @emph.
860 Remove "set DEVELOPMENT".
861 (Compiling GFORTRAN): Remove.
862
863 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
864
865 * array.c (match_subscript, match_array_ref): Add comments
866 explaining argument 'init'.
867 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
868 trans-expr.c, trans.c: Fix some typos in comments.
869 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
870 * primary.c (match_digits, match_integer_constant): Add comment
871 explaining signflag.
872
873 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
874
875 PR fortran/13940
876 * primary.c: Include system.h and flags.h, needed for pedantic.
877 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
878 pedantic is set.
879
880 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
881
882 PR fortran/13940
883 * match.c (match_data_constant): Handle case where
884 gfc_find_symbol sets sym to NULL
885
886 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
887
888 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
889 dependency on mathbuiltins.def
890
891 2004-04-24 Victor Leikehman <lei@il.ibm.com>
892
893 * trans-io.c (transfer_expr): Implemented recursive printing
894 of derived types.
895
896 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
897
898 * gfortranspec.c: Do not include multilib.h.
899
900 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
901
902 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
903 2004 to copyright years.
904 * trans-expr.c, trans-decl.c: Comment update, we now generate
905 GENERIC, not SIMPLE. Add 2004 to copyright years.
906
907 2004-04-24 Paul Brook <paul@codesourcery.com>
908
909 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
910
911 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
912
913 PR 14817
914 * arith.c (gfc_arith_divide): Fix complex divide.
915
916 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
917
918 * gfortranspec.c: Include the target headers.
919
920 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
921
922 PR fortran/14921
923 PR fortran/14540
924 * arith.c (arctangent2): New function.
925 * arith.h (arctangent2): Add function prototype.
926 * simplify.c (gfc_simplify_atan2): Use it.
927 (gfc_simplify_log): Use it.
928
929 2004-04-12 Diego Novillo <dnovillo@redhat.com>
930
931 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
932 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
933
934 2004-04-11 Bud Davis <bdavis9659@comcast.net>
935
936 PR fortran/14872
937 * trans-io.c (build_dt): Change REC to value.
938
939 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
940
941 PR 14394
942 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
943 the real value when converting mpf to string.
944
945 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
946
947 PR 14395
948 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
949 the result.
950
951 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
952
953 PR fortran/14377
954 * simplify.c (simplify_min_max): Convert the type of the result.
955
956 2004-04-11 Paul Brook <paul@codesourcery.com>
957
958 * gfortran.texi: Use full target triplet.
959
960 2004-04-11 Paul Brook <paul@codesourcery.com>
961
962 * Make-lang.in (GFORTRAN_TEXI): Set it.
963 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
964 (fortran/gfortran.info): Ditto.
965 * gfortran.texi: Major update.
966 * invoke.texi: New file.
967
968 2004-04-10 Paul Brook <paul@codesourcery.com>
969
970 * trans-array.c (gfc_trans_allocate_temp_array,
971 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
972 * trans-decl.c (gfc_build_dummy_array_decl,
973 gfc_get_symbol_decl, gfc_build_function_decl,
974 gfc_create_module_variable): Ditto.
975 * trans-expr.c (gfc_conv_variable): Ditto.
976 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
977 * trans.h (GFC_DECL_STRING): Remove.
978 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
979 GFC_DECL_ASSIGN): Renumber flags.
980
981 2004-04-05 Paul Brook <paul@codesourcery.com>
982
983 PR 13252
984 PR 14081
985 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
986 and stack_restore.
987 * gfortran.h (struct gfc_charlen): Add backend_decl.
988 * trans-array.c (gfc_trans_allocate_temp_array,
989 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
990 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
991 Remove old, broken string handling.
992 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
993 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
994 gfc_trans_deferred_array): Handle character arrays.
995 * trans-const.c (gfc_conv_const_charlen): New function.
996 * trans-const.h (gfc_conv_const_charlen): Add prototype.
997 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
998 as static.
999 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1000 (gfc_create_string_length): New function.
1001 (gfc_get_symbol_decl): Create lengths for character variables.
1002 (gfc_get_fake_result_decl): Ditto.
1003 (gfc_build_function_decl): Only set length for assumed length
1004 character arguments.
1005 (gfc_trans_dummy_character): New function.
1006 (gfc_trans_auto_character_variable): Rewrite.
1007 (gfc_trans_deferred_vars): Handle more types of character variable.
1008 (gfc_create_module_variable): String lengths have moved.
1009 (gfc_generate_function_code): Initialize deferred var chain earlier.
1010 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1011 (gfc_trans_init_string_length): ... to this.
1012 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1013 gfc_conv_function_call): Update to new format for character variables.
1014 (gfc_conv_string_length): Remove.
1015 (gfc_conv_string_parameter): Update assertion.
1016 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1017 * trans-io.c (set_string): Use new macro names.
1018 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1019 * trans-types.c (gfc_get_character_type): Use existing length expr.
1020 (gfc_is_nodesc_array): Make public.
1021 (gfc_get_dtype_cst): Rename ...
1022 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1023 (gfc_get_nodesc_array_type): Use new name.
1024 (gfc_sym_type): New character variable code.
1025 (gfc_get_derived_type): Ditto.
1026 (gfc_get_function_type): Evaluate character variable lengths.
1027 * trans-types.h (gfc_strlen_kind): Define.
1028 (gfc_is_nodesc_array): Add prototype.
1029 * trans.h: Update prototypes.
1030 (struct lang_type): Update comments.
1031 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1032 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1033
1034 2004-04-04 Paul Brook <paul@codesourcery.com>
1035
1036 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1037 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1038 * trans-expr.c (gfc_conv_function_call): Ditto.
1039 * trans-types.c (gfc_is_nodesc_array): Ditto
1040 * lang.opt (fg77-calls): Remove.
1041
1042 2004-04-04 Paul Brook <paul@codesourcery.com>
1043
1044 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1045 (gfc_conv_descriptor_base): Rename ...
1046 (gfc_conv_descriptor_offset): ... to this.
1047 (gfc_trans_allocate_array_storage): Set offset to zero.
1048 (gfc_conv_array_base): Rename ...
1049 (gfc_conv_array_offset): ... to this.
1050 (gfc_conv_array_index_ref): Add offset parameter.
1051 (gfc_conv_array_ref): Include offset.
1052 (gfc_trans_preloop_setup): Use existing offset.
1053 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1054 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1055 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1056 gfc_conf_ss_descriptor): Set offset.
1057 * trans-array.h: Rename prototypes.
1058 * trans-const.h (gfc_index_zero_node): Define.
1059 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1060 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1061 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1062
1063 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1064
1065 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1066
1067 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1068
1069 PR 14055
1070 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1071 before conversion by gmp library call.
1072
1073 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1074
1075 PR 12921
1076 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1077
1078 2004-02-24 Richard Henderson <rth@redhat.com>
1079
1080 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1081
1082 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1083
1084 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1085 (fortran/gfortran.info): ... to here.
1086 (f95.srcinfo): New.
1087
1088 2004-02-16 Richard Henderson <rth@redhat.com>
1089
1090 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1091 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1092 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1093 (gfc_expand_function): Rename from expand_function_body, make static,
1094 don't do anything except invoke tree_rest_of_compilation.
1095 (gfc_be_parse_file): Invoke cgraph.
1096 (gfc_expand_decl): Remove.
1097 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1098 __builtin_adjust_trampoline.
1099 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1100 (gfc_finalize): New.
1101 (gfc_generate_function_code): Use it. Lower nested functions.
1102 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1103 to call_expr.
1104 * trans.c (gfc_build_function_call): Likewise.
1105 * trans.h (expand_function_body): Remove.
1106
1107 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1108
1109 PR gfortran/13433
1110 * trans-decl.c (gfc_build_function_decl) For functions
1111 returning CHARACTER pass an extra length argument,
1112 following g77 calling conventions.
1113 * trans-types.c (gfc_get_function_type) Ditto.
1114 * trans-expr.c (gfc_conv_function_call) Ditto.
1115
1116 2004-02-14 Paul Brook <paul@codesourcery.com>
1117
1118 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1119
1120 2004-02-12 Paul Brook <paul@nowt.org>
1121
1122 * BUGS: Remove.
1123
1124 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1125
1126 * gfortran.texi: Fix typos.
1127
1128 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1129
1130 PR gfortran/13909
1131 * intrinsic.c (add_conversions) Use logical conversion instead
1132 of real.
1133 * trans-types.c (gfc_get_logical_type) implemented logical*1
1134 and logical*2.
1135
1136 2004-01-17 Paul Brook <paul@codesourcery.com>
1137
1138 * lang-specs.h: Remove %<fixed-form.
1139
1140 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1141
1142 * lang-specs.h: Enable preprocessing of source files
1143 ending in .F, .fpp, .FPP, .F90 and .F95.
1144
1145 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1146
1147 PR fortran/12912
1148 * lang-specs.h: Enable compilation of files ending
1149 in .f, .for and .FOR.
1150
1151 2004-01-11 Paul Brook <paul@codesourcery.com>
1152
1153 * trans-stmt.c (gfc_trans_if_1): New function.
1154 (gfc_trans_if): Use it.
1155
1156 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1157
1158 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1159 (gfc_option_t): Add max_identifier_length.
1160 * lang.opt: Add fmax-identifier-length.
1161 * match.c (parse_name): Use limit.
1162 * options.c (gfc_init_options): Set max_identifier_length.
1163 (gfc_handle_option): Ditto.
1164
1165 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1166
1167 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1168 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1169 * iresolve.c (gfc_resolve_dcmplx): New function.
1170
1171 2004-01-10 Paul Brook <paul@codesourcery.com>
1172
1173 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1174 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1175 (gfc_return_by_reference): Correct condition.
1176 (gfc_get_function_type): Ditto.
1177
1178 2004-01-10 Paul Brook <paul@codesourcery.com>
1179
1180 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1181 types.
1182
1183 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1184
1185 * iresolve.c: Use correct kind.
1186
1187 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1188
1189 PR fortran/13467
1190 * trans-decl.c (gfc_create_module_variable): Output array valued
1191 parameters.
1192
1193 2004-01-10 Paul Brook <paul@codesourcery.com>
1194
1195 * resolve.c (resolve_branch): Get error message right way round.
1196
1197 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1198
1199 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1200 reality.
1201 (gfc_array_allocate): Don't count size of element twice.
1202
1203 2004-01-04 Paul Brook <paul@codesourcery.com>
1204
1205 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1206
1207 2004-01-04 Paul Brook <paul@codesourcery.com>
1208
1209 * error.c (gfc_notify_std): New function.
1210 * gfortran.h (gfc_notify_std): Declare.
1211 (GFC_STD_*): Define.
1212 (gfc_option_t): Add warn_std and allow_std.
1213 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1214 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1215 * check.c (check_rest): Use gfc_notify_std.
1216 * match.c (gfc_match_pause): Ditto.
1217 (gfc_match_assign): Ditto.
1218 (gfc_match_goto): Ditto.
1219 * resolve.c (resolve_branch): Ditto.
1220 * lang.opt: Add std=<foo> and w.
1221 * options.c (gfc_init_options): Set allow_std and warn_std.
1222 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1223
1224 2004-01-01 Paul Brook <paul@codesourcery.com>
1225
1226 * array.c (gfc_append_constructor): Take constructor, not expression.
1227 * data.c (struct gfc_expr_stack): Remove.
1228 (expr_stack): Remove.
1229 (find_con_by_offset): Rename from find_expr_in_con.
1230 (find_con_by_component): Rename from find_component_in_con.
1231 (gfc_get_expr_stack): Remove.
1232 (gfc_assign_data_value): Rewrite.
1233 (gfc_expr_push): Remove.
1234 (gfc_expr_pop): Remove.
1235 (gfc_advance_section): Rename from
1236 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1237 (gfc_get_section_index): Handle unbounded sections.
1238 * gfortran.h: Update prototypes.
1239 * resolve.c (check_data_variable): Array section maight not be the
1240 last ref.
1241
1242 2004-01-01 Paul Brook <paul@codesourcery.com>
1243
1244 PR fortran/13432
1245 * resolve.c (resolve_symbol): Allow assumed length function results.
1246
1247 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1248
1249 * match.c (gfc_match_pause): Fix spelling.
1250
1251 2004-01-01 Steven Bosscher <stevenb@suse.de>
1252
1253 PR fortran/13251
1254 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1255 reference from the expression.
1256
1257 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1258
1259 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1260 dumping.
1261 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1262 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1263 (symbol_attribute):New variable attribute: assign.
1264 * io.c (resolve_tag):Integer variable is allowed.
1265 (match_dt_format): Add ASSIGN statement. Set assign flag.
1266 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1267 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1268 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1269 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1270 (next_statement): Add ST_LABEL_ASSIGNMENT.
1271 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1272 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1273 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1274 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1275 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1276 assign. Put them into the stuct lang_decl.
1277 * trans-io.c (set_string): Add the assign statement.
1278 * trans-stmt.c (gfc_trans_label_assign): New function.
1279 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1280 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1281 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1282 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1283 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1284 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1285
1286 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1287
1288 PR fortran/13434
1289 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1290 minval/maxval.
1291
1292 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1293
1294 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1295 that arguments to subroutines/functions can't alias themselves, nor global
1296 memory.
1297
1298 2003-12-20 Steven Bosscher <stevenb@suse.de>
1299
1300 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1301 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1302
1303 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1304
1305 * primary.c (match_substring): Fix substring bug for start point
1306 or end point is NULL.
1307 * trans-expr.c (gfc_conv_substring): Ditto
1308 * trans-types.c (gfc_sym_type): Get correct type of scalar
1309 character variables.
1310 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1311 derived type.
1312
1313 2003-12-10 Richard Henderson <rth@redhat.com>
1314
1315 * options.c (gfc_post_options): Don't ever use rtl inlining.
1316
1317 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1318
1319 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1320 * trans-equivalence.c: Remove.
1321 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1322 (gfc_generate_function_code): Ditto.
1323 * trans-array.c (gfc_conv_array_parameter): Ditto.
1324 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1325 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1326 * trans.h (gfc_trans_equivalence): Remove.
1327 * gfortran.h (struct gfc_equiv): Add used field.
1328 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1329 equiv_offset fields.
1330
1331 2003-12-05 Richard Henderson <rth@redhat.com>
1332
1333 * trans.c (gfc_build_addr_expr): New.
1334 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1335 * trans.h: Declare them.
1336 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1337 trans-stmt.c, trans.c (*): Use them.
1338
1339 * f95-lang.c (gfc_post_options): Remove dead prototype.
1340 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1341 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1342 allocation size.
1343
1344 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1345
1346 * io.c (gfc_match_format): Check for missing format label.
1347
1348 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1349
1350 PR fortran/13155
1351 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1352 from interfaces in modules.
1353
1354 2003-11-30 Paul Brook <paul@nowt.org>
1355
1356 * trans-array.c (gfc_trans_g77_array): Make non-static.
1357 (gfc_trans_assumed_size): Remove.
1358 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1359 * trans-array.h (gfc_trans_g77_array): Add prototype.
1360 (gfc_trans_assumed_size): Remove.
1361 * trans-decls.c (gfor_fndecl_push_context): Remove.
1362 (gfor_fndecl_pop_context): Remove.
1363 (gfc_build_function)decls): Don't create them.
1364 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1365 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1366
1367 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1368
1369 * trans-array.c (gfc_conv_array_parameter): Simplify
1370 array argument passing for array name actual argument.
1371 * trans-expr.c (gfc_conv_function_call): Ditto
1372 * trans-types.c (gfc_is_nodesc_array):Ditto.
1373
1374 2003-11-30 Paul Brook <paul@nowt.org>
1375
1376 * f95-lang.c (gfc_post_options): Move ...
1377 * options.c (gfc_post_options): .. to here. Handle inlining options.
1378 * gfortran.h (gfc_post_options): Add prototype.
1379
1380 2003-11-28 Richard Henderson <rth@redhat.com>
1381
1382 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1383
1384 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1385
1386 * trans.h (has_alternate_specifier): New global variable.
1387 * match.c (gfc_match_call): Handle actual arguments associated with
1388 alternate return indicators.
1389 * trans-expr.c (gfc_conv_function_call): Ditto
1390 * trans-stmt.c (gfc_trans_call): Ditto
1391 (gfc_trans_return): Handle return statement with value.
1392 * trans-decl.c (gfc_generate_function_code): Handle functions with
1393 asterisk dummy.
1394 (gfc_get_fake_result_decl): Ditto
1395 * trans-types.c (gfc_get_function_type): Ditto
1396 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1397 (resolve_formal_arglist): Check asterisk dummy.
1398
1399 2003-11-27 Paul Brook <paul@nowt.org>
1400
1401 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1402 allocation interface.
1403 (gfc_conv_ array_parameter): Ditto.
1404 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1405 * trans-array.c: Update prototype.
1406 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1407 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1408 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1409 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1410 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1411 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1412 * trans.h (gfc_ss_info): Remove unused pdata field.
1413 * trans.c (gfc_create_var_np): Change T to V.
1414
1415 2003-11-26 Richard Henderson <rth@redhat.com>
1416
1417 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1418 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1419 FRACTION, NEAREST, SET_EXPONENT.
1420 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1421 Fix GTY marking. Remove unnecessary const's.
1422 (LIBM_FUNCTION): Rename from I_LIB.
1423 (LIBF_FUNCTION): New.
1424 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1425 conventions. Assume the expr signature is correct. Mark const.
1426 (gfc_conv_intrinsic_exponent): Use library functions.
1427 (gfc_conv_intrinsic_set_exponent): Remove.
1428 (gfc_conv_intrinsic_scale): Remove.
1429 (gfc_conv_intrinsic_nearest): Remove.
1430 (gfc_conv_intrinsic_fraction): Remove.
1431 (gfc_conv_intrinsic_function): Update.
1432 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1433 (gfor_fndecl_math_exponent8): New.
1434 (gfc_build_intrinsic_function_decls): Set them.
1435 * trans.h: Declare them.
1436
1437 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1438
1439 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1440 underflow COMMON block.
1441 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1442 EQUIVALENCE object. Also fix typo in an error message.
1443
1444 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1445
1446 * Make-lang.in: Add check-gfortran to lang_checks.
1447 (check-f95): Alias for check-gfortran.
1448
1449 2003-11-25 Jason Merrill <jason@redhat.com>
1450
1451 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1452 directory and TAGS files that include them for each front end.
1453
1454 2003-11-24 Paul Brook <paul@nowt.org>
1455
1456 PR fortran/13154
1457 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1458
1459 2003-11-24 Paul Brook <paul@nowt.org>
1460
1461 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1462 handle.
1463 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1464
1465 2003-11-24 Paul Brook <paul@nowt.org>
1466
1467 PR fortran/13105
1468 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1469 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1470
1471 2003-11-20 Richard Henderson <rth@redhat.com>
1472
1473 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1474 (gfc_conv_array_base): Likewise.
1475 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1476 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1477 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1478 * trans-stmt.c (gfc_trans_character_select): Likewise.
1479
1480 2003-11-13 Paul Brook <paul@nowt.org>
1481
1482 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1483
1484 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1485
1486 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1487 (resolve_equivalence): New function.
1488 (resolve_equivalence_derived): New function.
1489
1490 2003-11-12 Richard Henderson <rth@redhat.com>
1491
1492 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1493 annotate_all_with_locus.
1494
1495 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1496
1497 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1498 * trans-decl.c (gfc_finish_var_decl): Modified.
1499
1500 2003-11-08 Paul Brook <paul@nowt.org>
1501
1502 PR fortran/12704
1503 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1504 arrays.
1505
1506 2003-11-06 Paul Brook <paul@nowt.org>
1507
1508 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1509
1510 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1511
1512 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1513
1514 2003-10-27 Anthony Green <green@redhat.com>
1515
1516 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1517 (f95.stagefeedback): Ditto.
1518
1519 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1520
1521 PR fortran/12682
1522 * Make-lang.in (f95.stageprofile): Add.
1523 (f95.stagefeedback): Add.
1524
1525 2003-10-23 Richard Henderson <rth@redhat.com>
1526
1527 * f96-lang.c (gfc_gimplify_expr): Remove.
1528 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1529 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1530
1531 2003-10-23 Richard Henderson <rth@redhat.com>
1532
1533 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1534
1535 2003-10-20 Paul Brook <paul@nowt.org>
1536
1537 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
1538 * trans-stmt.c (gfc_trans_do_while): Ditto.
1539
1540 2003-10-17 Paul Brook <paul@nowt.org>
1541
1542 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
1543
1544 2003-10-17 Paul Brook <paul@nowt.org>
1545
1546 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
1547
1548 2003-10-17 Feng Wang <wf_cs@yahoo.com>
1549
1550 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
1551 (gfc_resolve_minloc): Ditto.
1552 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
1553 Return the value after subtracting the lower bound.
1554
1555 2003-10-16 Richard Henderson <rth@redhat.com>
1556
1557 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
1558
1559 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
1560
1561 * lang.c: Remove -M option for now, it's in the way for C.
1562
1563 2003-10-14 Jason Merrill <jason@redhat.com>
1564
1565 * Make-lang.in (f95.tags): New rule.
1566
1567 2003-10-13 Richard Henderson <rth@redhat.com>
1568
1569 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
1570
1571 2003-10-13 Paul Brook <paul@nowt.org>
1572
1573 * trans-decl.c (generate_local_decl): Don't create junk variables.
1574
1575 2003-10-13 Paul Brook <paul@nowt.org>
1576
1577 * resolve.c (resolve_formal_arglist): Use function result decl in
1578 preference to function decl.
1579
1580 2003-10-12 Richard Henderson <rth@redhat.com>
1581
1582 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
1583 TREE_READONLY. Update all callers.
1584
1585 2003-10-12 Feng Wang <wf_cs@yahoo.com>
1586
1587 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
1588 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
1589 (gfc_is_intrinsic_libcall): Add CSHIFT.
1590
1591 2003-10-12 Richard Henderson <rth@redhat.com>
1592
1593 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
1594 (gfc_trans_array_constructor_value): Likewise.
1595 (gfc_conv_array_initializer): Likewise.
1596 * trans-stmt.c (gfc_trans_character_select): Likewise.
1597
1598 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1599
1600 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1601
1602 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1603
1604 * check.c (gfc_check_repeat): Check arguments are scalar.
1605 (gfc_check_trim): New function.
1606 * intrinsic.h (gfc_check_trim): Add prototype.
1607 * intrinsic.c (add_functions): Use it.
1608 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1609 Decalare.
1610 * trans-decl.c: Ditto.
1611 (gfc_build_intrinsic_fucntion_decls): Set them.
1612 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1613 (gfc_conv_intrinsic_trim): New function.
1614 (gfc_conv_intrinsic_repeat): New function.
1615 (gfc_conv_intrinsic_function): Use them.
1616
1617 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1618
1619 * trans-types.c (gfc_sym_type): Handle result variables.
1620
1621 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1622
1623 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1624 gfc_get_character_type.
1625
1626 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1627
1628 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1629
1630 2003-10-11 Paul Brook <paul@nowt.org>
1631
1632 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1633 (gfc_resolve_dprod): New function.
1634 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1635 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1636 (gfc_resolve_dprod): Declare.
1637 * intrinsic.c (add_functions): Use them.
1638 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1639
1640 2003-10-06 Richard Henderson <rth@redhat.com>
1641
1642 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1643 * trans-intrinsic.c (call_builtin_clz): Use it.
1644
1645 2003-10-05 Paul Brook <paul@nowt.org>
1646
1647 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1648 * trans-decl.c (gfc_generate_function_code): Set
1649 cfun->function_end_locus.
1650
1651 2003-09-24 Jason Merrill <jason@redhat.com>
1652
1653 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1654 TREE_LOCUS.
1655
1656 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1657 Paul Brook <paul@nowt.org>
1658
1659 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1660 * array.c (gfc_inser_constructor): New function.
1661 (gfc_get_constructor): New function.
1662 (gfc_free_constructor): Initialize offset and repeat.
1663 (iterator_stack): Remove.
1664 (expand_info): Add offset, component and repeat fields.
1665 (expand_constructor): Set them.
1666 (expand): Set new fields.
1667 (gfc_copy_constructor): Ditto. Avoid recursion.
1668 * gfortran.h: Add prototypes for new functions.
1669 (gfc_constructor): Add offset, component and repeat.
1670 (iteratio_stack): Move to here.
1671 * resolve.c (check_data_variable): Convert data values into variable
1672 initializers.
1673 (traverse_data_list): Build implicit loop chain.
1674 (gfc_resolve): Ditto.
1675 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1676 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1677 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1678 (gfc_conv_expr): Update to match.
1679 * trans.h (gfc_conv_structure): Declare.
1680 * data.c: New file.
1681
1682 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1683
1684 * trans.h: Add declarations for gfor_fndecl_si_kind and
1685 gfor_fndecl_sr_kind.
1686 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1687 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1688 (g95_conv_intrinsic_sr_kind): New function.
1689 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1690 SELECTED_REAL_KIND.
1691
1692 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1693
1694 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1695 instead of _4 and _8 as postfix for libgfortran calls.
1696
1697 2003-09-16 Paul Brook <paul@nowt.org>
1698
1699 * array.c (compare_bounds): New function.
1700 (gfc_compare_array_spec): Use it.
1701
1702 2003-09-14 Paul Brook <paul@nowt.org>
1703
1704 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1705 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1706
1707 2003-09-14 Paul Brook <paul@nowt.org>
1708
1709 * check.c (dim_rank_check): Allow assumed bounds if requested.
1710 (gfc_check_lbound): Call it.
1711 (gfc_check_ubound): Ditto.
1712 (gfc_check_size): Change to match.
1713 * simplify.c (gfc_simplify_bound): New function.
1714 (gfc_simplify_lbound): New function.
1715 (gfc_simplify_ubound): New function.
1716 * intrinsic.h: Declare them.
1717 * intrinsic.c (add_functions): Use them.
1718
1719 2003-09-14 Paul Brook <paul@nowt.org>
1720
1721 * io.c (format_lex): Initialize negative_flag.
1722 (check_format): Intialize repeat.
1723 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1724 (gfc_new_var_expr): Ditto.
1725
1726 2003-09-14 Paul Brook <paul@nowt.org>
1727
1728 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1729 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1730
1731 2003-09-12 Paul Brook <paul@nowt.org>
1732
1733 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1734
1735 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1736
1737 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1738 for a correct expression.
1739
1740 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1741
1742 * trans-intrinsic.c (real_compnt_info): New struct.
1743 (prepare_arg_info): New function.
1744 (gfc_conv_intrinsic_set_exponent): New function.
1745 (gfc_conv_intrinsic_scale): New function.
1746 (gfc_conv_intrinsic_nearest): New function.
1747 (gfc_conv_intrinsic_fraction): New function.
1748 (gfc_conv_intrinsic_exponent): New function.
1749 (gfc_conv_intrinsic_spacing): New function.
1750 (gfc_conv_intrinsic_rrspacing): New function.
1751 (gfc_conv_intrinsic_function): Use them.
1752
1753 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1754
1755 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1756 build_int_2 changed from (high, low) to (low, high).
1757 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1758 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1759 iocall_set_nml_val_float, iocall_set_nml_val_char,
1760 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1761 (gfc_build_io_library_fndecls): Add variable initialization.
1762 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1763 (build_dt): Add namelist support.
1764 * io.c (value): New variable.
1765 (check_format): Support FMT_H now.
1766
1767 2003-09-07 Paul Brook <paul@nowt.org>
1768
1769 * io.c (gfc_resolve_dt): Error if format label is not defined.
1770
1771 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1772
1773 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1774 about case_switch's break. The other is about building the condition
1775 statement tree, which judges the argument in the range of the
1776 corresponding integer type.
1777 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1778 for the large values.
1779
1780 2003-09-05 Paul Brook <paul@nowt.org>
1781
1782 * f95-lang.c (expand_function_body): Gimplify the function.
1783
1784 2003-09-04 Jeff Law <law@redhat.com>
1785
1786 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1787 index zero!
1788
1789 2003-09-04 Paul Brook <paul@nowt.org>
1790
1791 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1792 (gfc_expand_stmt): New function.
1793 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1794 (expand_function_body): Use tree_rest_of_compilation.
1795 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1796
1797 2003-09-03 Jeff Law <law@redhat.com>
1798
1799 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1800 index zero!
1801
1802 2003-08-30 Paul Brook <paul@nowt.org>
1803
1804 * f95-lang.c (builtin_function): Remove #if 0 code.
1805 (gfc_define_builtin): New function.
1806 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1807 * mathbuiltins.def: New file.
1808 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1809 (gfc_intrinsic_map): Use mathbuiltins.def.
1810 (gfc_intrinsic_builtin_t): Remove.
1811 (gfc_build_intrinsic_lib_fndecls): Update.
1812 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1813 signed_size_type_node.
1814
1815 2003-08-29 Paul Brook <paul@nowt.org>
1816
1817 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1818
1819 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1820
1821 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1822 (gfc_conv_intrinsic_function): Add MODULO.
1823
1824 2003-08-22 Jason Merrill <jason@redhat.com>
1825
1826 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1827
1828 2003-08-22 Andreas Jaeger <aj@suse.de>
1829
1830 * Make-lang.in (f95.install-common): Add DESTDIR support.
1831 * (f95.install-info): Likewise.
1832 (f95.uninstall): Likewise.
1833
1834 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1835
1836 * trans-types.c (gfc_init_types): Initialize
1837 signed_size_type_node with size_type_node.
1838
1839 2003-08-18 Paul Brook <paul@nowt.org>
1840
1841 * dependency.c (gfc_dependency): New enum.
1842 (check_another_array_ref): Remove.
1843 (gfc_get_array_from_component): Remove.
1844 (get_x): Remove.
1845 (get_range): Remove.
1846 (get_no_of_elements): Use mpz_t, not mpf_t.
1847 (transform_sections): New function.
1848 (gfc_check_range_range): Rename ...
1849 (gfc_check_section_vs_section): ... to this. Use new function.
1850 (gfc_is_inside_range): Rewrite to match.
1851 (gfc_check_element_vs_section): Ditto.
1852 (gfc_check_element_vs_element): Ditto.
1853 (get_deps): Ditto.
1854 (gfc_dep_resolver): Ditto. Remove unused parameter.
1855 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1856 gfc_check_element_vs_element, gfc_is_inside_range,
1857 gfc_get_array_from_component): Remove prototypes for static functions.
1858 (gfc_dep_resolver): Update prototype.
1859 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1860
1861 2003-08-15 Paul Brook <paul@nowt.org>
1862
1863 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1864 return values to parent scope.
1865 (gfc_build_dummy_array_decl): Ditto.
1866
1867 2003-08-14 Paul Brook <paul@nowt.org>
1868
1869 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1870 size of the type, not the pointer.
1871 * resolve.c (resolve_symbol): Give more accurate error message.
1872
1873 2003-08-10 Paul Brook <paul@nowt.org>
1874
1875 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1876
1877 2003-08-10 Paul Brook <paul@nowt.org>
1878
1879 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1880 type components.
1881
1882 2003-08-10 Chun Huang <compiler@sohu.com>
1883
1884 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1885 (resolve_symbol): Ditto.
1886 * trans-expr.c (gfc_conv_statement_function): New function.
1887 (gfc_conv_function_expr): Use it.
1888
1889 2003-08-10 Paul Brook <paul@nowt.org>
1890
1891 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1892 (walk_function_expr): Set section rank.
1893 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1894
1895 2003-08-10 Paul Brook <paul@nowt.org>
1896
1897 * intrinsic.c (add_sym): Prefix names with correct string.
1898 (add_sym_0s): New function.
1899 (add_subroutines): Register abort.
1900
1901 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1902
1903 * gfortran.h: Introduce options to control the mangling.
1904 * lang.opt: Likewise.
1905 * options.c (gfc_init_options): Handle the options.
1906 * trans-common.c (gfc_sym_mangled_common_id): New function.
1907 (gfc_build_common_decl): Call it.
1908 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1909 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1910
1911 2003-08-09 Paul Brook <paul@nowt.org>
1912
1913 * module.c (mio_symbol): Always ouput a namespace for formal args.
1914 (load_needed): Namespace now belong to their proper symbol.
1915 (gfc_dump_module): Change G95=>GFORTRAN.
1916
1917 2003-08-05 Paul Brook <paul@nowt.org>
1918
1919 * options.c: Force -fg77-calls.
1920
1921 2003-08-02 Paul Brook <paul@nowt.org>
1922
1923 * Makelang.in: Rename G95_* to GFORTRAN_*.
1924 * All sources: Rename G95_* to GFC_*.
1925
1926 2003-08-01 Paul Brook <paul@nowt.org>
1927
1928 * fortran/Make-lang.in: Use GMPLIBS.
1929 * fortran/config-lang.in: Set need_gmp.
1930 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1931
1932 2003-07-27 Andreas Jaeger <aj@suse.de>
1933
1934 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1935 ISO C90.
1936 * trans-const.c (gfc_init_constants): Likewise.
1937 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1938
1939 * gfortranspec.c: Convert to ISO C90.
1940 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1941
1942 2003-07-26 Paul Brook <paul@nowt.org>
1943
1944 * lang.opt: Add -fdump-parse-tree.
1945 * options.c (gfc_handle_option): Ditto.
1946 * resolve.c (resolve_forall_iterators): Convert to proper type.
1947 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1948
1949 2003-07-26 Paul Brook <paul@nowt.org>
1950
1951 * Makefile.in: Add build dependencies on files common with rest of gcc.
1952
1953 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1954
1955 * trans.h: Declare g95_trans_pointer_assignment.
1956 * trans-expr.c (g95_trans_pointer_assignment): New function.
1957 (g95_trans_pointer_assign): Use it.
1958 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1959 (g95_trans_pointer_assign_need_temp): New function.
1960
1961 2003-07-26 Paul Brook <paul@nowt.org>
1962
1963 * gfortran.texi: Replace references to g95.
1964
1965 2003-07-26 Paul Brook <paul@nowt.org>
1966
1967 Rename g95_* to gfc_*.
1968
1969 2003-07-25 Paul Brook <paul@nowt.org>
1970
1971 * gfortran.h: Rename from g95.h.
1972 * trans-types.c (boolean_type_node, booelan_true_node,
1973 boolean_false_node): Remove.
1974 * trans-types.h: Ditto.
1975
1976 2003-07-25 Chun Huang <compiler@sohu.com>
1977
1978 * parse.c (accept_statement): Implement BLOCK DATA statement.
1979 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1980 variables.
1981
1982 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1983
1984 * trans-stmt.c (temporary_list): Define.
1985 (g95_trans_assign_need_temp): New function.
1986 (g95_trans_forall_1): Modified for WHERE.
1987 (g95_trans_where_assign): Modified.
1988 (g95_trans_where_2): Modified.
1989 (g95_evaluate_where_mask): Modified.
1990 (g95_trans_where): Modified.
1991 (g95_get_temp_expr): Removed.
1992 (g95_add_to_where_stmt_list): Removed.
1993 (compute_overall_iter_number): Modified for WHERE.
1994 * trans.h: Remove where_stmt_list.
1995
1996 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1997
1998 * lang.opt: Correct description of options -J and -M.
1999
2000 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2001
2002 * lang.opt: Move help text to here.
2003 * lang-options.h: Remove.
2004
2005 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2006 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2007 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2008 on kind.
2009
2010 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2011 Paul Brook <paul@nowt.org>
2012
2013 * check.c (check_rest): Use global pedantic flag.
2014 * io.c (data_desc): Ditto.
2015 * error.c (g95_warning, g95_warning_now): Use global flag.
2016 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2017 (expand_function_body): Update to new prototypes.
2018 (g95_init): Use new option names.
2019 * g95.h (g95_option_t): Standardize names.
2020 (g95_init_options, g95_handle_option): Update prototypes.
2021 * interface.c: Use new option names.
2022 * match.c: Ditto.
2023 * module.c: Ditto.
2024 * parse.c: Ditto.
2025 * primary.c: Ditto.
2026 * resolve.c: Ditto.
2027 * scanner.c: Ditto.
2028 * simplify.c: Ditto.
2029 * symbol.c: Ditto.
2030 * trans-array.c: Ditto.
2031 * trans-expr.c: Ditto.
2032 * trans-types.c: Ditto.
2033 * trans-decl.c: Ditto.
2034 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2035 * trans.h: Ditto.
2036 * options.c (g95_display_help): Remove.
2037 (g95_init_options): Convert to new scheme.
2038 (set_Wall): Ditto
2039 (g95module_option): Ditto, rename from g95_parse_arg.
2040 (g95_handle_module_path_options): New function.
2041 * trans-equivalence.c: Fix error message.
2042 * lang.opt: Corrections.
2043
2044 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2045
2046 * lang.opt: New file.
2047
2048 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2049
2050 * decl.c (match_attr_spec): Set colon_seen.
2051
2052 2003-07-14 Paul Brook <paul@nowt.org>
2053
2054 * trans-array.c: Update comment.
2055 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2056 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2057 minmaxloc,minmaxval): Ditto.
2058 * trans-io.c (g95_trans_transfer): Ditto.
2059 * trans-stmt.c: Remove unneeded prototypes.
2060 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2061 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2062 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2063 Don't share loopinfo.
2064 (compute_overall_iter_number): Declare as static.
2065 (allocate_temp_for_forall_nest): Ditto.
2066 (g95_trans_forall_1): Don't pass shared loopinfo.
2067 * trans.c (g95_start_block): Expand comment.
2068
2069 2003-07-12 Paul Brook <paul@nowt.org>
2070
2071 * arith.c (g95_index_integer_kind): Remove unused initializer.
2072 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2073 index by size of element.
2074 (generate_loop_for_rhs_to_temp): Ditto.
2075 (allocate_temp_for_forall_nest): Use element size, not index size.
2076
2077 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2078
2079 * arith.c (g95_index_integer_kind): Add a TODO.
2080 * simplify.c (g95_simplify_nearest): Add a TODO.
2081
2082 2003-07-09 Chun Huang <compiler@sohu.com>
2083
2084 * trans.h: Add declarations for gfor_fndecl_string_scan and
2085 gfor_fndecl_string_verify.
2086 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2087 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2088 (g95_conv_intrinsic_verify): New function.
2089 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2090 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2091 of parameter 'BACK=.TRUE.'
2092
2093 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2094
2095 * trans-stmt.c (iter_info, forall_info): Define.
2096 (g95_trans_forall_block): Remove.
2097 (g95_trans_forall_loop): Use forall info blocks.
2098 (g95_trans_nested_forall_loop): New function.
2099 (g95_do_allocate): Handle things other than logical masks.
2100 (generate_loop_for_temp_to_lhs): New function.
2101 (generate_loop_for_rsh_to_temp): New function.
2102 (compute_inner_temp_size): New function.
2103 (compute_overall_iter_number): New function.
2104 (allocate_temp_for_forall_nest): New function.
2105 (g95_trans_forall): Move body ...
2106 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2107
2108 2003-07-02 Paul Brook <paul@nowt.org>
2109
2110 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2111 in correct scope. Change callers to match.
2112 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2113 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2114
2115 2003-07-02 Paul Brook <paul@nowt.org>
2116
2117 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2118 expression shape for all expressions.
2119 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2120
2121 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2122
2123 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2124 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2125 -Wconversion.
2126 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2127 * resolve.c (g95_resolve_index): Call it.
2128
2129 2003-07-02 Paul Brook <paul@nowt.org>
2130
2131 * iresolve.c (g95_resolve_reshape): Set expression shape.
2132 (g95_resolve_shape): Ditto.
2133 * simplify.c (g95_simplify_shape): Move common code outside condition.
2134 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2135
2136 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2137
2138 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2139 conformance checks.
2140
2141 2003-06-29 Paul Brook <paul@nowt.org>
2142
2143 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2144 * expr.c (find_array_element, find_component_ref): New functions.
2145 (remove_subobject_ref): New function.
2146 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2147 (simplify_ref_chain): New function.
2148 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2149 (g95_specification_expr): Simplify the expression.
2150 * resolve.c (resolve_operator): Check simplifications return code.
2151 (g95_resolve_expr): Ditto.
2152
2153 2003-06-26 Paul Brook <paul@nowt.org>
2154
2155 * expr.c (simplify_component_ref): New function.
2156 (g95_simplify_expr): Use it.
2157 * resolve.c (resolve_structure_cons): Handle references.
2158
2159 2003-06-25 Paul Brook <paul@nowt.org>
2160
2161 * trans-io.c (build_dt): Handle internal units.
2162
2163 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2164
2165 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2166 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2167 Use g95_array_index_type instead of integer_type_node.
2168 (g95_build_common_decl, g95_set_common_master_type): Use
2169 g95_character1_type_node instead of char_type_node.
2170 * trans-equivalence.c (g95_layout_local_equiv): As above.
2171
2172 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2173
2174 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2175 remove last remains of -fquiet.
2176
2177 2003-06-22 Paul Brook <paul@nowt.org>
2178
2179 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2180 (g95_resolve_expr): Ditto.
2181 (resolce_code): Mark as static.
2182 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2183 gimplifer doesn't (yet).
2184
2185 2003-06-20 Paul Brook <paul@nowt.org>
2186
2187 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2188 * match.c (g95_match_if): Add ST_PAUSE.
2189 (g95_match_stopcode): New function.
2190 (g95_match_pause, g95_match_stop): Use it.
2191 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2192 (decode_stmt, next_statement, parse_executable): Ditto.
2193 * resolve.c (resolve_code): Ditto.
2194 * st.c (g95_free_statement): Ditto.
2195 * trans-stmt.c (g95_trans_pause): New function.
2196 * trans-stmt.h: Declare it.
2197 * trans.c (g95_trans_code): Use it.
2198 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2199 Declare.
2200 (g95_build_builtin_function_decls): Initialize them.
2201 * trans.h: Ditto.
2202 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2203
2204 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2205
2206 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2207 match_filepos): Fix error handling.
2208
2209 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2210
2211 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2212 Add assertions on arguments.
2213 * resolve.c (expression_shape): Remove useless &.
2214 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2215 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2216 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2217 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2218 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2219 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2220 (g95_simplify_not, g95_simplify_scale): Add assertions.
2221
2222 2003-06-15 Paul Brook <paul@nowt.org>
2223
2224 Clean up stuff to work with the ssa optimizers.
2225 * convert.c (convert): Handle BOOLEAN_TYPEs.
2226 * f95-lang.c (g95_truthvalue_conversion): Implement.
2227 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2228 scalar values.
2229 * trans.h (g95_truthvalue_conversion): Declare.
2230 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2231 * trans-stmt.c (g95_trans_character_select): Don't create array
2232 assignments. Mark labels as indirect jump targets.
2233 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2234 (g95_get_dtype_cst): Handle LOGICAL types.
2235
2236 2003-06-14 Paul Brook <paul@nowt.org>
2237
2238 * f95-lang.c (g95_gimplify_expr): New function.
2239 * trans-array.c (g95_trans_array_constructor_value): Don't create
2240 array assignments.
2241 (g95_conv_expr_descriptor): Rename simple->gimple.
2242 * trans-expr.c (conv_expr_op): Use proper logical operators.
2243 * trans-intrinsic.c (build_fixbound_expr): New function.
2244 (build_fix_expr): Ditto.
2245 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2246 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2247
2248 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2249
2250 * array.c (g95_compare_array_spec): Remove unreachable code.
2251 * expr.c (g95_copy_expr): Likewise.
2252 * intrinsic.c (g95_convert_type): Likewise.
2253 * misc.c (g95_code2string): Likewise.
2254 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2255 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2256 * trans-stmt.c (g95_trans_select): Likewise.
2257 * primary.c (extend_ref): Add an assertion.
2258 * simplify.c (g95_convert_constant): Add const.
2259 * intrinsic.h: Remove g95_check_x_ni.
2260 * f95-lang.c (g95_finish): Call g95_release_include_path.
2261
2262 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2263
2264 * resolve.c (resolve_contained_functions): Fix typo introduced on
2265 2003-01-13.
2266
2267 2003-06-09 Paul Brook <paul@nowt.org>
2268
2269 * g95.h: Include system.h not hwint.h.
2270 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2271 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2272
2273 2003-06-09 Paul Brook <paul@nowt.org>
2274
2275 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2276 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2277 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2278 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2279 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2280 objects.
2281 * trans.h (g95_trans_equivalence, g95_trans_common,
2282 g95_add_decl_to_function): Declare.
2283 * trans-common.c, trans-equivalence.c: New files.
2284
2285 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2286
2287 * intrinsic.c (g95_intrinsic_extension): Remove.
2288 (add_functions): Substitute g95_check_x for g95_check_x_ni
2289 everywhere.
2290 (g95_init_expr_extensions): New function.
2291 (g95_intrinsic_func_interface): Use it.
2292 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2293 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2294 g95_check_precision, g95_check_present, g95_check_radix,
2295 g95_check_range, g95_check_selected_real_kind): Do not set
2296 g95_intrinsic_extension.
2297 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2298
2299 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2300
2301 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2302
2303 * g95.h (ref_type): Name this type explicitly.
2304 * module.c (MIO_NAME): Add specialisations of mio_name.
2305 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2306 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2307 (ab_attribute): Name this type explicitly.
2308 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2309
2310 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2311
2312 * trans-intrinsic.c (g95_conv_allocated): New function.
2313 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2314
2315 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2316
2317 * f95-lang.c: Don't include g95-support.h
2318 (g95_mark_addressable): Add prototype.
2319 (g95_init_decl_processing): Remove C front end hack.
2320 * f95-tree.c: Remove file.
2321 * support.c: Remove file.
2322 * g95-support.h: Remove file.
2323 * trans-types.c (g95_init_types): Set up boolean
2324 type related tree nodes.
2325 * Make-lang.in: Remove rules for dead files and
2326 dependencies on them.
2327
2328 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2329
2330 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2331 C front end dependency. Also, convert.c does not depend on
2332 g95-support.h anymore.
2333 * convert.c: Don't include c-common.h and g95-support.h
2334 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2335 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2336 stmts_are_full_exprs_p, current_stmt_tree,
2337 current_scope_stmt_stack): Remove.
2338 * g95-support.h (unsigned_conversion_warning): Kill proto.
2339 (boolean_type_node, boolean_true_node, boolean_false_node):
2340 Don't define here. Instead, make then true tree nodes in
2341 trans-types.
2342 * support.c (c_global_trees): Die, C front end, die!!!
2343 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2344 uintmax_type_node, string_type_node and const_string_type_node.
2345 (decl_constant_value, overflow_warning): Make static functions.
2346 They are in death row too, though.
2347 (default_conversion, c_expand_asm_operands): Remove.
2348 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2349 trans.c: Don't include c-common.h.
2350 * trans-types.c (boolean_type_node, boolean_true_node,
2351 boolean_false_node): Make them real tree nodes.
2352 * trans-types.h (intmax_type_node, string_type_node,
2353 const_string_type_node): Hack to work around C dependencies
2354 in builtin-types.def.
2355
2356 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2357
2358 * decl.c (decl_types): Add some iterators-like sentinels.
2359 * decl.c (match_attr_spec): Use them.
2360 Use "decl_types" instead of "int".
2361 Add cast in call to g95_match_strings.
2362 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2363 instead of "int".
2364 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2365 (g95_interface_info): Use "g95_intrinsic_op".
2366 * dump-parse-tree.c (g95_show_namespace): Use them.
2367 * interface.c (g95_check_interfaces): Use them.
2368 * module.c (read_module, write_module): Use them.
2369 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2370 Use "g95_intrinsic_op".
2371 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2372 Add a default case in switch statement.
2373 * intrinsic.h (g95_generic_isym_id): Moved to...
2374 * g95.h (g95_generic_isym_id): here.
2375 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2376 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2377 * trans-intrinsic.c (g95_intrinsic_map_t,
2378 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2379 * match.c (g95_match_intrinsic_op): Add cast in call to
2380 g95_match_strings.
2381
2382 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2383
2384 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2385 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2386 constant_fits_type_p, convert_and_check,
2387 unsigned_conversion_warning): Remove these ugly remnants
2388 we inherited from the C front end.
2389 (function_types_compatible): Remove '#if 0'-edcode.
2390 (build_modify_expr): Likewise.
2391 (convert_for_assignment): Don't use the deceased functions.
2392 The parameter fundecl is now unused.
2393 (decl_constant_value): Always just return decl. In fact
2394 this function is not used at present, but it might be in
2395 the future, when we start using the tree inliner.
2396 (overflow_warning, default_conversion, c_expand_asm_operands):
2397 Abort when these are called, they are part of the C type
2398 checking implementation and therefore poison to Fortran.
2399
2400 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2401
2402 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2403 c-pretty-print.o and c-dump.o. Add a comment on why we
2404 depend on c-semantics.c.
2405 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2406 Don't use the C front end tree dumper hook to dump the
2407 language specific tree representation -- we don't have
2408 one. So instead, inherit the default langhook.
2409
2410 2003-06-02 Paul Brook <paul@nowt.org>
2411
2412 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2413
2414 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2415
2416 * check.c (g95_check_associated): Use proper types. Remove
2417 extraneous argument in call to g95_error().
2418
2419 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2420
2421 * resolve.c (resolve_operator): Make logical operands convert to the
2422 type with higher kind.
2423
2424 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2425
2426 * check.c (g95_check_associated): Make sure both pointer and target has
2427 the same type and rank. Null pointer or array section with vector
2428 subscript as target are not allowed.
2429 * trans.h: Declare gfor_fndecl_associated.
2430 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2431 gfor_fndecl_associated.
2432 * trans-intrinsic.c (g95_conv_associated): New function.
2433 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2434
2435 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2436
2437 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2438 according to POINTER itself rather than TARGET.
2439 (g95_conv_expr_descriptor): Make lbound start at 1.
2440 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2441
2442 2003-06-01 Paul Brook <paul@nowt.org>
2443
2444 * expr.c (g95_type_convert_binary): Make it match the standard.
2445 * g95.texi: Remove dead link.
2446
2447 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2448
2449 * g95.texi: Cleanup somewhat in preparation for inclusion
2450 in GCC CVS.
2451
2452 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2453 Canqun Yang <canqun@yahoo.com.cn>
2454
2455 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2456 type.
2457 (g95_find_forall_index): Return proper value.
2458 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2459 compare the return value from g95_find_forall_index.
2460
2461 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2462 * g95.h, io.c (g95_st_label): Remove "length".
2463 (g95_symtree): Remove "link".
2464 (g95_case): Remove "code".
2465 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2466 g95_convert_real): Make an argument pointer to const.
2467 * decl.c (colon_seen): Add a TODO.
2468 * interface.c (g95_compare_types): Fix typo.
2469 * interface.c (compare_interfaces): Preserve value of "p".
2470 * intrinsic.c (sort_actual): Remove "i".
2471 * match.c (g95_match_assign): Proper type in call to g95_match().
2472 * parse.c (next_free): Avoid duplicate call due to macro.
2473 * parse.c (check_statement_label): wrong type in call to g95_error.
2474 * primary.c (match_real_constant): Add a TODO.
2475 * resolve.c (resolve_select): Remove useless conditional.
2476 * simplify.c (g95_simplify_repeat): Proper assignment to
2477 "value.character.string".
2478 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2479 g95_error.
2480
2481 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2482
2483 * trans-stmt.c: Remove unnecessary include file defaults.h.
2484
2485 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2486
2487 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2488 stride.
2489 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2490 actual variables used as FORALL indexes.
2491
2492 2003-05-15 Paul Brook <paul@nowt.org>
2493
2494 * trans-array.c (g95_trans_static_array_pointer): Use
2495 null_pointer_node.
2496 (g95_trans_deferred_array): Initialize static array pointers.
2497 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2498 correctly pass POINTER and absent CHARACTER arguments.
2499
2500 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2501
2502 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2503 (g95_resolve_forall_body): Resolve FORALL body.
2504 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2505 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2506 (g95_find_forall_index): Check whether the FORALL index appears in
2507 the expression or not.
2508 (resolve_code): Modified.
2509
2510 2003-05-14 Paul Brook <paul@nowt.org>
2511
2512 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2513
2514 2003-05-13 Paul Brook <paul@nowt.org>
2515
2516 * trans-types.c (g95_max_array_element_size): Now a tree node.
2517 (g95_init_types): Work out max size properly.
2518 (g95_get_dtype_cst): Modify to match.
2519
2520 2003-05-11 Paul Brook <paul@nowt.org>
2521
2522 * trans-io.c (add_case): Create a label decl for case labels.
2523
2524 2003-05-11 Paul Brook <paul@nowt.org>
2525
2526 * arith.c (g95_integer_index_kind): New variable.
2527 * f95-lang.c (g95_init): Move frontend initialization here ...
2528 (g95_post_options): ... from here.
2529 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2530 * intrinsic.c (add_functions): Use index kinds.
2531 * iresolve.c: Convert to index_kind where needed.
2532 * resolve.c (g95_resolve_index): Make public, use index_kind.
2533 (resolve_array_ref): Adjust to match.
2534 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2535 * trans-stmt.c: Ditto.
2536 * trans-types.c: Ditto.
2537 * trans-types.h (g95_array_index_kind): Remove declaration.
2538 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
2539
2540 2003-05-07 Paul Brook <paul@nowt.org>
2541
2542 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
2543 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
2544 of bound indices.
2545
2546 2003-05-07 Paul Brook <paul@nowt.org>
2547
2548 * trans-array.c (trans_static_array_pointer,
2549 g95_trans_array_constructor_value, g95_conv_array_initializer,
2550 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
2551 (g95_add_loop_ss_code): Convert subscripts to the correct type.
2552 * trans-stmt.c (g95_trans_character_select): Ditto.
2553 * trans-types.c (g95_init_types): Ditto.
2554
2555 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
2556
2557 * f95-lang.c (expand_function_body): Use input_line, not lineno.
2558 * trans-decl.c (g95_generate_function_code,
2559 g95_generate_constructors): Likewise.
2560 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
2561 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
2562 Likewise.
2563
2564 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2565 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
2566 with components point to the DERIVED type itself, and two DERIVED
2567 type with components point to each other.
2568 * trans-expr.c (g95_conv_componet_ref): Modified
2569
2570 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2571 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
2572 null_pointer_node.
2573 (g95_trans_pointer_assign): Implement Nullify.
2574
2575 2003-05-01 Paul Brook <paul@nowt.org>
2576
2577 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
2578 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
2579
2580 2003-05-01 Paul Brook <paul@nowr.org>
2581
2582 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
2583 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
2584 IS_EMPTY_STMT.
2585
2586 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
2587
2588 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
2589 CASE_LABEL_EXPR.
2590
2591 2003-04-28 Paul Brook <paul@nowt.org>
2592
2593 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
2594 as their kind suggests.
2595 (g95_resolve_reshape): Ditto.
2596
2597 2003-04-28 Chun Huang <compiler@sohu.com>
2598
2599 * trans-expr.c (g95_conv_substring_expr): New function.
2600 (g95_conv_expr): Use it.
2601
2602 2003-04-28 Paul Brook <paul@nowt.org>
2603
2604 * iresolve.c (g95_resolve_transpose): Make it match the
2605 implementation.
2606 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2607
2608 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2609
2610 * trans-types.c (g95_add_field_to_struct): New function to
2611 add a field to a UNION_TYPE or RECORD_TYPE.
2612 * trans-types.h (g95_add_field_to_struct): Prototype.
2613 (g95_get_derived_type): Use g95_add_field_to_struct to add
2614 components.
2615 * trans-io.c (g95_add_field): Remove.
2616 (ADD_FIELD): Use new g95_add_field_to_struct function.
2617 (ADD_STRING): Likewise.
2618 * trans-stmt.c (g95_trans_select): Likewise.
2619 (g95_add_field): Remove duplicated function.
2620
2621 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2622
2623 Port implementation for CHARACTER SELECT from Andy's tree.
2624 * trans-stmt.c (g95_trans_character_select): Implement character
2625 select. (g95_add_field): New function.
2626 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2627 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2628 * g95.h (struct g95_case): Add field 'int n'.
2629 * trans.h: Declare 'gfor_fndecl_select_string'.
2630
2631 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2632
2633 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2634 (g95_insert_bbd): Die on duplicates.
2635 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2636
2637 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2638
2639 * g95.texi: Require GMP 4.0 -- like we actually
2640 do. Explain the testsuite and what-goes-where.
2641 Don't use undefined texinfo symbol. Break very
2642 long line. Remove finished item from the list
2643 of open projects.
2644
2645 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2646
2647 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2648 LOGICAL type.
2649
2650 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2651
2652 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2653 (g95_trans_forall_body): New function.
2654
2655 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2656
2657 * resolve.c (resove_where): New function.
2658 (resolve_where_shape): New function.
2659 (resolve_code): Add call to 'resolve_where'
2660 * trans-stmt.c (g95_trans_where): Modified.
2661 (g95_trans_where_2): New function.
2662 (g95_trans_where_assign): New function.
2663 (g95_evaluate_where_mask): New function.
2664 (g95_add_to_stmt_list): New function.
2665 (g95_get_temp_expr): New function.
2666 * trans.h (where_stmt_list): New structure.
2667
2668 2003-04-10 Paul Brook <paul@nowt.org>
2669
2670 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2671 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2672
2673 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2674
2675 Update after mainline -> tree-ssa-branch merge.
2676 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2677 call.
2678 (g95_init): Update for new lang_hooks definition.
2679 (g95_post_options): New langhook.
2680 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2681 * scanner.c (g95_new_file): Comment update.
2682
2683 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2684
2685 * g95.h, lang-options.h: Add -Wimplicit-interface.
2686 * options.c (g95_init_options, g95_parse_arg): Set it.
2687 * interface.c (check_intents): Warn about call with implicit
2688 interface.
2689 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2690 g95_procedure_use.
2691
2692 2003-04-05 Paul Brook <paul@nowt.org>
2693
2694 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2695 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2696
2697 2003-03-29 Paul Brook <paul@nowt.org>
2698
2699 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2700 (g95_resolve_unpack): Ditto.
2701 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2702 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2703 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2704
2705 2003-03-25 Paul Brook <paul@nowt.org>
2706
2707 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2708 * arith.h: Ditto.
2709 * array.c (g95_free_array_ref): Ditto.
2710 * g95.h: Ditto.
2711 * symbol.c (g95_use_derived_tree): Ditto.
2712 * intrinsic.c (add_functions): Use simplification for SCALE.
2713 * primary.c (g95_match_rvalue): Test sym, not symtree.
2714
2715 2003-03-25 Paul Brook <paul@nowt.org>
2716
2717 * trans-decl.c (build_function_decl): Add parameter before it gets
2718 turned into a constant.
2719 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2720 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2721 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2722
2723 2003-03-22 Paul Brook <paul@nowt.org>
2724
2725 * trans-array.c (g95_conv_array_initializer): Allow scalar
2726 expressions.
2727 * trans-decl.c (g95_finish_var_decl): Result variables are not
2728 module variables.
2729 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2730 (g95_conv_intrinsic_function): Use it.
2731 * trans-types.h (g95_type_spec): Remove dead declaration.
2732
2733 2003-03-21 Paul Brook <paul@nowt.org>
2734
2735 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2736
2737 2003-03-20 Paul Brook <paul@nowt.org>
2738
2739 * trans-decl.c (g95_build_function_decl): Put character length
2740 parameters at the end of the function declaration.
2741 * trans-expr.c (g95_conv_function_call): Ditto.
2742 * trans-types.c (g95_get_function_type): Ditto.
2743
2744 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2745
2746 * resolve.c (resolve_formal_arglist): Don't impose intent for
2747 procedure arguments of pure functions.
2748 (resolve_select): Remove redundant assignment.
2749
2750 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2751
2752 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2753 Remove option l1.
2754 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2755 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2756 const.
2757 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2758 Order list.
2759 * symbol.c (g95_add_type): Fix typo in comment.
2760
2761
2762 2003-03-16 Paul Brook <paul@nowt.org>
2763
2764 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2765 * expr.c (g95_build_call): Remove.
2766 * f95-lang.c (puchdecl_top_level): New function.
2767 * g95.h (g95_code): Store resolved symbol, not just the name.
2768 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2769 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2770 (g95_get_intrinsic_sub_symbol): New function.
2771 * iresolve.c (g95_resolve_cpu_time): Use it.
2772 (g95_resolve_random_number): Ditto.
2773 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2774 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2775 the correct DECL_CONTEXT. Add global symbold to the global scope.
2776 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2777 fixed.
2778
2779 2003-03-16 Paul Brook <paul@nowt.org>
2780
2781 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2782 * options.c (g95_parse_arg): Ditto.
2783 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2784 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2785 for the procedure, not the parameter.
2786 * trans-array.c (g95_trans_g77_array): New function.
2787 (g95_trans_assumed_size): Use it.
2788 (g95_trans_dummy_array_bias): Ditto.
2789 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2790 (g95_conv_expr_descriptor): ... to here. Update callers.
2791 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2792 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2793 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2794 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2795 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2796 (g95_sym_type): Ditto.
2797
2798 2003-03-15 Paul Brook <paul@nowt.org>
2799
2800 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2801 first chain.
2802 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2803
2804 2003-03-14 Paul Brook <paul@nowt.org>
2805
2806 * trans-array.c (g95_array_is_packed): Remove.
2807 (g95_conv_array_base): Correctly handle all descriptorless cases.
2808 (g95_conv_array_stride): Use descriptorless strides.
2809 (g95_trans_dummy_array_bias): Don't always repack the array.
2810 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2811 packed.
2812 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2813 dummy and non-dummy arrays...
2814 (g95_sym_type, g95_get_derived_type): ... like these.
2815 (g95_get_array_type_bounds): Allow discontiguous arrays.
2816
2817 2003-03-12 Paul Brook <paul@nowt.org>
2818
2819 * array.c (g95_resolve_array_spec): Fix comment.
2820 * g95.h (symbol_attributes): New flag always_explicit.
2821 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2822 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2823 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2824 (g95_trans_array_bounds): Allow assumed shape arrays.
2825 (g95_trans_repack_array): Remove.
2826 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2827 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2828 bounds for assumed size arrays.
2829 (g95_build_dummy_array_decl): Use descriptorless arrays.
2830 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2831 (g95_trans_pointer_assign): Fix typo.
2832 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2833 code.
2834 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2835 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2836 Also modify callers.
2837 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2838
2839 2003-03-08 Paul Brook <paul@nowt.org>
2840
2841 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2842 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2843 * resolve.c (compare_spec_to_ref): Allow full array sections.
2844
2845 2003-03-08 Paul Brook <paul@nowt.org>
2846
2847 * expr.c (g95_simplify_expr): Also simplify array index and
2848 substring expressions.
2849 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2850 * trans-array.c (g95_trans_array_bounds): New function.
2851 (g95_trans_auto_array_allocation): Use it.
2852 (g95_trans_assumed_size): Rewrite.
2853 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2854 (gfor_fndecl_repack): Remove.
2855 (g95_build_qualified_array): Handle absent upper bounds.
2856 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2857 (g95_get_symbol_decl): Update.
2858 (g95_build_intrinsic_function_decls): Initialize new decls.
2859 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2860 (gfor_fndecl_repack): Remove.
2861 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2862 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2863 (g95_get_nodesc_array_type): Handle absent bounds.
2864 * trans-types.h (g95_get_nodesc_array_type): Declare.
2865
2866 2003-03-04 Paul Brook <paul@nowt.org>
2867
2868 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2869 builtin-types.def.
2870
2871 2003-03-02 Paul Brook <paul@nowt.org>
2872
2873 * options.c (g95_init_options): Drfault to 1.
2874 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2875 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2876 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2877 Handle non-constant size automatic arrays.
2878 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2879 generic bound functions.
2880 (g95_trans_auto_array_allocation): Don't create a descriptor.
2881 (g95_trans_assumed_size): New function (broken).
2882 (g95_trans_dummy_array_bias): Remove unused var.
2883 * trans-array.h (g95_trans_assumed_size): Declare.
2884 * trans-decl.c (create_index_var): New fuction.
2885 (g95_build_qualified_array): New function.
2886 (g95_get_symbol_decl): Use it.
2887 (g95_trans_deferred_vars): Handle assumed shape seperately.
2888 * trans-types.c (get_element_type): Handle heap allocated arrays.
2889 (g95_is_nodesc_array): Include non-const size arrays.
2890 (g95_get_nodesc_array_type): Ditto.
2891
2892 2003-02-23 Paul Brook <paul@nowt.org>
2893
2894 * trans-array.c (g95_array_init_size): Should use stride, not size of
2895 last dimension.
2896
2897 2003-02-18 Paul Brook <paul@nowt.org>
2898
2899 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2900 after intrinsic function check.
2901
2902 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2903
2904 * io.c (match_io): Fix missing return value and remove useless
2905 assignment.
2906 * match.c (g95_match): Remove useless assignment.
2907 * module.c (parse_string): Remove useless post increment.
2908 * simplify.c (g95_simplify_verify): Remove useless assignment.
2909
2910 2003-02-15 Paul Brook <paul@nowt.org>
2911
2912 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2913 * g95.h (symbol_attribute): Add referenced member.
2914 (g95_symbol): Add dummy_order member.
2915 (g95_set_sym_referenced): Declare.
2916 * match.c (g95_match_assignment, g95_match_call): Use it
2917 * primary.c (match_actual_arg, g95_match_rvalue,
2918 g95_match_variable): Ditto.
2919 * symbol.c (next_dummy_order): New variable.
2920 (g95_set_sym_referenced): New function.
2921 (check_done): New function.
2922 (g95_add_*): Use it.
2923 * trans-decl.c: Make formatting conform to GCC standards.
2924 (g95_defer_symbol_init): Add dummy variables in the right order.
2925 (g95_get_symbol_decl): Only accept referenced variables.
2926 (g95_create_module_variable): Module variables are always required.
2927 (generatr_local_decls): New function.
2928 (generate_local_vars): New function.
2929 (g95_generate_function_code): Use it.
2930
2931 2003-02-13 Paul Brook <paul@nowt.org>
2932
2933 * trans-decl.c (g95_conv_struct_cons): Remove.
2934 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2935 * trans-expr.c (g95_conv_structure): New function.
2936 (g95_conv_expr): Use it.
2937
2938 2003-02-09 Paul Brook <paul@nowt.org>
2939
2940 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2941 expressions multiple times.
2942 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2943
2944 2003-02-08 Paul Brook <paul@nowt.org>
2945
2946 * module.c (mio_symtree_ref): Declare as static.
2947 (mio_expr): Remove dead code.
2948 (read_module): Set the symtree link for fixups.
2949 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2950 (build_round_expr): ... to this.
2951 (g95_conv_intrinsic_aint): New function.
2952 (g95_conv_intrinsic_function): Use it.
2953
2954 2003-02-08 Paul Brook <paul@nowt.org>
2955
2956 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2957 offset after modificaton, not the increment expression.
2958 * dependency.c: Kill excess whitespace.
2959
2960 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2961
2962 * dependency.h: Remove some function declarations.
2963 * dependency.c (get_no_of_elements): Change this function not to
2964 return int.
2965 * other: Add comments for all modified functions.
2966
2967 2003-02-06 Paul Brook <paul@nowt.org>
2968
2969 * g95spec.c (lang_specific_functions): Fix initializer warning.
2970 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2971 for structure type names.
2972 * trans-decl.c (g95_cons_structure_cons): New function.
2973 (g95_get_symbol_decl): Use it.
2974 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2975 referencing code.
2976
2977 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2978
2979 * resolve.c (compare_cases): Add const to casts.
2980
2981 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2982
2983 * g95.h (g95_check_f): Change a1 to f1m.
2984 * intrinsic.c (add_sym_1m, check_specific,
2985 g95_intrinsic_func_interface): Use it.
2986
2987 * module.c (init_pi_tree): Remove useless cast.
2988 (fp2): Fix argument type.
2989
2990 * parse.c (parse_select_block): Add comment.
2991
2992 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2993
2994 * lang-options.h: Fix warning involving C90 concatenated
2995 strings.
2996
2997 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2998 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2999
3000 * io.c (format_asterisk): Complete initializer to kill warning.
3001 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3002 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3003 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3004 new defines to complete initializers. Kills all warnings.
3005
3006 * Make-lang.in: Comment cleanup.
3007
3008 2003-02-05 Paul Brook <paul@nowt.org>
3009
3010 * array.c (g95_free_constructor): Handle NULL expressions.
3011 * resolve.c (resolve_structure_cons): Ditto.
3012 * decl.c (g95_match_null): New Function.
3013 (variable_decl): Use it.
3014 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3015 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3016 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3017
3018 2003-02-05 Paul Brook <paul@nowt.org>
3019
3020 * trans.h (build1_v): New macro.
3021 (build_v): Remove pointless and incorrect prototype.
3022 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3023 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3024
3025 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3026
3027 * Make-lang.in (F95_OBJS): Remove one more dead file.
3028
3029 2003-02-01 Paul Brook <paul@nowt.org>
3030
3031 * lang-specs.h: Don't pass -ffixed-form to the linker.
3032 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3033
3034 2003-02-01 Paul Brook <paul@nowt.org>
3035
3036 * Make-lang.in (F95_OBJS): Remove dead files.
3037 * trans-array.c (g95_array_init_size): Do the right thing when
3038 ubound=NULL.
3039 * trans-decl.c (g95_generate_function_code): Initialize deffered
3040 symbol list before translating contained subroutines.
3041 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3042 scalar invariant values here...
3043 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3044 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3045
3046 2003-01-29 Paul Brook <paul@nowt.org>
3047
3048 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3049 (g95_walk_elemental_function_args): Reverse chains before adding.
3050 (g95_reverse_ss): Move about a bit.
3051 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3052 function arguments.
3053
3054 2003-01-28 Paul Brook <paul@nowt.org>
3055
3056 * intrinsic.c (resolve_intrinsic): Use correct union member.
3057 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3058 parameters.
3059 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3060 use associated variables.
3061 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3062 * trans-expr.c (g95_conv_expr_present): ... to here.
3063 * trans.h: Declare it.
3064 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3065
3066 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3067
3068 * array.c (expand_iterator): Suppress useless assignment.
3069 * decl.c (match_char_spec): Ditto.
3070 * io.c (match_io_iterator): Ditto.
3071 * primary.c (match_real_constant): Ditto.
3072 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3073 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3074 * matchexp.c (match_add_operand, match_level_5): Likewise.
3075 * module.c (parse_atom, find_enum): Likewise.
3076 * resolve.c: move #include <string.h>
3077 (resolve_select): Fix serious typo.
3078
3079 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3080
3081 * Make-lang.in: Don't build with broken tree-ssa-pre.
3082
3083 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3084
3085 * resolve.c (resolve_index): Add a TODO.
3086 * symbol.c: Remove useless "#include <ctype.h>".
3087
3088 2003-01-27 Paul Brook <paul@nowt.org>
3089
3090 * check.c (check_rest): Allow different type kinds as an extension.
3091 * g95.h (g95_resolve_f): Add f1m.
3092 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3093 * intrinsic.h: Chenge prototypes for MIN and MAX.
3094 * iresolve.c (g95_resolve_minmax): New function.
3095 (g95_resolve_min, g95_resolve_max): Use it.
3096 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3097 arguments once.
3098 (g95_conv_intrinsic_present): Fix logic.
3099
3100 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3101
3102 * g95.h (g95_case): Don't be a tree, be a double linked list.
3103 * match.c (match_case_selector): Remove redundant semantics check.
3104 Clean up a few goto's to make it a tiny little bit faster.
3105 * resolve.c (case_tree): Die.
3106 (compare_cases): Accept and compare unbounded cases too.
3107 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3108 whole list of g95_cases passed from resolve_select.
3109 (sane_logical_select): Die.
3110 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3111 type kind.
3112 (resolve_select): Fixup case expression for computed GOTOs, put it
3113 in expr, not expr2, for easier handing in the parse tree dumper and
3114 the code generator. Rewrite the rest of the function: Kill
3115 unreachable case labels and unreachable case blocks.
3116 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3117 an EXEC_SELECT, not case2 anymore.
3118 * trans-const.c (g95_conv_constant_to_tree): New function.
3119 (g95_conv_constant): Use it.
3120 * trans-const.h: Declare prototype for the new function.
3121 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3122 g95_trans_character_select): New static functions.
3123 (g95_trans_select): Rewrite.
3124
3125 2003-01-26 Paul Brook <paul@nowt.org>
3126
3127 * intrinsic.c (add_fnctions): Properly add dreal.
3128 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3129 (g95_conv_intrinsic_function): Use it.
3130 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3131
3132 2003-01-26 Paul Brook <paul@nowt.org>
3133
3134 Widespread changes to the handling of symbols in expressions. These
3135 are now linked via g95_symtree nodes.
3136 * parse.c (g95_fixup_sibling symbols): New function.
3137 (parse_contained): Use it.
3138 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3139 contained procedure that has bee correctly fixed up.
3140 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3141
3142 2003-01-24 Paul Brook <paul@nowt.org>
3143
3144 * trans-array.c (g95_walk_expr): Function result attributes are in
3145 sym->result.
3146 * trans-expr.c (g95_conv_function_call,
3147 g95_trans_arrayfunc_assign): Ditto.
3148 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3149
3150 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3151
3152 * expr.c (check_restricted): Fix error message.
3153 * symbol.c (free_st_labels): Plug memleak.
3154
3155 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3156
3157 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3158 reduce_binary_aa, reduce_binary, eval_intrinsic,
3159 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3160 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3161 for typesafe intrinsics helper functions.
3162 (g95_intrinsic_sym): Use them.
3163 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3164 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3165 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3166 check_specific, g95_intrinsic_func_interface,
3167 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3168 helper functions.
3169 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3170 * Make-lang.in: Don't disable warnings for strict prototypes
3171 any longer, everything is typesafe now.
3172
3173 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3174
3175 * bbt.c (duplicate_node): Make static.
3176 * module.c (module_name): Make static.
3177 * scanner.c (include_dirs): Make static.
3178
3179 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3180
3181 Hard coded _gfor_'s should not show up anymore.
3182 * g95.h (PREFIX): New macro.
3183 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3184 hard-coded "_gfor".
3185 (g95_resolve_random_number): Likewise.
3186 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3187 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3188 the new PREFIX macro from g95.h.
3189
3190 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3191
3192 The troubles of forking... Andy implemented this just now too.
3193 Let's stick to that and keep the trees close.
3194 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3195 * io.c: Revert previous changes.
3196 (g95_match_format): Match the format string as a character
3197 literal expression.
3198 * match.h (g95_statement_label): Declare external.
3199 * parse.c: Revert previous changes.
3200 * symbol.c (g95_free_st_label): Free a g95_expr instead
3201 if a 'char *'.
3202 * trans-io.c: Revert previous changes.
3203 (build_dt): Use set_string to set the format string.
3204
3205 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3206
3207 * io.c (format_string): Make non-static.
3208 (g95_match_format): Remember the format string.
3209 (terminate_io): Add I/O termination for empty I/O lists.
3210 * match.h: Declare external format_string.
3211 * parse.c (check_statement_label): Attack the format string
3212 to a format label for FORMAT statements.
3213 * trans-io.c (g95_add_field): Define prefix macro. Replace
3214 all uses of PREFIX define with a use of this macro.
3215 (build_dt): Implement formatted I/O for format labels.
3216
3217 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3218
3219 * lang-options.h: Kill "-std=F".
3220 * options.c: Remove unimplemented "-std=F". Modify
3221 web address.
3222 * misc.c (g95_terminal_width): New function.
3223 * error.c (g95_error_init_1): Use g95_terminal_width.
3224 * g95.h: Add prototype for g95_terminal_width, remove
3225 fmode flag.
3226
3227 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3228
3229 * Make-lang.in: Fix typo.
3230
3231 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3232
3233 * g95.h (struct g95_case): Remove unused cruft, new member
3234 'where' to keep track of the locus of the default case.
3235 * match.c (g95_match_case): Add locus to the current case.
3236 (match_case_selector): Likewise.
3237 * parse.c (parse_select_block): Move semantics check for
3238 multiple DEFAULT cases out of here to...
3239 * resolve.c (check_case_overlap): ...here. Return sooner
3240 when possible.
3241 (check_case_expr): Take two g95_cases now, use to sure the
3242 expression kinds are the same.
3243 (resolve_select): Cleanup.
3244
3245 2003-01-18 Paul Brook <paul@nowt.org>
3246
3247 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3248 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3249 variables.
3250 (g95_get_extern_function_decl): Put decls in the correct context.
3251
3252 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3253
3254 * trans-io.c: Port changes from Andy to set ERR flag.
3255
3256 2003-01-17 Paul Brook <paul@nowt.org>
3257
3258 * trans-array.c: Add various comments.
3259 (g95_ss_terminator): Declare as const.
3260 (g95_walk_expr): Remove first parameter and update all callers.
3261 (g95_walk_op_expr): Initialize scalar SS properly.
3262 * trans-array.h (g95_walk_expr): Update prototype.
3263 * trans-expr.c: Update for new g95_walk_expr.
3264 * trans-intrinsic.c: Ditto.
3265 * trans-io.c: Ditto.
3266 * trans.h: Various comments for SS chains.
3267
3268 2003-01-17 Paul Brook <paul@nowt.org>
3269
3270 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3271 and RRSPACING.
3272 * intrinsic.c (add_functions): Use them.
3273 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3274 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3275
3276 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3277
3278 Fallout of a small merge conflict:
3279 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3280
3281 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3282
3283 * initrinsic.c: New add_sym_* functions for strong typing.
3284 (add_conv): Make prototype strict.
3285 * dump-parse-tree.c, dependency.c: Include config.h
3286 * resolve.c, trans-io.c: Fix typos.
3287
3288 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3289
3290 * dump-parse-tree.c (g95_show_code_node): Show the
3291 condition for a computed GOTO that was transformed
3292 to a SELECT CASE construct.
3293 * resolve.c (check_case_overlap): Revert previous switch
3294 to treaps, it was too slow and didn't catch all trouble.
3295 (resolve_symbol): Be more flexible about module procedures.
3296 * symbol.c (check_conflict): Point to relevant section in
3297 the standard for dubious conflict. Allow procedure
3298 dummy arguments to be optional again.
3299 * trans-io (add_field): Rename to g95_add_field. Change
3300 all callers.
3301 * trans-stmt (trans_select): Handle unbounded cases for
3302 integer SELECT CASE constructs. Fix/add more comment.
3303
3304 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3305
3306 * g95.h: Uses GCC's function attribute macros.
3307 * error.c, module.c, parse.c, g95.h: More function attributes.
3308
3309 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3310 Forgot a file...
3311 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3312 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3313 DECL_SOURCE_FILE.
3314
3315 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3316
3317 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3318 DECL_SOURCE_LINE.
3319 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3320 instead of nowdead wrap_all_with_wfl.
3321
3322 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3323
3324 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3325 before generating code, so we can still see it even if the code
3326 generation phase dies.
3327
3328 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3329
3330 * decl.c (build_sym): Split out initialization expression parts...
3331 (add_init_expr_to_sym): ...to here.
3332 (variable_decl): Add the symbol following an attribute list to the
3333 symbol tree before parsing the optional initialization expression
3334 if the symbol is not of a derived type.
3335 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3336 a value if it is a PARAMETER.
3337
3338 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3339
3340 * misc.c: Don't #include <mcheck.h>
3341 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3342 ever was a glibc bug, then either this was never reported to
3343 glibc people, or it has been fixed for so long that there's
3344 no information you can find about it, anywhere.
3345
3346 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3347
3348 Fix warnings:
3349 * module.c (attr_bits, bt_types, array_spec_types):
3350 Switch 'const' and 'static'.
3351 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3352
3353 GNU'ify source code:
3354 * trans-io.c: Numerous fixes, one fixed warning and a few
3355 TODO markers so that we don't forget about them.
3356
3357 2003-01-13 Paul Brook <paul@nowt.org>
3358
3359 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3360 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3361 Add G95_ISYM_SCALE.
3362 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3363 * match.c (g95_match_stop): Fix dumb == -> != error.
3364
3365 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3366
3367 * dump-parse-tree.c (show_indent): Add line breaks. This
3368 whole dumping process needs cleanups.
3369 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3370 the langhook. Fix 'return's accordingly.
3371 * g95-support.h: Adjust prototype.
3372 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3373 * lang-options.h: Add '-fsyntax-only'.
3374 * options.c (g95_init_options): Init 'no_backend'.
3375 (g95_parse_arg): Deal with '-fsyntax-only'.
3376 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3377 is set.
3378
3379 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3380 Patch from Arnaud
3381 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3382 arguments. Also make sure that if a symbol is marked INTRINSIC,
3383 an intrinsic with the symbol's name actually exists.
3384 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3385 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3386 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3387
3388 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3389
3390 * resolve.c (resolve_contained_functions): Fix condition, don't
3391 throw internal_error if a child namespace has no name. Apparently
3392 this can be the case?
3393
3394 2003-01-11 Paul Brook <paul@nowt.org>
3395
3396 Port changes from Andy's tree:
3397 * g95.h (g95_code): Add stop_code.
3398 * match.c (g95_match_stop): Detter syntax checking.
3399 * resolve.c (resolve_generic_f0): Return match type.
3400 (resolve_generic_f): Remove dead/duplicated code.
3401 (resolve_specific_f): Ditto.
3402 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3403 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3404 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3405
3406 2003-01-11 Paul Brook <paul@nowt.org>
3407
3408 * trans-array.c: Various documentation/comment changes.
3409 * trans-stmt.c: Ditto.
3410
3411
3412 2003-01-10 Paul Brook <paul@nowt.org>
3413
3414 * options.c/h: Add -fdump-parse-tree as alias of -v.
3415
3416 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3417
3418 * dump-parse-tree.c (g95_show_namespace): Fixed another
3419 typo. Sorry, it's Friday...
3420
3421 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3422
3423 Spotted by Tobi:
3424 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3425 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3426 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3427 trans-types.c: Fix bogus copyright years, add 2003.
3428 * trans-types.h: Give copyright header.
3429
3430 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3431
3432 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3433 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3434 * intrinsic.c: Some constant strings moved to read-only memory.
3435 * io.c (format_asterisk): Move to...
3436 * g95.h: ...here.
3437
3438 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3439
3440 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3441 types for ranges instead of per-letter. Indent the
3442 'CONTAINS' just like everything else.
3443 * resolve.c (resolve_contained_functions): Clarify comment.
3444 Explain non-obvious conditional expression. Improve
3445 diagnostics if tyoe cannot be resolved.
3446 Port semi-fix from Andy's tree:
3447 (was_declared): Move up before first use.
3448 (generic_sym, specific_sym): New functions. Code moved
3449 out if procedure_kind.
3450 (procedure_kind): Simplify using new functions.
3451 (resolve_generic_f): Make sure the functions we find in
3452 a parent namespace is generic.
3453 (resolve_specific_f): Ditto for specific functions.
3454
3455 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3456
3457 * trans-stmt.c, trans.c: Fix some code style issues. Add
3458 some more comment (but still not enough!).
3459
3460 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3461
3462 * symbol.c (flavors, procedures, intents, acces_types,
3463 access_types, ifsrc_types): Make const.
3464 * misc.c (g95_string2code): Make 'm' param 'const'.
3465 * module.c (find_enum, write_atom, mio_name): Make
3466 'm' param 'const'.
3467 (attr_bits, bt_types, array_spec_types, array_ref_types,
3468 ref_types, expr_types): Make const.
3469 * g95.h: Adjust external decls.
3470
3471 2003-01-09 Paul Brook <paul@nowt.org>
3472
3473 * Testsuite: Add a load of new cases.
3474
3475 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3476
3477 * Make-file.in: Add dependency on back end header files;
3478 a parallel build should work now.
3479 * f95-lang-c (lang_identifier): Remove bogus comment.
3480 (g95_be_parse_file): Fix prototype.
3481 (g95_init): Make static.
3482 (g95_finish): Make static.
3483 * error.c (g95_syntax_error): Kill. Make define in...
3484 * g95.h (g95_syntax_error): Define.
3485 (g95.options): Make 'source' member 'const'.
3486 * interface.c (g95_match_interface): Explain
3487 hard-to-read condition.
3488 (g95_match_end_interface): Ditto.
3489 * trans_const.c (g95_build_string_const): Make 's' parameter
3490 'const'.
3491 * trans_const.h: Adjust protoype accordingly.
3492 * trans-decl.c: Include tree-dump.h
3493 (g95_generate_function_code): Build fixes for recent changes
3494 in the tree-ssa branch.
3495
3496 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3497
3498 * format.c: Kill, move code from here...
3499 * io.c: ...to here.
3500 * Make-lang.in: Adjust.
3501 * MANIFEST: Ditto.
3502 * match.h: Ditto.
3503 * BUGS: Mention where to submit bugs. Move old content...
3504 * TODO: ...to here. New file.
3505
3506 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3507 Fix most warnings, and suppress the ones we can't fix for now.
3508 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3509 these warnings just clutter the screen and there's not much
3510 we can do about them for now anyway.
3511 * check.c, iresolve.c: Mark unused function parameters.
3512 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3513 they should be resolved before they get here.
3514 * error.c: Remove unused FILE *status_out.
3515 * f95-lang.c (g95_init): Remove bogus cast.
3516 * Many files: Make things 'const' where required.
3517 * g95.h: Fix prototypes for all modified functions above.
3518 (g95_options): Remove 'object' member.
3519
3520 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3521
3522 * Make-file.in: Cleanup bogus targets. Add more comment.
3523 * lang-options.h: New option '-w'.
3524 * g95.h: add no_options field to struct g95_options.
3525 * options.c (g95_init_options): Default no_warnings to off.
3526 (g95_parse_arg): Recognise the '-w' switch and its alias,
3527 '-fno-warnings'.
3528 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3529 no_warning option is set.
3530 * iresolve.c (g95_resolve_shape): Fix warning.
3531
3532 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3533
3534 * primary.c (g95_next_string_char): Rename next_string_char, and
3535 make static. Adjust callers accordingly.
3536 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
3537 callers accordingly.
3538 * g95.h: Split out all g95_match* functions to...
3539 * match.h: ...here. New file.
3540 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
3541 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
3542
3543 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3544
3545 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
3546 g95_merge_new_implicit): New functions.
3547 (g95_match_implicit_none, g95_match_implicit): Move from here...
3548 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
3549 Modify to use the new functions in symbol.c.
3550 * g95.h: Add and move prototypes.
3551
3552 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3553
3554 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
3555 node compare function.
3556 (g95_insert_bbt): Likewise.
3557 (g95_insert_bbt_with_overlap): Likewise.
3558 (g95_delete_bbt): Likewise.
3559 (delete_treap): Likewise. Also fix a potential bug when calling it.
3560 * module.c (compare_pointers): Change proto to compare_fn.
3561 (compare_integers): Likewise.
3562 (compare_true_names): Likewise.
3563 (find_true_name): Adjust call to compare_true_names to match proto.
3564 (require_atom, write_atom, mio_name): Fix 'const' warnings.
3565 (init_pi_tree): Make compare a compare_fn instead of (int *).
3566 * resolve.c (compare_cases): Change proto to compare_fn.
3567 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
3568 it static, and rename to compare_symtree.
3569 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
3570 function.
3571 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
3572 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
3573
3574 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3575 * Make-lang.in: Fix spaces/tabs issues from previous patch.
3576 * patch.options: Blow away Paul's checkin mistake :-)
3577 * io.c (terminate_io): Fix memory leak (Arnaud).
3578
3579 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3580
3581 * Make-lang.in: Teach about building DVI, info manual.
3582 * g95.texi: New file.
3583
3584 2003-01-02 Paul Brook <paul@nowt.org>
3585
3586 * trans-array.c (g95_reverse_ss): Make static and don't use.
3587 (g95_conv_ss_descriptor): Don't use g95_loopinfo
3588 (g95_conv_array_parameters): Modify for pointer assignments.
3589 (g95_walk_subexpr): New function.
3590 (g95_walk_expr*): Use it.
3591 * trans-array.h (g95_reverse_ss): Remove prototype.
3592 * trans-expr.c (g95_trans_pointer_assign): Implement.
3593 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
3594 * trans-intrinsic.c: Sync with scalarizer changes.
3595 * trans-io.c: Ditto.
3596
3597 2002-12-29 Paul Brook <paul@nowt.org>
3598
3599 * trans-array.c: Document calling convention for arrays.
3600
3601 2002-12-19 Paul Brook <paul@nowt.org>
3602
3603 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3604 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3605 optional parameters for some intrinsics.
3606 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3607 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3608 optional parameters.
3609 * trans.h (g95_se): Add ignore_optional flag.
3610
3611 2002-12-15 Paul Brook <paul@nowt.org>
3612
3613 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3614 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3615
3616 2002-12-14 Paul Brook <paul@nowt.org>
3617
3618 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3619
3620 2002-12-12 Paul Brook <paul@nowt.org>
3621
3622 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3623 initialize the scalarizer.
3624 (various): Update to new format of g95_expr->value.constructor.
3625
3626 2002-12-08 Paul Brook <paul@nowt.org>
3627
3628 * trans-array.c (g95_put_offset_into_var): New function.
3629 (g95_trans_array_constructor_subarray): New function.
3630 (g95_trans_array_constructor_value): Use it.
3631 (g95_array_cons_size): Don't abort() on array components.
3632
3633 2002-12-08 Paul Brook <paul@nowt.org>
3634
3635 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3636 * support.c: Update #includes.
3637 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3638 * trans-array.c: Update #includes.
3639 * trans.c: Ditto.
3640 * trans-const.c: Ditto.
3641 * trans-io.c: Ditto.
3642 * trans-types.c: Ditto.
3643 (g95_init_types): Set size_type_node.
3644 * trans-decl.c: Update #includes.
3645 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3646 * trans-stmt.c: Update #includes.
3647 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3648 (g95_trans_select): Fix check for unbounded ranges.
3649 * trans-expr.c: Update #includes.
3650 (g95_conv_string_tmp): New function.
3651 (g95_conv_concat_op): Use it.
3652 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3653 * Trans-intrisic.c: Update #includes.
3654 (g95_conv_intrinsic_strcmp): New function.
3655 (g95_conv_intrinsic_adjust): Ditto.
3656 (g95_conv_intrinsic_function: Use them.
3657
3658 2002-11-30 Paul Brook <paul@nowt.org>
3659
3660 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3661 reference.
3662 * trans-dec.c (g95_build_function_decl): Handle character return
3663 parammeters.
3664 (g95_get_fake_result_decl): Ditto.
3665 (g95_trans_deferred_vars): Ditto.
3666 * trans-expr.c (g95_conv_function_call): Ditto.
3667 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3668 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3669 (g95_conv_intrinsic_function): Use it.
3670 * trans-types.c (g95_sym_type): Handle functions returning strings.
3671 (g95_return_by_reference): Ditto.
3672 (g95_get_function_type): Ditto.
3673
3674 2002-11-18 Paul Brook <paul@nowt.org>
3675
3676 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3677 requires a temporary.
3678 (g95_trans_select): Handle computed gotos.
3679 * trans-types.c (g95_build_array_type): Warn about non-functional
3680 assumed shape arrays.
3681 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3682 blocks.
3683 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3684 (g95_conv_intrinsic_int): New function.
3685 (g95_conv_intrinsic_mod): New function.
3686 (g95_conv_intrinsic_ichar): New function.
3687 (g95_conv_intrinsic_function): Use them.
3688 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3689
3690 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3691
3692 * trans-types.c (g95_build_array_type): Assumed
3693 sized arrays can have rank > 1.
3694 * trans.c (g95_trans_code): Remove erroneous
3695 warning about CONTINUE.
3696 * trans-expr.c (g95_conv_variable): Remove
3697 erroneous assert.
3698
3699 2002-11-15 Paul Brook <paul@nowt.org>
3700
3701 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3702
3703 2002-10-31 Paul Brook <paul@nowt.org>
3704
3705 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3706 * trans-expr.c (g95_conv_component_ref): Handle character string
3707 components.
3708 (g95_conv_string_parameter): Ditto.
3709 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3710 string components.
3711
3712 2002-10-10 Paul Brook <paul@nowt.org>
3713
3714 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3715 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3716 check.
3717 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3718 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3719 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3720 * trans-types.c (pvoid_type_node): Declare and initialize.
3721 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3722 (g95_array_allocate): Fix when base==data.
3723 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3724 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3725
3726 2002-10-09 Paul Brook <paul@nowt.org>
3727
3728 * (g95_conv_expr_reference): Handle character strings correctly.
3729
3730 2002-10-07 Paul Brook <paul@nowt.org>
3731
3732 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3733 langhook.
3734 * trans-array.c (g95_build_array_initializer): Remove.
3735 (g95_conv_array_initializer): New Function.
3736 (g95_trans_auto_arry_allocation): Cleanup.
3737 (g95_trans_init_character_array): Remove.
3738 * g95spec.c: Link in libgforbegin.
3739 * trans.c (g95_generate_code): Rename main function to MAIN__.
3740 (g95_create_var): New function.
3741 (g95_create_var_np): New function.
3742 (g95_evaluate_now): New function.
3743 (g95_start_block): New function.
3744 (g95_finish_block): New function.
3745 (g95_add_expr_to_block): New function.
3746 (g95_add_block_to_block): New function.
3747 * trans-expr.c (g95_conv_componen_ref): New function.
3748 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3749 (F95_OBJS): Add dependency.o.
3750 * f95-lang.c (g95_is_simple_stmt): Remove.
3751 * f95-tree.c (mark_not_simple): New function.
3752 (unshare_all_trees): New function.
3753 (create_tmp_var, create_tmp_alias_var): Remove.
3754 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3755 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3756 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3757
3758 2002-10-01 Paul Brook <paul@nowt.org>
3759
3760 * trans-array.c: Add support for descriptorless arrays.
3761 (g95_conv_array_data): New function.
3762 (g95_conv_array_base): New function.
3763 * trans-array.h: Declare these here.
3764 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3765 initialization and creation here.
3766 (g95_create_module_vars): Instead of here.
3767 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3768 * trans-intrinsic.c: Ditto.
3769 * trans-types.c (g95_is_nodesc_array): New function.
3770 (g95_get_nodesc_array_type): New function.
3771 (g95_sym_type, g95_get_derived_type): Use them.
3772 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3773
3774 2002-09-28 Paul Brook <paul@nowt.org>
3775
3776 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3777 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3778 parameters.
3779
3780 2002-09-24 Paul Brook <paul@nowt.org>
3781
3782 * f95-lang.c (listify): Remove declaration.
3783 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3784 (listify)
3785 * f95-tree.c (get_name): New function.
3786 * trans.c (module_namespace): Remove.
3787 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3788 * trans-types.c: Ditto.
3789
3790 2002-09-19 Paul Brook <paul@nowt.org>
3791
3792 * trans-array.c (g95_get_array_cons_size): New Function.
3793 (g95_con_ss_startstride): Handle Array constructors.
3794 (g95_conv_loop_setup): Ditto.
3795 (g95_conv_array_parameter): Ditto.
3796 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3797 static.
3798
3799 2002-09-19 Paul Brook <paul@nowt.org>
3800
3801 * trans.c (g95_simple_fold_tmp): Detect variables inside
3802 NON_LVALUE_EXPR.
3803 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3804
3805 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3806
3807 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3808
3809 2002-09-14 Paul Brook <paul@nowt.org>
3810
3811 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3812 * trans-const.c (g95_conv_string_init): New Function.
3813 * trans-const.h: Declare it.
3814 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3815 variables. Don't bail on intrinsic symbols.
3816 (get_extern_function_decl): Handle specific intrinsic functions.
3817 * trans-types.c (g95_sym_type): Dummy functions don't return
3818 reference types.
3819 * trans-array.c (g95_build_array_initializer): New Function.
3820 (g95_trans_auto_array_allocation): Build initializer for static decls.
3821 Don't use mpz_addmul, it's GMP4 only.
3822
3823 2002-09-12 Paul Brook <paul@nowt.org>
3824
3825 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3826 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3827 assembler names for module procedures.
3828
3829 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3830
3831 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3832 dependency/
3833
3834 2002-09-10 Paul Brook <paul@nowt.org>
3835
3836 * trans-array.c: Change format of G95_SS_TEMP strictures.
3837 (g95_check_fncall_dependancy): New function.
3838 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3839 offsets.
3840 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3841 result variables.
3842 (g95_build_function_decl): Don't assume result arrays are packed.
3843 (g95_trans-deferred-vars): Handle array result variables.
3844 (g95_generate_fuction_code): Clear saved_function_decls.
3845 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3846 reference.
3847 (g95_trans_arrayfunc_assign): New function.
3848 (g95_trans_assignment): Use it.
3849 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3850 (g95_se): Add direct_byref.
3851 * trans-types.c: Use sym->result rather than sym where appropriate.
3852 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3853 Update other functions to use this.
3854 (g95_is_intrinsic_libcall): New function.
3855 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3856 (g95_walk_intrinsic_function): Ditto.
3857
3858 2002-09-08 Paul Brook <paul@nowt.org>
3859
3860 * trans-types.c: Change rank field to dtype field in array descriptor.
3861 * trans-array.c: Implement filling of dtype array descriptor field.
3862 * trans-intrinsic.c: Fix broken LEN intrinsic.
3863
3864 2002-09-07 Paul Brook <paul@nowt.org>
3865
3866 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3867 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3868 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3869
3870 2002-09-06 Paul Brook <paul@nowt.org>
3871
3872 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3873 (gt-f95-trans-types.h): Add dependancy information.
3874 * config-lang.in (gtfiles): Add trans-types.c
3875 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3876 back to top-level code.
3877 * trans-array.c, trans-types.c: Change format of array descriptor.
3878 (g95_conv_descriptor_dimension): New function.
3879 * trans-types.h (g95_conv_descriptor_rank): define.
3880 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3881 intrinsics.
3882
3883 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3884
3885 * trans-array.c, trans-types.c: Add rank information to descriptor.
3886
3887 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3888
3889 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3890
3891 2002-09-04 Paul Brook <paul@nowt.org>
3892
3893 * f95-lang.c (g95_create_decls): New function.
3894 (g95_init): Move initialization of external decls to above, and call
3895 from g95_be_parse_file.
3896 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3897 * trans-types.c (g95_init_types): Always name integer and char types.
3898 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3899
3900 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3901
3902 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3903
3904 2002-09-02 Paul Brook <paul@nowt.org>
3905
3906 * g95_generate_code: Clear the attr for __fortran_main.
3907 * trans-types.c (g95_finish_type): New function.
3908 * g95_init_io_state_type: Use g95_finish_type.
3909 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3910
3911 2002-09-01 Paul Brook <paul@nowt.org>
3912
3913 * README.backend: Warn about the dangers of extra config.h files.
3914 Remove obsolete libgfor stuff.
3915 * config-lang.in: Add target-libgfor dependancy.
3916 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3917
3918 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3919
3920 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3921 not by buff.
3922
3923 2002-08-30 Paul Brook <paul@nowt.org>
3924
3925 * trans-intrinsic.c (g95_conv_intrinsic_function,
3926 g95_walk_intrinsic_function): Added ANY and ALL.
3927 (g95_conv_intrinsic_anyall): New function.
3928 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
3929 mangled name
3930