OSDN Git Service

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