OSDN Git Service

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