OSDN Git Service

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