OSDN Git Service

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