OSDN Git Service

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