OSDN Git Service

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