OSDN Git Service

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