OSDN Git Service

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