OSDN Git Service

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