OSDN Git Service

* decl.c: Typo in comment.
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
2
3         * decl.c: Typo in comment.
4
5 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
6
7         * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
8
9 2005-08-21  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
10
11         * gfortran.h (gfc_option_t): Remove source field.  Add
12         flag_d_lines field.
13         (gfc_new_file): Remove arguments in prototype.
14         (gfc_source_file): Make 'const char *'.
15         * f95-lang.c (gfc_init): Use gfc_source_file instead of
16         gfc_option.source.  Call gfc_new_file without arguments.
17         * invoke.texi: Document new options '-fd-lines-as-code' and
18         '-fd-lines-as-comment'.
19         * lang.opt: Add new options.  Alphabetize.
20         * options.c (gfc_init_options): Initialize gfc_source_file instead
21         of gfc_option.source.  Initialize gfc_option.flag_d_lines.
22         (form_from_filename): Move here from scanner.c.  Make
23         'filename' argument 'const'.
24         (gfc_post_options): Set gfc_source_file.  Determine source form.
25         Warn if 'd-lines*' are used in free form.
26         * scanner.c (gfc_source_file): Constify.
27         (skip_fixed_comments): Deal with d-lines.
28         (get_file): Constify argument 'name'.
29         (load_file): Constify argument 'filename'.
30         (form_from_filename): Moved to options.c.
31         (gfc_new_file): Remove arguments.  Don't initialize
32         gfc_source_file, don't determine source form.
33         * trans-const.c (gfc_init_constants): Use gfc_source_file instead
34         of gfc_option.source.
35
36 2005-08-19  Steven G. Kargl  <kargls@comcast.net>
37
38         PR fortran/23065
39         * gfortran.h: Remove PATH_MAX definition.
40         * module.c (write_module, gfc_dump_module): Use alloca to allocate
41         buffers.
42         * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
43
44 2004-08-16  Huang Chun  <chunhuang73@hotmail.com>
45
46         * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
47         expand.
48
49 2005-08-14  Asher Langton  <langton2@llnl.gov>
50
51         * parse.c (match): Enclose macro in do...while(0) and braces.
52
53 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
54
55         PR fortran/21432.
56         * gfortran.texi: Document PRINT namelist.
57
58 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
59
60         PR fortran/21432.
61         * io.c (match_io): Add code to implement PRINT namelist.
62
63 2005-08-14  Canqun Yang  <canqun@nudt.edu.cn>
64
65         * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
66         labels.
67
68 2005-08-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
69             Steven Bosscher  <stevenb@suse.de>
70
71         PR libfortran/20006
72         * gfortran.h: Add is_main_program member to symbol_attribute.
73         * trans-decl: Add a gfor_fndecl_set_std tree.
74         (gfc_build_builtin_function_decls): Create it.
75         (gfc_generate_function_code): Add this call at the beginning of
76         the main program.
77         * trans.c (gfc_generate_code): Move main_program and attr.
78         * trans.h: Add declaration for gfor_fndecl_set_std.
79
80 2005-08-10  Thomas Koenig  <Thomas.Koenig@online.de>
81
82         PR libfortran/22143
83         gfortran.h:  Declare new function gfc_resolve_dim_arg.
84         resolve.c:  New function gfc_resolve_dim_arg.
85         iresolve.c (gfc_resolve_all):  Use gfc_resolve_dim_arg.
86         (gfc_resolve_any):  Likewise.
87         (gfc_resolve_count):  Likewise.
88         (gfc_resolve_cshift):  Likewise.  If the kind of shift is less
89         gfc_default_integer_kind, convert it to default integer type.
90         (gfc_resolve_eoshift):  Likewise.
91         (gfc_resolve_maxloc):  Use gfc_resolve_dim_arg.
92         (gfc_resolve_maxval):  Likewise.
93         (gfc_resolve_minloc):  Likewise.
94         (gfc_resolve_minval):  Likewise.
95         (gfc_resolve_product):  Likewise.
96         (gfc_resolve_spread):  Likewise.
97         (gfc_resolve_sum):  Likewise.
98
99 2005-08-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
100
101         * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
102         functions for new intrinsics TTYNAM and ISATTY.
103         * intrinsic.c (add_functions, add_subroutines): Add new
104         intrinsics.
105         * intrinsic.h: Add prototypes for new check and resolve
106         functions.
107         * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
108         resolve functions for intrinsics TTYNAM and ISATTY.
109         * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
110         * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
111
112 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
113
114         * scanner.c (preprocessor_line): Don't write beyond the end of flag
115         buffer.
116
117 2005-08-07   Janne Blomqvist <jblomqvi@cc.hut.fi>
118
119         PR fortran/22390 
120         * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
121         * gfortran.h: Add enums for FLUSH.
122         * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
123         comment appropriately.  (gfc_match_flush): New function.
124         * match.c (gfc_match_if): Add match for flush.
125         * match.h: Add prototype.
126         * parse.c (decode_statement): Add flush to 'f' case.
127         (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
128         * resolve.c (resolve_code): Add flush case.
129         * st.c (gfc_free_statement): Add flush case.
130         * trans-io.c: Add prototype for flush.
131         (gfc_build_io_library_fndecls): Build fndecl for flush.
132         (gfc_trans_flush): New function.
133         * trans-stmt.h: Add prototype.
134         * trans.c (gfc_trans_code): Add case for flush.
135
136 2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
137
138         * primary.c (match_hollerith_constant): Fix typo.
139
140 2005-08-06  Kazu Hirata  <kazu@codesourcery.com>
141
142         * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
143         invoke.texi, resolve.c, trans-array.c, trans-array.h,
144         trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
145         comment/doc typos.  Follow spelling conventions.
146
147 2005-08-06  Jakub Jelinek  <jakub@redhat.com>
148
149         PR fortran/18833
150         PR fortran/20850
151         * primary.c (match_varspec): If equiv_flag, don't look at sym's
152         attributes, call gfc_match_array_ref up to twice and don't do any
153         substring or component processing.
154         * resolve.c (resolve_equivalence): Transform REF_ARRAY into
155         REF_SUBSTRING or nothing if needed.  Check that substrings
156         don't have zero length.
157
158 2005-08-05  Thomas Koenig  <Thomas.Koenig@online.de>
159
160         * trans-expr.c  (gfc_build_builtin_function_decls):  Mark
161         stop_numeric and stop_string as non-returning.
162
163 2005-08-04  Paul Brook  <paul@codesourcery.com>
164
165         * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
166         (gfc_conv_expr_lhs): Fix assertion.
167         (gfc_conv_expr_val): Merge post block.  Set se.expr to new value.
168
169 2005-08-02  David Edelsohn  <edelsohn@gnu.org>
170
171         PR fortran/22491
172         * expr.c (simplify_parameter_variable): Do not copy the subobject
173         references if the expression value is a constant.
174
175         * expr.c (gfc_simplify_expr): Evaluate constant substrings.
176
177 2005-07-31  Jerry DeLisle  <jvdelisle@verizon.net>
178
179         * intrinsic.texi: Add documentation for exponent, floor, and fnum and
180         fix description of ceiling in index.
181
182 2005-07-31  Steven Bosscher  <stevenb@suse.de>
183
184         * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
185         malloc functions the 'malloc' attribute.  Give runtime_error the
186         'noreturn' attribute.
187
188 2005-07-31  Steven Bosscher  <stevenb@suse.de>
189
190         * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
191         of the assigned goto variable.
192
193 2005-07-29  Steven Bosscher  <stevenb@suse.de>
194
195         * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
196
197 2005-07-28  Andrew Pinski  <pinskia@physics.uc.edu>
198
199         * fortran/f95-lang.c (language_function): Remove
200         named_labels, shadowed_labels, returns_value, returns_abnormally,
201         warn_about_return_type, and extern_inline fields.
202         (named_labels): Remove variable.
203         (gfc_init_decl_processing): Remove setting of named_labels.
204
205 2005-07-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
206
207         PR fortran/22503
208         * resolve.c (resolve_operator): Improve diagnostic for comparison
209         of logicals with invalid operator.
210
211 2005-07-25  Jakub Jelinek  <jakub@redhat.com>
212
213         PR fortran/20063
214         * data.c (gfc_assign_data_value_range): Call
215         create_character_initializer if last_ts is a character type.
216
217 2005-07-22  Manfred Hollstein  <mh@suse.com>
218
219         * match.c (gfc_match_symbol): Fix uninitialised warnings.
220         * matchexp.c (gfc_match_expr): Likewise.
221
222 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
223
224         Make CONSTRUCTOR use VEC to store initializers.
225         * trans-array.c (gfc_build_null_descriptor,
226         gfc_trans_array_constructor_value, gfc_conv_array_initializer):
227         Update to cope with VEC in CONSTRUCTOR_ELTS.
228         * trans-common.c (create_common): Likewise.
229         * trans-expr.c (gfc_conv_structure): Likewise.
230         * trans-stmt.c (gfc_trans_character_select): Use
231         build_constructor_from_list instead of build_constructor.
232
233 2005-07-19  Paul Thomas  <pault@gcc.gnu.org>
234
235         PR fortran/16940
236         * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
237         is matched against interfaces in parent namespaces. If there
238         the symtree is set to point to the interface.
239
240 2005-07-16  David Edelsohn  <edelsohn@gnu.org>
241
242         PR fortran/21730
243         * decl.c (do_parm): Adjust character initializer to character length
244         of symbol before assigning.
245
246 2005-07-14  Steve Ellcey  <sje@cup.hp.com>
247
248         * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
249
250 2005-07-14  Jakub Jelinek  <jakub@redhat.com>
251
252         * gfortran.h (MAX_ERROR_MESSAGE): Remove.
253         (gfc_error_buf): Add allocated and index fields.  Change message
254         field from array to a pointer.
255         * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
256         (cur_error_buffer): New variable.
257         (error_char): Use cur_error_buffer->{message,index} instead of
258         {warning,error}_{buffer.message,ptr}.  Reallocate message buffer
259         if too small.
260         (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
261         cur_error_buffer and its index rather than {warning,error}_ptr
262         and use_warning_buffer.
263         (gfc_warning_check, gfc_error_check): Don't print anything if
264         message is NULL.
265         (gfc_push_error): Allocate saved message with xstrdup.
266         (gfc_pop_error): Free saved message with gfc_free.
267         (gfc_free_error): New function.
268         * primary.c (match_complex_constant): Call gfc_free_error if
269         gfc_pop_error will not be called.
270         * match.c (gfc_match_st_function): Likewise.
271
272         PR fortran/22417
273         * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
274         file.  Fix file left but not entered warning.
275
276 2005-07-14  Feng Wang  <fengwang@nudt.edu.cn>
277         Steven G. Kargl  <kargls@comcast.net>
278
279         * array.c (resolve_character_array_constructor): Allocate gfc_charlen
280         for the array and attach to namespace list for automatic deallocation.
281
282 2005-07-13  Andreas Schwab  <schwab@suse.de>
283
284         * Make-lang.in (fortran/dependency.o): Depend on
285         $(GFORTRAN_TRANS_DEPS).
286
287 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
288
289         * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
290         the outermost loop.
291         (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
292         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
293         Don't clear maskindexes here.
294
295 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
296         
297         * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
298         is removed.
299
300 2005-07-08  Jakub Jelinek  <jakub@redhat.com>
301
302         * primary.c (gfc_match_rvalue): Handle ENTRY the same way
303         as FUNCTION.
304
305 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
306
307         * scanner.c (load_line): Add pbuflen argument, don't make
308         buflen static.  If maxlen == 0 or preprocessor_flag,
309         don't truncate at buflen, but at maxlen.  In xrealloc add
310         1 byte at the end for the terminating '\0'.  Don't fill
311         with spaces up to buflen, but gfc_option.fixed_line_length.
312         (load_file): Adjust load_line caller.  Add line_len variable.
313
314         * scanner.c (preprocessor_line): Only set current_file->line when errors
315         have not been encountered.  Warn and don't crash if a file leave
316         preprocessor line has no corresponding entering line.  Formatting.
317
318 2005-07-07  Steven Bosscher  <stevenb@suse.de>
319
320         * primary.c (match_hollerith_constant): Use int, not unsigned int,
321         for the hollerith length.  Fix indentation.
322
323 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
324
325         PR fortran/16531
326         PR fortran/15966
327         PR fortran/18781
328         * arith.c (gfc_hollerith2int, gfc_hollerith2real,
329         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
330         New functions.
331         (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
332         * arith.h (gfc_hollerith2int, gfc_hollerith2real,
333         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
334         Add prototypes.
335         * expr.c (free_expr0): Free memery allocated for Hollerith constant.
336         (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
337         (gfc_check_assign): Enable conversion from Hollerith to other.
338         * gfortran.h (bt): Add BT_HOLLERITH.
339         (gfc_expr): Add from_H flag.
340         * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
341         (add_conversions): Add conversions from Hollerith constant to other.
342         (do_simplify): Don't simplify if  Hollerith constant arguments exist.
343         * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
344         * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
345         (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
346         * primary.c (match_hollerith_constant): New function.
347         (gfc_match_literal_constant): Add match Hollerith before Integer.
348         * simplify.c (gfc_convert_constant): Add conversion from Hollerith
349         to other.
350         * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
351         convert Hollerith constant to tree.
352         * trans-io.c (gfc_convert_array_to_string): Get array's address and
353         length to set string expr.
354         (set_string): Deal with array assigned Hollerith constant and character
355         array.
356         * gfortran.texi: Document Hollerith constants as extention support.
357
358 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
359
360         PR fortran/22327
361         * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
362
363 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
364
365         * decl.c (gfc_match_entry): Allow ENTRY without parentheses
366         even in FUNCTIONs.
367
368 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
369
370         * gfortran.texi, intrinsic.texi: Fix typos.
371         * symbol.c: Fix a comment typo.
372
373 2005-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
374
375         * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
376         * gfortran.h (ATTRIBUTE_GCC_GFC): New.
377         (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
378         gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
379         ATTRIBUTE_GCC_GFC.
380
381 2005-07-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
382
383         PR fortran/20842
384         * io.c (match_dt_element): Do not allow END tag in PRINT or
385         WRITE statement.
386
387 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
388
389         * lang.opt: Remove "." from end of help texts.
390
391 2005-07-01  Jerry DeLisle  <jvdelisle@verizon.net>
392
393         * gfortran.texi: Fix typos and grammar.
394         * invoke.texi: Fix typos and grammar.
395         * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
396         exit. Fixed alignment of text for dtime syntax. Fixed a few line
397         lengths.
398
399 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
400
401         * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
402         type than boolean_type_node.
403
404 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
405
406         * all files: Update FSF address in copyright headers.
407
408 2005-06-24  Jerry DeLisle <jvdelisle@verizon.net>
409
410         PR fortran/21915
411         * gfortran.h: Add symbols for new intrinsic functions.
412         * intrinsic.c: Add new functions acosh, asinh, and atanh.
413         * intrinsic.h: Add prototypes for the new functions.
414         * iresolve.c (gfc_resolve_acosh): New function.
415         (gfc_resolve_asinh): New function.
416         (gfc_resolve_atanh): New function.
417         * mathbuiltins.def: Add defines.
418         * simplify.c (gfc_simplify_acosh): New function.
419         (gfc_simplify_asinh): New function.
420         (gfc_simplify_atanh): New function.
421
422 2005-06-24  Feng Wang  <fengwang@nudt.edu.cn>
423
424         * simplify.c (gfc_simplify_modulo): Don't clear before get result.
425
426 2005-06-22  Paul Brook  <paul@codesourcery.com>
427
428         PR fortran/21034
429         * symbol.c (gfc_is_var_automatic): New function.
430         (save_symbol): Use it.
431
432 2005-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
433             Paul Thomas  <pault@gcc.gnu.org>
434
435         PR fortran/22010
436         Port from g95.
437         * module.c (mio_namelist): New function. Correct to set
438         namelist_tail and to give error on renaming namelist by use
439         association.
440         (mio_symbol): Call mio_namelist.
441
442 2005-06-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
443
444         * gfortran.h: Add flag_backslash compile-time option.
445         * lang.opt: Add support for -fbackslash option.
446         * options.c: Likewise.
447         * primary.c: Implement behavior for -fno-backslash.
448         * invoke.texi: Add doc for -fbackslash option.
449         * gfortran.texi: Remove mention of -fno-backslash as a
450         possible extension.
451
452 2005-06-20  Steven G. Kargl  <kargls@comcast.net>
453         (port from g95)
454
455         PR fortran/21257
456         * match.c (gfc_match_label): Detect duplicate labels.
457
458
459 2005-06-20  Erik Edelmann  <erik.edelmann@iki.fi>
460
461         * intrinsic.c (check_intrinsic_standard): Fix spelling error
462         in a warning message.
463
464 2005-06-18  Erik Edelman  <eedelman@acclab.helsinki.fi>
465             Steven G. Kargl <kargls@comast.net>
466
467         PR fortran/19926
468         * primary.c (gfc_match_rvalue):  expr_type can be EXPR_CONSTANT
469         for an array; check that sym->as is NULL.
470
471
472 2005-06-18  Steven G. Kargl  <kargls@comcast.net>
473
474         * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
475         functions whose simplification routine return FAILURE.
476
477 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
478
479         * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
480         (rule for installing f95.1 manpage): Does depend on installdirs.
481
482 2005-06-13  Jakub Jelinek  <jakub@redhat.com>
483
484         PR fortran/22038
485         * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
486         in the innermost loop.
487
488         * trans-expr.c (gfc_conv_function_call): Return int instead of
489         void.  Use a local variable for has_alternate_specifier and
490         return it.  Avoid modification of function type's return value
491         in place, since it may be shared.
492         * trans.h (has_alternate_specifier): Remove.
493         (gfc_conv_function_call): Change return type.
494         * trans-stmt.c (has_alternate_specifier): Remove.
495         (gfc_trans_call): Add a local has_alternate_specifier variable,
496         set it from gfc_conv_function_call return value.
497
498 2005-06-12  Richard Henderson  <rth@redhat.com>
499
500         * trans-array.c (gfc_conv_descriptor_data_get): Rename from
501         gfc_conv_descriptor_data.  Cast the result to the DATAPTR type.
502         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
503         (gfc_trans_allocate_array_storage): Use them.
504         (gfc_array_allocate, gfc_array_deallocate): Likewise.
505         (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
506         (gfc_trans_deferred_array): Likewise.
507         * trans-expr.c (gfc_conv_function_call): Likewise.
508         (gfc_trans_subcomponent_assign): Likewise.
509         (gfc_trans_pointer_assignment): Likewise.
510         * trans-intrinsic.c (gfc_conv_allocated): Likewise.
511         * trans-types.c (gfc_array_descriptor_base): New.
512         (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
513         (gfc_get_array_descriptor_base): Break out from ...
514         (gfc_get_array_type_bounds): ... here.  Create type variants.
515         * trans-array.h (gfc_conv_descriptor_data_get): Declare.
516         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
517
518 2005-06-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
519
520         * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
521         calling conventions.  Look at sym instead of sym->result.
522         * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
523         Remove condition which is always false with workaround removed.
524         (gfc_return_by_reference): Always look at sym, never at sym->result.
525
526 2005-06-11  Steven G. Kargl  <kargls@comcast.net>
527         
528         PR fortran/17792
529         PR fortran/21375
530         * trans-array.c (gfc_array_deallocate): pstat is new argument
531         (gfc_array_allocate): update gfc_array_deallocate() call.
532         (gfc_trans_deferred_array): ditto.
533         * trans-array.h: update gfc_array_deallocate() prototype.
534         * trans-decl.c (gfc_build_builtin_function_decls): update declaration
535         * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
536
537 2005-06-07  Jerry DeLisle <jvdelisle@verizon.net>
538
539         * intrinsic.texi: Add documentation for dcmplx, digits,
540         dim, idim, ddim, dot_product, dprod, dreal, and dtime.
541
542 2005-06-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
543
544         PR fortran/21912
545         * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
546         Generate correct exit condition in case of negative steps in
547         implied-do loops.
548
549         * invoke.texi: Fix description of flags required for compatibility
550         with g77.
551
552 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
553         Erik Schnetter  <schnetter@aei.mpg.de>
554
555         PR fortran/19195
556         * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
557         remove FIXME comment. 
558
559 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
560
561         * match.c (match_forall_iterator): Don't immediately give error if '='
562         is not followed by an expression.
563
564 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
565         Erik Edelmann  <erik.edelmann@iki.fi>
566
567         * array.c (gfc_match_array_constructor): Disallow empty array
568         constructor.
569
570 2005-06-03  Jerry DeLisle <jvdelisle@verizon.net>
571
572         * fortran/intrinsic.texi: Add documentation for
573         command_argument_count, conjg, dconjg, count,
574         cpu_time, cshift, date_and_time, dble, dfloat.
575
576 2005-06-01  Roger Sayle  <roger@eyesopen.com>
577
578         * intrinsic.c (add_conv): No longer take a "simplify" argument as
579         its always gfc_convert_constant, instead take a "standard" argument.
580         (add_conversions): Change all existing calls of add_conv to pass
581         GFC_STD_F77 as appropriate.  Additionally, if we're allowing GNU
582         extensions support integer-logical and logical-integer conversions.
583         (gfc_convert_type_warn): Warn about use the use of these conversions
584         as a extension when appropriate, i.e. with -pedantic.
585         * simplify.c (gfc_convert_constant): Add support for integer to
586         logical and logical to integer conversions, using gfc_int2log and
587         gfc_log2int.
588         * arith.c (gfc_log2int, gfc_int2log): New functions.
589         * arith.h (gfc_log2int, gfc_int2log): Prototype here.
590         * gfortran.texi: Document this new GNU extension.
591
592 2005-06-01  Paul Thomas  <pault@gcc.gnu.org>
593
594         * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
595         * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
596         Correct comments and replace convert of integer_one_node with
597         build_int_cst.
598
599 2005-06-01  Jakub Jelinek  <jakub@redhat.com>
600
601         PR fortran/21729
602         * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
603         to avoid giving error multiple times.
604         (resolve_entries): Don't error about BT_UNKNOWN here.
605         (resolve_unknown_f): Capitalize IMPLICIT for consistency.
606         (resolve_fntype): New function.
607         (gfc_resolve): Call resolve_fntype.
608
609 2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>
610
611         PR fortran/20883
612         * fortran/io.c (resolve_tag): Fix error message.
613
614 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
615
616         * fortran/trans-decl.c: Don't include errors.h.
617         * fortran/Make-lang.in: Updates dependencies.
618
619 2005-05-31  Paul Thomas  <pault@gcc.gnu.org>
620
621         PR fortran/18109
622         PR fortran/18283
623         PR fortran/19107
624         * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
625         string length from the expression typespec character length value
626         and set temp_ss->stringlength and backend_decl. Obtain the
627         tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
628         Dereference the expression to obtain the character.
629         * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
630         dereference of scalar character pointer structure components.
631         * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
632         string length for the structure component from the component
633         expression.
634
635 2005-05-30  Roger Sayle  <roger@eyesopen.com>
636
637         * gfortran.h (GFC_STD_LEGACY): New "standard" macro.  Reindent.
638         * options.c (gfc_init_options): By default, allow legacy extensions
639         but warn about them.
640         (gfc_post_options): Make -pedantic warn about legacy extensions
641         even with -std=legacy.
642         (gfc_handle_option): Make -std=gnu follow the default behaviour
643         of warning about legacy extensions, but allowing them. Make the
644         new -std=legacy accept everything and warn about nothing.
645         * lang.opt (std=legacy): New F95 command line option.
646         * invoke.texi: Document both -std=f2003 and -std=legacy.
647         * gfortran.texi: Explain the two types of extensions and document
648         how they are affected by the various -std= command line options.
649
650 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
651
652         * trans-expr.c: Remove trailing ^M.
653
654         * trans-expr.c: Fix comment typos.
655
656 2005-05-29  Paul Thomas  <pault@gcc.gnu.org>
657
658         PR fortran/16939
659         PR fortran/17192
660         PR fortran/17193
661         PR fortran/17202
662         PR fortran/18689
663         PR fortran/18890
664         * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
665         length to temp_ss for character pointer array assignments.
666         * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
667         dereferencing of characters and character pointers.
668         * fortran/trans-expr.c (gfc_conv_function_call): Provide string
669         length as return argument for various kinds of handling of return.
670         Return a char[]* temporary for character pointer functions and
671         dereference the temporary upon return.
672
673 2005-05-29  Janne Blomqvist  <jblomqvi@vipunen.hut.fi>
674             Steven G. Kargl  <kargls@comcast.net>
675   
676         fortran/PR20846
677         * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
678
679 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
680
681         PR libfortran/20006
682         * io.c (format_item_1): Add check and extension warning for
683         $ edit descriptor.
684
685 2005-05-28  Steven G. Kargl  <kargls@comcast.net>
686
687         * arith.c (gfc_arith_init_1): Fix off by one problem;
688         (gfc_check_integer_range): Chop extra bits in subnormal numbers.
689
690 2005-05-28  Jerry DeLisle   <jvdelisle@verizon.net>
691             Steven G. Kargl  <kargls@comcast.net>
692
693         * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
694         and CMPLX
695
696 2005-05-27  Steven G. Kargl  <kargls@comcast.net>
697
698         * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
699         like types in comparsion.
700
701 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
702
703         * data.c, parse.c, trans-array.c, trans-decl.c,
704         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
705         trans.h: Fix comment typos.  Follow spelling conventions.
706
707 2005-05-22  Roger Sayle  <roger@eyesopen.com>
708
709         * gfortran.texi: Document some more GNU extensions.
710
711 2005-05-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
712
713         * error.c (gfc_warning): Fix typo in comment.
714
715 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
716
717         PR libfortran/21127
718         * fortran/iresolve.c (gfc_resolve_reshape): Add 
719         gfc_type_letter (BT_COMPLEX) for complex to
720         to resolved function name.
721
722 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
723
724         * array.c (gfc_match_array_constructor): Support [ ... ]
725         style array constructors.
726
727 2005-05-18  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
728
729         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
730         and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
731         * trans-intrinsic.c (build_fix_expr): Change 'op' argument
732         to correct enum type.
733         (gfc_conv_intrinsic_aint): Likewise.  Clarify comment in front of
734         function.  Add default case to switch, deal with FIX_TRUNC_EXPR
735         instead of FIX_FLOOR_EXPR.
736
737 2005-05-18  Feng Wang  <fengwang@nudt.edu.cn>
738
739         PR fortran/20954
740         * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
741         build character length.
742
743 2005-05-17  Zdenek Dvorak  <dvorakz@suse.cz>
744
745         * trans-types.c (gfc_array_range_type): New variable.
746         (gfc_init_types): Initialize gfc_array_range_type.
747         (gfc_get_array_type_bounds): Use gfc_array_range_type.
748
749 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
750
751         PR fortran/15080
752         * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
753         arguments.  If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
754         of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
755         just that as index.
756         (generate_loop_for_rhs_to_temp): Likewise.
757         (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
758         It non-NULL, add it to body.
759         (allocate_temp_for_forall_nest_1): New function, split from
760         allocate_temp_for_forall_nest.
761         (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
762         propagate it down to compute_overall_iter_number.  Use
763         allocate_temp_for_forall_nest_1.
764         (gfc_trans_assign_need_temp): Remove COUNT2.  Call
765         compute_inner_temp_size into a new stmtblock_t.  Adjust calls to
766         allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
767         and generate_loop_for_temp_to_lhs.
768         (gfc_trans_pointer_assign_need_temp): Adjust calls to
769         allocate_temp_for_forall_nest.
770         (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
771         stmtblock_t.  Call compute_overall_iter_number just once, then
772         allocate_temp_for_forall_nest_1 twice with the same size.
773         Initialize mask indexes if nested_forall_info != NULL.
774         (gfc_trans_where_2): Initialize mask indexes before calling
775         gfc_trans_nested_forall_loop.
776
777 2005-05-15  Feng Wang <fengwang@nudt.edu.cn>
778         Jerry DeLisle <jvdelisle@verizon.net>
779
780         PR fortran/17432
781         * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to 
782         resolve ICE on assign of format label.
783         * trans-io.c (set_string): add fold-convert to properly
784         handle assigned format label in write.
785  
786 2005-05-13  Paul Brook  <paul@codesourcery.com>
787
788         * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
789
790 2005-05-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
791
792         * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
793
794 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
795
796         PR fortran/21260
797         * io.c (check_format): Look for literal characters inside
798         hollerith constant.
799
800 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
801
802         * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
803         attribute from result symbol to function symbol.
804         * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
805         instead of sym->result->attr.dimension.
806
807 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
808
809         PR fortran/20178
810         * gfortran.h (gfc_option): Add flag_f2c.
811         * invoke.texi: Document '-ff2c' command line option.  Adapt
812         documentation for '-fno-second-underscore' and '-fno-underscoring'.
813         * lang.opt (ff2c): New entry.
814         * options.c (gfc-init_options): Set default calling convention
815         to -fno-f2c.  Mark -fsecond-underscore unset.
816         (gfc_post_options): Set -fsecond-underscore if not explicitly set
817         by user.        
818         (handle_options): Set gfc_option.flag_f2c according to requested
819         calling convention.
820         * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
821         intrinsics where necessary.
822         (gfc_trans_deferred_vars): Change todo error to assertion.
823         * trans-expr.c (gfc_conv_variable): Dereference access
824         to hidden result argument.
825         (gfc_conv_function_call): Add hidden result argument to argument
826         list if f2c calling conventions requested.  Slightly restructure
827         tests.  Convert result of default REAL function to requested type
828         if f2c calling conventions are used.  Dereference COMPLEX result
829         if f2c cc are used.
830         * trans-types.c (gfc_sym_type):  Return double for default REAL
831         function if f2c cc are used.
832         (gfc_return_by_reference): Slightly restructure logic.  Return
833         COMPLEX by reference depending on calling conventions.
834         (gfc_get_function_type): Correctly make hidden result argument a
835         pass-by-reference argument for COMPLEX.  Remove old code which does
836         this for derived types.
837
838 2005-05-09  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
839
840         * match.c (gfc_match_return): Only require space after keyword when
841         it is obligatory.  Only give stdwarn to after matching is successful.
842         * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
843
844 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
845
846         * intrinsic.texi: Fix typos.
847
848 2005-05-07  Steven G. Kargl  <kargls@comcast.net>
849
850         * intrinsic.texi:  Document ASSOCIATED and ATAN2.  Update Bessel function
851         description to include information about scalar arguments.
852
853 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
854
855         * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
856         match.h, trans-array.h: Update copyright.
857
858 2005-04-29  Tom Tromey  <tromey@redhat.com>
859
860         * f95-lang.c (poplevel): Updated for change to build_block.
861
862 2005-04-29  Jakub Jelinek  <jakub@redhat.com>
863
864         PR fortran/13082
865         PR fortran/18824
866         * trans-expr.c (gfc_conv_variable): Handle return values in functions
867         with alternate entry points.
868         * resolve.c (resolve_entries): Remove unnecessary string termination
869         after snprintf.  Set result of entry master.
870         If all entries have the same type, set entry master's type
871         to that common type, otherwise set mixed_entry_master attribute.
872         * trans-types.c (gfc_get_mixed_entry_union): New function.
873         (gfc_get_function_type): Use it for mixed_entry_master functions.
874         * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
875         * decl.c (gfc_match_entry): Set entry->result properly for
876         function ENTRY.
877         * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
878         __entry argument.
879         (build_entry_thunks): Handle return values in entry thunks.
880         Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
881         shared between multiple contexts.
882         (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
883         current_function_decl instead of sym->backend_decl.  Skip over
884         entry master's entry id argument.  For mixed_entry_master entries or
885         their results, return a COMPONENT_REF of the fake result.
886         (gfc_trans_deferred_vars): Don't warn about missing return value if
887         at least one entry point uses RESULT.
888         (gfc_generate_function_code): For entry master returning
889         CHARACTER, copy ts.cl->backend_decl to all entry result syms.
890         * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
891         values optional just because they are in entry master.
892
893 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
894
895         * gfortran.h (gfc_namespace): Add seen_implicit_none field,
896         Tobias forgot this in previous commit.
897         
898 2005-04-29  Paul Brook   <paul@codesourcery.com>
899
900         * trans-expr.c (gfc_conv_expr_present): Fix broken assert.  Update
901         comment.
902
903 2005-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
904
905         * gfortran.h (gfc_namespace): Add seen_implicit_none field.
906         * symbol.c (gfc_set_implicit_none): Give error if there's a previous
907         IMPLICIT NONE, set seen_implicit_none.
908         (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
909
910 2005-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
911
912         * gfortran.h (gfc_gsymbol): Make name a const char *.
913         * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
914         gfc_get_string.
915
916 2005-04-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
917
918         PR fortran/20865
919         * resolve.c (resolve_actual_arglist): Issue an error if a statement
920         functions is used as actual argument.
921
922 2005-04-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
923
924         PR fortran/21177
925         * interface.c (compare_parameter): Ignore type for EXPR_NULL
926         only if type is BT_UNKNOWN.
927
928 2005-04-25  Paul Brook  <paul@codesourcery.com>
929         Steven G. Kargl  <kargls@comcast.net>
930
931         PR fortran/20879
932         * check.c (gfc_check_ichar_iachar): New function.
933         * instinsic.h (gfc_check_ichar_iachar): Add prototype.
934         * intrinsic.c (add_functions): Use it.
935         * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
936         character expression lengths.
937
938 2005-04-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
939
940         PR fortran/20059
941         * trans-common.c (translate_common): Cast offset and
942         common_segment->offset to type int for warning message.
943
944 2005-04-23  DJ Delorie  <dj@redhat.com>
945
946         * trans-decl.c: Adjust warning() callers.
947
948 2005-04-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
949
950         * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
951         intermediate representation.  Fix typo in comment.
952
953 2005-04-21  Steven G. Kargl  <kargls@comcast.net>
954
955         * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
956         simplify logic; Add a gcc_assert.
957
958 2005-04-19  Steven G. Kargl  <kargls@comcast.net>
959
960         * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
961
962 2005-04-19  Arnaud Desitter  <arnaud.desitter@ouce.ox.ac.uk>
963             Steven G. Kargl  <kargls@comcast.net>
964
965         * invoke.texi: Update -Waliasing description
966
967 2005-04-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
968
969         PR fortran/16861
970         * resolve.c (resolve_variable): If e->symtree is not set, this
971         ought to be a FAILURE, and not a segfault.
972
973 2005-04-17  Paul Thomas <pault@gcc.gnu.org>
974
975         PR fortran/17472
976         PR fortran/18209
977         PR fortran/18396
978         PR fortran/19467
979         PR fortran/19657
980         * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
981         declaration for st_set_nml_var and st_set_nml_var_dim. Remove
982         declarations of old namelist functions.
983         (build_dt): Simplified call to transfer_namelist_element.
984         (nml_get_addr_expr): Generates address expression for start of 
985         object data. New function.
986         (nml_full_name): Qualified name for derived type components. New 
987         function.
988         (transfer_namelist_element): Modified for calls to new functions 
989         and improved derived type handling.
990
991 2005-04-17  Richard Guenther  <rguenth@gcc.gnu.org>
992
993         * scanner.c (gfc_next_char_literal): Reset truncation flag
994         for lines ending in a comment for both fixed and free form.
995         (load_line): Do not set truncated flag if only truncating
996         the EOL marker.
997
998 2005-04-15  Richard Guenther  <rguenth@gcc.gnu.org>
999
1000         PR fortran/14569
1001         * gfortran.h (gfc_linebuf): Add truncated field.
1002         * parse.c (next_statement): Handle warning for truncated
1003         lines.
1004         * scanner.c (load_line): Return if line was truncated.
1005         No longer warn for truncated lines.  Remove unused parameters.
1006         (load_file): Store load_line return value to linebuf.
1007         (gfc_error_recovery): Do not advance line at the end.
1008
1009 2005-04-14  Steven G. Kargl  <kargls@comcast.net>
1010
1011         * gfortran.h (gfc_real_info): Add subnormal struct member.
1012         * arith.c (gfc_arith_init_1): Set it.
1013         (gfc_check_real_range): Use it.
1014         * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1015
1016 2005-04-12  Kazu Hirata  <kazu@cs.umass.edu>
1017
1018         * simplify.c: Fix a comment typo.
1019
1020 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1021
1022         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1023
1024 2005-04-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1025
1026         * simplify.c (gfc_simplify_nearest): Overhaul.
1027
1028 2005-04-10  Kazu Hirata  <kazu@cs.umass.edu>
1029
1030         * interface.c: Fix a comment typo.
1031
1032 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1033
1034         * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1035         Fortran 95.
1036
1037 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
1038
1039         * simplify.c (gfc_simplify_anint): Use mpfr_round()
1040         (gfc_simplify_dnint): ditto.
1041         (gfc_simplify_nint): ditto.
1042
1043 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
1044
1045         PR fortran/13257
1046         * io.c (check_format): Allow an optional comma
1047         between descriptors.
1048
1049 2005-04-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1050
1051         * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1052         comment according to GNU coding style.
1053         (gfc_match_if): Remove gfc_ prefix in call to
1054         match_arithmetic_if.
1055
1056 2005-04-08  Diego Novillo  <dnovillo@redhat.com>
1057
1058         * match.c (gfc_match_arithmetic_if): Declare static.
1059
1060 2005-04-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1061
1062         PR fortran/17229
1063         * match.c (gfc_match_arithmetic_if): New function to match an
1064         arithmetic IF statement.
1065         (gfc_match_if): Use gfc_match_arithmetic_if to match an
1066         arithmetic IF statement embedded in a simple IF statement.
1067
1068 2005-04-07  Steven G. Kargl  <kargls@comcast.net>
1069
1070         * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1071
1072 2005-04-06  Steven G. Kargl  <kargls@comcast.net>
1073
1074         * invoke.texi: Remove documentation of -std=f90 
1075
1076 2005-04-06  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1077
1078         * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1079         non-pointer assignment.
1080
1081 2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>
1082
1083         PR fortran/15959
1084         PR fortran/20713
1085
1086         * array.c (resolve_character_array_constructor): New function. Set
1087         constant character array's character length.
1088         (gfc_resolve_array_constructor): Use it.
1089         * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1090         length.
1091         (gfc_set_constant_character_len): New function. Set constant character
1092         expression according the given length.
1093         * match.h (gfc_set_constant_character_len): Add prototype.
1094
1095 2005-04-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1096
1097         * intrinsic.texi: BES?? functions are not in the f95 standard.
1098
1099 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1100
1101         * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1102
1103 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1104
1105         * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1106         BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1107
1108 2005-04-02  Steven G. Kargl  <kargls@comcast.net>
1109
1110         * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1111
1112 2005-04-01  Kazu Hirata  <kazu@cs.umass.edu>
1113
1114         * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1115         trans.h: Fix comment typos.
1116
1117 2005-03-29  Steven G. Kargl  <kargls@comcast.net>
1118
1119         * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1120         flag_default_integer, flag_default_real
1121         * invoke.texi: Update documentation
1122         * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8   
1123         fdefault-integer-8, and fdefault-real-8 definitions.
1124         * options.c (gfc_init_options): Set option defaults
1125         (gfc_handle_option): Handle command line options.
1126         * trans-types.c (gfc_init_kinds): Use options.
1127
1128 2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
1129
1130         * f95-lang.c (builtin_function): Process the attrs parameter
1131         and apply the "const" attribute to the builtin if found.
1132
1133 2005-03-27  Steven G. Kargl  <kargls@comcast.net>
1134
1135         * intrinsic.texi: Document AIMAG, AINT, ALL
1136
1137 2005-03-26  Steven G. Kargl  <kargls@comcast.net>
1138
1139         * arith.c (check_result): Fix illogical logic.
1140
1141 2005-03-26  Canqun Yang  <canqun@nudt.edu.cn>
1142
1143         * trans-common.c (create_common): Build RECORD_NODE for common blocks
1144         contain no equivalence objects.
1145         (add_equivalences): New argument saw_equiv.
1146         (trans_common): New local variable saw_equiv.
1147         (finish_equivalences): Add a local variable dummy, Always pass true
1148         for the 3rd parameter to create_common.
1149
1150 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
1151
1152         * intrinsic.texi: Fix "make dvi"
1153
1154 2005-03-24  Steven G. Kargl  <kargls@comcast.net>
1155
1156         * intrinsic.texi: New file.
1157         * gfortran.texi: Include it; white space change; fix typo.
1158
1159 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1160
1161         * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1162
1163 2005-03-23  Steven Bosscher  <stevenb@suse.de>
1164
1165         * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1166         * trans-array.c (gfc_trans_allocate_array_storage,
1167         gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1168         gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1169         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1170         gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1171         gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1172         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1173         gfc_conv_expr_descriptor): Likewise.
1174         * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1175         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1176         * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1177         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1178         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1179         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1180         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1181         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1182         gfc_conv_intrinsic_merge, prepare_arg_info,
1183         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1184         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1185         gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1186         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1187         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1188         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1189         Likewise.
1190         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1191         * trans.c (gfc_add_modify_expr): Likewise.
1192
1193 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1194
1195         * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1196         gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1197         gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1198         gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1199         gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1200         gfc_check_perror): new functions to check newly implemented
1201         g77 intrinsics.
1202         * gfortran.h: adding symbols for new intrinsics.
1203         * intrinsic.c (add_functions): adding new intrinsics.
1204         (add_subroutines): adding new intrinsics.
1205         * intrinsic.h: prototype for all checking and resolving
1206         functions.
1207         * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1208         gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1209         gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1210         gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1211         gfc_resolve_kill_sub, gfc_resolve_link_sub,
1212         gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1213         gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1214         gfc_resolve_perror): new functions to resolve intrinsics.
1215         * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1216         for new symbols.
1217
1218 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1219
1220         * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1221         in which the variable is declared.
1222
1223         PR fortran/18525
1224         * resolve.c (was_declared): Also check for dummy attribute.
1225
1226 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1227
1228         * gfortran.h (arith): Remove ARITH_0TO0.
1229         * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1230         (gfc_arith_power): Remove special casing of zero to integral
1231         power zero.
1232
1233 2005-03-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1234
1235         * Make-lang.in (fortran-warn): Remove -Wno-error.
1236         (expr.o-warn, resolve.o-warn, simplify.o-warn,
1237         trans-common.o-warn): Specify -Wno-error.
1238
1239 2005-03-17  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1240
1241         * trans-array.c (gfc_trans_static_array_pointer,
1242         get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1243         comment and formatting typos.
1244
1245 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1246
1247         * invoke.texi: Fix typos.
1248
1249 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1250
1251         * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1252
1253 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1254
1255         * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1256         to zero on label_tree.
1257
1258 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1259
1260         PR fortran/18827
1261         * io.c (resolve_tag): Add checking on assigned label.
1262         (match_dt_format): Does not set symbol assign attribute.
1263         * match.c (gfc_match_goto):Does not set symbol assign attribute.
1264         * resolve.c (resolve_code): Add checking on assigned label.
1265         * trans-common.c (build_field): Deals with common variable assigned
1266         a label.
1267         * trans-stmt.c (gfc_conv_label_variable): New function.
1268         (gfc_trans_label_assign): Use it.
1269         (gfc_trans_goto): Ditto.
1270         * trans-io.c (set_string): Ditto.
1271         * trans.h (gfc_conv_label_variable): Add prototype.
1272
1273 2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1274
1275         PR fortran/20467
1276         * symbol.c (check_conflict): A dummy argument can't be a statement
1277         function.
1278
1279 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
1280
1281         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1282         the argument of the shift to the unsigned type.
1283
1284 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1285
1286         PR fortran/16907
1287         * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1288
1289 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1290
1291         PR fortran/20323
1292         * resolve.c (gfc_resolve): Check if character lengths are
1293         specification expressions.
1294
1295 2005-03-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1296
1297         PR fortran/20361
1298         * trans-array.c (gfc_stack_space_left): Remove unused variable.
1299         (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1300         code.
1301         * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1302         Remove declaration / prototype.
1303         * trans-common.c (build_equiv_decl): Give union a name.  Check if
1304         it can be put on the stack.
1305         * trans-decl.c (gfc_stack_space_left): Move function here.
1306         (gfc_build_qualified_array): Fix comment typo.
1307         * trans.h (gfc_put_var_on_stack): Add prototype.
1308
1309 2005-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1310
1311         * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1312         * decl.c, trans.c: Don't use C++ style comments.
1313         * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1314         ifsrc): Give names to enums and use ENUM_BITFIELD.
1315         (gfc_access): Remove trailing comma.
1316
1317 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
1318
1319         PR 19936
1320         * primary.c (match_complex_constant): Mangled complex constant may
1321         be an implied do-loop.  Give implied do-loop matcher a chance.
1322
1323 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
1324
1325         PR fortran/19754
1326         * resolve.c (compare_shapes):  New function.
1327         (resolve_operator): Use it.
1328
1329 2005-03-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1330
1331         * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1332         type for COMPLEX constants.
1333
1334 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1335
1336         PR fortran/19673
1337         * trans-expr.c (gfc_conv_function_call): Correctly dereference
1338         argument from a pointer function also if it has a result clause.
1339
1340 2005-03-04  Steven G. Kargl  <kargls@comcast.net>
1341
1342         * expr.c (gfc_copy_shape_excluding): Change && to ||.
1343
1344 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1345
1346         * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1347         clarify comment.
1348
1349 2005-02-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1350         (port from g95)
1351
1352         PR fortran/19479
1353         * simplify.c (gfc_simplify_bound): Rename to ...
1354         (simplify_bound): ... this and overhaul.
1355
1356 2005-02-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1357
1358         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1359         (gfc_conv_intrinsic_function): update function calls
1360
1361 2005-02-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1362
1363         PR fortran/20058
1364         * trans-types.c (gfc_max_integer_kind): Declare
1365         (gfc_init_kinds): Initialize it.
1366         * gfortran.h (gfc_max_integer_kind): extern it.
1367         * primary.c (match_boz_constant): Use it; remove gfortran extension
1368         of kind suffixes on BOZ literal constants
1369
1370
1371 2005-02-27  Steven G. Kargl  <kargls@comcast.net>
1372
1373         * arith.c (gfc_check_real_range):  Remove multiple returns
1374         (check_result): New function.
1375         (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1376         gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1377
1378
1379 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1380
1381         * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1382
1383
1384 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-meunchen.de>
1385
1386         Unrevert previously reverted patch.  Adding this fix:
1387         * module.c (find_true_name): Deal with NULL module.
1388
1389 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1390
1391         Revert yesterday's patch:
1392         2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1393
1394                 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1395                 ... argument.  Copy string instead of pointing to it.
1396
1397 2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1398
1399         * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1400         * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1401         gfc_get_namespace.
1402         * module.c (mio_namespace_ref, load_needed): Likewise.
1403         * parse.c (parse_interface, parse_contained): Likewise.  Here the
1404         correct second argument matters.
1405         * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1406         parent's implicit types if this is set.
1407         (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1408         * trans-common.c (build_common_decl): Likewise.
1409
1410         * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1411         formatting.
1412         * symbol.c (gfc_set_default_type): Issue error only once, by setting
1413         and checking 'untyped' attribute.
1414
1415         * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1416         fields into new struct 'op' inside the 'value' union.
1417         * arith.c (eval_intrinsic): Adapt all users.
1418         * dependency.c (gfc_check_dependency): Likewise.
1419         * dump-parse-tree.c (gfc_show_expr): Likewise.
1420         * expr.c (gfc_get_expr): Don't clear removed fields.
1421         (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1422         gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1423         check_intrinsic_op): Adapt to new field names.
1424         * interface.c (gfc_extend_expr): Likewise.  Also explicitly
1425         nullify 'esym' and 'isym' fields of new function call.
1426         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1427         Adapt to renamed structure fields.
1428         * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1429         * module.c (mio_expr): Likewise.
1430         * resolve.c (resolve_operator): Likewise.
1431         (gfc_find_forall_index): Likewise.  Only look through operands
1432         if dealing with EXPR_OP
1433         * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1434         * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1435         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1436
1437         [ Reverted ]
1438         * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1439         'name' a 'const char *'.
1440         (gfc_symbol): Likewise, also for 'module'.
1441         (gfc_symtree): Make 'name' a 'const char *'.
1442         (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1443         (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1444         'char *' argument.
1445         (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1446         initialize 'SYM->module'.
1447         * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1448         pointer instead of empty string.
1449         * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1450         * interface.c (gfc_compare_types): Adapt check to account for possible
1451         NULL pointer.
1452         (compare_actual_formal): Check for NULL pointer instead of empty
1453         string.
1454         * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1455         Add 'const' qualifier.
1456         (conv_name): Return a heap allocated string.
1457         (find_conv): Add 'const' qualifier to 'target'.
1458         (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1459         (make_generic): Check for NULL pointer instead of empty string.
1460         (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1461         (add_conv): No need to strcpy result from 'conv_name'.
1462         (sort_actual): Check for NULL pointer instead of empty  string.
1463         * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1464         Adapt prototype.
1465         * module.c (compare_true_names): Compare pointers instead of strings
1466         for 'module' member.
1467         (find_true_name): Initialize string fields with gfc_get_string.
1468         (mio_pool_string): New function.
1469         (mio_internal_string): Adapt comment.
1470         (mio_component_ref, mio_component, mio_actual_arg): Use
1471         'mio_pool_string' instead of 'mio_internal_string'.
1472         (mio_symbol_interface): Add 'const' qualifier to string arguments.
1473         Add level of indirection. Use 'mio_pool_string' instead of
1474         'mio_internal_string'.
1475         (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1476         (write_common, write_symbol): Use 'mio_pool_string' instead of
1477         'mio_internal_string'.
1478         (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1479         instead of empty string.
1480         (write_operator, write_generic): Pass correct type variable to
1481         'mio_symbol_interface'.
1482         (write_symtree): Use 'mio_pool_string' instead of
1483         'mio_internal_string'.
1484         * primary.c (match_keyword_arg): Adapt check to possible
1485         case of NULL pointer.  Use 'gfc_get_string' instead of 'strcpy'.
1486         * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1487         gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1488         'strcpy'.
1489         (ambiguous_symbol): Check for NULL pointer instead of empty string.
1490         (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1491         arguments.
1492         * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1493         pointer instead of empty string.
1494         * trans-decl.c (gfc_sym_mangled_identifier,
1495         gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1496         gfc_get_symbol_decl): Likewise.
1497         * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1498         argument.  Copy string instead of pointing to it.
1499
1500 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
1501
1502         * intrinsic.h, st.c: Update copyright.
1503
1504 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1505
1506         * symbol.c: Typos in comments.
1507
1508 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1509
1510         * expr.c (gfc_type_convert_binary): Typo in comment.
1511
1512 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1513
1514         * check.c (gfc_check_selected_int_kind): New function.
1515         * intrinsic.h: Prototype it.
1516         * intrinsic.c (add_function): Use it.
1517         * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1518           BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1519
1520 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1521
1522         * check.c (gfc_check_int): improve checking of optional kind
1523         * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1524
1525 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1526
1527         * check.c (gfc_check_achar): New function
1528         * intrinsic.h: Prototype it.
1529         * intrinsic.c (add_function): Use it.
1530
1531 2005-02-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1532
1533         * trans-stmt.c (generate_loop_for_temp_to_lhs,
1534         generate_loop_for_rhs_to_temp): Remove if whose condition is
1535         always true.
1536
1537 2005-02-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1538
1539         * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1540         (gfc_use_derived): ... this function.
1541
1542 2005-02-09  Richard Henderson  <rth@redhat.com>
1543
1544         * f95-lang.c (gfc_init_builtin_functions): Call
1545         build_common_builtin_nodes; do not define any functions handled
1546         by it.
1547
1548 2005-02-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1549
1550         * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1551         EXPR_SUBSTRING.
1552         (gfc_is_constant_expr): Check 'ref' to determine if substring
1553         reference is constant.
1554         (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1555         (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1556         and 'op2'.
1557         * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1558
1559 2005-02-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1560
1561         * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1562         gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1563         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1564         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1565         gfc_add_procedure): Add argument.
1566         * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1567         gfc_match_null, match_type_spec, match_attr_spec,
1568         gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1569         Update callers to match.
1570         (gfc_match_entry) : Likewise, fix comment typo.
1571         (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1572         access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1573         gfc_match_derived_decl): Update callers.
1574         * interface.c (gfc_match_interface): Likewise.
1575         * match.c (gfc_match_label, gfc_add_flavor,
1576         gfc_match_call, gfc_match_common, gfc_match_block_data,
1577         gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1578         Likewise.
1579         * parse.c (parse_derived, parse_interface, parse_contained),
1580         primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1581         * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1582         * symbol.c (check_conflict, check_used): Add new 'name' argument,
1583         use when printing error message.
1584         (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1585         gfc_add_generic, gfc_add_in_common, gfc_add_data,
1586         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1587         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1588         gfc_add_procedure): Add new 'name' argument.  Pass along to
1589         check_conflict and check_used.
1590         (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1591         gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1592         gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1593         gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1594         argument in calls to any of the modified functions.
1595
1596 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
1597
1598         * gfortran.texi: Don't give last update date.
1599
1600 2006-01-30  Richard Henderson  <rth@redhat.com>
1601
1602         * options.c (gfc_init_options): Zero flag_errno_math.
1603
1604 2005-01-29  Paul Brook  <paul@codesourcery.com>
1605
1606         PR fortran/18565
1607         * check.c (real_or_complex_check): New function.
1608         (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1609         * intrinsic.c (add_functions): Use new check functions.
1610         * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1611         Add prototypes.
1612
1613 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
1614
1615         PR fortran/19589
1616         * expr.c (gfc_check_assign):  Check for conformance of logical operands
1617
1618 2004-01-27  Steven Bosscher  <stevenb@suse.de>
1619
1620         * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1621         TREE_USED for all labels.
1622         (gfc_trans_entry_master_switch): Use it instead of building a
1623         label by hand.
1624         * trans-io.c (add_case): Likewise.
1625         * trans-stmt.c (gfc_trans_integer_select): Likewise.
1626
1627 2004-01-23  Paul Brook  <paul@codesourcery.com>
1628         Steven G. Kargl  <kargls@comcast.net>
1629
1630         PR fortran/17941
1631         * arith.c (gfc_convert_real): Remove sign handling.
1632         * primary.c (match_digits): Allow whitespace after initial sign.
1633         (match_real_const): Handle signs here.  Allow whitespace after
1634         initial sign.  Remove dead code.
1635         (match_const_complex_part): Remove.
1636         (match_complex_part): Use match_{real,integer}_const.
1637         (match_complex_constant): Cross-promote integer types.
1638
1639 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
1640
1641         PR fortran/19294
1642         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1643         transpose_c8 for complex types.
1644
1645 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
1646
1647         * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1648         trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1649         trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1650         Follow spelling conventions.
1651
1652 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
1653
1654         PR fortran/19313
1655         * trans-io.c (gfc_trans_inquire): Added code to support
1656         pad.
1657
1658 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
1659
1660         * intrinsic.c (make_alias):  Add standard argument.
1661         (add_functions): Update make_alias calls.
1662
1663 2005-01-22  Paul Brook  <paul@codesourcery.com>
1664
1665         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1666
1667 2005-01-22  Paul Brook  <paul@codesourcery.com>
1668
1669         * gfortran.h (gfc_check_access): Add prototype.
1670         * match.c (gfc_match_namelist): Remove TODO.
1671         * module.c (check_access): Rename ...
1672         (gfc_check_access): ... to this.  Boolify.  Update callers.
1673         * resolve.c (resolve_symbol): Check for private objects in public
1674         namelists.
1675
1676 2005-01-22  Paul Brook  <paul@codesourcery.com>
1677
1678         * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1679         does not have an explicit type.
1680         (gfc_match_variable): Resolve implicit derived types in all cases.
1681         Resolve contained function types from their own namespace, not the
1682         parent.
1683         * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1684         checking.  Resolve from the contained namespace, not the parent.
1685
1686 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1687
1688         PR fortran/19543
1689         * trans-const.c (gfc_conv_constant_to_tree): Give logical
1690         constants the correct type.
1691
1692         PR fortran/19194
1693         * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1694         length parameters.
1695         (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1696         pointer fields.
1697
1698 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
1699
1700         * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1701         gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1702         match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1703         scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1704         trans-io.c, trans-stmt.c, trans.c: Update copyright.
1705
1706 2005-01-17  Ira Rosen  <irar@il.ibm.com>
1707
1708         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1709
1710 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1711
1712         PR fortran/19182
1713         * error.c (error_char): Line-buffer errors / warnings.
1714
1715 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1716
1717         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1718         unsigned issue.  Use build_int_cst instead of converting
1719         integer_zero_node.  Remove unnecessary conversion.
1720
1721         * trans-types.c (gfc_get_character_type_len): : Use
1722         gfc_charlen_type_node as basic type for the range field.
1723
1724         * trans-intrinsic.c (build_fixbound_expr,
1725         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1726         gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1727         gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1728         of converting 'integer_zero_node' or 'integer_one_node'
1729         respectively.
1730         (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1731         evade re-building.
1732         (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1733         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1734         'build_int_cst' instead of converting 'integer_zero_node' or
1735         'integer_one_node' respectively.
1736
1737         * trans-intrinsic.c (gfc_conv_intrinsic_index,
1738         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1739         'gfc'-prefix from local variable, remove dead code, use correct
1740         type when inserting argument.
1741
1742         * trans-intrinsic.c, trans-types.c: Update copyright years.
1743
1744 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
1745
1746         PR 19168
1747         * resolve.c (check_case_overlap): Typo in comment.
1748         (validate_case_label_expr):  Fix up kinds of case values
1749         (resolve_select): Properly handle kind mismatches.
1750
1751 2004-01-16  Paul Brook  <paul@codesourcery.com>
1752
1753         PR fortran/17675
1754         * trans-common.c (translate_common): Remove duplicate function call.
1755         (finish_equivalences): Preserve alignment when biasing offsets.
1756
1757 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
1758
1759         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1760         ASCII-like character encoding.
1761
1762 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
1763
1764         * resolve.c (compare_case): Cleanup.
1765
1766 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
1767
1768         * resolve.c (compare_case): Give arguments correct type.
1769
1770 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
1771
1772         * iresolve.c, trans-common.c, trans-types.c: Fix comment
1773         typos.
1774
1775 2005-01-09  Paul Brook  <paul@codesourcery.com>
1776
1777         PR fortran/17675
1778         * trans-common.c (current_common, current_offset): Remove.
1779         (create_common): Add head argument.
1780         (align_segment): New function.
1781         (apply_segment_offset): New function.
1782         (translate_common): Merge code from new_segment.  Handle alignment.
1783         (new_segment): Remove.
1784         (finish_equivalences): Ensure proper alignment.
1785
1786 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1787
1788         * trans-const.c: Don't include unused math.h.
1789
1790         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1791         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1792         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1793         trailing whitespace.
1794         (prepare_arg_info): Fix formatting, indenting and remove trailing
1795         whitespace.
1796         (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1797         trailing whitespace.
1798
1799         * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1800         gfc_constant_result, gfc_range_check, gfc_arith_power,
1801         eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1802         gfc_real2complex, gfc_complex2int, gfc_complex2real,
1803         gfc_complex2complex): Fix whitespace issues.
1804         * check.c (must_be, type_check, numeric_check, int_or_real_check,
1805         logical_array_check, array_check, scalar_check, nonoptional_check,
1806         variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1807         gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1808         gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1809         gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1810         gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1811         gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1812         gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1813         gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1814         gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1815         gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1816         gfc_check_lbound, gfc_check_logical, min_max_args,
1817         gfc_check_min_max_integer, gfc_check_min_max_real,
1818         gfc_check_min_max_double, gfc_check_matmul,
1819         gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1820         gfc_check_pack, gfc_check_precision, gfc_check_radix,
1821         gfc_check_range, gfc_check_real, gfc_check_repeat,
1822         gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1823         gfc_check_set_exponent): Fix formatting issues.
1824         (gfc_check_size, gfc_check_sign): Alphabetize function order,
1825         remove whitespace-only line.
1826         (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1827         gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1828         gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1829         gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1830         gfc_check_random_number, gfc_check_random_seed,
1831         gfc_check_second_sub, gfc_check_system_clock,
1832         gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1833         gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1834         gfc_check_unlink_sub): Fix formatting issues.
1835
1836 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1837
1838         * gfortran.h: Remove outdated comment.  Don't include stdio.h
1839         explicitly.
1840
1841 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1842
1843         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1844         output of 'gfortran --version'.
1845
1846 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
1847
1848         * arith.c: Add system.h; remove string.h
1849         * decl.c: Ditto
1850         * matchexp.c: Ditto
1851         * parse.c: Ditto
1852         * resolve.c: Ditto
1853         * st.c: Ditto
1854         * check.c: Remove stdlib.h and stdarg.h
1855         * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1856         * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1857         * f95-lang.c: Add system.h; remove stdio.h
1858         * interface.c: Add system.h; remove stdlib.h and string.h
1859         * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1860         * io.c: Remove string.h
1861         * simplify.c: Ditto
1862         * match.c: Remove stdarg.h and string.h
1863         * misc.c: Update copyright; add system.h; remove stdlib.h,
1864         string.h, and sys/stat.h
1865         * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1866         unistd.h, and time.h
1867         * option.c: Remove string.h and stdlib.h
1868         * primary.c: Ditto
1869         * scanner.c: Update copyright; add system.h; remove stdlib.h,
1870         stdio.h, string.h, and strings.h
1871         * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1872         * trans-array.c: Remove stdio.h and gmp.h
1873         * trans-const.c: Ditto
1874         * trans-expr.c: Ditto
1875         * trans-io.c: Ditto
1876         * trans-stmt.c: Ditto
1877         * trans.c: Ditto
1878         * trans-intrinsic.c: Remove stdio.h and string.h
1879
1880 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
1881
1882         * gfortran.h (gfc_case): fix typo in comment.
1883
1884 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1885
1886         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1887         logical shift.  Call fold.  Remove 0-bit shift shortcut.
1888         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1889         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
1890         result if width(arg 1) < 4 bytes.  Call fold.
1891
1892         PR fortran/19032
1893         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1894         in front of function to match the standard.  Correct handling
1895         of MODULO.
1896
1897 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
1898
1899         * trans-expr.c (gfc_conv_cst_int_power): Only check for
1900         flag_unsafe_math_optimizations if we have a float type.
1901
1902 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
1903
1904         * gfortran.texi: Fix typo.
1905
1906 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1907
1908         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1909         comment typo.
1910
1911 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1912
1913         PR fortran/18993
1914         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1915         (gfc_match_nullify): Make sure that ')' is in front of the end of
1916         statement.
1917
1918         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1919         function.
1920
1921 2004-12-14  Richard Henderson  <rth@redhat.com>
1922
1923         * gfortran.h (gfc_expr.function.name): Make const.
1924         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1925         (gfc_get_string): Update prototype.
1926         * iresolve.c: Include tree.h.
1927         (string_node, HASH_SIZE, string_head, hash): Remove.
1928         (gfc_get_string): Use vsnprintf, get_identifier.
1929         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1930         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1931         (gfc_done_1): Don't call gfc_iresolve_done_1.
1932         * module.c (mio_allocated_string): Take and return const char *,
1933         instead of modifying char**.
1934         (mio_expr): Update to match.
1935         * resolve.c (pure_function): Constify name argument.
1936         (resolve_function): Constify name.
1937         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1938
1939 2004-12-12  Richard Henderson  <rth@redhat.com>
1940
1941         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1942         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1943         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1944         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1945         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1946         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1947         gfc_resolve_unpack: Use PREFIX.
1948
1949 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1950
1951         PR fortran/18869
1952         * match.c (gfc_match_common): Skip whitespace.
1953
1954 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
1955
1956         PR fortran/16581
1957         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1958         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1959         integer kind check; Issue error for -std=f95 when needed.
1960         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1961         GFC_STD_F95.
1962         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1963         Promote arguments to same kind.
1964
1965 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
1966         Paul Brook  <paul@codesourcery.com>
1967
1968         PR fortran/16222
1969         * resolve.c (gfc_resolve_iterator_expr): New function.
1970         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
1971         start, end and stride to correct type.
1972         (resolve_code): Pass extra argument.
1973         * array.c (resolve_array_list): Pass extra argument.
1974         * gfortran.h (gfc_resolve): Add prototype.
1975         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1976         Handle real type iterators.
1977
1978 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1979
1980         PR fortran/17175
1981         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1982         same kind as C's 'int'.
1983         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1984
1985 2004-12-08  Richard Henderson  <rth@redhat.com>
1986
1987         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1988         to the output expression.
1989         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1990         warning conversion.
1991         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1992         to index kind.
1993
1994 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1995
1996         PR fortran/18826
1997         * resolve.c (resolve_code): Impose correct restrictions on
1998         assigned variable.
1999
2000         * decl.c (gfc_match_end): Use locus of END when eos is an error.
2001
2002 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2003         Paul Brook  <paul@codesourcery.com>
2004
2005         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2006         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2007         (gfc_check_stat, gfc_check_stat_sub): New functions.
2008         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2009         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2010         fstat, and stat to intrinsics symbol tables.
2011         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2012         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2013         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2014         (gfc_resolve_stat, gfc_resolve_flush): New functions.
2015         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2016         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2017
2018 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2019
2020         * intrinsic.c: Fix and add comments, fix function declarations
2021         (OPTIONAL,REQUIRED): New symbols
2022         (add_functions,add_subroutines): Use symbols
2023         (gmp.h): Remove unused include
2024
2025 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2026
2027         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2028         in diagnostics.
2029
2030 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2031
2032         * options.c (gfc_post_options): Don't clear flag_inline_functions.
2033
2034 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
2035
2036         * check.c (gfc_check_getcwd_sub): Fix seg fault.
2037
2038         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2039         gfc_check_unlink,gfc_check_unlink_sub): New functions
2040         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2041         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2042         exit to intrinsics symbol tables.
2043         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2044         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2045         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2046         gfc_resolve_unlink_sub): Add and sort prototypes.
2047         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2048         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2049         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2050
2051 2004-11-16  Paul Brook  <paul@codesourcery.com>
2052
2053         PR fortran/13010
2054         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2055         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2056         * trans-types.c (gfc_get_dtype): Accept array type rather than element
2057         type.
2058         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2059         (gfc_get_array_type_bounds): Ditto.
2060         (gfc_get_derived_type): Recurse into derived type pointers.
2061         * trans-types.h (gfc_get_dtype): Add prototype.
2062         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2063
2064 2004-11-15  Paul Brook  <paul@codesourcery.com>
2065
2066         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2067
2068 2004-11-10  Paul Brook  <paul@codesourcery.com>
2069
2070         PR fortran/18375
2071         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2072         * trans-io.c (transfer_array_component): Ditto.
2073
2074 2004-11-10  Paul Brook  <paul@codesourcery.com>
2075
2076         * invoke.texi: Fix typo.
2077
2078 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2079
2080         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2081         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2082         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2083         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2084         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2085
2086 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2087
2088         PR fortran/18023
2089         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2090
2091 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
2092
2093         * gfortranspec.c: Replace GNU CC with GCC.
2094
2095 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2096
2097         * gfortranspec.c (lang_specific_driver): Change year to 2004.
2098
2099 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2100
2101         PR fortran/18111
2102         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2103         hidden parameters.
2104
2105 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2106
2107         PR fortran/15164
2108         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2109         module procedures as if they were module variables.
2110
2111 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2112
2113         PR fortran/17535
2114         PR fortran/17583
2115         PR fortran/17713
2116         * module.c (write_symbol1): Set module_name for dummy arguments.
2117
2118 2004-11-02  Paul Brook  <paul@codesourcery.com>
2119
2120         * intrinsic.c (check_intrinsic_standard): Include error locus.
2121         Remove VLA.
2122         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2123         locus to check_intrinsic_standard.
2124
2125 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2126
2127         PR fortran/17590
2128         * gfortran.h: Change GFC_STD_* flags to more appropriate
2129         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2130         gfc_option_t): Add field for warning about use of nonstandard
2131         intrinsics.
2132         * intrinsic.c (add_sym): Add parameter for standard version, check
2133         this against current standard.
2134         (add_sym_0): Pass standard parameter to add_sym.
2135         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2136         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2137         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2138         (make_generic): Add parameter for standard, check this
2139         against currently selected standard.
2140         (add_functions, add_subroutines): Add parameter to tell which
2141         standard an intrinsic belongs to.
2142         (check_intrinsic_standard): New function.
2143         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2144         (gfc_intrinsic_sub_interface): Ditto.
2145         * lang.opt: Add Wnonstd-intrinsics option.
2146         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2147         init new warning.
2148         (set_Wall): Add warning about nonstd intrinsics.
2149         (gfc_handle_option): Change to use new GFC_STD_* flags,
2150         handle new warning.
2151         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2152
2153 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
2154
2155         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2156
2157 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2158
2159         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2160
2161 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2162
2163         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2164         comment typo.
2165
2166 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
2167
2168         * check.c (gfc_check_rand): Allow missing optional argument.
2169         (gfc_check_irand): Ditto.
2170         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2171
2172 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
2173
2174         PR fortran/13490, PR fortran/17912
2175         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2176         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2177         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2178         warning when compiling with pedantic.
2179         * gcc/fortran/arith.c: Set minimum integer values to reflect
2180         realities of two's complement signed integers. Added
2181         pedantic minimum.
2182
2183 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
2184
2185         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2186         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2187         link it in.
2188
2189 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2190
2191         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2192         typo.
2193         (gfc_generate_function_code): Fix formatting issue.
2194
2195 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2196
2197         * module.c: Fix formatting issues.
2198
2199 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2200
2201         * module.c (mio_interface_rest): Set where member of interface
2202         while loading.
2203
2204 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2205
2206         PR fortran/17901
2207         * options.c (gfc_handle_option): Add break after handing the
2208         J/M option.
2209
2210 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
2211
2212         * arith.c: Fix formatting issues.
2213
2214 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2215
2216         PR fortran/17676
2217         * resolve.c (resolve_operator): Use correct operator name in message.
2218
2219 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2220
2221         * primary.c (match_boz_constant): Allow kind parameter suffixes.
2222         Move standard warning further to the front.
2223
2224 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
2225
2226         * trans-stmt.c: Fix a comment typo.
2227
2228 2004-10-07  Paul Brook  <paul@codesourcery.com>
2229
2230         PR fortran/17678
2231         * trans-array.c (gfc_trans_deferred_array): Leave use associated
2232         variables alone.
2233
2234 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2235
2236         PR fortran/17568
2237         * simplify.c (twos_complement): New function.
2238         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2239
2240         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2241
2242 2004-10-06  Paul Brook  <paul@codesourcery.com>
2243
2244         * trans-stmt.c (gfc_trans_simple_do): New function.
2245         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
2246         loop.  Update comments.
2247
2248 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2249
2250         PR fortran/17283
2251         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2252         is scalar.
2253
2254         PR fortran/17631
2255         * intrinsic.c (add_sym_5): Remove.
2256         (add_subroutines): Add resolution function for MVBITS.
2257         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2258         MVBITS
2259         * iresolve.c (gfc_resolve_mvbits): New function.
2260         (gfc_resolve_random_number): Remove empty line at end of function.
2261
2262         * trans-const.c (gfc_build_cstring_const): New function.
2263         (gfc_init_cst): Use new function.
2264         * trans-const.h (gfc_build_cstring_const): Add prototype.
2265         * trans-io.c (set_string, set_error_locus): Use new function.
2266         * trans-stmt.c (gfc_trans_goto): Use new function.
2267
2268         PR fortran/17708
2269         * parse.c (accept_statement): Don't treat END DO like END IF and
2270         END SELECT.
2271         (parse_do_block): Generate possible END DO label inside END DO
2272         block.
2273
2274         PR fortran/17776
2275         * check.c (gfc_check_system_sub): New function.
2276         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2277         * intrinsic.c (add_functions): Add 'system'.
2278         (add_subroutines): Add 'system'.
2279         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2280         Move prototypes to other suborutines.
2281         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2282         Add prototype.
2283         (gfc_resolve_system_clock): Fix formatting of prototype.
2284         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2285         functions.
2286         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2287         GFC_ISYM_SYSTEM.
2288
2289 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
2290
2291         * scanner.c (preprocessor_line): Accept preprocessor lines without
2292         file names.  Check file names for closing quotes.  Handle escaped
2293         quotes in file names.
2294
2295 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2296         Paul Brook  <paul@codesourcery.com>
2297
2298         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2299         Use gfc_get_expr_charlen.
2300         * trans-expr.c (gfc_get_expr_charlen): New function.
2301         * trans.h (gfc_get_expr_charlen): Add prototype.
2302
2303 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
2304
2305         * trans-intrinsic.c: Fix a comment typo.
2306
2307 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2308
2309         * simplify.c (range_check): Remove blank line at beginning of function.
2310         (gfc_simplify_dint): Same at end of function.
2311         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2312         (gfc_simplify_bound): Fix indentation.
2313         (gfc_simplify_log10): Simplify calculation.
2314         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2315         of function.
2316         (gfc_simplify_nearest): Same at end of function.
2317         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2318         function.
2319         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2320         gfc_simplify_spacing): Simplify calulations.
2321
2322 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
2323
2324         * trans-intrinsic.c: Fix comments on spacing and rrspacing
2325         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2326
2327 2004-10-01  Jan Hubicka  <jh@suse.cz>
2328
2329         * f95-lang.c (gfc_expand_function): Update call of
2330         tree_rest_of_compilation.
2331         * trans-decl.c (gfc_generate_constructors): Likewise.
2332
2333 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2334
2335         * trans-intrinsic.c: Comment fixes.
2336
2337 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2338
2339         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2340
2341 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2342
2343         * trans-types.c (gfc_return_by_reference): Remove superfluous
2344         assertion.
2345
2346         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2347         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2348
2349         PR fortran/17615
2350         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2351         function to determine return type.
2352
2353 2004-09-20  Jan Hubicka  <jh@suse.cz>
2354
2355         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2356         tree.
2357         (gfc_generate_function_code): Likewise.
2358
2359 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2360
2361         PR fortran/15957
2362         * simplify.c (gfc_simplify_reshape): Set shape of return value
2363         correctly.
2364
2365 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2366             Zack Weinberg  <zack@codesourcery.com>
2367
2368         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2369         enumeration constants.
2370
2371 2004-09-17  Paul Brook  <paul@codesourcery.com>
2372
2373         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2374         (gfc_linebuf_header_size): Define.
2375         * scanner.c (load_file): Use it.
2376
2377 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2378
2379         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2380         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2381         resolve.c, scanner.c, trans-array.c, trans-array.h,
2382         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2383         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2384         trans.h: Fix comment typos.  Follow spelling conventions.
2385
2386 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
2387
2388         PR/15364
2389         * trans-io.c (transfer_array_component): New function.
2390         (transfer_expr): For array fields, call transfer_array_component.
2391
2392 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2393
2394         * gfortran.texi: Fix a typo.
2395
2396 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2397
2398         * parse.c (eof_buf): Rename eof to eof_buf.
2399         (unexpected_eof): Same.
2400         (gfc_parse_file): Same.
2401
2402 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
2403
2404         * check.c (gfc_check_getcwd_sub): New function.
2405         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2406         * intrinsic.c (add_functions): Add function definition;
2407         Use symbol.
2408         * intrinsic.c (add_subroutines): Add subroutine definitions.
2409         * intrinsic.h: Add prototypes.
2410         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2411         New functions.
2412         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2413
2414 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2415
2416         PR fortran/16485
2417         * module.c (write_symbol): Don't fill in module name here.
2418         (write_symbol0): Fill in here instead.
2419
2420 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2421
2422         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2423         trans-array.c, trans-common.c, trans-expr.c,
2424         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2425         comment typos.  Follow spelling conventions.
2426
2427 2004-09-09  Paul Brook  <paul@codesourcery.com>
2428
2429         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2430
2431 2004-09-08  Paul Brook  <paul@codesourcery.com>
2432
2433         * array.c: Don't include assert.h.
2434         * data.c: Don't include assert.h.  Replace assert and abort with
2435         gcc_assert and gcc_unreachable.
2436         * dependency.c: Ditto.
2437         * f95-lang.c: Ditto.
2438         * iresolve.c: Ditto.
2439         * resolve.c: Ditto.
2440         * simplify.c: Ditto.
2441         * symbol.c: Ditto.
2442         * trans-array.c: Ditto.
2443         * trans-common.c: Ditto.
2444         * trans-const.c: Ditto.
2445         * trans-decl.c: Ditto.
2446         * trans-expr.c: Ditto.
2447         * trans-intrinsic.c: Ditto.
2448         * trans-io.c: Ditto.
2449         * trans-stmt.c: Ditto.
2450         * trans-types.c: Ditto.
2451         * trans.c: Ditto.
2452
2453 2004-09-07  Per Bothner  <per@bothner.com>
2454         Paul Brook  <paul@codesourcery.com>
2455
2456         * error.c (show_locus): Handle mapped locations.
2457         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2458         * gfortran.h: Include input.h.
2459         (struct gfc_linebuf): Use source_location.
2460         * scanner.c (get_file): Initialize linemap.
2461         (preprocessor_line): Pass extra argument to get_file.
2462         (load_file): Ditto.  Setup linemap.
2463         (gfc_new_file): Handle mapped locations.
2464         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2465         Set decl source locations.
2466         (gfc_trans_common): Set blank common block location.
2467         * trans-decl.c (gfc_set_decl_location): New function.
2468         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2469         (trans_function_start): Move call to gfc_set_backend_locus..
2470         (build_function_decl): ... to here.
2471         (build_entry_thunks): Set and restore the backend locus.
2472         (gfc_generate_constructors): Remove excess arguments to
2473         init_function_start.
2474         (gfc_generate_block_data): Add comments.  Set the decl locus.
2475         * trans-io.c (set_error_locus): Handle mapped locations.
2476         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2477         (gfc_trans_code): Use SET_EXPR_LOCATION.
2478         (gfc_generate_code): Override the location of the new symbol.
2479         * trans.h (gfc_set_decl_location): Add prototype.
2480
2481 2004-08-31  Paul Brook  <paul@codesourcery.com>
2482
2483         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2484
2485 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2486
2487         PR fortran/15327
2488         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2489         strings.
2490
2491 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2492
2493         PR fortran/16400
2494         PR fortran/16404
2495         (port from g95)
2496         * resolve.c (resolve_transfer): New function.
2497         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2498
2499 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2500
2501         PR fortran/16579
2502         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2503         unsigned char.
2504
2505 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2506
2507         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2508
2509 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2510
2511         PR fortran/17244
2512         * trans-types.c (gfc_return_by_reference): Remove TODO error,
2513         add comment pointing out possible issue WRT compatibility with g77.
2514
2515 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2516
2517         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2518         all occurences of 'gfc_strlen_type_node' by
2519         'gfc_charlen_type_node'.
2520         * trans-types.h: Same. Also update comment accordingly.
2521
2522 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2523
2524         * primary.c: Update copyright boilerplate to say GCC.
2525         * f95-lang.c: Change initial comment to say gfortran.
2526
2527 2004-08-31  Paul Brook  <paul@codesourcery.com>
2528
2529         * trans-types.h: Add comments.
2530         (intmax_type_node, string_type_node, const_string_type_node): Remove.
2531
2532 2004-08-30  Richard Henderson  <rth@redhat.com>
2533
2534         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2535         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2536         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2537         c_long, c_long_long.
2538         (gfc_logical_info): Add c_bool.
2539         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2540         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2541         rather than gfc_int[48]_type_node for allocate choice.
2542         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2543         local copies of some kind type nodes.
2544         (gfc_build_builtin_function_decls): Likewise.
2545         * trans-expr.c (gfc_conv_power_op): Likewise.
2546         * trans-intrinsic.c (gfc_conv_intrinsic_index,
2547         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2548         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2549         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2550         gfc_trans_character_select, gfc_trans_allocate): Likewise.
2551         * trans-io.c (gfc_pint4_type_node): Move into ...
2552         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
2553         some kind type nodes.
2554         * trans-types.c (gfc_type_nodes): Remove.
2555         (gfc_character1_type_node, gfc_strlen_type_node): New.
2556         (gfc_integer_types, gfc_logical_types): New.
2557         (gfc_real_types, gfc_complex_types): New.
2558         (gfc_init_kinds): Fill in real mode_precision.
2559         (gfc_build_int_type, gfc_build_real_type): New.
2560         (gfc_build_complex_type, gfc_build_logical_type): New.
2561         (c_size_t_size): New.
2562         (gfc_init_types): Loop over kinds.
2563         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2564         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2565         (gfc_get_character_type_len): Likewise.
2566         (gfc_type_for_size): Loop over kinds; use a reduced set of
2567         unsigned type nodes.
2568         (gfc_type_for_mode): Loop over kinds.
2569         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2570         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2571         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2572         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2573         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2574         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2575         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2576         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2577         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2578         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2579         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2580         gfc_complex8_type_node, gfc_complex16_type_node,
2581         gfc_logical1_type_node, gfc_logical2_type_node,
2582         gfc_logical4_type_node, gfc_logical8_type_node,
2583         gfc_logical16_type_node, gfc_strlen_kind): Remove.
2584         (gfc_character1_type_node): Turn in to a variable.
2585         (gfc_strlen_type_node): Likewise.
2586
2587 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2588
2589         * gfortran.h (gfc_namespace): Add new field is_block_data.
2590         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2591         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2592         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2593         * trans.h (gfc_generate_block_data): Add prototype.
2594         * trans-decl.c (gfc_generate_block_data): New function.
2595
2596 2004-08-29  Richard Henderson  <rth@redhat.com>
2597
2598         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2599         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2600         than two HOST_WIDE_INT.
2601
2602 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2603
2604         PR fortran/13910
2605         * decl.c (free_variable, free_value, gfc_free_data, var_list,
2606         var_element, top_var_list, match_data_constant, top_val_list,
2607         gfc_match_data): Move here from match.c.
2608         (match_old_style_init): New function.
2609         (variable_decl): Match old-style initialization.
2610         * expr.c (gfc_get_variable_expr): New function.
2611         * gfortran.h (gfc_get_variable_expr): Add prototype.
2612         * gfortran.texi: Start documentation for supported extensions.
2613         * match.c: Remove the functions moved to decl.c.
2614         * match.h (gfc_match_data): Move prototype to under decl.c.
2615         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2616         comments.
2617
2618 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2619         Paul Brook  <paul@codesourcery.com>
2620
2621         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2622         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2623         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2624         (build_builtin_fntypes): New function.
2625         (gfc_init_builtin_functions): Use it.
2626         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2627         and GFC_ISYM_ERF{,C}.
2628         (gfc_c_int_kind): Declare.
2629         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2630         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2631         gfc_resolve_g77_math1): Add prototypes.
2632         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2633         * mathbuiltins.def: Add comment.  Change third argument.  Use
2634         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
2635         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2636         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2637         * trans-types.c (gfc_c_int_kind): Declare.
2638         (gfc_init_kinds): Set it.
2639
2640 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2641         Paul Brook  <paul@codesourcery.com>
2642
2643         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2644         (gfc_check_f, gfc_simplify_f): Add f0.
2645         * intrinsic.c (do_check): Call f0.  Flatten.
2646         (add_sym_0): Fix prototype.  Set f0.
2647         (add_functions): Add getgid, getgid and getuid.
2648         (resolve_intrinsic): Remove obsolete comment.
2649         (do_simplify): Call f0.
2650         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2651         gfc_resolve_getuid): Add prototypes.
2652         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2653         gfc_resolve_getuid): New functions.
2654         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2655         GFC_ISYM_GET?ID.
2656
2657 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2658
2659         * error.c (gfc_error_init_1): Remove blank line in front of
2660         function body. Add missing blank.
2661         (gfc_buffer_error, error_char, error_string): Remove blank line in
2662         front of function body.
2663         (show_locus): Add comma in comment.
2664         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2665         gfc_push_error, gfc_pop_error): Remove blank line in front of
2666         function body.
2667         (gfc_get_errors): Typo fix in comment in front of function. Remove
2668         blank line in front of function body.
2669
2670 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2671
2672         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2673         variable declaration of same name.
2674         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2675         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2676         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2677         Replace all calls to gfc_default_*_kind with variable accesses.
2678         * trans-types.c: Same as above.
2679         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2680         static qualifier. Replace all occurences.
2681         (gfc_default_*_kind): Remove functions.
2682
2683 2004-08-26  Richard Henderson  <rth@redhat.com>
2684
2685         * arith.c: Include system.h, not real system headers.
2686         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2687         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2688         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2689         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2690         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2691         gfc_index_integer_kind, gfc_default_integer_kind,
2692         gfc_default_real_kind,gfc_default_double_kind,
2693         gfc_default_character_kind, gfc_default_logical_kind,
2694         gfc_default_complex_kind, validate_integer, validate_real,
2695         validate_logical, validate_character,
2696         gfc_validate_kind): Move to trans-types.c.
2697         (gfc_set_model_kind): Use gfc_validate_kind.
2698         (gfc_set_model): Just copy the current precision to default.
2699         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2700         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2701         * gfortran.h: Update file commentary.
2702         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2703         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2704         gfc_default_double_kind_1, gfc_default_character_kind_1,
2705         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2706         (gfc_init_kinds): New.
2707         (gfc_init_types): Don't set gfc_index_integer_kind here.
2708         * trans-types.h (gfc_init_kinds): Declare.
2709         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2710
2711 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2712
2713         * check.c (gfc_check_atan2): New function.
2714         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2715         * intrinsic.h (gfc_check_atan2): Add prototype.
2716
2717 2004-08-25  Richard Henderson  <rth@redhat.com>
2718
2719         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2720         false and we don't validate the kind.
2721         (gfc_check_integer_range, gfc_check_real_range): Update to match.
2722         * check.c (kind_check): Likewise.
2723         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2724         (match_char_spec, match_logical_spec): Likewise.
2725         * gfortran.h (gfc_validate_kind): Likewise.
2726         * options.c (gfc_handle_option): Likewise.
2727         * primary.c (match_integer_constant, match_real_constant,
2728         match_string_constant, match_logical_constant,
2729         match_const_complex_part): Likewise.
2730         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2731         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2732         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2733         gfc_simplify_maxexponent, gfc_simplify_minexponent,
2734         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2735         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2736         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2737         gfc_simplify_tiny): Likewise.
2738         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2739         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2740         prepare_arg_info): Likewise.
2741
2742 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2743
2744         * expr.c (gfc_check_assign): Add comment. Add new warning.
2745         * trans-expr.c (gfc_conv_function_call): Correctly dereference
2746         result of pointer valued function when not in pointer assignment.
2747
2748 2004-08-25  Paul Brook  <paul@codesourcery.com>
2749
2750         * config-lang.in: Remove dead commented line.
2751         * module.c: Replace g95 with gfortran in comment.
2752
2753 2004-08-25  Paul Brook  <paul@codesourcery.com>
2754
2755         PR fortran/17190
2756         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2757
2758 2004-08-25  Paul Brook  <paul@codesourcery.com>
2759
2760         PR fortran/17144
2761         * trans-array.c (gfc_trans_allocate_temp_array): Remove
2762         string_length argument.
2763         (gfc_trans_array_ctor_element): New function.
2764         (gfc_trans_array_constructor_subarray): Use it.
2765         (gfc_trans_array_constructor_value): Ditto.  Handle constant
2766         character arrays.
2767         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2768         (gfc_trans_array_constructor): Use them.
2769         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2770         (gfc_conv_ss_descriptor): Remember section string length.
2771         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
2772         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2773         (gfc_conv_expr_descriptor): Ditto.
2774         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
2775         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2776         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
2777         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2778         (gfc_conv_variable): Set string_length from section.
2779         (gfc_conv_function_call): Remove extra argument.
2780         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2781         * trans-types.c (gfc_get_character_type_len): New function.
2782         (gfc_get_character_type): Use it.
2783         (gfc_get_dtype): Return zero for internal types.
2784         * trans-types.h (gfc_get_character_type_len): Add prototype.
2785         * trans.h (struct gfc_ss): Move string_length out of union.
2786
2787 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2788
2789         * trans.h (build2_v, build3_v): New macros.
2790         (build_v): Remove.
2791         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2792         build.
2793         * trans-array.c (gfc_conv_descriptor_data,
2794         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2795         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2796         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2797         gfc_trans_allocate_temp_array,
2798         gfc_trans_array_constructor_subarray,
2799         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2800         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2801         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2802         gfc_conv_array_ref, gfc_trans_preloop_setup,
2803         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2804         gfc_conv_loop_setup, gfc_array_init_size,
2805         gfc_conv_array_initializer, gfc_trans_array_bounds,
2806         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2807         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2808         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2809         of build and build_v as appropriate.
2810         * trans-common.c (create_common): Same.
2811         * trans-decl.c (gfc_trans_auto_character_variable,
2812         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2813         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2814         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2815         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2816         gfc_conv_expr_op, gfc_conv_function_call,
2817         gfc_trans_structure_assign): Same.
2818         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2819         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2820         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2821         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2822         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2823         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2824         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2825         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2826         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2827         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2828         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2829         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2830         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2831         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2832         gfc_conv_intrinsic_iargc): Same.
2833         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2834         set_flag, add_case, io_result, transfer_namelist_element,
2835         transfer_expr): Same.
2836         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2837         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2838         gfc_trans_integer_select, gfc_trans_logical_select,
2839         gfc_trans_character_select, gfc_trans_forall_loop,
2840         gfc_trans_nested_forall_loop, gfc_do_allocate,
2841         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2842         compute_inner_temp_size, compute_overall_iter_number,
2843         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2844         gfc_trans_forall_1, gfc_evaluate_where_mask,
2845         gfc_trans_where_assign, gfc_trans_allocate): Same.
2846         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2847         * trans.c (gfc_add_modify_expr, gfc_finish_block,
2848         gfc_build_array_ref, gfc_build_function_call,
2849         gfc_trans_runtime_check): Same.
2850
2851 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2852
2853         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2854         build_int_cst to build_int_cst_wide in accordance to Nathan's
2855         previous patch.
2856
2857 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2858
2859         * trans-array.c (gfc_trans_array_constructor_value): Adjust
2860         build_int_cst calls.
2861         * trans-const.c (gfc_build_string_const, gfc_init_constants,
2862         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2863         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2864         gfc_trans_entry_master_switch): Likewise.
2865         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2866         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2867         * trans-io.c (add_case, set_error_locus,
2868         transfer_namelist_element, transfer_expr): Likewise.
2869         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2870         gfc_trans_stop, gfc_trans_character_select): Likewise.
2871         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2872         * trans.c (gfc_trans_runtime_check): Likewise.
2873
2874 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2875
2876         * trans-decl.c, trans-types.c: Add and remove blank lines as
2877         required.
2878
2879 2004-08-24  Richard Henderson  <rth@redhat.com>
2880
2881         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2882
2883 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2884
2885         * resolve.c (merge_argument_lists): Revert unintentionally
2886         committed change.
2887
2888 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2889
2890         * trans-decl.c (build_function_decl): Fix spelling in comment.
2891         (build_entry_thunks): Remove code with no function.
2892         (gfc_build_intrinsic_function_decls): Remove empty line.
2893
2894         * resolve.c (resolve_entries): Fix a bunch of comment typos.
2895
2896 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2897
2898         * f95-lang.c (gfc_init_decl_processing): Adjust
2899         build_common_tree_nodes call.
2900
2901 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2902
2903         * trans-types.c: Spelling and formatting fixes.
2904
2905 2004-08-23  Richard Henderson  <rth@redhat.com>
2906
2907         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2908         of going through an intermediate string.  Fix 32/64 int/long bug.
2909
2910 2004-08-23  Eric Christopher  <echristo@redhat.com>
2911
2912         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2913         usage. Use build_vector_type_for_mode for vector types.
2914
2915 2004-08-22  Richard Henderson  <rth@redhat.com>
2916
2917         PR 13465
2918         * data.c (find_con_by_offset): Search ordered list; handle
2919         elements with repeat counts.
2920         (gfc_assign_data_value_range): New.
2921         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2922         (gfc_assign_data_value_range): Declare.
2923         * match.c (top_val_list): Extract repeat count into a temporary.
2924         * resolve.c (values): Make left unsigned.
2925         (next_data_value): Don't decrement left.
2926         (check_data_variable): Use gfc_assign_data_value_range.
2927
2928 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2929
2930         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2931
2932 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2933
2934         * check.c (gfc_check_reduction): Rename to ...
2935         (check_reduction): ... this. Make static. Don't check type of
2936         first argument.
2937         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2938         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2939         SUM to use new check functions.
2940         (check_specific): Change logic to call new functions.
2941         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2942         Add prototypes.
2943         (gfc_check_reduction): Remove prototype.
2944
2945 2004-08-20  Paul Brook  <paul@codesourcery.com>
2946         Canqun Yang  <canqun@nudt.edu.cn>
2947
2948         PR fortran/17077
2949         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2950         for automatic arrays.
2951         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2952
2953 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2954         (Port from g95)
2955
2956         PR fortran/17074
2957         * match.c (match_simple_forall, match_simple_where): Forward-declare.
2958         (gfc_match_if): Order statement list alphabetically, add WHERE and
2959         FORALL, remove double PAUSE.
2960         (gfc_match_simple_where, match_forall_header,
2961         gfc_match_simple_forall): New functions.
2962         (gfc_match_forall): Use match_forall_header.
2963
2964 2004-08-19  Paul Brook  <paul@codesourcery.com>
2965
2966         PR fortran/17091
2967         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2968         * symbol.c (gfc_clear_attr): Use memset.
2969
2970 2004-08-19  Paul Brook  <paul@codesourcery.com>
2971
2972         PR fortran/14976
2973         PR fortran/16228
2974         * data.c (assign_substring_data_value): Remove.
2975         (create_character_intializer): New function.
2976         (gfc_assign_data_value): Track the typespec for the current
2977         subobject.  Use create_character_intializer.
2978
2979 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
2980
2981         PR fortran/16946
2982         * check.c (gfc_check_reduction): New function.
2983         (gfc_check_minval_maxval): Removed.
2984         (gfc_check_product): Removed.
2985         (gfc_check_sum): Removed.
2986         * intrinsic.h: Add/remove declarations for these.
2987         * gfortran.h: Add field f3red to union gfc_check_f.
2988         * intrinsic.c (add_sym_3red): New function.
2989         (add_functions): Register maxval, minval, product, and sum intrinsics
2990         through add_sym_3red.
2991         (check_specific): Handle f3red union field.
2992         * iresolve.c: Whitespace change.
2993
2994 2004-08-18  Paul Brook  <paul@codesourcery.com>
2995
2996         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2997
2998 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
2999
3000         PR fortran/13278
3001         * trans-io.c (transfer_namelist_element): New. Recursively handle
3002         derived-type variables.  Pass string lengths.
3003         (build_dt): Code moved to build_namelist, with some
3004         changes and additions.
3005         (gfc_build_io_library_fndecls): Declare the fifth
3006         argument in st_set_nml_var_char -- string_length.
3007
3008 2004-08-17  Paul Brook  <paul@codesourcery.com>
3009         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3010
3011         PR fortran/13082
3012         * decl.c (get_proc_name): Update mystery comment.
3013         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
3014         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3015         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
3016         (struct gfc_entry_list): Define.
3017         (gfc_get_entry_list): Define.
3018         (struct gfc_namespace): Add refs and entries.
3019         (enum gfc_exec_op): Add EXEC_ENTRY.
3020         (struct gfc_code): Add ext.entry.
3021         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3022         (mio_symbol_attribute): Don't save/reture addr->entry.
3023         (mio_namespace_ref): Refcount namespaces.
3024         * parse.c (accept_statement): Handle ST_ENTRY.
3025         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3026         (parse_contained): Fixup sibling references to entry points
3027         after parsing the procedure body.
3028         * resolve.c (resolve_contained_fntype): New function.
3029         (merge_argument_lists, resolve_entries): New functions.
3030         (resolve_contained_functions): Use them.
3031         (resolve_code): Handle EXEC_ENTRY.
3032         (gfc_resolve): Call resolve_entries.
3033         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3034         * symbol.c (gfc_get_namespace): Refcount namespaces.
3035         (gfc_free_namespace): Ditto.
3036         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3037         optional when multiple entry points are present.
3038         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3039         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
3040         (create_function_arglist, trans_function_start, build_entry_thunks):
3041         New functions.
3042         (gfc_build_function_decl): Rename ...
3043         (build_function_decl): ... to this.
3044         (gfc_create_function_decl): New function.
3045         (gfc_generate_contained_functions): Use it.
3046         (gfc_trans_entry_master_switch): New function.
3047         (gfc_generate_function_code): Use new functions.
3048         * trans-stmt.c (gfc_trans_entry): New function.
3049         * trans-stmt.h (gfc_trans_entry): Add prototype.
3050         * trans-types.c (gfc_get_function_type): Add entry point argument.
3051         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3052         (gfc_generate_module_code): Call gfc_create_function_decl.
3053         * trans.h (gfc_build_function_decl): Remove.
3054         (gfc_create_function_decl): Add prototype.
3055
3056 2004-08-15  Andrew Pinski  <apinski@apple.com>
3057
3058         PR fortran/17030
3059         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3060         for cabs{,f} and copysign{,f}.
3061         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3062         (gfor_fndecl_math_cabs): Delete.
3063         (gfor_fndecl_math_sign4): Delete.
3064         (gfor_fndecl_math_sign8): Delete.
3065         (gfc_build_intrinsic_function_decls): Remove the
3066         initializing of cabs{,f} and copysign{,f} functions.
3067         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3068         instead of the functions definitions.
3069         (gfc_conv_intrinsic_sign): Likewise.
3070         * trans.h (gfor_fndecl_math_cabsf): Delete.
3071         (gfor_fndecl_math_cabs): Delete.
3072         (gfor_fndecl_math_sign4): Delete.
3073         (gfor_fndecl_math_sign8): Delete.
3074
3075 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3076
3077         * trans-array.c (gfc_trans_array_constructor_value): Use
3078         build_int_cst.
3079         * trans-const.c (gfc_build_string_const,
3080         gfc_init_constants, gfc_conv_mpz_to_tree,
3081         gfc_conv_constant_to_tree): Likewise.
3082         * trans-decl.c (gfc_get_symbol_decl): Likewise.
3083         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3084         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3085         * trans-io.c (add_case, set_error_locus, build_dt,
3086         transfer_expr): Likewise.
3087         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3088         gfc_trans_stop, gfc_trans_character_select): Likewise.
3089         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3090         * trans.c (gfc_trans_runtime_check): Likewise.
3091
3092 2004-08-14  Paul Brook  <paul@codesourcery.com>
3093
3094         * trans-decl.c (gfc_build_function_decl): Remove dead code.
3095
3096 2004-08-14  Paul Brook  <paul@codesourcery.com>
3097
3098         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3099
3100 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3101
3102         * gfortran.h: Add comments.
3103         * parse.c (parse_contained): Fix comment typo.
3104         * resolve.c (was_declared): Ditto.
3105         * symbol.c: Ditto.
3106
3107 2004-08-11  Paul Brook  <paul@codeourcery.com>
3108
3109         PR fortran/16917
3110         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3111
3112 2004-08-10  Richard Henderson  <rth@redhat.com>
3113
3114         * f95-lang.c (gfc_init_builtin_functions): Remove
3115          __builtin_stack_alloc, add __builtin_alloca.
3116         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3117         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3118
3119 2004-08-10  Paul Brook  <paul@codesourcery.com>
3120
3121         * trans-io.c (transfer_expr): Handle pointters.
3122
3123 2004-08-10  Paul Brook  <paul@codesourcery.com>
3124
3125         PR fortran/16919
3126         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3127         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3128         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3129         Handle GFC_SS_COMPONENT.
3130         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
3131         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3132         Use ss->shape.
3133         (gfc_conv_array_initializer): Call specific initializer routines.
3134         * trans-expr.c (gfc_trans_structure_assign): New function.
3135         (gfc_trans_subarray_assign): New function.
3136         (gfc_trans_subcomponent_assign): New fucntion
3137         (gfc_conv_structure): Use them.
3138         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3139         (gfc_ss): Add shape.
3140
3141 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
3142
3143         * simplify.c (gfc_simplify_shape): Bugfix.
3144         * expr.c (gfc_copy_shape_excluding): New function.
3145         * gfortran.h (gfc_get_shape): Bugfix.
3146         (gfc_copy_shape_excluding): Added declaration.
3147         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3148         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3149         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3150         time resolution of shape.
3151
3152 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3153
3154         * intrinsic.c (add_subroutines): Add getenv and
3155         get_environment_variable. (add_sym_5s): New function.
3156         * intrinsic.h (gfc_resolve_get_environment_variable): Add
3157         prototype.
3158         * iresolve.c (gfc_resolve_get_environment_variable): New
3159         function.
3160
3161 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
3162
3163         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3164         __builtin_pow[f] arguments.
3165
3166 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
3167
3168         * arith.c: Add #define for model numbers.  Remove global GMP variables.
3169         (natural_logarithm,common_logarithm,exponential,sine,
3170         cosine,arctangent,hypercos,hypersine ): Remove.
3171         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3172         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3173         gfc_check_real_range, gfc_constant_result, gfc_range_check,
3174         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3175         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3176         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3177         gfc_convert_complex,gfc_int2real,gfc_int2complex,
3178         gfc_real2int,gfc_real2real,gfc_real2complex,
3179         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3180         to MPFR, use new functions.
3181         * arith.h: Remove extern global variables.
3182         (natural_logarithm,common_logarithm,exponential, sine, cosine,
3183         arctangent,hypercos,hypersine): Remove prototypes.
3184         (arctangent2): Update prototype from GMP to MPFR.
3185         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3186         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3187         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3188         * gfortran.h (GFC_REAL_BITS): Remove.
3189         (arith): Add ARITH_NAN.
3190         Include mpfr.h.  Define GFC_RND_MODE.
3191         Rename GCC_GFORTRAN_H GFC_GFC_H.
3192         (gfc_expr): Convert GMP to MPFR.
3193         * module.c: Add arith.h, correct type in comment.
3194         (mio_gmp_real): Convert GMP to MPFR.
3195         (mio_expr):  Use gfc_set_model_kind().
3196         * primary.c:  Update copyright date with 2004.
3197         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3198         * simplify.c: Remove global GMP variables
3199         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3200         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3201         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3202         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3203         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3204         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3205         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3206         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3207         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3208         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3209         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3210         gfc_simplify_rrspacing,gfc_simplify_scale,
3211         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3212         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3213         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3214         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
3215         Use new functions.
3216         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3217         gfc_conv_mpf_to_tree.  Convert it to use MPFR
3218         (gfc_conv_constant_to_tree): Use it.
3219         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3220         * trans-intrinsic.c: Add arith.h, remove gmp.h
3221         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3222
3223 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
3224         Paul Brook  <paul@codesourcery.com>
3225
3226         * trans-array.c (gfc_trans_allocate_array_storage,
3227         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3228         gfc_conv_loop_setup): For functions, if the shape of the result
3229         is not known in compile-time, generate an empty array descriptor for
3230         the result and let the callee to allocate the memory.
3231         (gfc_trans_dummy_array_bias): Do nothing for pointers.
3232         (gfc_conv_expr_descriptor): Use function return values directly.
3233         * trans-expr.c (gfc_conv_function_call): Always add byref call
3234         insn to pre chain.
3235         (gfc_trans_pointer_assignment): Add comments.
3236         (gfc_trans_arrayfunc_assign): Don't chain on expression.
3237
3238 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3239
3240         * options.c (gfc_init_options): Don't warn about the use GNU
3241         extensions by default.
3242         (gfc_post_options): Warn about GNU extensions with -pedantic.
3243         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3244
3245 2004-07-30  Richard Henderson  <rth@redhat.com>
3246
3247         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3248         for TREE_CONSTANTs.
3249
3250 2004-07-25  Richard Henderson  <rth@redhat.com>
3251
3252         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3253         and DECL_IGNORED_P on RESULT_DECL.
3254         (gfc_generate_constructors): Likewise.
3255
3256 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3257
3258         PR fortran/16465
3259         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3260         options.
3261         (ffixed-line-length-80, ffixed-line-length-132): Remove.
3262         * options.c (gfc_handle_options): Deal with changed options.
3263         * scanner.c (load_line): Change second arg to 'char **',
3264         allocate if pointing to NULL. Keep track of buffer's length.
3265         Adapt buffer size to overlong lines. Pad lines to full length
3266         in fixed form.
3267         (load_file): Adapt to new interface of load_line.
3268
3269 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3270
3271         * trans.h (builtin_function): Declare.
3272
3273 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3274
3275         PR fortran/16404
3276         (parts ported from g95)
3277         * parse.h (gfc_state_data): New field do_variable.
3278         (gfc_check_do_variable): Add prototype.
3279         * parse.c (push_state): Initialize field 'do_variable'.
3280         (gfc_check_do_variable): New function.
3281         (parse_do_block): Remember do iterator variable.
3282         (parse_file): Initialize field 'do_variable'.
3283         * match.c (gfc_match_assignment, gfc_match_do,
3284         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
3285         Add previously missing checks.
3286         (gfc_match_return): Reformat error message.
3287         * io.c (match_out_tag): New function.
3288         (match_open_element, match_close_element,
3289         match_file_element, match_dt_element): Call match_out_tag
3290         instead of match_vtag where appropriate.
3291         (match_io_iterator, match_io_element): Add missing check.
3292         (match_io): Reformat error message.
3293         (match_inquire_element): Call match_out_tag where appropriate.
3294
3295         * parse.c (gfc_check_do_variable): Fix error locus.
3296
3297 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3298
3299         PR fortran/15129
3300         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3301         for every assumed length character dummy argument.
3302
3303         PR fortran/15140
3304         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3305
3306         PR fortran/13792
3307         * simplify.c (gfc_simplify_bound): Copy the bound expression.
3308
3309 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3310
3311         PR fortran/15324
3312         * trans-array.c gfc_trans_g77_array,
3313         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
3314         for assumed length characters.
3315         (gfc_conv_expr_descriptor): Set se->string_length if dealing
3316         with a character expression.
3317         (gfc_cvonv_array_parameter): Pass string length when passing
3318         character array according to g77 conventions.
3319
3320 2004-07-12  Paul Brook  <paul@codesourcery.com>
3321
3322         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
3323         * trans-array.c (gfc_trans_auto_array_allocation): Remove
3324         initialization code.
3325         * trans-common.c (create_common): Use gfc_conv_initializer.
3326         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
3327         * trans-expr.c (gfc_conv_initializer): New function.
3328         (gfc_conv_structure): Use it.
3329         * trans.h (gfc_conv_initializer): Add prototype.
3330
3331 2004-07-11  Paul Brook  <paul@codesourcery.com>
3332
3333         PR fortran/15986
3334         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
3335         variables.
3336         (parse_contained): Mark contained symbols as referenced.
3337
3338 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3339
3340         PR fortran/16455
3341         * module.c (gfc_dump_module, gfc_use_module): Print locus
3342         when opening of module file fails.
3343
3344         PR fortran/16404
3345         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
3346
3347         PR fortran/16404
3348         * match.c (gfc_match_program): A program name is obligatory.
3349         (gfc_match_return): RETURN in main program is an extension.
3350         (gfc_match_block_data): A space is required before a block data
3351         name.
3352
3353         PR fortran/16433
3354         * primary.c (match_boz_constant): Call gfc_notify_std only if
3355         we actually have a non-standard boz-literal-constant.
3356
3357         PR fortran/15754
3358         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3359         warning if assigning NULL().
3360
3361 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3362
3363         * f95-lang.c (set_block): Remove.
3364         (gfc_clear_binding_stack): New.
3365         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3366         (struct binding_level): Remove block_created_by_back_end.
3367         (clear_binding_level): Likewise.
3368         (poplevel): Don't handle block_created_by_back_end.
3369
3370 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3371
3372         * trans-decl.c (gfc_create_module_variable): Nothing to do if
3373         symbol is in common, because we ...
3374         (gfc_generate_module_vars): Call gfc_trans_common.
3375
3376 2004-07-10  Paul Brook  <paul@codesourcery.com>
3377
3378         * trans-array.c (gfc_build_null_descriptor): New function.
3379         (gfc_trans_static_array_pointer): Use it.
3380         * trans-array.h (gfc_build_null_descriptor): Add prototype.
3381         * trans-expr.c (gfc_conv_structure): Handle array pointers.
3382
3383 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3384
3385         PR fortran/16336
3386         * decl.c (gfc_match_save): Use-associated common block
3387         doesn't collide.
3388         * gfortran.h (gfc_common_head): Add new field 'name'.
3389         Fix typo in comment after #endif.
3390         * match.c (gfc_get_common): Add new argument from_common,
3391         mangle name if flag is set, fill in new field in structure
3392         gfc_common_head.
3393         (match_common): Set new arg in call to gfc_get_common,
3394         use-associated common block doesn't collide.
3395         * match.h (gfc_get_common): Adapt prototype.
3396         * module.c (load_commons): Set new arg in call to
3397         gfc_get_common.
3398         * symbol.c (free_common_tree): New function.
3399         (gfc_free_namespace): Call new function.
3400         * trans-common.c (several functions): Remove argument
3401         'name', use name from gfc_common_head instead.
3402
3403 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3404
3405         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3406         and RHS match. Return early if the RHS is NULL().
3407
3408         PR fortran/16336
3409         * match.c (match_common): Fix error reporting for used common.
3410
3411         PR fortran/15969
3412         * trans-expr.c (gfc_conv_structure): Handle initialization
3413         of scalar pointer components.
3414
3415         * parse.c (decode_statement): Fix matching of BLOCK DATA.
3416
3417         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3418         by fix for PR 15481.
3419
3420 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3421
3422         * trans-common.c: Fix whitespace issues, make variable names
3423         more readable.
3424         (create_common): Additionally, make loop logic more obvious.
3425
3426 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3427         Paul Brook  <paul@codesourcery.com>
3428
3429         PR fortran/13415
3430         * trans-common.c (calculate_length): Remove ...
3431         (get_segment_info): Merge into here.  Save field type.
3432         (build_field): Use saved type.
3433         (create_common, new_condition, new_segment, finish_equivalences):
3434         Use new get_segment_info.
3435         * trans-types.c: Update comment.
3436
3437 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3438
3439         PR fortran/14077
3440         * moduele.c (mio_symbol): Don't I/O initial values unless
3441         symbol is a parameter.
3442
3443 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3444
3445         PR fortran/13201
3446         * resolve.c (resolve_symbol): Verify that the shape of a
3447         parameter array is not only explicit, but also constant.
3448         * array.c (gfc_is_compile_time_shape): New function.
3449         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
3450
3451 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3452
3453         PR fortran/15481
3454         PR fortran/13372
3455         PR fortran/13575
3456         PR fortran/15978
3457         * module.c (write_symbol, write_symtree): Remove workaround.
3458         * primary.c (match_actual_arglist): Enhance comment.
3459         (gfc_match_rvalue): Handle function call with first argument
3460         a keyword argument correctly.
3461         * resolve.c (resolve_symbol): Change call to
3462         gfc_set_default_type to issue error if no implicit type
3463         can be found.
3464         * trans-decl.c (gfc_create_module_variable): Remove workaround.
3465
3466 2004-07-08  Paul Brook  <paul@codesourcery.com>
3467
3468         * intrinsic.c (add_sym_4s): New function.
3469         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3470
3471 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3472         Paul Brook  <paul@codesourcery.com>
3473
3474         PR fortran/15280
3475         PR fortran/15665
3476         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
3477         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
3478         * intrinsic.c (add_functions):  Identify iargc.  Add
3479         command_argument_count.
3480         (add_subroutines): Resolve getarg.  Add get_command and
3481         get_command_argument.
3482         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
3483         gfc_resolve_get_command_argument): Add prototypes.
3484         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
3485         gfc_resolve_get_command_argument): New functions.
3486         * trans-decl.c (gfor_fndecl_iargc): New variable.
3487         (gfc_build_intrinsic_function_decls): Set it.
3488         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
3489         (gfc_conv_intrinsic_function): Use it.
3490         * trans.h (gfor_fndecl_iargc): Declare.
3491
3492 2004-07-04  Matthias Klose  <doko@debian.org>
3493
3494         * Make-lang.in: Generate and install gfortran man page.
3495         * invoke.texi: Remove extra '@c man end'.
3496
3497 2004-07-04  Richard Henderson  <rth@redhat.com>
3498
3499         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3500
3501 2004-07-04  Paul Brook  <paul@codesourcery.com>
3502
3503         * decl.c (gfc_match_implicit_range): Don't use typespec.
3504         (gfc_match_implicit): Handle character selectors.
3505         * gfortran.h (gfc_set_implicit): Remove prototype.
3506         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
3507         * parse.c (accept_statement): Don't call gfc_set_implicit.
3508         * symbol.c (new_ts): Remove.
3509         (gfc_set_implicit_none): Use same loop bounds as other functions.
3510         (gfc_set_implicit): Remove.
3511         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
3512         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
3513
3514 2004-06-30  Richard Henderson  <rth@redhat.com>
3515
3516         * match.c (var_element): Remove unused variable.
3517
3518         * trans-decl.c (gfc_generate_function_code): Don't set
3519         x_whole_function_mode_p.
3520         (gfc_generate_constructors): Likewise.
3521
3522 2004-06-30  Richard Henderson  <rth@redhat.com>
3523
3524         * trans-decl.c (gfc_generate_function_code): Don't set
3525         immediate_size_expand.
3526         (gfc_generate_constructors): Likewise.
3527
3528 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3529
3530         PR fortran/16161
3531         * decl.c (gfc_match_type_spec): Rename second argument to
3532         'implicit_flag', reverse meaning. Don't match_char_spec if
3533         'implicit_flag' is set. Rename to ...
3534         (match_type_spec): ... this.
3535         (gfc_match_implicit_none, match_implicit_range): Move here
3536         from match.c.
3537         (gfc_match_implicit): Move here from match.c, try to
3538         match_char_len if match_implicit_range doesn't succeed for
3539         CHARACTER implicits. Call renamed fucntion match_type_spec.
3540         (gfc_match_data_decl, match_prefix): Call renamed function
3541         match_type_spec.
3542         * match.c (gfc_match_implicit_none, match_implicit_range,
3543         gfc_match_implicit): Move to decl.c.
3544         * match.h (gfc_match_implicit_none, gfc_match_implicit):
3545         Move protoypes to section 'decl.c'.
3546         (gfc_match_type_spec): Remove prototype.
3547
3548 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3549
3550         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3551         copyright years.
3552
3553 2004-06-29  Steven Bosscher  <stevenb@suse.de>
3554
3555         Make sure types in assignments are compatible.  Mostly mechanical.
3556         * trans-const.h (gfc_index_one_node): New define.
3557         * trans-array.c (gfc_trans_allocate_array_storage,
3558         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3559         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3560         gfc_conv_array_ubound, gfc_conv_array_ref,
3561         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3562         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3563         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3564         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3565         types in assignments, conversions and conditionals for expressions.
3566         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3567         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3568         gfc_conv_function_call, gfc_trans_pointer_assignment,
3569         gfc_trans_scalar_assign): Likewise.
3570         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3571         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3572         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3573         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3574         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3575         gfc_conv_allocated, gfc_conv_associated,
3576         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3577         * trans-io.c (set_string): Likewise.
3578         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3579         gfc_do_allocate, generate_loop_for_temp_to_lhs,
3580         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3581         compute_overall_iter_number, gfc_trans_assign_need_temp,
3582         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3583         gfc_evaluate_where_mask, gfc_trans_where_assign,
3584         gfc_trans_where_2): Likewise.
3585         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3586         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3587
3588         * trans.c (gfc_add_modify_expr): Add sanity check that types
3589         for the lhs and rhs are the same for scalar assignments.
3590
3591 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3592
3593         * dump-parse-tree.c (show_common): New function.
3594         (gfc_show_namespace): Show commons.
3595
3596 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3597         Andrew Vaught  <andyv@firstinter.net>
3598
3599         PR fortran/13249
3600         PR fortran/15481
3601         * decl.c (gfc_match_save): Adapt to new common structures,
3602         don't allow saving USE-associated common.
3603         * dump-parse-tree (gfc_show_attr): (saved_)common are not
3604         symbol attributes any longer.
3605         (gfc_show_symbol): Don't show old-style commons any longer.
3606         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3607         interface.
3608         * gfortran.h (symbol_attribute): Remove common and saved_common
3609         attributes.
3610         (gfc_symbol): Remove common_head element.
3611         (gfc_common_head): New struct.
3612         (gfc_get_common_head): New macro.
3613         (gfc_symtree): Add field 'common' to union.
3614         (gfc_namespace): Add field 'common_root'; change type of field
3615         'blank_common' to blank_common.
3616         (gfc_add_data): New prototype.
3617         (gfc_traverse_symtree): Expect a symtree as first argument
3618         instead of namespace.
3619         * match.c (gfc_get_common): New function.
3620         (match_common_name): Change to take char * as argument, adapt,
3621         fix bug with empty name.
3622         (gfc_match_common): Adapt to new data structures. Disallow
3623         redeclaration of USE-associated COMMON-block. Fix bug with
3624         empty common.
3625         (var_element): Adapt to new common structures.
3626         * match.h (gfc_get_common): Declare.
3627         * module.c: Add 2004 to copyright years, add commons to module
3628         file layout description.
3629         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3630         for removed attributes.
3631         (mio_symbol): Adapt to new way of storing common relations.
3632         (load_commons): New function.
3633         (read_module): Skip common list on first pass, load_commons at
3634         second.
3635         (write_commons): New function.
3636         (write_module): Call write_commons().
3637         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3638         functions related to removed attributes.
3639         (gfc_add_data): New function.
3640         (gfc_clear_attr): Don't set removed attributes.
3641         (gfc_copy_attr): Don't copy removed attributes.
3642         (traverse_symtree): Remove.
3643         (gfc_traverse_symtree): Don't traverse symbol
3644         tree of the passed namespace, but require a symtree to be passed
3645         instead. Unify with traverse_symtree.
3646         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3647         interface.
3648         (save_symbol): Remove setting of removed attribute.
3649         * trans-common.c (gfc_sym_mangled_common_id): Change to
3650         take 'char *' argument instead of 'gfc_symbol'.
3651         (build_common_decl, new_segment, translate_common): Adapt to new
3652         data structures, add new
3653         argument name.
3654         (create_common): Adapt to new data structures, add new
3655         argument name. Fix typo in intialization of derived types.
3656         (finish_equivalences): Add second argument in call to
3657         create_common.
3658         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3659         (gfc_trans_common): Adapt to new data structures.
3660         * trans-decl.c (gfc_create_module_variables): Remove test for
3661         removed attribute.
3662
3663 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3664
3665         * io.c: Add 2004 to copyright years.
3666
3667 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3668         Andrew Vaught  <andyv@firstinter.net>
3669
3670         * gfortran.h (gfc_gsymbol): New typedef.
3671         (gfc_gsym_root): New variable.
3672         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3673         * parse.c (global_used): New function.
3674         (parse_block_data): Check for double empty BLOCK DATA,
3675         use global symbol table.
3676         (parse_module): Use global symbol table.
3677         (add_global_procedure, add_global_program): New functions.
3678         (gfc_parse_file): Use global symbol table.
3679         * symbol.c (gfc_gsym_root): New variable.
3680         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3681         functions.
3682
3683 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3684
3685         * module.c (mio_gmp_real): Correct writing of negative numbers.
3686
3687 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3688
3689         PR fortran/15963
3690         * expr.c (check_intrinsic_op): Allow comparison of characters.
3691         Make logic easier.
3692
3693 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3694         Andrew Vaught  <andyv@firstinter.net>
3695
3696         * decl.c (contained_procedure): New function.
3697         (match_end): Verify correctness of END STATEMENT in
3698         all cases.
3699
3700 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3701         Andrew Vaught  <andyv@firstinter.net>
3702
3703         PR fortran/15190
3704         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
3705         (decode_statement): Enforce required space in free-form.
3706
3707 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3708
3709         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
3710         * trans-array.c (gfc_conv_descriptor_data): Add operand
3711         for COMPONENT_REF.
3712         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
3713         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
3714         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
3715         * trans-common.c (create_common): Likewise.
3716         * trans-expr.c (gfc_conv_component_ref): Likewise.
3717         * trans-io.c (set_parameter_value): Likewise.
3718         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
3719         (transfer_expr): Likewise.
3720         * trans-decl.c (gfc_trans_auto_character_variable):
3721         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
3722         (gfc_gimplify_function): New function.
3723         (gfc_generate_function-code): Properly handle nested functions.
3724         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
3725
3726 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3727
3728         PR fortran/15750
3729         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
3730         (gfc_resolve_inquire): Resolve the iolength tag.  Return
3731         SUCCESS at end of function if no failure has occured.
3732         * resolve.c (resolve_code): Resolve if iolength is encountered.
3733         * trans-io.c: (ioparm_iolength, iocall_iolength,
3734         iocall_iolength_done): New variables.
3735         (last_dt): Add IOLENGTH.
3736         (gfc_build_io_library_fndecls ): Set iolength related variables.
3737         (gfc_trans_iolength): Implement.
3738         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3739
3740 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
3741
3742         PR fortran/15511
3743         * scanner.c (load_line): Don't truncate preprocessor lines.
3744         Reformat error message.
3745         (preprocessor_line): Issue warning in case of malformed
3746         preprocessor line.
3747
3748 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3749
3750         * resolve.c (resolve_symbol): Add comment in function body.
3751         (check_data_variable): Change type of mark to ar_type, adapt code
3752         accordingly.
3753
3754 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3755
3756         * array.c (gfc_insert_constructor): Avoid redundant call to
3757         mpz_comp. Add 2004 to copyright years.
3758
3759 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3760
3761         * trans.h (stmtblock_t): Change has_scope to unsigned int.
3762
3763 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
3764
3765         * arith.c (gfc_range_check): correct complex underflow.
3766
3767 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3768
3769         PR fortran/15962
3770         * match.c (match_case_selector): Call gfc_match_init_expr
3771         instead of gfc_match_expr.
3772         * resolve.c (validate_case_label_expr): No need to check for
3773         constant, since it wouldn't have been matched with the fix to
3774         match.c.
3775
3776 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3777
3778         PR fortran/15211
3779         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3780         of strings.
3781
3782 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3783
3784         PR fortran/15510
3785         * trans-deecl.c (generate_local_decl): Do not issue warning for
3786         unused variables if they're use associated.
3787
3788 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3789         Andrew Vaught <andyv@firstinter.net>
3790
3791         PR fortran/14928
3792         * gfortran.h (gfc_check_f): Add new field f3ml.
3793         * check.c (gfc_check_minloc_maxloc): Take argument list instead
3794         of individual arguments, reorder if necessary.
3795         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3796         * intrinsic.c (add_sym_3ml): New function.
3797         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3798         (check_specific): Catch special case MINLOC, MAXLOC.
3799
3800 2004-06-14  Paul Brook  <paul@codesourcery.com>
3801
3802         * intrinsic.c (add_sym_2s): Use correct function types.
3803
3804 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3805
3806         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
3807         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
3808
3809 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
3810
3811         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3812         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3813         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3814         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3815         * trans-intrinsic.c:  Use symbols.
3816         * intrinsic.c (add_sym_2s): New function.
3817         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3818         * intrinsic.h: Function prototypes.
3819         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3820         gfc_resolve_srand):  New functions.
3821
3822 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3823
3824         PR fortran/14957
3825         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3826         contained procedure.
3827
3828 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3829
3830         PR fortran/12841
3831         * interface.c (compare_parameter, compare_actual_formal): Don't
3832         check types and array shapes for NULL()
3833         * trans-expr.c (conv_function_call): No double indirection for
3834         NULL()
3835
3836 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
3837
3838         * trans-expr.c (gfc_conv_cst_int_power): Compute
3839         x**(-n) by converting it to (1/x)**n instead of
3840         1/x**n.
3841
3842 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3843
3844         PR fortran/13372
3845         * module.c (write_symbol, write_symtree): Don't write symbols
3846         wrongly added to namespace.
3847         * trans-decl.c (gfc_create_module_variable): Don't create a
3848         backend decl for a symbol incorrectly added to namespace.
3849
3850 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3851
3852         PR fortran/13201
3853         * resolve.c (resolve_symbol): Verify that parameter array has an
3854         explicit shape. Fix typos and coding style issues in surrounding
3855         lines.
3856
3857 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3858
3859         PR fortran/15478
3860         * gfortran.texi: The documentation doesn't contain infomration on
3861         how to report bugs, and shouldn't, so remove the line which
3862         says it does.
3863
3864 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3865
3866         * intrinsic.c (sort_actual): Keep track of type of missing
3867         arguments. (Missing from previous commit.)
3868
3869 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3870
3871         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3872         * interface.c (compare_actual_formal): Keep type of omitted
3873         optional arguments.
3874         * trans-expr.c (gfc_conv_function_call): Add string length
3875         argument for omitted string argument.
3876
3877 2004-06-03  Paul Brook  <paul@codesourcery.com>
3878
3879         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3880         lists instead of compound expr chains.
3881         (gfc_trans_code): Annotate statement lists.
3882
3883 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3884
3885         * trans-array.c: Fix spelling in comments.
3886
3887 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3888
3889         PR fortran/15557
3890         * data.c (assign_substring_data_value): New function.
3891         (gfc_assign_data_value): Call the new function if we're dealing
3892         with a substring LHS.
3893
3894 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3895
3896         PR fortran/15477
3897         * gfortran.h (GFC_VERSION): Remove.
3898         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3899         where used.
3900
3901 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3902
3903         * trans-types.c: Fix spelling & layout in comments.
3904
3905 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3906
3907         PR fortran/14067
3908         * trans-const.c (gfc_conv_string_init): Allow variable string
3909         length lower than initialization string length.
3910
3911 2004-05-30  Paul Brook  <paul@codesourcery.com>
3912
3913         PR fortran/15620
3914         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3915         * trans-expr.c (gfc_trans_string_copy): New function.
3916         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
3917         character lengths.
3918         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3919         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3920         * trans.h (struct gfc_saved_var): Define.
3921         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3922
3923 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
3924
3925         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3926
3927 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
3928
3929         * simplify.c (gfc_simplify_log): Remove useless line of code.
3930
3931 2004-05-29  Paul Brook  <paul@codesourcery.com>
3932
3933         * trans-common.c (find_equivalence): Find multiple rules.
3934
3935 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3936
3937         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3938         (gfc_current_locus): Declare new global variable.
3939         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3940         (gfc_current_locus1): Rename ...
3941         (gfc_current_locus): ... to this.
3942         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3943         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3944         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3945         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3946         and gfc_current_locus(), respectively.
3947         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3948         match_array_cons_element, gfc_match_array_constructor):
3949         Read/modify gfc_current_locus instead of calling gfc_set_locus()
3950         and gfc_current_locus().
3951         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3952         match_attr_spec, gfc_match_function_decl, gfc_match_end,
3953         attr_decl1, gfc_match_save): Likewise.
3954         * error.c (error_print, gfc_internal_error): Likewise.
3955         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3956         * interface.c (gfc_add_interface): Likewise.
3957         * io.c (gfc_match_format, match_dt_format, match_dt_element,
3958         match_io_iterator, match_io): Likewise.
3959         * match.c (gfc_match_space, gfc_match_eos,
3960         gfc_match_small_literal_int, gfc_match_st_label,
3961         gfc_match_strings, gfc_match_name, gfc_match_iterator,
3962         gfc_match_char, gfc_match, gfc_match_assignment,
3963         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3964         gfc_match_nullify, gfc_match_call, match_implicit_range,
3965         gfc_match_implicit, gfc_match_data, match_case_selector,
3966         gfc_match_case, match_forall_iterator): Likewise.
3967         * matchexp.c (gfc_match_defined_op_name, next_operator,
3968         match_level_1, match_mult_operand, match_ext_mult_operand,
3969         match_add_operand, match_ext_add_operand, match_level_2,
3970         match_level_3, match_level_4, match_and_operand, match_or_operand,
3971         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3972         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3973         * parse.c (match_word, decode_statement, next_free, next_fixed,
3974         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3975         Likewise.
3976         * primary.c (match_digits, match_integer_constant,
3977         match_boz_constant, match_real_constant, match_substring,
3978         next_string_char, match_charkind_name, match_string_constant,
3979         match_logical_constant, match_const_complex_part,
3980         match_complex_constant, match_actual_arg, match_keyword_arg,
3981         gfc_match_actual_arglist, gfc_match_structure_constructor,
3982         gfc_match_rvalue, gfc_match_variable): Likewise.
3983         * st.c (gfc_get_code): Likewise.
3984         * symbol.c (check_conflict, check_used, check_done,
3985         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3986         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3987         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3988
3989 2004-05-26  Roger Sayle  <roger@eyesopen.com>
3990
3991         * io.c (format_asterisk): Silence compiler warnings by correcting
3992         the number of elements of a "locus" initializer.
3993
3994 2004-05-25  Roger Sayle  <roger@eyesopen.com>
3995
3996         PR fortran/13912
3997         * matchexp.c: Allow unary operators after arithmetic operators
3998         as a GNU extension.
3999         (match_ext_mult_operand, match_ext_add_operand): New functions.
4000         (match_mult_operand): Tweak to call match_ext_mult_operand.
4001         (match_add_operand): Tweak to call match_ext_mult_operand.
4002         (match_level_2): Rearrange to call match_ext_add_operand.
4003
4004 2004-05-25  Paul Brook  <paul@codesourcery.com>
4005
4006         * expr.c (check_inquiry): Remove bogus tests.
4007
4008 2004-05-23  Paul Brook  <paul@codesourcery.com>
4009
4010         PR fortran/13773
4011         * expr.c (restricted_args): Remove redundant checks/argument.
4012         (external_spec_function): Update to match.
4013         (restricted_intrinsic): Rewrite.
4014
4015 2004-05-23  Paul Brook  <paul@codesourcery.com>
4016         Victor Leikehman  <lei@haifasphere.co.il>
4017
4018         * gfortran.h (struct gfc_symbol): Add equiv_built.
4019         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
4020         messages.
4021         (current_length): Remove.
4022         (add_segments): New function.
4023         (build_equiv_decl): Create initialized common blocks.
4024         (build_common_decl): Always add decl to bindings.
4025         (create_common): Create initializers.
4026         (find_segment_info): Reformat to match coding conventions.
4027         (new_condition): Use add_segments.
4028         (add_condition, find_equivalence, add_equivalences): Move iteration
4029         inside functions.  Only process each segment once.
4030         (new_segment, finish_equivalences, translate_common): Simplify.
4031
4032 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
4033
4034         * check.c (gfc_check_random_seed): Issue for too many arguments.
4035
4036 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4037
4038         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4039
4040 2004-05-22  Paul Brook  <paul@codesourcery.com>
4041
4042         * dump-parse-tree.c (gfc_show_equiv): New function.
4043         (gfc_show_namespace): Use it.
4044
4045 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
4046
4047         PR fortran/13249
4048         * symbol.c (gfc_add_common): Disable checks to work around other more
4049         fundamental inadequacies.
4050
4051 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4052
4053         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4054         only for functions.
4055         (gfc_build_function_decl): Likewise.
4056
4057 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4058
4059         * check.c (gfc_check_system_clock): New function.
4060         * intrinsic.c (add_sym_3s): New function.
4061         (add_subroutines): Use it.
4062         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4063         Add prototypes.
4064         * iresolve.c (gfc_resolve_system_clock): New function.
4065
4066 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4067
4068         * invoke.texi: Document -Wunderflow and spell check.
4069         * lang.opt: Add Wunderflow.
4070         * gfortran.h (gfc_option_t): Add warn_underflow option.
4071         * options.c (gfc_init_options, set_Wall): Use it.
4072         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4073         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4074         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4075         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4076         * arith.c (common_logarithm): Fix typo in comment.
4077
4078 2004-05-21  Roger Sayle  <roger@eyesopen.com>
4079
4080         * io.c (check_format): As a GNU extension, allow the comma after a
4081         string literal to be optional in a format.  Use gfc_notify_std to
4082         issue an error/warning as appropriate.
4083
4084 2004-05-21  Roger Sayle  <roger@eyesopen.com>
4085
4086         * io.c (check_format): Use gfc_notify_std to determine whether to
4087         issue an error/warning for omitting the digits from the X format.
4088
4089 2004-05-20  Roger Sayle  <roger@eyesopen.com>
4090
4091         * io.c (check_format): Allow the number before the X format to
4092         be optional when not -pedantic.
4093
4094 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
4095         Paul Brook  <paul@codesourcery.com>
4096
4097         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4098         Create decls for __builtin_pow{,f}.
4099         * gfortran.h (PREFIX_LEN): Define.
4100         * trans-decl.c (gfor_fndecl_math_powi): Add.
4101         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4102         (gfc_build_intrinsic_function_decls): Create decls for powi.
4103         * trans-expr.c (powi_table): Add.
4104         (gfc_conv_integer_power): Remove.
4105         (gfc_conv_powi): New function.
4106         (gfc_conv_cst_int_power): New function.
4107         (gfc_conv_power_op): Use new powi routines.
4108         * trans.h (struct gfc_powdecl_list): Add.
4109         (gfor_fndecl_math_powi): Add.
4110         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4111
4112 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4113
4114         * trans.c, trans-decl.c: Fix comment typos.
4115
4116 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4117
4118         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4119
4120 2004-05-18  Steve Kargl  <kargls@comcast.net>
4121
4122         * arith.c (gfc_int2complex): Fix incorrect range checking.
4123
4124 2004-05-18  Paul Brook  <paul@codesourcery.com>
4125
4126         PR fortran/13930
4127         * decl.c (add_init_expr_to_sym): Remove incorrect check.
4128         (default_initializer): Move to expr.c.
4129         (variable_decl): Don't assign default initializer to variables.
4130         * expr.c (gfc_default_initializer): Move to here.
4131         * gfortran.h (gfc_default_initializer): Add prototype.
4132         * resolve.c (resolve_symbol): Check for illegal initializers.
4133         Assign default initializer.
4134
4135 2004-05-17  Steve Kargl  <kargls@comcast.net>
4136
4137         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4138
4139 2004-05-17  Steve Kargl  <kargls@comcast.net>
4140
4141         * arith.c (gfc_real2complex): Range checking wrong part of complex
4142         number.
4143
4144 2004-05-16  Paul Brook  <paul@codesourcery.com>
4145
4146         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4147
4148 2004-05-16  Paul Brook  <paul@codesourcery.com>
4149
4150         * arith.c (gfc_range_check): Fix logic error.
4151
4152 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4153
4154         * arith.c: Fix comment typos.
4155
4156 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4157
4158         PR fortran/13742
4159         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4160         not initialized in a disallowed fashion.
4161         * match.c (gfc_match_common): Likewise.
4162         (var_element): Verify that variable is not in the blank COMMON,
4163         if it is in a common.
4164
4165 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
4166
4167         * Make-lang.in (f95.generated-manpages): Remove.
4168         (f95.srcextra): New.
4169         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4170         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4171         (f95.dvi): Remove.
4172         (dvi): New.
4173         (f95.install-info): Remove.
4174         (install-info): New.
4175
4176 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
4177
4178         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4179
4180 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4181
4182         * primary.c (match_boz_constant): Use gfc_notify_std() for
4183         issuing a warning or an error.
4184
4185 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4186
4187         PR fortran/13826
4188         * primary.c (match_structure_constructor): Rename ...
4189         (gfc_match_structure_constructor): ... to this. Make non-static.
4190         (gfc_match_rvalue): Call renamed function.
4191         * match.h (gfc_match_structure_constructor): Declare.
4192         * match.c (gfc_match_data_constant): Handle structure
4193         constructor.
4194
4195 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4196
4197         PR fortran/13702
4198         (Port from g95)
4199         * gfortran.h (gfc_linebuf): New typedef.
4200         (linebuf): Remove.
4201         (gfc_file): Revamped, use new gfc_linebuf.
4202         (locus): Revamped, use new types.
4203         (gfc_current_file): Remove.
4204         (gfc_current_form, gfc_source_file): New global variables.
4205         * match.c (gfc_match_space, gfc_match_strings): Use
4206         gfc_current_form to find source form.
4207         * module.c (gfc_dump_module): Use gfc_source_file when printing
4208         module header.
4209         * error.c (show_locus, show_loci) Use new data structures to print
4210         locus.
4211         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4212         Remove.
4213         (file_head, current_file, gfc_current_form, line_head, line_tail,
4214         gfc_current_locus1, gfc_source_file): New global variables.
4215         (gfc_scanner_init1): Set new global variables.
4216         (gfc_scanner_done1): Free new data structures.
4217         (gfc_current_locus): Return pointer to gfc_current_locus1.
4218         (gfc_set_locus): Set gfc_current_locus1.
4219         (gfc_at_eof): Set new variables.
4220         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4221         to new locus structure.
4222         (gfc_check_include): Remove.
4223         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4224         (gfc_skip_comments): Use gfc_current_form, find locus with
4225         gfc_current_locus1.
4226         (gfc_next_char): Use gfc_current_form.
4227         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4228         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4229         comment formatting.
4230         (get_file): New function.
4231         (preprocessor_line, include_line): New functions.
4232         (load_file): Move down, rewrite to match new data structures.
4233         (gfc_new_file): Rewrite to match new data structures.
4234         * parse.c (next_statement): Remove code which is now useless. Use
4235         gfc_source_form and gfc_source_file where appropriate.
4236         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4237         when determining locus of frontend code.
4238         * trans-io.c (set_error_locus): Same.
4239         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4240         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4241         preprocessor flags.
4242         (all): Add missing initializers.
4243
4244 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4245
4246         * Make-lang.in (trans-common.o): Remove redundant dependency.
4247         (data.c): Replace object file name ...
4248         (data.o): ... by the correct one.
4249
4250 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4251
4252         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4253         for ranges when dumping array references.
4254
4255 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
4256
4257         * decl.c (variable_decl): Always apply default initializer.
4258
4259 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4260
4261         PR fortran/15206
4262         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4263         handle zero correctly.
4264
4265 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4266
4267         * match.c (gfc_match): Eliminate dead code.
4268
4269 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4270
4271         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4272         Detect bad continuation line in fixed form sources.
4273
4274 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4275
4276         PR fortran/15205
4277         * iresolve.c (gfc_resolve_nearest): Add new function.
4278         * intrinsic.h: ... declare it here.
4279         * intrinsic.c (add_functions): ... add it as resolving function
4280         for NEAREST.
4281
4282 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4283
4284         PR fortran/14066
4285         * match.c (gfc_match_do): Allow infinite loops with
4286         label-do-stmt. Do not enforce space after comma.
4287
4288 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4289
4290         PR fortran/15051
4291         * parse.c (parse_interface): Allow empty INTERFACE, remove
4292         seen_body.
4293
4294 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4295
4296         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4297         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4298         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4299         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4300         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4301         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4302         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4303         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4304         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4305         trans-types.h, trans.c, trans.h: Update copyright years and
4306         boilerplate.
4307         * data.c: Likewise, also removed two whitespace-only lines.
4308         * gfortranspec.c, lang.opt: Update copyright years.
4309
4310 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4311
4312         PR fortran/14568
4313         * trans-decl.c (generate_local_decl): Don't warn for unused
4314         variables which are in common blocks.
4315
4316 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4317
4318         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4319         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4320         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4321
4322 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
4323
4324         PR fortran/15314
4325         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4326
4327 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
4328
4329         * gfortran.texi: Use @table @emph instead of @itemize @emph.
4330         Remove "set DEVELOPMENT".
4331         (Compiling GFORTRAN): Remove.
4332
4333 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4334
4335         * array.c (match_subscript, match_array_ref): Add comments
4336         explaining argument 'init'.
4337         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4338         trans-expr.c, trans.c: Fix some typos in comments.
4339         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4340         * primary.c (match_digits, match_integer_constant): Add comment
4341         explaining signflag.
4342
4343 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4344
4345         PR fortran/13940
4346         * primary.c: Include system.h and flags.h, needed for pedantic.
4347         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4348         pedantic is set.
4349
4350 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4351
4352         PR fortran/13940
4353         * match.c (match_data_constant): Handle case where
4354         gfc_find_symbol sets sym to NULL
4355
4356 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4357
4358         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4359         dependency on mathbuiltins.def
4360
4361 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
4362
4363         * trans-io.c (transfer_expr): Implemented recursive printing
4364         of derived types.
4365
4366 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
4367
4368         * gfortranspec.c: Do not include multilib.h.
4369
4370 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4371
4372         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4373         2004 to copyright years.
4374         * trans-expr.c, trans-decl.c: Comment update, we now generate
4375         GENERIC, not SIMPLE. Add 2004 to copyright years.
4376
4377 2004-04-24  Paul Brook  <paul@codesourcery.com>
4378
4379         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4380
4381 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
4382
4383         PR 14817
4384         * arith.c (gfc_arith_divide): Fix complex divide.
4385
4386 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
4387
4388         * gfortranspec.c: Include the target headers.
4389
4390 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
4391
4392         PR fortran/14921
4393         PR fortran/14540
4394         * arith.c (arctangent2): New function.
4395         * arith.h (arctangent2): Add function prototype.
4396         * simplify.c (gfc_simplify_atan2): Use it.
4397         (gfc_simplify_log): Use it.
4398
4399 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
4400
4401         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4402         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4403
4404 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
4405
4406         PR fortran/14872
4407         * trans-io.c (build_dt): Change REC to value.
4408
4409 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4410
4411         PR 14394
4412         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4413         the real value when converting mpf to string.
4414
4415 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4416
4417         PR 14395
4418         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4419         the result.
4420
4421 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4422
4423         PR fortran/14377
4424         * simplify.c (simplify_min_max): Convert the type of the result.
4425
4426 2004-04-11  Paul Brook  <paul@codesourcery.com>
4427
4428         * gfortran.texi: Use full target triplet.
4429
4430 2004-04-11  Paul Brook  <paul@codesourcery.com>
4431
4432         * Make-lang.in (GFORTRAN_TEXI): Set it.
4433         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
4434         (fortran/gfortran.info): Ditto.
4435         * gfortran.texi: Major update.
4436         * invoke.texi: New file.
4437
4438 2004-04-10  Paul Brook  <paul@codesourcery.com>
4439
4440         * trans-array.c (gfc_trans_allocate_temp_array,
4441         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4442         * trans-decl.c (gfc_build_dummy_array_decl,
4443         gfc_get_symbol_decl, gfc_build_function_decl,
4444         gfc_create_module_variable): Ditto.
4445         * trans-expr.c (gfc_conv_variable): Ditto.
4446         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4447         * trans.h (GFC_DECL_STRING): Remove.
4448         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4449         GFC_DECL_ASSIGN): Renumber flags.
4450
4451 2004-04-05  Paul Brook  <paul@codesourcery.com>
4452
4453         PR 13252
4454         PR 14081
4455         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4456         and stack_restore.
4457         * gfortran.h (struct gfc_charlen): Add backend_decl.
4458         * trans-array.c (gfc_trans_allocate_temp_array,
4459         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4460         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4461         Remove old, broken string handling.
4462         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4463         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4464         gfc_trans_deferred_array): Handle character arrays.
4465         * trans-const.c (gfc_conv_const_charlen): New function.
4466         * trans-const.h (gfc_conv_const_charlen): Add prototype.
4467         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4468         as static.
4469         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4470         (gfc_create_string_length): New function.
4471         (gfc_get_symbol_decl): Create lengths for character variables.
4472         (gfc_get_fake_result_decl): Ditto.
4473         (gfc_build_function_decl): Only set length for assumed length
4474         character arguments.
4475         (gfc_trans_dummy_character): New function.
4476         (gfc_trans_auto_character_variable): Rewrite.
4477         (gfc_trans_deferred_vars): Handle more types of character variable.
4478         (gfc_create_module_variable): String lengths have moved.
4479         (gfc_generate_function_code): Initialize deferred var chain earlier.
4480         * trans-expr.c (gfc_conv_init_string_length): Rename ...
4481         (gfc_trans_init_string_length):  ... to this.
4482         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4483         gfc_conv_function_call): Update to new format for character variables.
4484         (gfc_conv_string_length): Remove.
4485         (gfc_conv_string_parameter): Update assertion.
4486         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4487         * trans-io.c (set_string): Use new macro names.
4488         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4489         * trans-types.c (gfc_get_character_type): Use existing length expr.
4490         (gfc_is_nodesc_array): Make public.
4491         (gfc_get_dtype_cst): Rename ...
4492         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
4493         (gfc_get_nodesc_array_type): Use new name.
4494         (gfc_sym_type): New character variable code.
4495         (gfc_get_derived_type): Ditto.
4496         (gfc_get_function_type): Evaluate character variable lengths.
4497         * trans-types.h (gfc_strlen_kind): Define.
4498         (gfc_is_nodesc_array): Add prototype.
4499         * trans.h: Update prototypes.
4500         (struct lang_type): Update comments.
4501         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4502         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4503
4504 2004-04-04  Paul Brook  <paul@codesourcery.com>
4505
4506         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4507         * options.c (gfc_init.options, gfc_handle_option): Ditto.
4508         * trans-expr.c (gfc_conv_function_call): Ditto.
4509         * trans-types.c (gfc_is_nodesc_array): Ditto
4510         * lang.opt (fg77-calls): Remove.
4511
4512 2004-04-04  Paul Brook  <paul@codesourcery.com>
4513
4514         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4515         (gfc_conv_descriptor_base): Rename ...
4516         (gfc_conv_descriptor_offset): ... to this.
4517         (gfc_trans_allocate_array_storage): Set offset to zero.
4518         (gfc_conv_array_base): Rename ...
4519         (gfc_conv_array_offset): ... to this.
4520         (gfc_conv_array_index_ref): Add offset parameter.
4521         (gfc_conv_array_ref): Include offset.
4522         (gfc_trans_preloop_setup): Use existing offset.
4523         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
4524         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4525         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4526         gfc_conf_ss_descriptor): Set offset.
4527         * trans-array.h: Rename prototypes.
4528         * trans-const.h (gfc_index_zero_node): Define.
4529         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4530         * trans-types.c (gfc_get_array_type_bounds): Ditto.
4531         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4532
4533 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
4534
4535         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4536
4537 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
4538
4539         PR 14055
4540         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
4541         before conversion by gmp library call.
4542
4543 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
4544
4545         PR 12921
4546         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4547
4548 2004-02-24  Richard Henderson  <rth@redhat.com>
4549
4550         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4551
4552 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
4553
4554         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4555         (fortran/gfortran.info): ... to here.
4556         (f95.srcinfo): New.
4557
4558 2004-02-16  Richard Henderson  <rth@redhat.com>
4559
4560         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4561         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4562         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4563         (gfc_expand_function): Rename from expand_function_body, make static,
4564         don't do anything except invoke tree_rest_of_compilation.
4565         (gfc_be_parse_file): Invoke cgraph.
4566         (gfc_expand_decl): Remove.
4567         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4568         __builtin_adjust_trampoline.
4569         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4570         (gfc_finalize): New.
4571         (gfc_generate_function_code): Use it.  Lower nested functions.
4572         * trans-expr.c (gfc_conv_function_call): Add static chain operand
4573         to call_expr.
4574         * trans.c (gfc_build_function_call): Likewise.
4575         * trans.h (expand_function_body): Remove.
4576
4577 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
4578
4579         PR gfortran/13433
4580         * trans-decl.c (gfc_build_function_decl) For functions
4581         returning CHARACTER pass an extra length argument,
4582         following g77 calling conventions.
4583         * trans-types.c (gfc_get_function_type) Ditto.
4584         * trans-expr.c (gfc_conv_function_call) Ditto.
4585
4586 2004-02-14  Paul Brook  <paul@codesourcery.com>
4587
4588         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4589
4590 2004-02-12  Paul Brook  <paul@nowt.org>
4591
4592         * BUGS: Remove.
4593
4594 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4595
4596         * gfortran.texi: Fix typos.
4597
4598 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
4599
4600         PR gfortran/13909
4601         * intrinsic.c (add_conversions) Use logical conversion instead
4602         of real.
4603         * trans-types.c (gfc_get_logical_type) implemented logical*1
4604         and logical*2.
4605
4606 2004-01-17  Paul Brook  <paul@codesourcery.com>
4607
4608         * lang-specs.h: Remove %<fixed-form.
4609
4610 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
4611
4612         * lang-specs.h: Enable preprocessing of source files
4613         ending in .F, .fpp, .FPP, .F90 and .F95.
4614
4615 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
4616
4617         PR fortran/12912
4618         * lang-specs.h: Enable compilation of files ending
4619         in .f, .for and .FOR.
4620
4621 2004-01-11  Paul Brook  <paul@codesourcery.com>
4622
4623         * trans-stmt.c (gfc_trans_if_1): New function.
4624         (gfc_trans_if): Use it.
4625
4626 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
4627
4628         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4629         (gfc_option_t): Add max_identifier_length.
4630         * lang.opt: Add fmax-identifier-length.
4631         * match.c (parse_name): Use limit.
4632         * options.c (gfc_init_options): Set max_identifier_length.
4633         (gfc_handle_option): Ditto.
4634
4635 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
4636
4637         * intrinsic.c (add_functions): Add resolve function to dcmplx.
4638         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4639         * iresolve.c (gfc_resolve_dcmplx): New function.
4640
4641 2004-01-10  Paul Brook  <paul@codesourcery.com>
4642
4643         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4644         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4645         (gfc_return_by_reference): Correct condition.
4646         (gfc_get_function_type): Ditto.
4647
4648 2004-01-10  Paul Brook  <paul@codesourcery.com>
4649
4650         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4651         types.
4652
4653 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
4654
4655         * iresolve.c: Use correct kind.
4656
4657 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
4658
4659         PR fortran/13467
4660         * trans-decl.c (gfc_create_module_variable):  Output array valued
4661         parameters.
4662
4663 2004-01-10  Paul Brook  <paul@codesourcery.com>
4664
4665         * resolve.c (resolve_branch): Get error message right way round.
4666
4667 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
4668
4669         * trans-array (gfc_conv_loop_setup): Adjust comment to track
4670         reality.
4671         (gfc_array_allocate): Don't count size of element twice.
4672
4673 2004-01-04  Paul Brook  <paul@codesourcery.com>
4674
4675         * lang.opt (i8, r8, std=*): Remove RejectNegative.
4676
4677 2004-01-04  Paul Brook  <paul@codesourcery.com>
4678
4679         * error.c (gfc_notify_std): New function.
4680         * gfortran.h (gfc_notify_std): Declare.
4681         (GFC_STD_*): Define.
4682         (gfc_option_t): Add warn_std and allow_std.
4683         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4684         (gfc_intrinsic_func_interface): Use gfc_notify_std.
4685         * check.c (check_rest): Use gfc_notify_std.
4686         * match.c (gfc_match_pause): Ditto.
4687         (gfc_match_assign): Ditto.
4688         (gfc_match_goto): Ditto.
4689         * resolve.c (resolve_branch): Ditto.
4690         * lang.opt: Add std=<foo> and w.
4691         * options.c (gfc_init_options): Set allow_std and warn_std.
4692         (gfc_handle_option): Handle OPT_std_* and OPT_w.
4693
4694 2004-01-01  Paul Brook  <paul@codesourcery.com>
4695
4696         * array.c (gfc_append_constructor): Take constructor, not expression.
4697         * data.c (struct gfc_expr_stack): Remove.
4698         (expr_stack): Remove.
4699         (find_con_by_offset): Rename from find_expr_in_con.
4700         (find_con_by_component): Rename from find_component_in_con.
4701         (gfc_get_expr_stack): Remove.
4702         (gfc_assign_data_value): Rewrite.
4703         (gfc_expr_push): Remove.
4704         (gfc_expr_pop): Remove.
4705         (gfc_advance_section): Rename from
4706         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
4707         (gfc_get_section_index): Handle unbounded sections.
4708         * gfortran.h: Update prototypes.
4709         * resolve.c (check_data_variable): Array section maight not be the
4710         last ref.
4711
4712 2004-01-01  Paul Brook  <paul@codesourcery.com>
4713
4714         PR fortran/13432
4715         * resolve.c (resolve_symbol): Allow assumed length function results.
4716
4717 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4718
4719         * match.c (gfc_match_pause): Fix spelling.
4720
4721 2004-01-01  Steven Bosscher  <stevenb@suse.de>
4722
4723         PR fortran/13251
4724         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4725         reference from the expression.
4726
4727 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
4728
4729         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4730         dumping.
4731         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4732         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4733         (symbol_attribute):New variable attribute: assign.
4734         * io.c (resolve_tag):Integer variable is allowed.
4735         (match_dt_format): Add ASSIGN statement. Set assign flag.
4736         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4737         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4738         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4739         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4740         (next_statement): Add ST_LABEL_ASSIGNMENT.
4741         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4742         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4743         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4744         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4745         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4746         assign.  Put them into the stuct lang_decl.
4747         * trans-io.c (set_string): Add the assign statement.
4748         * trans-stmt.c (gfc_trans_label_assign): New function.
4749         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4750         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4751         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4752         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4753         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4754         (GFC_DECL_ASSIGN(node)): New macro to access flag.
4755
4756 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
4757
4758         PR fortran/13434
4759         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4760         minval/maxval.
4761
4762 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
4763
4764         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4765         that arguments to subroutines/functions can't alias themselves, nor global
4766         memory.
4767
4768 2003-12-20  Steven Bosscher  <stevenb@suse.de>
4769
4770         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4771         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4772
4773 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
4774
4775         * primary.c (match_substring): Fix substring bug for start point
4776         or end point is NULL.
4777         * trans-expr.c (gfc_conv_substring): Ditto
4778         * trans-types.c (gfc_sym_type): Get correct type of scalar
4779         character variables.
4780         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4781         derived type.
4782
4783 2003-12-10  Richard Henderson  <rth@redhat.com>
4784
4785         * options.c (gfc_post_options): Don't ever use rtl inlining.
4786
4787 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
4788
4789         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4790         * trans-equivalence.c: Remove.
4791         * trans-decl.c (gfc_get_symbol_decl): Update to match.
4792         (gfc_generate_function_code): Ditto.
4793         * trans-array.c (gfc_conv_array_parameter): Ditto.
4794         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4795         (F95_ADDITIONAL_OBJS): Add stor-layout.o
4796         * trans.h (gfc_trans_equivalence): Remove.
4797         * gfortran.h (struct gfc_equiv): Add used field.
4798         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4799         equiv_offset fields.
4800
4801 2003-12-05  Richard Henderson  <rth@redhat.com>
4802
4803         * trans.c (gfc_build_addr_expr): New.
4804         (gfc_build_indirect_ref, gfc_build_array_ref): New.
4805         * trans.h: Declare them.
4806         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4807         trans-stmt.c, trans.c (*): Use them.
4808
4809         * f95-lang.c (gfc_post_options): Remove dead prototype.
4810         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4811         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4812         allocation size.
4813
4814 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
4815
4816         * io.c (gfc_match_format): Check for missing format label.
4817
4818 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4819
4820         PR fortran/13155
4821         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4822         from interfaces in modules.
4823
4824 2003-11-30  Paul Brook  <paul@nowt.org>
4825
4826         * trans-array.c (gfc_trans_g77_array): Make non-static.
4827         (gfc_trans_assumed_size): Remove.
4828         (gfc_trans_dummy_array_bias): Explicitly free temporary.
4829         * trans-array.h (gfc_trans_g77_array): Add prototype.
4830         (gfc_trans_assumed_size): Remove.
4831         * trans-decls.c (gfor_fndecl_push_context): Remove.
4832         (gfor_fndecl_pop_context): Remove.
4833         (gfc_build_function)decls): Don't create them.
4834         (gfc_trans_deferred_vars): Update to match. Remove dead code.
4835         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4836
4837 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
4838
4839         * trans-array.c (gfc_conv_array_parameter): Simplify
4840         array argument passing for array name actual argument.
4841         * trans-expr.c (gfc_conv_function_call): Ditto
4842         * trans-types.c (gfc_is_nodesc_array):Ditto.
4843
4844 2003-11-30  Paul Brook  <paul@nowt.org>
4845
4846         * f95-lang.c (gfc_post_options): Move ...
4847         * options.c (gfc_post_options): .. to here.  Handle inlining options.
4848         * gfortran.h (gfc_post_options): Add prototype.
4849
4850 2003-11-28  Richard Henderson  <rth@redhat.com>
4851
4852         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4853
4854 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4855
4856         * trans.h (has_alternate_specifier): New global variable.
4857         * match.c (gfc_match_call): Handle actual arguments associated with
4858         alternate return indicators.
4859         * trans-expr.c (gfc_conv_function_call): Ditto
4860         * trans-stmt.c (gfc_trans_call): Ditto
4861         (gfc_trans_return): Handle return statement with value.
4862         * trans-decl.c (gfc_generate_function_code): Handle functions with
4863         asterisk dummy.
4864         (gfc_get_fake_result_decl): Ditto
4865         * trans-types.c (gfc_get_function_type): Ditto
4866         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4867         (resolve_formal_arglist): Check asterisk dummy.
4868
4869 2003-11-27  Paul Brook  <paul@nowt.org>
4870
4871         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4872         allocation interface.
4873         (gfc_conv_ array_parameter): Ditto.
4874         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4875         * trans-array.c: Update prototype.
4876         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4877         (gfc_trans_auto_character_variable): Use new memory alloc interface.
4878         * trans-expr.c (gfc_conv_string_tmp): Ditto.
4879         (gfc_conv_function_call): Use gfc_conv_string_tmp.
4880         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
4881         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4882         * trans.h (gfc_ss_info): Remove unused pdata field.
4883         * trans.c (gfc_create_var_np): Change T to V.
4884
4885 2003-11-26  Richard Henderson  <rth@redhat.com>
4886
4887         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4888         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
4889         FRACTION, NEAREST, SET_EXPONENT.
4890         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4891         Fix GTY marking.  Remove unnecessary const's.
4892         (LIBM_FUNCTION): Rename from I_LIB.
4893         (LIBF_FUNCTION): New.
4894         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4895         conventions.  Assume the expr signature is correct.  Mark const.
4896         (gfc_conv_intrinsic_exponent): Use library functions.
4897         (gfc_conv_intrinsic_set_exponent): Remove.
4898         (gfc_conv_intrinsic_scale): Remove.
4899         (gfc_conv_intrinsic_nearest): Remove.
4900         (gfc_conv_intrinsic_fraction): Remove.
4901         (gfc_conv_intrinsic_function): Update.
4902         * trans-decl.c (gfor_fndecl_math_exponent4): New.
4903         (gfor_fndecl_math_exponent8): New.
4904         (gfc_build_intrinsic_function_decls): Set them.
4905         * trans.h: Declare them.
4906
4907 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
4908
4909         * trans-common.c (gfc_layout_global_equiv): Locate the error for
4910         underflow COMMON block.
4911         (gfc_trans_one_common): Fix bug for size of COMMON block containing
4912         EQUIVALENCE object. Also fix typo in an error message.
4913
4914 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
4915
4916         * Make-lang.in: Add check-gfortran to lang_checks.
4917         (check-f95): Alias for check-gfortran.
4918
4919 2003-11-25  Jason Merrill  <jason@redhat.com>
4920
4921         * Make-lang.in (f95.tags): Create TAGS.sub files in each
4922         directory and TAGS files that include them for each front end.
4923
4924 2003-11-24  Paul Brook  <paul@nowt.org>
4925
4926         PR fortran/13154
4927         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4928
4929 2003-11-24  Paul Brook  <paul@nowt.org>
4930
4931         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4932         handle.
4933         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4934
4935 2003-11-24  Paul Brook  <paul@nowt.org>
4936
4937         PR fortran/13105
4938         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4939         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4940
4941 2003-11-20  Richard Henderson  <rth@redhat.com>
4942
4943         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4944         (gfc_conv_array_base): Likewise.
4945         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4946         * trans-expr.c (gfc_conv_string_tmp): Likewise.
4947         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4948         * trans-stmt.c (gfc_trans_character_select): Likewise.
4949
4950 2003-11-13  Paul Brook  <paul@nowt.org>
4951
4952         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4953
4954 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
4955
4956         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4957         (resolve_equivalence): New function.
4958         (resolve_equivalence_derived): New function.
4959
4960 2003-11-12  Richard Henderson  <rth@redhat.com>
4961
4962         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4963         annotate_all_with_locus.
4964
4965 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
4966
4967         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4968         * trans-decl.c (gfc_finish_var_decl): Modified.
4969
4970 2003-11-08  Paul Brook  <paul@nowt.org>
4971
4972         PR fortran/12704
4973         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4974         arrays.
4975
4976 2003-11-06  Paul Brook  <paul@nowt.org>
4977
4978         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4979
4980 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
4981
4982         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4983
4984 2003-10-27  Anthony Green  <green@redhat.com>
4985
4986         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4987         (f95.stagefeedback): Ditto.
4988
4989 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
4990
4991         PR fortran/12682
4992         * Make-lang.in (f95.stageprofile): Add.
4993         (f95.stagefeedback): Add.
4994
4995 2003-10-23  Richard Henderson  <rth@redhat.com>
4996
4997         * f96-lang.c (gfc_gimplify_expr): Remove.
4998         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4999         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5000
5001 2003-10-23  Richard Henderson  <rth@redhat.com>
5002
5003         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5004
5005 2003-10-20  Paul Brook  <paul@nowt.org>
5006
5007         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5008         * trans-stmt.c (gfc_trans_do_while): Ditto.
5009
5010 2003-10-17  Paul Brook  <paul@nowt.org>
5011
5012         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5013
5014 2003-10-17  Paul Brook  <paul@nowt.org>
5015
5016         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5017
5018 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
5019
5020         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5021         (gfc_resolve_minloc): Ditto.
5022         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5023         Return the value after subtracting the lower bound.
5024
5025 2003-10-16  Richard Henderson  <rth@redhat.com>
5026
5027         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5028
5029 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
5030
5031         * lang.c: Remove -M option for now, it's in the way for C.
5032
5033 2003-10-14  Jason Merrill  <jason@redhat.com>
5034
5035         * Make-lang.in (f95.tags): New rule.
5036
5037 2003-10-13  Richard Henderson  <rth@redhat.com>
5038
5039         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5040
5041 2003-10-13  Paul Brook  <paul@nowt.org>
5042
5043         * trans-decl.c (generate_local_decl): Don't create junk variables.
5044
5045 2003-10-13  Paul Brook  <paul@nowt.org>
5046
5047         * resolve.c (resolve_formal_arglist): Use function result decl in
5048         preference to function decl.
5049
5050 2003-10-12  Richard Henderson  <rth@redhat.com>
5051
5052         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
5053         TREE_READONLY.  Update all callers.
5054
5055 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
5056
5057         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5058         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5059         (gfc_is_intrinsic_libcall): Add CSHIFT.
5060
5061 2003-10-12  Richard Henderson  <rth@redhat.com>
5062
5063         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5064         (gfc_trans_array_constructor_value): Likewise.
5065         (gfc_conv_array_initializer): Likewise.
5066         * trans-stmt.c (gfc_trans_character_select): Likewise.
5067
5068 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5069
5070         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5071
5072 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5073
5074         * check.c (gfc_check_repeat): Check arguments are scalar.
5075         (gfc_check_trim): New function.
5076         * intrinsic.h (gfc_check_trim): Add prototype.
5077         * intrinsic.c (add_functions): Use it.
5078         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5079         Decalare.
5080         * trans-decl.c: Ditto.
5081         (gfc_build_intrinsic_fucntion_decls): Set them.
5082         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5083         (gfc_conv_intrinsic_trim): New function.
5084         (gfc_conv_intrinsic_repeat): New function.
5085         (gfc_conv_intrinsic_function): Use them.
5086
5087 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5088
5089         * trans-types.c (gfc_sym_type): Handle result variables.
5090
5091 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5092
5093         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5094         gfc_get_character_type.
5095
5096 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
5097
5098         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5099
5100 2003-10-11  Paul Brook  <paul@nowt.org>
5101
5102         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5103         (gfc_resolve_dprod): New function.
5104         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5105         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5106         (gfc_resolve_dprod): Declare.
5107         * intrinsic.c (add_functions): Use them.
5108         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5109
5110 2003-10-06  Richard Henderson  <rth@redhat.com>
5111
5112         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5113         * trans-intrinsic.c (call_builtin_clz): Use it.
5114
5115 2003-10-05  Paul Brook  <paul@nowt.org>
5116
5117         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5118         * trans-decl.c (gfc_generate_function_code): Set
5119         cfun->function_end_locus.
5120
5121 2003-09-24  Jason Merrill  <jason@redhat.com>
5122
5123         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5124         TREE_LOCUS.
5125
5126 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
5127         Paul Brook  <paul@nowt.org>
5128
5129         * Make-lang.in (F95_OBJS): Add fortran/data.o.
5130         * array.c (gfc_inser_constructor): New function.
5131         (gfc_get_constructor): New function.
5132         (gfc_free_constructor): Initialize offset and repeat.
5133         (iterator_stack): Remove.
5134         (expand_info): Add offset, component and repeat fields.
5135         (expand_constructor): Set them.
5136         (expand): Set new fields.
5137         (gfc_copy_constructor): Ditto. Avoid recursion.
5138         * gfortran.h: Add prototypes for new functions.
5139         (gfc_constructor): Add offset, component and repeat.
5140         (iteratio_stack): Move to here.
5141         * resolve.c (check_data_variable): Convert data values into variable
5142         initializers.
5143         (traverse_data_list): Build implicit loop chain.
5144         (gfc_resolve): Ditto.
5145         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5146         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5147         * trans-expr.c (gfc_conv_structure): Handle array initializers.
5148         (gfc_conv_expr): Update to match.
5149         * trans.h (gfc_conv_structure): Declare.
5150         * data.c: New file.
5151
5152 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5153
5154         * trans.h: Add declarations for gfor_fndecl_si_kind and
5155         gfor_fndecl_sr_kind.
5156         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5157         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5158         (g95_conv_intrinsic_sr_kind): New function.
5159         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5160         SELECTED_REAL_KIND.
5161
5162 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
5163
5164         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5165         instead of _4 and _8 as postfix for libgfortran calls.
5166
5167 2003-09-16  Paul Brook  <paul@nowt.org>
5168
5169         * array.c (compare_bounds): New function.
5170         (gfc_compare_array_spec): Use it.
5171
5172 2003-09-14  Paul Brook  <paul@nowt.org>
5173
5174         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5175         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5176
5177 2003-09-14  Paul Brook  <paul@nowt.org>
5178
5179         * check.c (dim_rank_check): Allow assumed bounds if requested.
5180         (gfc_check_lbound): Call it.
5181         (gfc_check_ubound): Ditto.
5182         (gfc_check_size): Change to match.
5183         * simplify.c (gfc_simplify_bound): New function.
5184         (gfc_simplify_lbound): New function.
5185         (gfc_simplify_ubound): New function.
5186         * intrinsic.h: Declare them.
5187         * intrinsic.c (add_functions): Use them.
5188
5189 2003-09-14  Paul Brook  <paul@nowt.org>
5190
5191         * io.c (format_lex): Initialize negative_flag.
5192         (check_format): Intialize repeat.
5193         * trans-io.c (gfc_new_nml_name_expr): Declare static.
5194         (gfc_new_var_expr): Ditto.
5195
5196 2003-09-14  Paul Brook  <paul@nowt.org>
5197
5198         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5199         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5200
5201 2003-09-12  Paul Brook  <paul@nowt.org>
5202
5203         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5204
5205 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5206
5207         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5208         for a correct expression.
5209
5210 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5211
5212         * trans-intrinsic.c (real_compnt_info): New struct.
5213         (prepare_arg_info): New function.
5214         (gfc_conv_intrinsic_set_exponent): New function.
5215         (gfc_conv_intrinsic_scale): New function.
5216         (gfc_conv_intrinsic_nearest): New function.
5217         (gfc_conv_intrinsic_fraction): New function.
5218         (gfc_conv_intrinsic_exponent): New function.
5219         (gfc_conv_intrinsic_spacing): New function.
5220         (gfc_conv_intrinsic_rrspacing): New function.
5221         (gfc_conv_intrinsic_function): Use them.
5222
5223 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
5224
5225         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5226         build_int_2 changed from (high, low) to (low, high).
5227         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5228         ioparm_namelist_read_mode, iocall_set_nml_val_int,
5229         iocall_set_nml_val_float, iocall_set_nml_val_char,
5230         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5231         (gfc_build_io_library_fndecls): Add variable initialization.
5232         (gfc_new_nml_name_expr, get_new_var_expr): New function.
5233         (build_dt): Add namelist support.
5234         * io.c (value): New variable.
5235         (check_format): Support FMT_H now.
5236
5237 2003-09-07  Paul Brook  <paul@nowt.org>
5238
5239         * io.c (gfc_resolve_dt): Error if format label is not defined.
5240
5241 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5242
5243         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5244         about case_switch's break. The other is about building the condition
5245         statement tree, which judges the argument in the range of the
5246         corresponding integer type.
5247         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5248         for the large values.
5249
5250 2003-09-05  Paul Brook  <paul@nowt.org>
5251
5252         * f95-lang.c (expand_function_body): Gimplify the function.
5253
5254 2003-09-04  Jeff Law  <law@redhat.com>
5255
5256         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5257         index zero!
5258
5259 2003-09-04  Paul Brook  <paul@nowt.org>
5260
5261         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5262         (gfc_expand_stmt): New function.
5263         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5264         (expand_function_body): Use tree_rest_of_compilation.
5265         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5266
5267 2003-09-03  Jeff Law  <law@redhat.com>
5268
5269         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5270         index zero!
5271
5272 2003-08-30  Paul Brook  <paul@nowt.org>
5273
5274         * f95-lang.c (builtin_function): Remove #if 0 code.
5275         (gfc_define_builtin): New function.
5276         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5277         * mathbuiltins.def: New file.
5278         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5279         (gfc_intrinsic_map): Use mathbuiltins.def.
5280         (gfc_intrinsic_builtin_t): Remove.
5281         (gfc_build_intrinsic_lib_fndecls): Update.
5282         * trans-types.c (gfc_init_types): Remove redundant initilaization of
5283         signed_size_type_node.
5284
5285 2003-08-29  Paul Brook  <paul@nowt.org>
5286
5287         * arith.c (gfc_real_kinds): Use correct minimum exponents.
5288
5289 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5290
5291         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5292         (gfc_conv_intrinsic_function): Add MODULO.
5293
5294 2003-08-22  Jason Merrill  <jason@redhat.com>
5295
5296         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5297
5298 2003-08-22  Andreas Jaeger  <aj@suse.de>
5299
5300         * Make-lang.in (f95.install-common): Add DESTDIR support.
5301         * (f95.install-info): Likewise.
5302         (f95.uninstall): Likewise.
5303
5304 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
5305
5306         * trans-types.c (gfc_init_types): Initialize
5307         signed_size_type_node with size_type_node.
5308
5309 2003-08-18  Paul Brook  <paul@nowt.org>
5310
5311         * dependency.c (gfc_dependency): New enum.
5312         (check_another_array_ref): Remove.
5313         (gfc_get_array_from_component): Remove.
5314         (get_x): Remove.
5315         (get_range): Remove.
5316         (get_no_of_elements): Use mpz_t, not mpf_t.
5317         (transform_sections): New function.
5318         (gfc_check_range_range): Rename ...
5319         (gfc_check_section_vs_section): ... to this.  Use new function.
5320         (gfc_is_inside_range): Rewrite to match.
5321         (gfc_check_element_vs_section): Ditto.
5322         (gfc_check_element_vs_element): Ditto.
5323         (get_deps): Ditto.
5324         (gfc_dep_resolver): Ditto.  Remove unused parameter.
5325         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5326         gfc_check_element_vs_element, gfc_is_inside_range,
5327         gfc_get_array_from_component): Remove prototypes for static functions.
5328         (gfc_dep_resolver): Update prototype.
5329         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5330
5331 2003-08-15  Paul Brook  <paul@nowt.org>
5332
5333         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5334         return values to parent scope.
5335         (gfc_build_dummy_array_decl): Ditto.
5336
5337 2003-08-14  Paul Brook  <paul@nowt.org>
5338
5339         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5340         size of the type, not the pointer.
5341         * resolve.c (resolve_symbol): Give more accurate error message.
5342
5343 2003-08-10  Paul Brook  <paul@nowt.org>
5344
5345         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5346
5347 2003-08-10  Paul Brook  <paul@nowt.org>
5348
5349         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5350         type components.
5351
5352 2003-08-10  Chun Huang  <compiler@sohu.com>
5353
5354         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5355         (resolve_symbol): Ditto.
5356         * trans-expr.c (gfc_conv_statement_function): New function.
5357         (gfc_conv_function_expr): Use it.
5358
5359 2003-08-10  Paul Brook  <paul@nowt.org>
5360
5361         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5362         (walk_function_expr): Set section rank.
5363         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5364
5365 2003-08-10  Paul Brook  <paul@nowt.org>
5366
5367         * intrinsic.c (add_sym): Prefix names with correct string.
5368         (add_sym_0s): New function.
5369         (add_subroutines): Register abort.
5370
5371 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
5372
5373         * gfortran.h: Introduce options to control the mangling.
5374         * lang.opt: Likewise.
5375         * options.c (gfc_init_options): Handle the options.
5376         * trans-common.c (gfc_sym_mangled_common_id): New function.
5377         (gfc_build_common_decl): Call it.
5378         * trans-decl.c (gfc_sym_mangled_function_id): New function.
5379         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5380
5381 2003-08-09  Paul Brook  <paul@nowt.org>
5382
5383         * module.c (mio_symbol): Always ouput a namespace for formal args.
5384         (load_needed): Namespace now belong to their proper symbol.
5385         (gfc_dump_module): Change G95=>GFORTRAN.
5386
5387 2003-08-05  Paul Brook  <paul@nowt.org>
5388
5389         * options.c: Force -fg77-calls.
5390
5391 2003-08-02  Paul Brook  <paul@nowt.org>
5392
5393         * Makelang.in: Rename G95_* to GFORTRAN_*.
5394         * All sources: Rename G95_* to GFC_*.
5395
5396 2003-08-01  Paul Brook  <paul@nowt.org>
5397
5398         * fortran/Make-lang.in: Use GMPLIBS.
5399         * fortran/config-lang.in: Set need_gmp.
5400         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5401
5402 2003-07-27  Andreas Jaeger  <aj@suse.de>
5403
5404         * trans-decl.c (gfc_generate_constructors): Convert prototype to
5405         ISO C90.
5406         * trans-const.c (gfc_init_constants): Likewise.
5407         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5408
5409         * gfortranspec.c: Convert to ISO C90.
5410         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5411
5412 2003-07-26  Paul Brook  <paul@nowt.org>
5413
5414         * lang.opt: Add -fdump-parse-tree.
5415         * options.c (gfc_handle_option): Ditto.
5416         * resolve.c (resolve_forall_iterators): Convert to proper type.
5417         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5418
5419 2003-07-26  Paul Brook  <paul@nowt.org>
5420
5421         * Makefile.in: Add build dependencies on files common with rest of gcc.
5422
5423 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
5424
5425         * trans.h: Declare g95_trans_pointer_assignment.
5426         * trans-expr.c (g95_trans_pointer_assignment): New function.
5427         (g95_trans_pointer_assign): Use it.
5428         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5429         (g95_trans_pointer_assign_need_temp): New function.
5430
5431 2003-07-26  Paul Brook  <paul@nowt.org>
5432
5433         * gfortran.texi: Replace references to g95.
5434
5435 2003-07-26  Paul Brook  <paul@nowt.org>
5436
5437         Rename g95_* to gfc_*.
5438
5439 2003-07-25  Paul Brook  <paul@nowt.org>
5440
5441         * gfortran.h: Rename from g95.h.
5442         * trans-types.c (boolean_type_node, booelan_true_node,
5443         boolean_false_node): Remove.
5444         * trans-types.h: Ditto.
5445
5446 2003-07-25  Chun Huang  <compiler@sohu.com>
5447
5448         * parse.c (accept_statement): Implement BLOCK DATA statement.
5449         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5450         variables.
5451
5452 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
5453
5454         * trans-stmt.c (temporary_list): Define.
5455         (g95_trans_assign_need_temp): New function.
5456         (g95_trans_forall_1): Modified for WHERE.
5457         (g95_trans_where_assign): Modified.
5458         (g95_trans_where_2): Modified.
5459         (g95_evaluate_where_mask): Modified.
5460         (g95_trans_where): Modified.
5461         (g95_get_temp_expr): Removed.
5462         (g95_add_to_where_stmt_list): Removed.
5463         (compute_overall_iter_number): Modified for WHERE.
5464         * trans.h: Remove where_stmt_list.
5465
5466 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5467
5468         * lang.opt: Correct description of options -J and -M.
5469
5470 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
5471
5472         * lang.opt: Move help text to here.
5473         * lang-options.h: Remove.
5474
5475 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5476         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5477         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5478         on kind.
5479
5480 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
5481         Paul Brook  <paul@nowt.org>
5482
5483         * check.c (check_rest): Use global pedantic flag.
5484         * io.c (data_desc): Ditto.
5485         * error.c (g95_warning, g95_warning_now): Use global flag.
5486         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5487         (expand_function_body): Update to new prototypes.
5488         (g95_init): Use new option names.
5489         * g95.h (g95_option_t): Standardize names.
5490         (g95_init_options, g95_handle_option): Update prototypes.
5491         * interface.c: Use new option names.
5492         * match.c: Ditto.
5493         * module.c: Ditto.
5494         * parse.c: Ditto.
5495         * primary.c: Ditto.
5496         * resolve.c: Ditto.
5497         * scanner.c: Ditto.
5498         * simplify.c: Ditto.
5499         * symbol.c: Ditto.
5500         * trans-array.c: Ditto.
5501         * trans-expr.c: Ditto.
5502         * trans-types.c: Ditto.
5503         * trans-decl.c: Ditto.
5504         (g95_build_library_function_decl): Remove obsolete VPARAMS.
5505         * trans.h: Ditto.
5506         * options.c (g95_display_help): Remove.
5507         (g95_init_options): Convert to new scheme.
5508         (set_Wall): Ditto
5509         (g95module_option): Ditto, rename from g95_parse_arg.
5510         (g95_handle_module_path_options): New function.
5511         * trans-equivalence.c: Fix error message.
5512         * lang.opt: Corrections.
5513
5514 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
5515
5516         * lang.opt: New file.
5517
5518 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5519
5520         * decl.c (match_attr_spec): Set colon_seen.
5521
5522 2003-07-14  Paul Brook  <paul@nowt.org>
5523
5524         * trans-array.c: Update comment.
5525         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5526         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5527         minmaxloc,minmaxval): Ditto.
5528         * trans-io.c (g95_trans_transfer): Ditto.
5529         * trans-stmt.c: Remove unneeded prototypes.
5530         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5531         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5532         (compute_inner_temp_size): Remove bits of dead code. Add comments.
5533         Don't share loopinfo.
5534         (compute_overall_iter_number): Declare as static.
5535         (allocate_temp_for_forall_nest): Ditto.
5536         (g95_trans_forall_1): Don't pass shared loopinfo.
5537         * trans.c (g95_start_block): Expand comment.
5538
5539 2003-07-12  Paul Brook  <paul@nowt.org>
5540
5541         * arith.c (g95_index_integer_kind): Remove unused initializer.
5542         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5543         index by size of element.
5544         (generate_loop_for_rhs_to_temp): Ditto.
5545         (allocate_temp_for_forall_nest): Use element size, not index size.
5546
5547 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5548
5549         * arith.c (g95_index_integer_kind): Add a TODO.
5550         * simplify.c (g95_simplify_nearest): Add a TODO.
5551
5552 2003-07-09  Chun Huang  <compiler@sohu.com>
5553
5554         * trans.h: Add declarations for gfor_fndecl_string_scan and
5555         gfor_fndecl_string_verify.
5556         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5557         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5558         (g95_conv_intrinsic_verify): New function.
5559         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5560         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5561         of parameter 'BACK=.TRUE.'
5562
5563 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
5564
5565         * trans-stmt.c (iter_info, forall_info): Define.
5566         (g95_trans_forall_block): Remove.
5567         (g95_trans_forall_loop): Use forall info blocks.
5568         (g95_trans_nested_forall_loop): New function.
5569         (g95_do_allocate): Handle things other than logical masks.
5570         (generate_loop_for_temp_to_lhs): New function.
5571         (generate_loop_for_rsh_to_temp): New function.
5572         (compute_inner_temp_size): New function.
5573         (compute_overall_iter_number): New function.
5574         (allocate_temp_for_forall_nest): New function.
5575         (g95_trans_forall): Move body ...
5576         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
5577
5578 2003-07-02  Paul Brook  <paul@nowt.org>
5579
5580         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5581         in correct scope.  Change callers to match.
5582         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5583         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5584
5585 2003-07-02  Paul Brook  <paul@nowt.org>
5586
5587         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
5588         expression shape for all expressions.
5589         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5590
5591 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5592
5593         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5594         g95_parse_arg), intrinsic.c (g95_convert_type): support of
5595         -Wconversion.
5596         * intrinsic.c, g95.h: Add g95_convert_type_warn,
5597         * resolve.c (g95_resolve_index): Call it.
5598
5599 2003-07-02  Paul Brook  <paul@nowt.org>
5600
5601         * iresolve.c (g95_resolve_reshape): Set expression shape.
5602         (g95_resolve_shape): Ditto.
5603         * simplify.c (g95_simplify_shape): Move common code outside condition.
5604         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5605
5606 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5607
5608         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5609         conformance checks.
5610
5611 2003-06-29  Paul Brook  <paul@nowt.org>
5612
5613         * array.c (g95_simplify_iterator_var): Don't bother with return value.
5614         * expr.c (find_array_element, find_component_ref): New functions.
5615         (remove_subobject_ref): New function.
5616         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
5617         (simplify_ref_chain): New function.
5618         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
5619         (g95_specification_expr): Simplify the expression.
5620         * resolve.c (resolve_operator): Check simplifications return code.
5621         (g95_resolve_expr): Ditto.
5622
5623 2003-06-26  Paul Brook  <paul@nowt.org>
5624
5625         * expr.c (simplify_component_ref): New function.
5626         (g95_simplify_expr): Use it.
5627         * resolve.c (resolve_structure_cons): Handle references.
5628
5629 2003-06-25  Paul Brook  <paul@nowt.org>
5630
5631         * trans-io.c (build_dt): Handle internal units.
5632
5633 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
5634
5635         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5636         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5637         Use g95_array_index_type instead of integer_type_node.
5638         (g95_build_common_decl, g95_set_common_master_type): Use
5639         g95_character1_type_node instead of char_type_node.
5640         * trans-equivalence.c (g95_layout_local_equiv): As above.
5641
5642 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
5643
5644         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5645         remove last remains of -fquiet.
5646
5647 2003-06-22  Paul Brook  <paul@nowt.org>
5648
5649         * resolve.c (resolve_operator): Don't fail if we can't simplify.
5650         (g95_resolve_expr): Ditto.
5651         (resolce_code): Mark as static.
5652         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5653         gimplifer doesn't (yet).
5654
5655 2003-06-20  Paul Brook  <paul@nowt.org>
5656
5657         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5658         * match.c (g95_match_if): Add ST_PAUSE.
5659         (g95_match_stopcode): New function.
5660         (g95_match_pause, g95_match_stop): Use it.
5661         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5662         (decode_stmt, next_statement, parse_executable): Ditto.
5663         * resolve.c (resolve_code): Ditto.
5664         * st.c (g95_free_statement): Ditto.
5665         * trans-stmt.c (g95_trans_pause): New function.
5666         * trans-stmt.h: Declare it.
5667         * trans.c (g95_trans_code): Use it.
5668         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5669         Declare.
5670         (g95_build_builtin_function_decls): Initialize them.
5671         * trans.h: Ditto.
5672         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5673
5674 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5675
5676         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5677         match_filepos): Fix error handling.
5678
5679 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5680
5681         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5682         Add assertions on arguments.
5683         * resolve.c (expression_shape): Remove useless &.
5684         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5685         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5686         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5687         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5688         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5689         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5690         (g95_simplify_not, g95_simplify_scale): Add assertions.
5691
5692 2003-06-15  Paul Brook  <paul@nowt.org>
5693
5694         Clean up stuff to work with the ssa optimizers.
5695         * convert.c (convert): Handle BOOLEAN_TYPEs.
5696         * f95-lang.c (g95_truthvalue_conversion): Implement.
5697         * trans-array.c (g95_trans_array_constructor_value): Group multiple
5698         scalar values.
5699         * trans.h (g95_truthvalue_conversion): Declare.
5700         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5701         * trans-stmt.c (g95_trans_character_select): Don't create array
5702         assignments.  Mark labels as indirect jump targets.
5703         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5704         (g95_get_dtype_cst): Handle LOGICAL types.
5705
5706 2003-06-14  Paul Brook  <paul@nowt.org>
5707
5708         * f95-lang.c (g95_gimplify_expr): New function.
5709         * trans-array.c (g95_trans_array_constructor_value): Don't create
5710         array assignments.
5711         (g95_conv_expr_descriptor): Rename simple->gimple.
5712         * trans-expr.c (conv_expr_op): Use proper logical operators.
5713         * trans-intrinsic.c (build_fixbound_expr): New function.
5714         (build_fix_expr): Ditto.
5715         (g95_conv_intinsic_aint): Use them. Use builtin functions.
5716         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5717
5718 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5719
5720         * array.c (g95_compare_array_spec): Remove unreachable code.
5721         * expr.c (g95_copy_expr): Likewise.
5722         * intrinsic.c (g95_convert_type): Likewise.
5723         * misc.c (g95_code2string): Likewise.
5724         * simplify.c (g95_simplify_ishft, g95_simplify_real,
5725         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5726         * trans-stmt.c (g95_trans_select): Likewise.
5727         * primary.c (extend_ref): Add an assertion.
5728         * simplify.c (g95_convert_constant): Add const.
5729         * intrinsic.h: Remove g95_check_x_ni.
5730         * f95-lang.c (g95_finish): Call g95_release_include_path.
5731
5732 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5733
5734         * resolve.c (resolve_contained_functions): Fix typo introduced on
5735         2003-01-13.
5736
5737 2003-06-09  Paul Brook  <paul@nowt.org>
5738
5739         * g95.h: Include system.h not hwint.h.
5740         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
5741         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5742
5743 2003-06-09  Paul Brook  <paul@nowt.org>
5744
5745         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5746         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5747         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5748         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5749         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5750         objects.
5751         * trans.h (g95_trans_equivalence, g95_trans_common,
5752         g95_add_decl_to_function): Declare.
5753         * trans-common.c, trans-equivalence.c: New files.
5754
5755 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
5756
5757         * intrinsic.c (g95_intrinsic_extension): Remove.
5758         (add_functions): Substitute g95_check_x for g95_check_x_ni
5759         everywhere.
5760         (g95_init_expr_extensions): New function.
5761         (g95_intrinsic_func_interface): Use it.
5762         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5763         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5764         g95_check_precision, g95_check_present, g95_check_radix,
5765         g95_check_range, g95_check_selected_real_kind): Do not set
5766         g95_intrinsic_extension.
5767         (g95_check_x_ni): Remove now duplicate of g95_check_x.
5768
5769         * expr.c (check_inquiry): Add FIXME, fixup some code style.
5770
5771 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5772
5773         * g95.h (ref_type): Name this type explicitly.
5774         * module.c (MIO_NAME): Add specialisations of mio_name.
5775         (mio_symbol_attribute, mio_typespec, mio_array_ref,
5776         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5777         (ab_attribute): Name this type explicitly.
5778         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5779
5780 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5781
5782         * trans-intrinsic.c (g95_conv_allocated): New function.
5783         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5784
5785 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
5786
5787         * f95-lang.c: Don't include g95-support.h
5788         (g95_mark_addressable): Add prototype.
5789         (g95_init_decl_processing): Remove C front end hack.
5790         * f95-tree.c: Remove file.
5791         * support.c: Remove file.
5792         * g95-support.h: Remove file.
5793         * trans-types.c (g95_init_types): Set up boolean
5794         type related tree nodes.
5795         * Make-lang.in: Remove rules for dead files and
5796         dependencies on them.
5797
5798 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
5799
5800         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5801         C front end dependency.  Also, convert.c does not depend on
5802         g95-support.h anymore.
5803         * convert.c: Don't include c-common.h and g95-support.h
5804         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5805         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5806         stmts_are_full_exprs_p, current_stmt_tree,
5807         current_scope_stmt_stack): Remove.
5808         * g95-support.h (unsigned_conversion_warning): Kill proto.
5809         (boolean_type_node, boolean_true_node, boolean_false_node):
5810         Don't define here.  Instead, make then true tree nodes in
5811         trans-types.
5812         * support.c (c_global_trees): Die, C front end, die!!!
5813         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5814         uintmax_type_node, string_type_node and const_string_type_node.
5815         (decl_constant_value, overflow_warning): Make static functions.
5816         They are in death row too, though.
5817         (default_conversion, c_expand_asm_operands): Remove.
5818         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5819         trans.c: Don't include c-common.h.
5820         * trans-types.c (boolean_type_node, boolean_true_node,
5821         boolean_false_node): Make them real tree nodes.
5822         * trans-types.h (intmax_type_node, string_type_node,
5823         const_string_type_node): Hack to work around C dependencies
5824         in builtin-types.def.
5825
5826 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5827
5828         * decl.c (decl_types): Add some iterators-like sentinels.
5829         * decl.c (match_attr_spec): Use them.
5830         Use "decl_types" instead of "int".
5831         Add cast in call to g95_match_strings.
5832         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
5833         instead of "int".
5834         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5835         (g95_interface_info): Use "g95_intrinsic_op".
5836         * dump-parse-tree.c (g95_show_namespace): Use them.
5837         * interface.c (g95_check_interfaces): Use them.
5838         * module.c (read_module, write_module): Use them.
5839         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5840         Use "g95_intrinsic_op".
5841         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5842         Add a default case in switch statement.
5843         * intrinsic.h (g95_generic_isym_id): Moved to...
5844         * g95.h (g95_generic_isym_id): here.
5845         (g95_intrinsic_sym): Use "g95_generic_isym_id".
5846         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5847         * trans-intrinsic.c (g95_intrinsic_map_t,
5848          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5849         * match.c (g95_match_intrinsic_op): Add cast in call to
5850         g95_match_strings.
5851
5852 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
5853
5854         * support.c (skip_evaluation, warn_conversion, lvalue_p,
5855         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5856         constant_fits_type_p, convert_and_check,
5857         unsigned_conversion_warning): Remove these ugly remnants
5858         we inherited from the C front end.
5859         (function_types_compatible): Remove '#if 0'-edcode.
5860         (build_modify_expr): Likewise.
5861         (convert_for_assignment): Don't use the deceased functions.
5862         The parameter fundecl is now unused.
5863         (decl_constant_value): Always just return decl.  In fact
5864         this function is not used at present, but it might be in
5865         the future, when we start using the tree inliner.
5866         (overflow_warning, default_conversion, c_expand_asm_operands):
5867         Abort when these are called, they are part of the C type
5868         checking implementation and therefore poison to Fortran.
5869
5870 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
5871
5872         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5873         c-pretty-print.o and c-dump.o.  Add a comment on why we
5874         depend on c-semantics.c.
5875         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5876         Don't use the C front end tree dumper hook to dump the
5877         language specific tree representation -- we don't have
5878         one.  So instead, inherit the default langhook.
5879
5880 2003-06-02  Paul Brook  <paul@nowt.org>
5881
5882         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5883
5884 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5885
5886         * check.c (g95_check_associated): Use proper types.  Remove
5887         extraneous argument in call to g95_error().
5888
5889 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5890
5891         * resolve.c (resolve_operator): Make logical operands convert to the
5892         type with higher kind.
5893
5894 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5895
5896         * check.c (g95_check_associated): Make sure both pointer and target has
5897         the same type and rank. Null pointer or array section with vector
5898         subscript as target are not allowed.
5899         * trans.h: Declare gfor_fndecl_associated.
5900         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5901         gfor_fndecl_associated.
5902         * trans-intrinsic.c (g95_conv_associated): New function.
5903         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5904
5905 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5906
5907         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5908         according to POINTER itself rather than TARGET.
5909         (g95_conv_expr_descriptor): Make lbound start at 1.
5910         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5911
5912 2003-06-01  Paul Brook  <paul@nowt.org>
5913
5914         * expr.c (g95_type_convert_binary): Make it match the standard.
5915         * g95.texi: Remove dead link.
5916
5917 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
5918
5919         * g95.texi: Cleanup somewhat in preparation for inclusion
5920         in GCC CVS.
5921
5922 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5923             Canqun Yang  <canqun@yahoo.com.cn>
5924
5925         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5926         type.
5927         (g95_find_forall_index): Return proper value.
5928         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5929         compare the return value from g95_find_forall_index.
5930
5931 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5932         * g95.h, io.c (g95_st_label): Remove "length".
5933         (g95_symtree): Remove "link".
5934         (g95_case): Remove "code".
5935         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5936         g95_convert_real): Make an argument pointer to const.
5937         * decl.c (colon_seen): Add a TODO.
5938         * interface.c (g95_compare_types): Fix typo.
5939         * interface.c (compare_interfaces): Preserve value of "p".
5940         * intrinsic.c (sort_actual): Remove "i".
5941         * match.c (g95_match_assign): Proper type in call to g95_match().
5942         * parse.c (next_free): Avoid duplicate call due to macro.
5943         * parse.c (check_statement_label): wrong type in call to g95_error.
5944         * primary.c (match_real_constant): Add a TODO.
5945         * resolve.c (resolve_select):  Remove useless conditional.
5946         * simplify.c (g95_simplify_repeat): Proper assignment to
5947         "value.character.string".
5948         * simplify.c (g95_simplify_reshape): Wrong variable in call to
5949         g95_error.
5950
5951 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
5952
5953         * trans-stmt.c: Remove unnecessary include file defaults.h.
5954
5955 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
5956
5957         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5958         stride.
5959         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5960         actual variables used as FORALL indexes.
5961
5962 2003-05-15  Paul Brook  <paul@nowt.org>
5963
5964         * trans-array.c (g95_trans_static_array_pointer): Use
5965         null_pointer_node.
5966         (g95_trans_deferred_array): Initialize static array pointers.
5967         * trans-expr.c (g95_conv_function_call): Use formal arglist to
5968         correctly pass POINTER and absent CHARACTER arguments.
5969
5970 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
5971
5972         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5973         (g95_resolve_forall_body): Resolve FORALL body.
5974         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5975         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5976         (g95_find_forall_index): Check whether the FORALL index appears in
5977         the expression or not.
5978         (resolve_code): Modified.
5979
5980 2003-05-14  Paul Brook  <paul@nowt.org>
5981
5982         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5983
5984 2003-05-13  Paul Brook  <paul@nowt.org>
5985
5986         * trans-types.c (g95_max_array_element_size): Now a tree node.
5987         (g95_init_types): Work out max size properly.
5988         (g95_get_dtype_cst): Modify to match.
5989
5990 2003-05-11  Paul Brook  <paul@nowt.org>
5991
5992         * trans-io.c (add_case): Create a label decl for case labels.
5993
5994 2003-05-11  Paul Brook  <paul@nowt.org>
5995
5996         * arith.c (g95_integer_index_kind): New variable.
5997         * f95-lang.c (g95_init): Move frontend initialization here ...
5998         (g95_post_options): ... from here.
5999         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6000         * intrinsic.c (add_functions): Use index kinds.
6001         * iresolve.c: Convert to index_kind where needed.
6002         * resolve.c (g95_resolve_index): Make public, use index_kind.
6003         (resolve_array_ref): Adjust to match.
6004         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6005         * trans-stmt.c: Ditto.
6006         * trans-types.c: Ditto.
6007         * trans-types.h (g95_array_index_kind): Remove declaration.
6008         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6009
6010 2003-05-07  Paul Brook  <paul@nowt.org>
6011
6012         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6013         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6014         of bound indices.
6015
6016 2003-05-07  Paul Brook  <paul@nowt.org>
6017
6018         * trans-array.c (trans_static_array_pointer,
6019         g95_trans_array_constructor_value, g95_conv_array_initializer,
6020         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6021         (g95_add_loop_ss_code): Convert subscripts to the correct type.
6022         * trans-stmt.c (g95_trans_character_select): Ditto.
6023         * trans-types.c (g95_init_types): Ditto.
6024
6025 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
6026
6027         * f95-lang.c (expand_function_body): Use input_line, not lineno.
6028         * trans-decl.c (g95_generate_function_code,
6029         g95_generate_constructors): Likewise.
6030         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6031         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6032         Likewise.
6033
6034 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6035         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6036         with components point to the DERIVED type itself, and two DERIVED
6037         type with components point to each other.
6038         * trans-expr.c (g95_conv_componet_ref): Modified
6039
6040 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6041         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6042         null_pointer_node.
6043         (g95_trans_pointer_assign): Implement Nullify.
6044
6045 2003-05-01  Paul Brook  <paul@nowt.org>
6046
6047         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6048         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6049
6050 2003-05-01  Paul Brook  <paul@nowr.org>
6051
6052         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6053         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6054         IS_EMPTY_STMT.
6055
6056 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
6057
6058         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6059         CASE_LABEL_EXPR.
6060
6061 2003-04-28  Paul Brook  <paul@nowt.org>
6062
6063         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6064         as their kind suggests.
6065         (g95_resolve_reshape): Ditto.
6066
6067 2003-04-28  Chun Huang  <compiler@sohu.com>
6068
6069         * trans-expr.c (g95_conv_substring_expr): New function.
6070         (g95_conv_expr): Use it.
6071
6072 2003-04-28  Paul Brook  <paul@nowt.org>
6073
6074         * iresolve.c (g95_resolve_transpose): Make it match the
6075         implementation.
6076         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6077
6078 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
6079
6080         * trans-types.c (g95_add_field_to_struct): New function to
6081         add a field to a UNION_TYPE or RECORD_TYPE.
6082         * trans-types.h (g95_add_field_to_struct): Prototype.
6083         (g95_get_derived_type): Use g95_add_field_to_struct to add
6084         components.
6085         * trans-io.c (g95_add_field): Remove.
6086         (ADD_FIELD): Use new g95_add_field_to_struct function.
6087         (ADD_STRING): Likewise.
6088         * trans-stmt.c (g95_trans_select): Likewise.
6089         (g95_add_field): Remove duplicated function.
6090
6091 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
6092
6093         Port implementation for CHARACTER SELECT from Andy's tree.
6094         * trans-stmt.c (g95_trans_character_select): Implement character
6095         select. (g95_add_field): New function.
6096         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6097         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6098         * g95.h (struct g95_case): Add field 'int n'.
6099         * trans.h: Declare 'gfor_fndecl_select_string'.
6100
6101 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
6102
6103         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6104         (g95_insert_bbd): Die on duplicates.
6105         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6106
6107 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
6108
6109         * g95.texi: Require GMP 4.0 -- like we actually
6110         do.  Explain the testsuite and what-goes-where.
6111         Don't use undefined texinfo symbol.  Break very
6112         long line.  Remove finished item from the list
6113         of open projects.
6114
6115 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
6116
6117         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6118         LOGICAL type.
6119
6120 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
6121
6122         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6123         (g95_trans_forall_body): New function.
6124
6125 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
6126
6127         * resolve.c (resove_where): New function.
6128         (resolve_where_shape): New function.
6129         (resolve_code): Add call to 'resolve_where'
6130         * trans-stmt.c (g95_trans_where): Modified.
6131         (g95_trans_where_2): New function.
6132         (g95_trans_where_assign): New function.
6133         (g95_evaluate_where_mask): New function.
6134         (g95_add_to_stmt_list): New function.
6135         (g95_get_temp_expr): New function.
6136         * trans.h (where_stmt_list): New structure.
6137
6138 2003-04-10  Paul Brook  <paul@nowt.org>
6139
6140         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6141         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6142
6143 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
6144
6145         Update after mainline -> tree-ssa-branch merge.
6146         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6147         call.
6148         (g95_init): Update for new lang_hooks definition.
6149         (g95_post_options): New langhook.
6150         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6151         * scanner.c (g95_new_file): Comment update.
6152
6153 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6154
6155         * g95.h, lang-options.h: Add -Wimplicit-interface.
6156         * options.c (g95_init_options, g95_parse_arg): Set it.
6157         * interface.c (check_intents): Warn about call with implicit
6158         interface.
6159         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6160         g95_procedure_use.
6161
6162 2003-04-05  Paul Brook  <paul@nowt.org>
6163
6164         * iresolve.c (g95_resolve_spread): Don't resole based on type.
6165         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6166
6167 2003-03-29  Paul Brook  <paul@nowt.org>
6168
6169         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6170         (g95_resolve_unpack): Ditto.
6171         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6172         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
6173         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6174
6175 2003-03-25  Paul Brook  <paul@nowt.org>
6176
6177         * arith.c (g95_unary_user, g95_user): Remove dead functions.
6178         * arith.h: Ditto.
6179         * array.c (g95_free_array_ref): Ditto.
6180         * g95.h: Ditto.
6181         * symbol.c (g95_use_derived_tree): Ditto.
6182         * intrinsic.c (add_functions): Use simplification for SCALE.
6183         * primary.c (g95_match_rvalue): Test sym, not symtree.
6184
6185 2003-03-25  Paul Brook  <paul@nowt.org>
6186
6187         * trans-decl.c (build_function_decl): Add parameter before it gets
6188         turned into a constant.
6189         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6190         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6191         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6192
6193 2003-03-22  Paul Brook  <paul@nowt.org>
6194
6195         * trans-array.c (g95_conv_array_initializer): Allow scalar
6196         expressions.
6197         * trans-decl.c (g95_finish_var_decl): Result variables are not
6198         module variables.
6199         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6200         (g95_conv_intrinsic_function): Use it.
6201         * trans-types.h (g95_type_spec): Remove dead declaration.
6202
6203 2003-03-21  Paul Brook  <paul@nowt.org>
6204
6205         * trans-decl.c (g95_build_function_decl): Mark string parameters.
6206
6207 2003-03-20  Paul Brook  <paul@nowt.org>
6208
6209         * trans-decl.c (g95_build_function_decl): Put character length
6210         parameters at the end of the function declaration.
6211         * trans-expr.c (g95_conv_function_call): Ditto.
6212         * trans-types.c (g95_get_function_type): Ditto.
6213
6214 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6215
6216         * resolve.c (resolve_formal_arglist): Don't impose intent for
6217         procedure arguments of pure functions.
6218         (resolve_select): Remove redundant assignment.
6219
6220 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6221
6222         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6223         Remove option l1.
6224         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6225         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6226         const.
6227         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6228         Order list.
6229         * symbol.c (g95_add_type): Fix typo in comment.
6230
6231
6232 2003-03-16  Paul Brook  <paul@nowt.org>
6233
6234         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6235         * expr.c (g95_build_call): Remove.
6236         * f95-lang.c (puchdecl_top_level): New function.
6237         * g95.h (g95_code): Store resolved symbol, not just the name.
6238         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6239         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6240         (g95_get_intrinsic_sub_symbol): New function.
6241         * iresolve.c (g95_resolve_cpu_time): Use it.
6242         (g95_resolve_random_number): Ditto.
6243         * resolve.c: Set code->resolved_sym instead of code->sub_name.
6244         * trans-decl.c (g95_get_extern_function_decl): Give external decls
6245         the correct DECL_CONTEXT.  Add global symbold to the global scope.
6246         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6247         fixed.
6248
6249 2003-03-16  Paul Brook  <paul@nowt.org>
6250
6251         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6252         * options.c (g95_parse_arg): Ditto.
6253         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6254         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6255         for the procedure, not the parameter.
6256         * trans-array.c (g95_trans_g77_array): New function.
6257         (g95_trans_assumed_size): Use it.
6258         (g95_trans_dummy_array_bias): Ditto.
6259         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6260         (g95_conv_expr_descriptor): ... to here.  Update callers.
6261         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6262         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6263         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6264         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6265         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6266         (g95_sym_type): Ditto.
6267
6268 2003-03-15  Paul Brook  <paul@nowt.org>
6269
6270         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6271         first chain.
6272         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6273
6274 2003-03-14  Paul Brook  <paul@nowt.org>
6275
6276         * trans-array.c (g95_array_is_packed): Remove.
6277         (g95_conv_array_base): Correctly handle all descriptorless cases.
6278         (g95_conv_array_stride): Use descriptorless strides.
6279         (g95_trans_dummy_array_bias): Don't always repack the array.
6280         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6281         packed.
6282         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6283         dummy and non-dummy arrays...
6284         (g95_sym_type, g95_get_derived_type): ... like these.
6285         (g95_get_array_type_bounds): Allow discontiguous arrays.
6286
6287 2003-03-12  Paul Brook  <paul@nowt.org>
6288
6289         * array.c (g95_resolve_array_spec): Fix comment.
6290         * g95.h (symbol_attributes): New flag always_explicit.
6291         * resolve.c (resolve_formal_arglist): Set it always_explicit.
6292         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6293         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6294         (g95_trans_array_bounds): Allow assumed shape arrays.
6295         (g95_trans_repack_array): Remove.
6296         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6297         * trans-decl.c (g95_build_qualified_array): Only ignore absent
6298         bounds for assumed size arrays.
6299         (g95_build_dummy_array_decl): Use descriptorless arrays.
6300         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6301         (g95_trans_pointer_assign): Fix typo.
6302         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6303         code.
6304         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6305         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6306         Also modify callers.
6307         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6308
6309 2003-03-08  Paul Brook  <paul@nowt.org>
6310
6311         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6312         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6313         * resolve.c (compare_spec_to_ref): Allow full array sections.
6314
6315 2003-03-08  Paul Brook  <paul@nowt.org>
6316
6317         * expr.c (g95_simplify_expr): Also simplify array index and
6318         substring expressions.
6319         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6320         * trans-array.c (g95_trans_array_bounds): New function.
6321         (g95_trans_auto_array_allocation): Use it.
6322         (g95_trans_assumed_size): Rewrite.
6323         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6324         (gfor_fndecl_repack): Remove.
6325         (g95_build_qualified_array): Handle absent upper bounds.
6326         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6327         (g95_get_symbol_decl): Update.
6328         (g95_build_intrinsic_function_decls): Initialize new decls.
6329         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6330         (gfor_fndecl_repack): Remove.
6331         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6332         * trans-types.c: (g95_build_array_type): Merge duplicated code..
6333         (g95_get_nodesc_array_type): Handle absent bounds.
6334         * trans-types.h (g95_get_nodesc_array_type): Declare.
6335
6336 2003-03-04  Paul Brook  <paul@nowt.org>
6337
6338         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6339         builtin-types.def.
6340
6341 2003-03-02  Paul Brook  <paul@nowt.org>
6342
6343         * options.c (g95_init_options): Drfault to 1.
6344         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6345         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6346         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6347         Handle non-constant size automatic arrays.
6348         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6349         generic bound functions.
6350         (g95_trans_auto_array_allocation): Don't create a descriptor.
6351         (g95_trans_assumed_size): New function (broken).
6352         (g95_trans_dummy_array_bias): Remove unused var.
6353         * trans-array.h (g95_trans_assumed_size): Declare.
6354         * trans-decl.c (create_index_var): New fuction.
6355         (g95_build_qualified_array): New function.
6356         (g95_get_symbol_decl): Use it.
6357         (g95_trans_deferred_vars): Handle assumed shape seperately.
6358         * trans-types.c (get_element_type): Handle heap allocated arrays.
6359         (g95_is_nodesc_array): Include non-const size arrays.
6360         (g95_get_nodesc_array_type): Ditto.
6361
6362 2003-02-23  Paul Brook  <paul@nowt.org>
6363
6364         * trans-array.c (g95_array_init_size): Should use stride, not size of
6365         last dimension.
6366
6367 2003-02-18  Paul Brook  <paul@nowt.org>
6368
6369         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6370         after intrinsic function check.
6371
6372 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6373
6374         * io.c (match_io): Fix missing return value and remove useless
6375         assignment.
6376         * match.c (g95_match): Remove useless assignment.
6377         * module.c (parse_string):  Remove useless post increment.
6378         * simplify.c (g95_simplify_verify): Remove useless assignment.
6379
6380 2003-02-15  Paul Brook  <paul@nowt.org>
6381
6382         * expr.c (restricted_intrinsic): Handle bad values gracefully.
6383         * g95.h (symbol_attribute): Add referenced member.
6384         (g95_symbol): Add dummy_order member.
6385         (g95_set_sym_referenced): Declare.
6386         * match.c (g95_match_assignment, g95_match_call): Use it
6387         * primary.c (match_actual_arg, g95_match_rvalue,
6388         g95_match_variable): Ditto.
6389         * symbol.c (next_dummy_order): New variable.
6390         (g95_set_sym_referenced): New function.
6391         (check_done): New function.
6392         (g95_add_*): Use it.
6393         * trans-decl.c: Make formatting conform to GCC standards.
6394         (g95_defer_symbol_init): Add dummy variables in the right order.
6395         (g95_get_symbol_decl): Only accept referenced variables.
6396         (g95_create_module_variable): Module variables are always required.
6397         (generatr_local_decls): New function.
6398         (generate_local_vars): New function.
6399         (g95_generate_function_code): Use it.
6400
6401 2003-02-13  Paul Brook  <paul@nowt.org>
6402
6403         * trans-decl.c (g95_conv_struct_cons): Remove.
6404         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6405         * trans-expr.c (g95_conv_structure): New function.
6406         (g95_conv_expr): Use it.
6407
6408 2003-02-09  Paul Brook  <paul@nowt.org>
6409
6410         * trans-array.c (g95_array_init_size): Don't evaluate the linit
6411         expressions multiple times.
6412         (g95_trans_auto_arry_allocation): Use pointer not tmp.
6413
6414 2003-02-08  Paul Brook  <paul@nowt.org>
6415
6416         * module.c (mio_symtree_ref): Declare as static.
6417         (mio_expr): Remove dead code.
6418         (read_module): Set the symtree link for fixups.
6419         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6420         (build_round_expr): ... to this.
6421         (g95_conv_intrinsic_aint): New function.
6422         (g95_conv_intrinsic_function): Use it.
6423
6424 2003-02-08  Paul Brook  <paul@nowt.org>
6425
6426         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6427         offset after modificaton, not the increment expression.
6428         * dependency.c: Kill excess whitespace.
6429
6430 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
6431
6432         * dependency.h: Remove some function declarations.
6433         * dependency.c (get_no_of_elements): Change this function not to
6434         return int.
6435         * other: Add comments for all modified functions.
6436
6437 2003-02-06  Paul Brook  <paul@nowt.org>
6438
6439         * g95spec.c (lang_specific_functions): Fix initializer warning.
6440         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6441         for structure type names.
6442         * trans-decl.c (g95_cons_structure_cons): New function.
6443         (g95_get_symbol_decl): Use it.
6444         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6445         referencing code.
6446
6447 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6448
6449         * resolve.c (compare_cases): Add const to casts.
6450
6451 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6452
6453         * g95.h (g95_check_f): Change a1 to f1m.
6454         * intrinsic.c (add_sym_1m, check_specific,
6455         g95_intrinsic_func_interface): Use it.
6456
6457         * module.c (init_pi_tree): Remove useless cast.
6458         (fp2): Fix argument type.
6459
6460         * parse.c (parse_select_block): Add comment.
6461
6462 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
6463
6464         * lang-options.h: Fix warning involving C90 concatenated
6465         strings.
6466
6467 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6468             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6469
6470         * io.c (format_asterisk): Complete initializer to kill warning.
6471         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6472         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6473         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6474         new defines to complete initializers.  Kills all warnings.
6475
6476         * Make-lang.in: Comment cleanup.
6477
6478 2003-02-05  Paul Brook  <paul@nowt.org>
6479
6480         * array.c (g95_free_constructor): Handle NULL expressions.
6481         * resolve.c (resolve_structure_cons): Ditto.
6482         * decl.c (g95_match_null): New Function.
6483         (variable_decl): Use it.
6484         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6485         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6486         * trans-types.c (g95_set_decl_attributes): Remove empty function.
6487
6488 2003-02-05  Paul Brook  <paul@nowt.org>
6489
6490         * trans.h (build1_v): New macro.
6491         (build_v): Remove pointless and incorrect prototype.
6492         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6493         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6494
6495 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6496
6497         * Make-lang.in (F95_OBJS): Remove one more dead file.
6498
6499 2003-02-01  Paul Brook  <paul@nowt.org>
6500
6501         * lang-specs.h: Don't pass -ffixed-form to the linker.
6502         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6503
6504 2003-02-01  Paul Brook  <paul@nowt.org>
6505
6506         * Make-lang.in (F95_OBJS): Remove dead files.
6507         * trans-array.c (g95_array_init_size): Do the right thing when
6508         ubound=NULL.
6509         * trans-decl.c (g95_generate_function_code): Initialize deffered
6510         symbol list before translating contained subroutines.
6511         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6512         scalar invariant values here...
6513         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6514         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6515
6516 2003-01-29  Paul Brook  <paul@nowt.org>
6517
6518         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6519         (g95_walk_elemental_function_args): Reverse chains before adding.
6520         (g95_reverse_ss): Move about a bit.
6521         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6522         function arguments.
6523
6524 2003-01-28  Paul Brook  <paul@nowt.org>
6525
6526         * intrinsic.c (resolve_intrinsic): Use correct union member.
6527         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6528         parameters.
6529         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6530         use associated variables.
6531         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6532         * trans-expr.c (g95_conv_expr_present): ... to here.
6533         * trans.h: Declare it.
6534         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6535
6536 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6537
6538         * array.c (expand_iterator): Suppress useless assignment.
6539         * decl.c (match_char_spec): Ditto.
6540         * io.c (match_io_iterator): Ditto.
6541         * primary.c (match_real_constant): Ditto.
6542         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6543         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
6544         * matchexp.c (match_add_operand, match_level_5): Likewise.
6545         * module.c (parse_atom, find_enum): Likewise.
6546         * resolve.c: move #include <string.h>
6547         (resolve_select): Fix serious typo.
6548
6549 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
6550
6551         * Make-lang.in: Don't build with broken tree-ssa-pre.
6552
6553 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6554
6555         * resolve.c (resolve_index): Add a TODO.
6556         * symbol.c: Remove useless "#include <ctype.h>".
6557
6558 2003-01-27  Paul Brook  <paul@nowt.org>
6559
6560         * check.c (check_rest): Allow different type kinds as an extension.
6561         * g95.h (g95_resolve_f): Add f1m.
6562         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6563         * intrinsic.h: Chenge prototypes for MIN and MAX.
6564         * iresolve.c (g95_resolve_minmax): New function.
6565         (g95_resolve_min, g95_resolve_max): Use it.
6566         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6567         arguments once.
6568         (g95_conv_intrinsic_present): Fix logic.
6569
6570 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
6571
6572         * g95.h (g95_case): Don't be a tree, be a double linked list.
6573         * match.c (match_case_selector): Remove redundant semantics check.
6574         Clean up a few goto's to make it a tiny little bit faster.
6575         * resolve.c (case_tree): Die.
6576         (compare_cases): Accept and compare unbounded cases too.
6577         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
6578         whole list of g95_cases passed from resolve_select.
6579         (sane_logical_select): Die.
6580         (check_case_expr): Return FAILURE if a CASE label is of the wrong
6581         type kind.
6582         (resolve_select): Fixup case expression for computed GOTOs, put it
6583         in expr, not expr2, for easier handing in the parse tree dumper and
6584         the code generator.  Rewrite the rest of the function: Kill
6585         unreachable case labels and unreachable case blocks.
6586         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6587         an EXEC_SELECT, not case2 anymore.
6588         * trans-const.c (g95_conv_constant_to_tree): New function.
6589         (g95_conv_constant): Use it.
6590         * trans-const.h: Declare prototype for the new function.
6591         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6592         g95_trans_character_select): New static functions.
6593         (g95_trans_select): Rewrite.
6594
6595 2003-01-26  Paul Brook  <paul@nowt.org>
6596
6597         * intrinsic.c (add_fnctions): Properly add dreal.
6598         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6599         (g95_conv_intrinsic_function): Use it.
6600         * trans-io.c (build_dt): Abort on internal files (unimplemented).
6601
6602 2003-01-26  Paul Brook  <paul@nowt.org>
6603
6604         Widespread changes to the handling of symbols in expressions.  These
6605         are now linked via g95_symtree nodes.
6606         * parse.c (g95_fixup_sibling symbols): New function.
6607         (parse_contained): Use it.
6608         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
6609         contained procedure that has bee correctly fixed up.
6610         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6611
6612 2003-01-24  Paul Brook  <paul@nowt.org>
6613
6614         * trans-array.c (g95_walk_expr): Function result attributes are in
6615         sym->result.
6616         * trans-expr.c (g95_conv_function_call,
6617         g95_trans_arrayfunc_assign): Ditto.
6618         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6619
6620 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6621
6622         * expr.c (check_restricted): Fix error message.
6623         * symbol.c (free_st_labels): Plug memleak.
6624
6625 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6626
6627         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6628         reduce_binary_aa, reduce_binary, eval_intrinsic,
6629         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6630         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6631         for typesafe intrinsics helper functions.
6632         (g95_intrinsic_sym): Use them.
6633         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6634         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6635         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6636         check_specific, g95_intrinsic_func_interface,
6637         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6638         helper functions.
6639         * trans-decl.c (g95_get_extern_function_decl): Likewise.
6640         * Make-lang.in: Don't disable warnings for strict prototypes
6641         any longer, everything is typesafe now.
6642
6643 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6644
6645         * bbt.c (duplicate_node): Make static.
6646         * module.c (module_name): Make static.
6647         * scanner.c (include_dirs): Make static.
6648
6649 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6650
6651         Hard coded _gfor_'s should not show up anymore.
6652         * g95.h (PREFIX): New macro.
6653         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6654         hard-coded "_gfor".
6655         (g95_resolve_random_number): Likewise.
6656         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6657         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
6658         the new PREFIX macro from g95.h.
6659
6660 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6661
6662         The troubles of forking... Andy implemented this just now too.
6663         Let's stick to that and keep the trees close.
6664         * g95.h (g95_st_label): 'format' member is now a g95_expr.
6665         * io.c: Revert previous changes.
6666         (g95_match_format): Match the format string as a character
6667         literal expression.
6668         * match.h (g95_statement_label): Declare external.
6669         * parse.c: Revert previous changes.
6670         * symbol.c (g95_free_st_label): Free a g95_expr instead
6671         if a 'char *'.
6672         * trans-io.c: Revert previous changes.
6673         (build_dt): Use set_string to set the format string.
6674
6675 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6676
6677         * io.c (format_string): Make non-static.
6678         (g95_match_format): Remember the format string.
6679         (terminate_io): Add I/O termination for empty I/O lists.
6680         * match.h: Declare external format_string.
6681         * parse.c (check_statement_label): Attack the format string
6682         to a format label for FORMAT statements.
6683         * trans-io.c (g95_add_field): Define prefix macro.  Replace
6684         all uses of PREFIX define with a use of this macro.
6685         (build_dt): Implement formatted I/O for format labels.
6686
6687 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6688
6689         * lang-options.h: Kill "-std=F".
6690         * options.c: Remove unimplemented "-std=F".  Modify
6691         web address.
6692         * misc.c (g95_terminal_width): New function.
6693         * error.c (g95_error_init_1): Use g95_terminal_width.
6694         * g95.h: Add prototype for g95_terminal_width, remove
6695         fmode flag.
6696
6697 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6698
6699         * Make-lang.in: Fix typo.
6700
6701 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6702
6703         * g95.h (struct g95_case): Remove unused cruft, new member
6704         'where' to keep track of the locus of the default case.
6705         * match.c (g95_match_case): Add locus to the current case.
6706         (match_case_selector): Likewise.
6707         * parse.c (parse_select_block): Move semantics check for
6708         multiple DEFAULT cases out of here to...
6709         * resolve.c (check_case_overlap): ...here.  Return sooner
6710         when possible.
6711         (check_case_expr): Take two g95_cases now, use to sure the
6712         expression kinds are the same.
6713         (resolve_select): Cleanup.
6714
6715 2003-01-18  Paul Brook  <paul@nowt.org>
6716
6717         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6718         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6719         variables.
6720         (g95_get_extern_function_decl): Put decls in the correct context.
6721
6722 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6723
6724         * trans-io.c: Port changes from Andy to set ERR flag.
6725
6726 2003-01-17  Paul Brook  <paul@nowt.org>
6727
6728         * trans-array.c: Add various comments.
6729         (g95_ss_terminator): Declare as const.
6730         (g95_walk_expr): Remove first parameter and update all callers.
6731         (g95_walk_op_expr): Initialize scalar SS properly.
6732         * trans-array.h (g95_walk_expr): Update prototype.
6733         * trans-expr.c: Update for new g95_walk_expr.
6734         * trans-intrinsic.c: Ditto.
6735         * trans-io.c: Ditto.
6736         * trans.h: Various comments for SS chains.
6737
6738 2003-01-17  Paul Brook  <paul@nowt.org>
6739
6740         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6741         and RRSPACING.
6742         * intrinsic.c (add_functions): Use them.
6743         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6744         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6745
6746 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6747
6748         Fallout of a small merge conflict:
6749         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6750
6751 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6752
6753         * initrinsic.c: New add_sym_* functions for strong typing.
6754         (add_conv): Make prototype strict.
6755         * dump-parse-tree.c, dependency.c: Include config.h
6756         * resolve.c, trans-io.c: Fix typos.
6757
6758 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6759
6760         * dump-parse-tree.c (g95_show_code_node): Show the
6761         condition for a computed GOTO that was transformed
6762         to a SELECT CASE construct.
6763         * resolve.c (check_case_overlap): Revert previous switch
6764         to treaps, it was too slow and didn't catch all trouble.
6765         (resolve_symbol): Be more flexible about module procedures.
6766         * symbol.c (check_conflict): Point to relevant section in
6767         the standard for dubious conflict.  Allow procedure
6768         dummy arguments to be optional again.
6769         * trans-io (add_field): Rename to g95_add_field.  Change
6770         all callers.
6771         * trans-stmt (trans_select): Handle unbounded cases for
6772         integer SELECT CASE constructs.  Fix/add more comment.
6773
6774 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6775
6776         * g95.h: Uses GCC's function attribute macros.
6777         * error.c, module.c, parse.c, g95.h: More function attributes.
6778
6779 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6780         Forgot a file...
6781         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6782         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6783         DECL_SOURCE_FILE.
6784
6785 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6786
6787         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6788         DECL_SOURCE_LINE.
6789         * trans.c (g95_trans_code): Use annotate_all_with_file_line
6790         instead of nowdead wrap_all_with_wfl.
6791
6792 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6793
6794         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6795         before generating code, so we can still see it even if the code
6796         generation phase dies.
6797
6798 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6799
6800         * decl.c (build_sym): Split out initialization expression parts...
6801         (add_init_expr_to_sym): ...to here.
6802         (variable_decl): Add the symbol following an attribute list to the
6803         symbol tree before parsing the optional initialization expression
6804         if the symbol is not of a derived type.
6805         * primary.c (g95_match_rvalue): Don't assume a symbol always has
6806         a value if it is a PARAMETER.
6807
6808 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6809
6810         * misc.c: Don't #include <mcheck.h>
6811         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
6812         ever was a glibc bug, then either this was never reported to
6813         glibc people, or it has been fixed for so long that there's
6814         no information you can find about it, anywhere.
6815
6816 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6817
6818         Fix warnings:
6819         * module.c (attr_bits, bt_types, array_spec_types):
6820         Switch 'const' and 'static'.
6821         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6822
6823         GNU'ify source code:
6824         * trans-io.c: Numerous fixes, one fixed warning and a few
6825         TODO markers so that we don't forget about them.
6826
6827 2003-01-13  Paul Brook  <paul@nowt.org>
6828
6829         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6830         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6831         Add G95_ISYM_SCALE.
6832         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6833         * match.c (g95_match_stop): Fix dumb == -> != error.
6834
6835 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6836
6837         * dump-parse-tree.c (show_indent): Add line breaks.  This
6838         whole dumping process needs cleanups.
6839         * f95-lang.c (g95_mark_addressable): Fix prototype to match
6840         the langhook.  Fix 'return's accordingly.
6841         * g95-support.h: Adjust prototype.
6842         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6843         * lang-options.h: Add '-fsyntax-only'.
6844         * options.c (g95_init_options): Init 'no_backend'.
6845         (g95_parse_arg): Deal with '-fsyntax-only'.
6846         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6847         is set.
6848
6849 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6850         Patch from Arnaud
6851         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6852         arguments.  Also make sure that if a symbol is marked INTRINSIC,
6853         an intrinsic with the symbol's name actually exists.
6854         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6855         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6856         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6857
6858 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6859
6860         * resolve.c (resolve_contained_functions): Fix condition, don't
6861         throw internal_error if a child namespace has no name.  Apparently
6862         this can be the case?
6863
6864 2003-01-11  Paul Brook  <paul@nowt.org>
6865
6866         Port changes from Andy's tree:
6867         * g95.h (g95_code): Add stop_code.
6868         * match.c (g95_match_stop): Detter syntax checking.
6869         * resolve.c (resolve_generic_f0): Return match type.
6870         (resolve_generic_f): Remove dead/duplicated code.
6871         (resolve_specific_f): Ditto.
6872         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6873         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6874         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6875
6876 2003-01-11  Paul Brook  <paul@nowt.org>
6877
6878         * trans-array.c: Various documentation/comment changes.
6879         * trans-stmt.c: Ditto.
6880
6881
6882 2003-01-10  Paul Brook  <paul@nowt.org>
6883
6884         * options.c/h: Add -fdump-parse-tree as alias of -v.
6885
6886 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6887
6888         * dump-parse-tree.c (g95_show_namespace): Fixed another
6889         typo.  Sorry, it's Friday...
6890
6891 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6892
6893         Spotted by Tobi:
6894         * trans-array.c, trans-array.h, trans.c, trans-const.c,
6895         trans-const.h, trans-decl.c, trans-expr.c, trans.h
6896         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6897         trans-types.c: Fix bogus copyright years, add 2003.
6898         * trans-types.h: Give copyright header.
6899
6900 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6901
6902         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6903         * expr.c, options.c, scanner.c: Add some more 'const' markers.
6904         * intrinsic.c: Some constant strings moved to read-only memory.
6905         * io.c (format_asterisk): Move to...
6906         * g95.h: ...here.
6907
6908 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6909
6910         * dump-parse-tree.c (g95_show_namespace): Dump implicit
6911         types for ranges instead of per-letter.  Indent the
6912         'CONTAINS' just like everything else.
6913         * resolve.c (resolve_contained_functions): Clarify comment.
6914         Explain non-obvious conditional expression.  Improve
6915         diagnostics if tyoe cannot be resolved.
6916         Port semi-fix from Andy's tree:
6917         (was_declared): Move up before first use.
6918         (generic_sym, specific_sym): New functions.  Code moved
6919         out if procedure_kind.
6920         (procedure_kind): Simplify using new functions.
6921         (resolve_generic_f): Make sure the functions we find in
6922         a parent namespace is generic.
6923         (resolve_specific_f): Ditto for specific functions.
6924
6925 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6926
6927         * trans-stmt.c, trans.c: Fix some code style issues. Add
6928         some more comment (but still not enough!).
6929
6930 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6931
6932         * symbol.c (flavors, procedures, intents, acces_types,
6933         access_types, ifsrc_types): Make const.
6934         * misc.c (g95_string2code): Make 'm' param 'const'.
6935         * module.c (find_enum, write_atom, mio_name): Make
6936         'm' param 'const'.
6937         (attr_bits, bt_types, array_spec_types, array_ref_types,
6938         ref_types, expr_types): Make const.
6939         * g95.h: Adjust external decls.
6940
6941 2003-01-09  Paul Brook  <paul@nowt.org>
6942
6943         * Testsuite: Add a load of new cases.
6944
6945 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6946
6947         * Make-file.in: Add dependency on back end header files;
6948         a parallel build should work now.
6949         * f95-lang-c (lang_identifier): Remove bogus comment.
6950         (g95_be_parse_file): Fix prototype.
6951         (g95_init): Make static.
6952         (g95_finish): Make static.
6953         * error.c (g95_syntax_error): Kill. Make define in...
6954         * g95.h (g95_syntax_error): Define.
6955         (g95.options): Make 'source' member 'const'.
6956         * interface.c (g95_match_interface): Explain
6957         hard-to-read condition.
6958         (g95_match_end_interface): Ditto.
6959         * trans_const.c (g95_build_string_const): Make 's' parameter
6960         'const'.
6961         * trans_const.h: Adjust protoype accordingly.
6962         * trans-decl.c: Include tree-dump.h
6963         (g95_generate_function_code): Build fixes for recent changes
6964         in the tree-ssa branch.
6965
6966 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6967
6968         * format.c: Kill, move code from here...
6969         * io.c: ...to here.
6970         * Make-lang.in: Adjust.
6971         * MANIFEST: Ditto.
6972         * match.h: Ditto.
6973         * BUGS: Mention where to submit bugs.  Move old content...
6974         * TODO: ...to here.  New file.
6975
6976 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6977         Fix most warnings, and suppress the ones we can't fix for now.
6978         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6979         these warnings just clutter the screen and there's not much
6980         we can do about them for now anyway.
6981         * check.c, iresolve.c: Mark unused function parameters.
6982         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6983         they should be resolved before they get here.
6984         * error.c: Remove unused FILE *status_out.
6985         * f95-lang.c (g95_init): Remove bogus cast.
6986         * Many files: Make things 'const' where required.
6987         * g95.h: Fix prototypes for all modified functions above.
6988         (g95_options): Remove 'object' member.
6989
6990 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6991
6992         * Make-file.in: Cleanup bogus targets.  Add more comment.
6993         * lang-options.h: New option '-w'.
6994         * g95.h: add no_options field to struct g95_options.
6995         * options.c (g95_init_options): Default no_warnings to off.
6996         (g95_parse_arg): Recognise the '-w' switch and its alias,
6997         '-fno-warnings'.
6998         * error.c (g95_warning, g95_warning_now): Don't emit warning if
6999         no_warning option is set.
7000         * iresolve.c (g95_resolve_shape): Fix warning.
7001
7002 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7003
7004         * primary.c (g95_next_string_char): Rename next_string_char, and
7005         make static.  Adjust callers accordingly.
7006         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
7007         callers accordingly.
7008         * g95.h: Split out all g95_match* functions to...
7009         * match.h: ...here. New file.
7010         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7011         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7012
7013 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7014
7015         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7016         g95_merge_new_implicit): New functions.
7017         (g95_match_implicit_none, g95_match_implicit): Move from here...
7018         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7019         Modify to use the new functions in symbol.c.
7020         * g95.h: Add and move prototypes.
7021
7022 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7023
7024         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7025         node compare function.
7026         (g95_insert_bbt): Likewise.
7027         (g95_insert_bbt_with_overlap): Likewise.
7028         (g95_delete_bbt): Likewise.
7029         (delete_treap): Likewise. Also fix a potential bug when calling it.
7030         * module.c (compare_pointers): Change proto to compare_fn.
7031         (compare_integers): Likewise.
7032         (compare_true_names): Likewise.
7033         (find_true_name): Adjust call to compare_true_names to match proto.
7034         (require_atom, write_atom, mio_name): Fix 'const' warnings.
7035         (init_pi_tree): Make compare a compare_fn instead of (int *).
7036         * resolve.c (compare_cases): Change proto to compare_fn.
7037         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7038         it static, and rename to compare_symtree.
7039         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7040         function.
7041         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7042         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7043
7044 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7045         * Make-lang.in: Fix spaces/tabs issues from previous patch.
7046         * patch.options: Blow away Paul's checkin mistake :-)
7047         * io.c (terminate_io): Fix memory leak (Arnaud).
7048
7049 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7050
7051         * Make-lang.in: Teach about building DVI, info manual.
7052         * g95.texi: New file.
7053
7054 2003-01-02  Paul Brook  <paul@nowt.org>
7055
7056         * trans-array.c (g95_reverse_ss): Make static and don't use.
7057         (g95_conv_ss_descriptor): Don't use g95_loopinfo
7058         (g95_conv_array_parameters): Modify for pointer assignments.
7059         (g95_walk_subexpr): New function.
7060         (g95_walk_expr*): Use it.
7061         * trans-array.h (g95_reverse_ss): Remove prototype.
7062         * trans-expr.c (g95_trans_pointer_assign): Implement.
7063         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7064         * trans-intrinsic.c: Sync with scalarizer changes.
7065         * trans-io.c: Ditto.
7066
7067 2002-12-29  Paul Brook  <paul@nowt.org>
7068
7069         * trans-array.c: Document calling convention for arrays.
7070
7071 2002-12-19  Paul Brook  <paul@nowt.org>
7072
7073         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7074         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7075         optional parameters for some intrinsics.
7076         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7077         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7078         optional parameters.
7079         * trans.h (g95_se): Add ignore_optional flag.
7080
7081 2002-12-15  Paul Brook  <paul@nowt.org>
7082
7083         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7084         * trans-decl.c (g95_generate_function_code): Use TDI_original.
7085
7086 2002-12-14  Paul Brook  <paul@nowt.org>
7087
7088         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7089
7090 2002-12-12  Paul Brook  <paul@nowt.org>
7091
7092         * trans-array.c (g95_trans_array_constructor_subarray): Fully
7093         initialize the scalarizer.
7094         (various): Update to new format of g95_expr->value.constructor.
7095
7096 2002-12-08  Paul Brook  <paul@nowt.org>
7097
7098         * trans-array.c (g95_put_offset_into_var): New function.
7099         (g95_trans_array_constructor_subarray): New function.
7100         (g95_trans_array_constructor_value): Use it.
7101         (g95_array_cons_size): Don't abort() on array components.
7102
7103 2002-12-08  Paul Brook  <paul@nowt.org>
7104
7105         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7106         * support.c: Update #includes.
7107         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7108         * trans-array.c: Update #includes.
7109         * trans.c: Ditto.
7110         * trans-const.c: Ditto.
7111         * trans-io.c: Ditto.
7112         * trans-types.c: Ditto.
7113         (g95_init_types): Set size_type_node.
7114         * trans-decl.c: Update #includes.
7115         (gfor_fndecl_adjust{l,r}): Declare and initialize.
7116         * trans-stmt.c: Update #includes.
7117         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7118         (g95_trans_select): Fix check for unbounded ranges.
7119         * trans-expr.c: Update #includes.
7120         (g95_conv_string_tmp): New function.
7121         (g95_conv_concat_op): Use it.
7122         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7123         * Trans-intrisic.c: Update #includes.
7124         (g95_conv_intrinsic_strcmp): New function.
7125         (g95_conv_intrinsic_adjust): Ditto.
7126         (g95_conv_intrinsic_function: Use them.
7127
7128 2002-11-30  Paul Brook  <paul@nowt.org>
7129
7130         * trans-array.c (g95_walk_function_expr): Handle non-array return by
7131         reference.
7132         * trans-dec.c (g95_build_function_decl): Handle character return
7133         parammeters.
7134         (g95_get_fake_result_decl): Ditto.
7135         (g95_trans_deferred_vars): Ditto.
7136         * trans-expr.c (g95_conv_function_call): Ditto.
7137         (g95_trans_arrayfunc_assign) Limit to array valued functions.
7138         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7139         (g95_conv_intrinsic_function): Use it.
7140         * trans-types.c (g95_sym_type): Handle functions returning strings.
7141         (g95_return_by_reference): Ditto.
7142         (g95_get_function_type): Ditto.
7143
7144 2002-11-18  Paul Brook  <paul@nowt.org>
7145
7146         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7147         requires a temporary.
7148         (g95_trans_select): Handle computed gotos.
7149         * trans-types.c (g95_build_array_type): Warn about non-functional
7150         assumed shape arrays.
7151         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7152         blocks.
7153         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7154         (g95_conv_intrinsic_int): New function.
7155         (g95_conv_intrinsic_mod): New function.
7156         (g95_conv_intrinsic_ichar): New function.
7157         (g95_conv_intrinsic_function): Use them.
7158         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7159
7160 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
7161
7162         * trans-types.c (g95_build_array_type): Assumed
7163         sized arrays can have rank > 1.
7164         * trans.c (g95_trans_code): Remove erroneous
7165         warning about CONTINUE.
7166         * trans-expr.c (g95_conv_variable): Remove
7167         erroneous assert.
7168
7169 2002-11-15  Paul Brook  <paul@nowt.org>
7170
7171         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7172
7173 2002-10-31  Paul Brook  <paul@nowt.org>
7174
7175         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7176         * trans-expr.c (g95_conv_component_ref): Handle character string
7177         components.
7178         (g95_conv_string_parameter): Ditto.
7179         * trans-types.c (g95_get_derived_type): Add length decl to caracter
7180         string components.
7181
7182 2002-10-10  Paul Brook  <paul@nowt.org>
7183
7184         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7185         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7186         check.
7187         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7188         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7189         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7190         * trans-types.c (pvoid_type_node): Declare and initialize.
7191         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7192         (g95_array_allocate): Fix when base==data.
7193         (g95_conv_array_parameter): Correctly handle reduced rank sections.
7194         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7195
7196 2002-10-09  Paul Brook  <paul@nowt.org>
7197
7198         * (g95_conv_expr_reference): Handle character strings correctly.
7199
7200 2002-10-07  Paul Brook  <paul@nowt.org>
7201
7202         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7203         langhook.
7204         * trans-array.c (g95_build_array_initializer): Remove.
7205         (g95_conv_array_initializer): New Function.
7206         (g95_trans_auto_arry_allocation): Cleanup.
7207         (g95_trans_init_character_array): Remove.
7208         * g95spec.c: Link in libgforbegin.
7209         * trans.c (g95_generate_code): Rename main function to MAIN__.
7210         (g95_create_var): New function.
7211         (g95_create_var_np): New function.
7212         (g95_evaluate_now): New function.
7213         (g95_start_block): New function.
7214         (g95_finish_block): New function.
7215         (g95_add_expr_to_block): New function.
7216         (g95_add_block_to_block): New function.
7217         * trans-expr.c (g95_conv_componen_ref): New function.
7218         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7219         (F95_OBJS): Add dependency.o.
7220         * f95-lang.c (g95_is_simple_stmt): Remove.
7221         * f95-tree.c (mark_not_simple): New function.
7222         (unshare_all_trees): New function.
7223         (create_tmp_var, create_tmp_alias_var): Remove.
7224         * support.c (declare_tmp_vars, tree_last_decl): Remove.
7225         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
7226         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7227
7228 2002-10-01  Paul Brook  <paul@nowt.org>
7229
7230         * trans-array.c: Add support for descriptorless arrays.
7231         (g95_conv_array_data): New function.
7232         (g95_conv_array_base): New function.
7233         * trans-array.h: Declare these here.
7234         * trans-decl.c(g95_create_mopdule_variable): Perform variable
7235         initialization and creation here.
7236         (g95_create_module_vars): Instead of here.
7237         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7238         * trans-intrinsic.c: Ditto.
7239         * trans-types.c (g95_is_nodesc_array): New function.
7240         (g95_get_nodesc_array_type): New function.
7241         (g95_sym_type, g95_get_derived_type): Use them.
7242         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7243
7244 2002-09-28  Paul Brook  <paul@nowt.org>
7245
7246         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7247         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7248         parameters.
7249
7250 2002-09-24  Paul Brook  <paul@nowt.org>
7251
7252         * f95-lang.c (listify): Remove declaration.
7253         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7254         (listify)
7255         * f95-tree.c (get_name): New function.
7256         * trans.c (module_namespace): Remove.
7257         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7258         * trans-types.c: Ditto.
7259
7260 2002-09-19  Paul Brook  <paul@nowt.org>
7261
7262         * trans-array.c (g95_get_array_cons_size): New Function.
7263         (g95_con_ss_startstride): Handle Array constructors.
7264         (g95_conv_loop_setup): Ditto.
7265         (g95_conv_array_parameter): Ditto.
7266         * tras-decl.c (g95_finish_var_decl): Make initializes variables
7267         static.
7268
7269 2002-09-19  Paul Brook  <paul@nowt.org>
7270
7271         * trans.c (g95_simple_fold_tmp): Detect variables inside
7272         NON_LVALUE_EXPR.
7273         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7274
7275 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
7276
7277         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7278
7279 2002-09-14  Paul Brook  <paul@nowt.org>
7280
7281         * trans.c (g95_create_module_variable): Move to trans-decl.c.
7282         * trans-const.c (g95_conv_string_init): New Function.
7283         * trans-const.h: Declare it.
7284         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7285         variables. Don't bail on intrinsic symbols.
7286         (get_extern_function_decl): Handle specific intrinsic functions.
7287         * trans-types.c (g95_sym_type): Dummy functions don't return
7288         reference types.
7289         * trans-array.c (g95_build_array_initializer): New Function.
7290         (g95_trans_auto_array_allocation): Build initializer for static decls.
7291         Don't use mpz_addmul, it's GMP4 only.
7292
7293 2002-09-12  Paul Brook  <paul@nowt.org>
7294
7295         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7296         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7297         assembler names for module procedures.
7298
7299 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
7300
7301         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7302         dependency/
7303
7304 2002-09-10  Paul Brook  <paul@nowt.org>
7305
7306         * trans-array.c: Change format of G95_SS_TEMP strictures.
7307         (g95_check_fncall_dependancy): New function.
7308         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7309         offsets.
7310         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7311         result variables.
7312         (g95_build_function_decl): Don't assume result arrays are packed.
7313         (g95_trans-deferred-vars): Handle array result variables.
7314         (g95_generate_fuction_code): Clear saved_function_decls.
7315         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7316         reference.
7317         (g95_trans_arrayfunc_assign): New function.
7318         (g95_trans_assignment): Use it.
7319         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7320         (g95_se): Add direct_byref.
7321         * trans-types.c: Use sym->result rather than sym where appropriate.
7322         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7323         Update other functions to use this.
7324         (g95_is_intrinsic_libcall): New function.
7325         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7326         (g95_walk_intrinsic_function): Ditto.
7327
7328 2002-09-08  Paul Brook  <paul@nowt.org>
7329
7330         * trans-types.c: Change rank field to dtype field in array descriptor.
7331         * trans-array.c: Implement filling of dtype array descriptor field.
7332         * trans-intrinsic.c: Fix broken LEN intrinsic.
7333
7334 2002-09-07  Paul Brook  <paul@nowt.org>
7335
7336         * trans-intrinsic.c: Remove outdated todo intrinsic list.
7337         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7338         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7339
7340 2002-09-06  Paul Brook  <paul@nowt.org>
7341
7342         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7343         (gt-f95-trans-types.h): Add dependancy information.
7344         * config-lang.in (gtfiles): Add trans-types.c
7345         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7346         back to top-level code.
7347         * trans-array.c, trans-types.c: Change format of array descriptor.
7348         (g95_conv_descriptor_dimension): New function.
7349         * trans-types.h (g95_conv_descriptor_rank): define.
7350         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7351         intrinsics.
7352
7353 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7354
7355         * trans-array.c, trans-types.c: Add rank information to descriptor.
7356
7357 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
7358
7359         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7360
7361 2002-09-04  Paul Brook  <paul@nowt.org>
7362
7363         * f95-lang.c (g95_create_decls): New function.
7364         (g95_init):  Move initialization of external decls to above, and call
7365         from g95_be_parse_file.
7366         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7367         * trans-types.c (g95_init_types): Always name integer and char types.
7368         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7369
7370 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7371
7372         * Make-lang.in: Add options.c to F95_PARSER_OBJS
7373
7374 2002-09-02  Paul Brook  <paul@nowt.org>
7375
7376         * g95_generate_code: Clear the attr for __fortran_main.
7377         * trans-types.c (g95_finish_type): New function.
7378         * g95_init_io_state_type: Use g95_finish_type.
7379         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7380
7381 2002-09-01  Paul Brook  <paul@nowt.org>
7382
7383         * README.backend: Warn about the dangers of extra config.h files.
7384         Remove obsolete libgfor stuff.
7385         * config-lang.in: Add target-libgfor dependancy.
7386         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7387
7388 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
7389
7390         * g95_conv_mpz_to_tree: Free storage pointed to by q,
7391         not by buff.
7392
7393 2002-08-30  Paul Brook  <paul@nowt.org>
7394
7395         * trans-intrinsic.c (g95_conv_intrinsic_function,
7396         g95_walk_intrinsic_function): Added ANY and ALL.
7397         (g95_conv_intrinsic_anyall): New function.
7398         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
7399         mangled name