OSDN Git Service

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