OSDN Git Service

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