OSDN Git Service

PR fortran/23677
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
2
3         PR fortran/23677
4         * symbol.c (gfc_is_var_automatic): Return true if character length
5         is non-constant rather than constant.
6         * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
7         here.
8         * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
9         to 0 for -fno-automatic.
10
11 2005-09-23  Paul Thomas  <pault@gcc.gnu.org>
12
13         PR fortran/16861
14         * module.c (mio_component_ref): Return if the symbol is NULL
15         and wait for another iteration during module reads.
16         (mio_symtree_ref): Suppress the writing of contained symbols,
17         when a symbol is available in the main namespace.
18         (read_module): Restrict scope of special treatment of contained
19         symbols to variables only and suppress redundant call to
20         find_true_name.
21
22 2005-09-22  Steven G. Kargl  <kargls@comcast.net>
23
24         PR fortran/24005
25         * interface.c (check_interface1): Fix NULL dereference.
26
27 2005-09-22  Erik Edelmann  <erik.edelmann@iki.fi>
28
29         PR fortran/23843
30         * resolve.c (derived_inaccessible): New function.
31         (resolve_transfer): Use it to check for private
32         components.
33
34 2005-09-22  Steven G. Kargl  <kargls@comcast.net>
35
36         PR fortran/23516
37         * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
38         intrinsics.
39         * intrinsic.h: Prototypes for gfc_simplify_realpart and
40         gfc_resolve_realpart.
41         * intrinsic.texi: Document intrinsic procedures.
42         * simplify.c (gfc_simplify_realpart): New function.
43         * irseolve.c (gfc_resolve_realpart): New function.
44
45 2005-09-21  Erik Edelmann  <erik.edelmann@iki.fi>
46
47         PR fortran/19929
48         * trans-stmt.c (gfc_trans_deallocate): Check if the 
49         object to be deallocated is an array by looking at 
50         expr->rank instead of expr->symtree->n.sym->attr.dimension.
51
52 2005-09-20  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
53
54         PR fortran/23420
55         * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
56         (match_io): Fix usage of gfc_find_symbol.
57
58 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
59
60         PR fortran/23663
61         * primary.c (match_actual_arg): Handle ENTRY the same way
62         as FUNCTION.
63
64 2005-09-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
65
66         * Make-lang.in: Make check-fortran alias for check-gfortran.
67
68 2005-09-18  Andreas Jaeger  <aj@suse.de>
69
70         * module.c (read_module): Add missed line from last patch.
71
72 2005-09-18  Erik Edelmann  <erik.edelmann@iki.fi>
73
74         PR fortran/15975
75         * resolve.c (resolve_symbol): Don't assign default
76         initializer to pointers.
77
78 2005-09-18  Paul Thomas  <pault@gcc.gnu.org>
79
80         PR fortran/16861
81         * module.c (read_module): Give symbols from module procedures
82         different true_name entries to those from the module proper.
83
84 2005-09-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
85
86         PR fortran/15586
87         * arith.c (gfc_arith_error): Add translation support for error
88         messages.
89         * array.c (gfc_match_array_ref): Likewise.
90         (gfc_match_array_spec): Likewise.
91         * check.c (must_be): Add msgid convention to third argument.
92         (same_type_check): Add translation support for error message.
93         (rank_check): Likewise.
94         (kind_value_check): Likewise.
95         (gfc_check_associated): Correct typo.
96         (gfc_check_reshape): Add translation support for error message.
97         (gfc_check_spread): Likewise.
98         * error.c (error_printf): Add nocmsgid convention to argument.
99         (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
100         (gfc_error, gfc_error_now): Likewise.
101         (gfc_status): Add cmsgid convention to argument.
102         * expr.c (gfc_extract_int): Add translation support for error
103         messages.
104         (gfc_check_conformance): Add msgid convention to argument.
105         (gfc_check_pointer_assign): Correct tabbing.
106         * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
107         * gfortranspec.c: Include intl.h header.
108         (lang_specific_driver): Add translation support for --version.
109         * io.c (check_format): Add translation support for error message.
110         (format_item_1): Likewise.
111         (data_desc): Likewise.
112         * matchexp.c: Likewise.
113         * misc.c (gfc_article): Remove function.
114         * module.c (bad_module): Use msgid convention. Add translation support
115         for error messages.
116         (require_atom): Add translation support for error messages.
117         * parse.c (gfc_ascii_statement): Likewise.
118         (gfc_state_name): Likewise.
119         * primary.c (match_boz_constant): Reorganise error messages for
120         translations.
121         * resolve.c (resolve_entries): Likewise.
122         (resolve_operator): Add translation support for error messages.
123         (gfc_resolve_expr): Use msgid convention. Reorganise error messages
124         for translations.
125         (resolve_symbol): Add translation support for error messages.
126         * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
127         * trans-const.c (gfc_build_string_const): Use msgid convention.
128
129 2005-09-16  Paul Brook  <paul@codesourcery.com>
130
131         PR fortran/23906
132         * dependency.c (transform_sections): Divide by correct value.
133         Elaborate comment.
134
135 2005-09-14  Paul Thomas  <pault@gcc.gnu.org>
136
137         PR fortran/21875 Internal Unit Array I/O, NIST
138         * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
139         array descriptor to IOPARM structure.
140         * fortran/trans-io.c (set_internal_unit): New function to generate code
141         to store the character (array) and the character length for an internal
142         unit.
143         * fortran/trans-io (build_dt): Use the new function set_internal_unit.
144         
145 2005-09-14  Paul Thomas  <pault@gcc.gnu.org>
146
147         PR fortran/19358
148         * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
149         which uses dim[i].upper for lbound, rather than dim[i].lower.
150
151 2005-09-13  Erik Edelmann  <erik.edelmann@iki.fi>
152
153         PR fortran/17740
154         * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
155         of attr.elemental for specific function instead of generic name.
156
157 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
158
159         PR fortran/18899
160         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
161         of argse.  Remove now-redundant want_pointer assignment.
162         * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
163         a pointer, keep the original bounds of a full array reference.
164
165 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
166
167         PR target/19269
168         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
169         (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
170         (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
171         for character-based operations.
172         (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
173         (gfc_resolve_unpack): Copy the whole typespec from the vector.
174         * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
175         case, get the string length from the scalarization state.
176
177 2005-09-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
178
179         * Make-lang.in: Change targets prefixes from f95 to fortran.
180         * config-lang.in: Change language name to "fortran".
181         * lang.opt: Change language name to "fortran".
182         * options.c: Change CL_F95 to CL_Fortran.
183
184 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
185
186         gfortran.texi:  Document IOSTAT= specifier.
187
188 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
189
190         * gfortran.h:  Add iomsg to gfc_open, gfc_close, gfc_filepos,
191         gfc_inquire and gfc_dt.
192         * dump-parse-tree.c (gfc_show_code_node):  Add iomsg
193         for open, close, file positioning, inquire and namelist.
194         * io.c (io_tag):  Add tag_iomsg.
195         (resolve_tag): Add standards warning for iomsg.
196         (match_open_element):  Add iomsg.
197         (gfc_free_open):  Add iomsg.
198         (gfc_resolve_open):  Add iomsg.
199         (gfc_free_close):  Add iomsg.
200         (match_close_element):  Add iomsg.
201         (gfc_resolve_close):  Add iomsg.
202         (gfc_free_filepos):  Add iomsg.
203         (match_file_element):  Add iomsg.
204         (gfc_resolve_filepos):  Add iostat and iomsg.
205         (match-dt_element):  Add iomsg.
206         (gfc_free_dt):  Add iomsg.
207         (gfc_resolve_dt):  Add iomsg.
208         (gfc_free_inquire):  Add iomsg.
209         (match_inquire_element):  Add iomsg.
210         (gfc_resolve_inquire):  Add iomsg.
211         * trans_io.c:  Add ioparm_iomsg and ioparm_iomsg_len.
212         (gfc_build_io_library_fndecls):  Add iomsg as last field.
213         (gfc_trans_open):  Add iomsg.
214         (gfc_trans_close):  Add iomsg.
215         (build_fileos):  Call set_string for iomsg.
216         (gfc_trans_inquire):  Add iomsg.
217         (build_dt):  Add iomsg.
218
219 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
220
221         * match.h (gfc_match_equiv_variable): Declare.
222
223 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
224
225         PR fortran/19239
226         * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
227         * dependency.h (gfc_ref_needs_temporary_p): Declare.
228         * dependency.c (gfc_ref_needs_temporary_p): New function.
229         (gfc_check_fncall_dependency): Use it instead of inlined check.
230         By so doing, take advantage of the fact that character substrings
231         within an array reference also need a temporary.
232         * trans.h (GFC_SS_VECTOR): Adjust comment.
233         * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
234         (gfc_set_vector_loop_bounds): New function.
235         (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
236         a GFC_SS_SECTION.  Deal with the GFC_SS_VECTOR case by evaluating
237         the vector expression and caching its descriptor for use within
238         the loop.
239         (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
240         (gfc_conv_array_index_offset): Handle scalar, vector and range
241         dimensions as separate cases of a switch statement.  In the vector
242         case, use the loop variable to calculate a vector index and use the
243         referenced element as the dimension's index.  Perform bounds checking
244         on this final index.
245         (gfc_conv_section_upper_bound): Return null for vector indexes.
246         (gfc_conv_section_startstride): Give vector indexes a start value
247         of 0 and a stride of 1.
248         (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
249         (gfc_conv_expr_descriptor): Expand comments.  Generalize the
250         handling of the !want_pointer && !direct_byref case.  Use
251         gfc_ref_needs_temporary_p to decide whether the variable case
252         needs a temporary.
253         (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
254         GFC_SS_VECTOR index.
255         * trans-expr.c: Include dependency.h.
256         (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
257
258 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
259
260         PR fortran/21104
261         * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
262         from trans-expr.c.
263         (gfc_init_interface_mapping, gfc_free_interface_mapping)
264         (gfc_add_interface_mapping, gfc_finish_interface_mapping)
265         (gfc_apply_interface_mapping): Declare.
266         * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
267         (gfc_trans_allocate_temp_array): Add pre and post block arguments.
268         * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
269         (gfc_trans_allocate_array_storage): Replace loop argument with
270         separate pre and post blocks.
271         (gfc_trans_allocate_temp_array): Add pre and post block arguments.
272         Update call to gfc_trans_allocate_array_storage.
273         (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
274         interface to gfc_trans_allocate_temp_array.
275         * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
276         Moved to trans.h.
277         (gfc_init_interface_mapping, gfc_free_interface_mapping)
278         (gfc_add_interface_mapping, gfc_finish_interface_mapping)
279         (gfc_apply_interface_mapping): Make extern.
280         (gfc_conv_function_call): Build an interface mapping for array
281         return values too.  Call gfc_set_loop_bounds_from_array_spec.
282         Adjust call to gfc_trans_allocate_temp_array so that code is
283         added to SE rather than LOOP.
284
285 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
286
287         PR fortran/12840
288         * trans.h (gfor_fndecl_internal_realloc): Declare.
289         (gfor_fndecl_internal_realloc64): Declare.
290         * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
291         (gfor_fndecl_internal_realloc64): New variable.
292         (gfc_build_builtin_function_decls): Initialize them.
293         * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
294         * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
295         to say whether the array can grow later.  Don't allocate the array
296         on the stack if so.  Don't call malloc for zero-sized arrays.
297         (gfc_trans_allocate_temp_array): Add a similar argument here.
298         Pass it along to gfc_trans_allocate_array_storage.
299         (gfc_get_iteration_count, gfc_grow_array): New functions.
300         (gfc_iterator_has_dynamic_bounds): New function.
301         (gfc_get_array_constructor_element_size): New function.
302         (gfc_get_array_constructor_size): New function.
303         (gfc_trans_array_ctor_element): Replace pointer argument with
304         a descriptor tree.
305         (gfc_trans_array_constructor_subarray): Likewise.  Take an extra
306         argument to say whether the variable-sized part of the constructor
307         must be allocated using realloc.  Grow the array when this
308         argument is true.
309         (gfc_trans_array_constructor_value): Likewise.
310         (gfc_get_array_cons_size): Delete.
311         (gfc_trans_array_constructor): If the loop bound has not been set,
312         split the allocation into a static part and a dynamic part.  Set
313         loop->to to the bounds for static part before allocating the
314         temporary.  Adjust call to gfc_trans_array_constructor_value.
315         (gfc_conv_loop_setup): Allow any constructor to determine the
316         loop bounds.  Check whether the constructor has a dynamic size
317         and prefer to use something else if so.  Expect the loop bound
318         to be set later.  Adjust call to gfc_trans_allocate_temp_array.
319         * trans-expr.c (gfc_conv_function_call): Adjust another call here.
320
321 2005-09-09  Paul Thomas  <pault@gcc.gnu.org>
322
323         PR fortran/18878
324         * module.c (find_use_name_n): Based on original
325         find_use_name. Either counts number of use names for a
326         given real name or returns use name n.
327         (find_use_name, number_use_names): Interfaces to the
328         function find_use_name_n.
329         (read_module): Add the logic and calls to these functions,
330         so that mutiple reuses of the same real name are loaded.
331
332 2005-09-09  Paul Thomas  <pault@gcc.gnu.org>
333
334         PR fortran/22304
335         PR fortran/23270
336         PR fortran/18870
337         PR fortran/16511
338         PR fortran/17917
339         * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
340         common.c so that it is accessible to module.c. Add common_head
341         field to gfc_symbol structure. Add field for the equivalence
342         name AND new attr field, in_equivalence.
343         * match.c (gfc_match_common, gfc_match_equivalence): In loops
344         that flag common block equivalences, emit an error if the
345         common blocks are different, using sym->common_head as the
346         common block identifier. Ensure that symbols that are equivalence
347         associated with a common block are marked as being in_common.
348         * module.c (write_blank_common): New.
349         (write_common): Use unmangled common block name.
350         (load_equiv): New function ported from g95.
351         (read_module): Call load_equiv.
352         (write_equiv): New function ported from g95. Correct
353         string referencing for gfc functions. Give module
354         equivalences a unique name.
355         (write_module): Call write_equiv and write_blank_common.
356         * primary.c (match_variable) Old gfc_match_variable, made
357         static and third argument provided to indicate if parent
358         namespace to be visited or not.
359         (gfc_match_variable) New. Interface to match_variable.
360         (gfc_match_equiv_variable) New. Interface to match_variable.
361         * trans-common.c (finish_equivalences): Provide the call
362         to create_common with a gfc_common_header so that
363         module equivalences are made external, rather than local.
364         (find_equivalences): Ensure that all members in common block
365         equivalences are marked as used. This prevents the subsequent
366         call to this function from making local unions.
367         * trans-decl.c (gfc_generate_function_code): Move the call to
368         gfc_generate_contained_functions to after the call to
369         gfc_trans_common so the use-associated, contained common
370         blocks produce the correct references.
371         (gfc_create_module_variable): Return for equivalenced symbols
372         with existing backend declaration.
373
374 2005-09-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
375
376         PR fortran/23765
377         * match.c (gfc_match_common): Remove unnecessary / wrong special
378         cases for end-of-statement.
379
380 2005-09-08  Janne Blomqvist  <jblomqvi@cc.hut.fi>
381
382         * gfortran.texi: Add section about implemented F2003 features.
383
384 2005-09-08  Richard Sandiford  <richard@codesourcery.com>
385
386         PR fortran/15326
387         * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
388         the GFC_SS_FUNCTION case too.
389         * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
390         to function pointers as well as function decls.
391         (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
392         (gfc_init_interface_mapping, gfc_free_interface_mapping)
393         (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
394         (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
395         (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
396         (gfc_apply_interface_mapping_to_ref)
397         (gfc_apply_interface_mapping_to_expr)
398         (gfc_apply_interface_mapping): New functions.
399         (gfc_conv_function_call): Evaluate the arguments before working
400         out where the result should go.  Make the null pointer case provide
401         the string length in parmse.string_length.  Cope with non-constant
402         string lengths, using the above functions to evaluate such lengths.
403         Use a temporary typespec; don't assign to sym->cl->backend_decl.
404         Don't assign to se->string_length when returning a cached array
405         descriptor.
406
407 2005-09-08  Richard Sandiford  <richard@codesourcery.com>
408
409         PR fortran/19928
410         * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
411         after handling scalarized references.  Make "indexse" inherit from
412         "se" when handling AR_ELEMENTs.
413         (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
414         substring or scalar reference that follows an array section.
415         * trans-expr.c (gfc_conv_variable): When called from within a
416         scalarization loop, start out with "ref" pointing to the scalarized
417         part of the reference.  Don't call gfc_advance_se_ss_chain here.
418
419 2005-09-07  Richard Sandiford  <richard@codesourcery.com>
420
421         PR fortran/23373
422         * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
423         descriptor if the rhs is not a null pointer or variable.
424
425 2005-09-07  Thomas Koenig  <Thomas.Koenig@online.de>
426
427         PR fortran/20848
428         * symbol.c(check_conflict):  Add conflict for parameter/save,
429
430 2005-09-06  Richard Sandiford  <richard@codesourcery.com>
431
432         PR fortran/19269
433         * simplify.c (gfc_simplify_transpose): Set the result's typespec from
434         the source, not the first element of the return value.
435
436 2005-09-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
437
438         PR fortran/23661
439         * io.c (match_io): Correctly backup if PRINT followed by
440         symbol which is not a namelist.  Force blank between PRINT
441         and namelist in free form.
442
443 2005-08-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
444
445         PR fortran/20592
446         * gfortran.h (gfc_option_t): Add flag_automatic.
447         * invoke.texi: Document the -fno-automatic option.
448         * lang.opt: Add a -fautomatic option.
449         * options.c (gfc_init_options): Default for -fautomatic is on.
450         (gfc_handle_option): Add handling of -fautomatic option.
451         * resolve.c (gfc_resolve): When -fno-automatic is used, mark
452         needed variables as SAVE.
453
454 2005-08-27  Erik Edelmann  <erik.edelmann@iki.fi>
455
456         * trans-array.c (gfc_trans_deferred_array): Fix comments.
457
458 2005-08-27  Erik Schnetter  <schnetter@aei.mpg.de>
459
460         * primary.c (match_charkind_name): Fix typo in comment leading to
461         function.
462
463 2005-08-25  Erik Edelmann  <eedelman@acclab.helsinki.fi>
464
465         PR fortran/20363
466         * symbol.c (find_special): Remove.
467         (build_sym, add_init_expr, attr_decl1): Remove calls to
468         find_special in favor of calls to gfc_get_symbol.
469
470 2005-08-24  Thomas Koenig  <Thomas.Koenig@online.de>
471
472         PR fortran/17758
473         * gfortran.h (symbol_attribute):  Add noreturn to the structure.
474         (gfc_intrinsic_sym):  Add noreturn to the structure.
475         * intrinsic.c (make_noreturn):  New function.
476         (add_subroutines):  Mark subroutines abort and exit as noreturn.
477         (gfc_intrinsic_sub_interface):  Copy noreturn attribute from
478         isym to the resolved symbol.
479         * trans-decl.c (gfc_get_extern_function_decl): Set function
480         as VOLATILE (== noreturn) if the noreturn attribute is set.
481
482 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
483
484         * decl.c: Typo in comment.
485
486 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
487
488         * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
489
490 2005-08-21  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
491
492         * gfortran.h (gfc_option_t): Remove source field.  Add
493         flag_d_lines field.
494         (gfc_new_file): Remove arguments in prototype.
495         (gfc_source_file): Make 'const char *'.
496         * f95-lang.c (gfc_init): Use gfc_source_file instead of
497         gfc_option.source.  Call gfc_new_file without arguments.
498         * invoke.texi: Document new options '-fd-lines-as-code' and
499         '-fd-lines-as-comment'.
500         * lang.opt: Add new options.  Alphabetize.
501         * options.c (gfc_init_options): Initialize gfc_source_file instead
502         of gfc_option.source.  Initialize gfc_option.flag_d_lines.
503         (form_from_filename): Move here from scanner.c.  Make
504         'filename' argument 'const'.
505         (gfc_post_options): Set gfc_source_file.  Determine source form.
506         Warn if 'd-lines*' are used in free form.
507         * scanner.c (gfc_source_file): Constify.
508         (skip_fixed_comments): Deal with d-lines.
509         (get_file): Constify argument 'name'.
510         (load_file): Constify argument 'filename'.
511         (form_from_filename): Moved to options.c.
512         (gfc_new_file): Remove arguments.  Don't initialize
513         gfc_source_file, don't determine source form.
514         * trans-const.c (gfc_init_constants): Use gfc_source_file instead
515         of gfc_option.source.
516
517 2005-08-19  Steven G. Kargl  <kargls@comcast.net>
518
519         PR fortran/23065
520         * gfortran.h: Remove PATH_MAX definition.
521         * module.c (write_module, gfc_dump_module): Use alloca to allocate
522         buffers.
523         * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
524
525 2004-08-16  Huang Chun  <chunhuang73@hotmail.com>
526
527         * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
528         expand.
529
530 2005-08-14  Asher Langton  <langton2@llnl.gov>
531
532         * parse.c (match): Enclose macro in do...while(0) and braces.
533
534 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
535
536         PR fortran/21432.
537         * gfortran.texi: Document PRINT namelist.
538
539 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
540
541         PR fortran/21432.
542         * io.c (match_io): Add code to implement PRINT namelist.
543
544 2005-08-14  Canqun Yang  <canqun@nudt.edu.cn>
545
546         * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
547         labels.
548
549 2005-08-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
550             Steven Bosscher  <stevenb@suse.de>
551
552         PR libfortran/20006
553         * gfortran.h: Add is_main_program member to symbol_attribute.
554         * trans-decl: Add a gfor_fndecl_set_std tree.
555         (gfc_build_builtin_function_decls): Create it.
556         (gfc_generate_function_code): Add this call at the beginning of
557         the main program.
558         * trans.c (gfc_generate_code): Move main_program and attr.
559         * trans.h: Add declaration for gfor_fndecl_set_std.
560
561 2005-08-10  Thomas Koenig  <Thomas.Koenig@online.de>
562
563         PR libfortran/22143
564         gfortran.h:  Declare new function gfc_resolve_dim_arg.
565         resolve.c:  New function gfc_resolve_dim_arg.
566         iresolve.c (gfc_resolve_all):  Use gfc_resolve_dim_arg.
567         (gfc_resolve_any):  Likewise.
568         (gfc_resolve_count):  Likewise.
569         (gfc_resolve_cshift):  Likewise.  If the kind of shift is less
570         gfc_default_integer_kind, convert it to default integer type.
571         (gfc_resolve_eoshift):  Likewise.
572         (gfc_resolve_maxloc):  Use gfc_resolve_dim_arg.
573         (gfc_resolve_maxval):  Likewise.
574         (gfc_resolve_minloc):  Likewise.
575         (gfc_resolve_minval):  Likewise.
576         (gfc_resolve_product):  Likewise.
577         (gfc_resolve_spread):  Likewise.
578         (gfc_resolve_sum):  Likewise.
579
580 2005-08-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
581
582         * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
583         functions for new intrinsics TTYNAM and ISATTY.
584         * intrinsic.c (add_functions, add_subroutines): Add new
585         intrinsics.
586         * intrinsic.h: Add prototypes for new check and resolve
587         functions.
588         * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
589         resolve functions for intrinsics TTYNAM and ISATTY.
590         * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
591         * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
592
593 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
594
595         * scanner.c (preprocessor_line): Don't write beyond the end of flag
596         buffer.
597
598 2005-08-07   Janne Blomqvist <jblomqvi@cc.hut.fi>
599
600         PR fortran/22390 
601         * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
602         * gfortran.h: Add enums for FLUSH.
603         * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
604         comment appropriately.  (gfc_match_flush): New function.
605         * match.c (gfc_match_if): Add match for flush.
606         * match.h: Add prototype.
607         * parse.c (decode_statement): Add flush to 'f' case.
608         (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
609         * resolve.c (resolve_code): Add flush case.
610         * st.c (gfc_free_statement): Add flush case.
611         * trans-io.c: Add prototype for flush.
612         (gfc_build_io_library_fndecls): Build fndecl for flush.
613         (gfc_trans_flush): New function.
614         * trans-stmt.h: Add prototype.
615         * trans.c (gfc_trans_code): Add case for flush.
616
617 2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
618
619         * primary.c (match_hollerith_constant): Fix typo.
620
621 2005-08-06  Kazu Hirata  <kazu@codesourcery.com>
622
623         * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
624         invoke.texi, resolve.c, trans-array.c, trans-array.h,
625         trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
626         comment/doc typos.  Follow spelling conventions.
627
628 2005-08-06  Jakub Jelinek  <jakub@redhat.com>
629
630         PR fortran/18833
631         PR fortran/20850
632         * primary.c (match_varspec): If equiv_flag, don't look at sym's
633         attributes, call gfc_match_array_ref up to twice and don't do any
634         substring or component processing.
635         * resolve.c (resolve_equivalence): Transform REF_ARRAY into
636         REF_SUBSTRING or nothing if needed.  Check that substrings
637         don't have zero length.
638
639 2005-08-05  Thomas Koenig  <Thomas.Koenig@online.de>
640
641         * trans-expr.c  (gfc_build_builtin_function_decls):  Mark
642         stop_numeric and stop_string as non-returning.
643
644 2005-08-04  Paul Brook  <paul@codesourcery.com>
645
646         * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
647         (gfc_conv_expr_lhs): Fix assertion.
648         (gfc_conv_expr_val): Merge post block.  Set se.expr to new value.
649
650 2005-08-02  David Edelsohn  <edelsohn@gnu.org>
651
652         PR fortran/22491
653         * expr.c (simplify_parameter_variable): Do not copy the subobject
654         references if the expression value is a constant.
655
656         * expr.c (gfc_simplify_expr): Evaluate constant substrings.
657
658 2005-07-31  Jerry DeLisle  <jvdelisle@verizon.net>
659
660         * intrinsic.texi: Add documentation for exponent, floor, and fnum and
661         fix description of ceiling in index.
662
663 2005-07-31  Steven Bosscher  <stevenb@suse.de>
664
665         * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
666         malloc functions the 'malloc' attribute.  Give runtime_error the
667         'noreturn' attribute.
668
669 2005-07-31  Steven Bosscher  <stevenb@suse.de>
670
671         * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
672         of the assigned goto variable.
673
674 2005-07-29  Steven Bosscher  <stevenb@suse.de>
675
676         * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
677
678 2005-07-28  Andrew Pinski  <pinskia@physics.uc.edu>
679
680         * fortran/f95-lang.c (language_function): Remove
681         named_labels, shadowed_labels, returns_value, returns_abnormally,
682         warn_about_return_type, and extern_inline fields.
683         (named_labels): Remove variable.
684         (gfc_init_decl_processing): Remove setting of named_labels.
685
686 2005-07-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
687
688         PR fortran/22503
689         * resolve.c (resolve_operator): Improve diagnostic for comparison
690         of logicals with invalid operator.
691
692 2005-07-25  Jakub Jelinek  <jakub@redhat.com>
693
694         PR fortran/20063
695         * data.c (gfc_assign_data_value_range): Call
696         create_character_initializer if last_ts is a character type.
697
698 2005-07-22  Manfred Hollstein  <mh@suse.com>
699
700         * match.c (gfc_match_symbol): Fix uninitialised warnings.
701         * matchexp.c (gfc_match_expr): Likewise.
702
703 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
704
705         Make CONSTRUCTOR use VEC to store initializers.
706         * trans-array.c (gfc_build_null_descriptor,
707         gfc_trans_array_constructor_value, gfc_conv_array_initializer):
708         Update to cope with VEC in CONSTRUCTOR_ELTS.
709         * trans-common.c (create_common): Likewise.
710         * trans-expr.c (gfc_conv_structure): Likewise.
711         * trans-stmt.c (gfc_trans_character_select): Use
712         build_constructor_from_list instead of build_constructor.
713
714 2005-07-19  Paul Thomas  <pault@gcc.gnu.org>
715
716         PR fortran/16940
717         * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
718         is matched against interfaces in parent namespaces. If there
719         the symtree is set to point to the interface.
720
721 2005-07-16  David Edelsohn  <edelsohn@gnu.org>
722
723         PR fortran/21730
724         * decl.c (do_parm): Adjust character initializer to character length
725         of symbol before assigning.
726
727 2005-07-14  Steve Ellcey  <sje@cup.hp.com>
728
729         * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
730
731 2005-07-14  Jakub Jelinek  <jakub@redhat.com>
732
733         * gfortran.h (MAX_ERROR_MESSAGE): Remove.
734         (gfc_error_buf): Add allocated and index fields.  Change message
735         field from array to a pointer.
736         * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
737         (cur_error_buffer): New variable.
738         (error_char): Use cur_error_buffer->{message,index} instead of
739         {warning,error}_{buffer.message,ptr}.  Reallocate message buffer
740         if too small.
741         (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
742         cur_error_buffer and its index rather than {warning,error}_ptr
743         and use_warning_buffer.
744         (gfc_warning_check, gfc_error_check): Don't print anything if
745         message is NULL.
746         (gfc_push_error): Allocate saved message with xstrdup.
747         (gfc_pop_error): Free saved message with gfc_free.
748         (gfc_free_error): New function.
749         * primary.c (match_complex_constant): Call gfc_free_error if
750         gfc_pop_error will not be called.
751         * match.c (gfc_match_st_function): Likewise.
752
753         PR fortran/22417
754         * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
755         file.  Fix file left but not entered warning.
756
757 2005-07-14  Feng Wang  <fengwang@nudt.edu.cn>
758         Steven G. Kargl  <kargls@comcast.net>
759
760         * array.c (resolve_character_array_constructor): Allocate gfc_charlen
761         for the array and attach to namespace list for automatic deallocation.
762
763 2005-07-13  Andreas Schwab  <schwab@suse.de>
764
765         * Make-lang.in (fortran/dependency.o): Depend on
766         $(GFORTRAN_TRANS_DEPS).
767
768 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
769
770         * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
771         the outermost loop.
772         (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
773         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
774         Don't clear maskindexes here.
775
776 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
777         
778         * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
779         is removed.
780
781 2005-07-08  Jakub Jelinek  <jakub@redhat.com>
782
783         * primary.c (gfc_match_rvalue): Handle ENTRY the same way
784         as FUNCTION.
785
786 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
787
788         * scanner.c (load_line): Add pbuflen argument, don't make
789         buflen static.  If maxlen == 0 or preprocessor_flag,
790         don't truncate at buflen, but at maxlen.  In xrealloc add
791         1 byte at the end for the terminating '\0'.  Don't fill
792         with spaces up to buflen, but gfc_option.fixed_line_length.
793         (load_file): Adjust load_line caller.  Add line_len variable.
794
795         * scanner.c (preprocessor_line): Only set current_file->line when errors
796         have not been encountered.  Warn and don't crash if a file leave
797         preprocessor line has no corresponding entering line.  Formatting.
798
799 2005-07-07  Steven Bosscher  <stevenb@suse.de>
800
801         * primary.c (match_hollerith_constant): Use int, not unsigned int,
802         for the hollerith length.  Fix indentation.
803
804 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
805
806         PR fortran/16531
807         PR fortran/15966
808         PR fortran/18781
809         * arith.c (gfc_hollerith2int, gfc_hollerith2real,
810         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
811         New functions.
812         (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
813         * arith.h (gfc_hollerith2int, gfc_hollerith2real,
814         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
815         Add prototypes.
816         * expr.c (free_expr0): Free memery allocated for Hollerith constant.
817         (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
818         (gfc_check_assign): Enable conversion from Hollerith to other.
819         * gfortran.h (bt): Add BT_HOLLERITH.
820         (gfc_expr): Add from_H flag.
821         * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
822         (add_conversions): Add conversions from Hollerith constant to other.
823         (do_simplify): Don't simplify if  Hollerith constant arguments exist.
824         * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
825         * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
826         (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
827         * primary.c (match_hollerith_constant): New function.
828         (gfc_match_literal_constant): Add match Hollerith before Integer.
829         * simplify.c (gfc_convert_constant): Add conversion from Hollerith
830         to other.
831         * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
832         convert Hollerith constant to tree.
833         * trans-io.c (gfc_convert_array_to_string): Get array's address and
834         length to set string expr.
835         (set_string): Deal with array assigned Hollerith constant and character
836         array.
837         * gfortran.texi: Document Hollerith constants as extention support.
838
839 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
840
841         PR fortran/22327
842         * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
843
844 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
845
846         * decl.c (gfc_match_entry): Allow ENTRY without parentheses
847         even in FUNCTIONs.
848
849 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
850
851         * gfortran.texi, intrinsic.texi: Fix typos.
852         * symbol.c: Fix a comment typo.
853
854 2005-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
855
856         * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
857         * gfortran.h (ATTRIBUTE_GCC_GFC): New.
858         (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
859         gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
860         ATTRIBUTE_GCC_GFC.
861
862 2005-07-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
863
864         PR fortran/20842
865         * io.c (match_dt_element): Do not allow END tag in PRINT or
866         WRITE statement.
867
868 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
869
870         * lang.opt: Remove "." from end of help texts.
871
872 2005-07-01  Jerry DeLisle  <jvdelisle@verizon.net>
873
874         * gfortran.texi: Fix typos and grammar.
875         * invoke.texi: Fix typos and grammar.
876         * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
877         exit. Fixed alignment of text for dtime syntax. Fixed a few line
878         lengths.
879
880 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
881
882         * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
883         type than boolean_type_node.
884
885 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
886
887         * all files: Update FSF address in copyright headers.
888
889 2005-06-24  Jerry DeLisle <jvdelisle@verizon.net>
890
891         PR fortran/21915
892         * gfortran.h: Add symbols for new intrinsic functions.
893         * intrinsic.c: Add new functions acosh, asinh, and atanh.
894         * intrinsic.h: Add prototypes for the new functions.
895         * iresolve.c (gfc_resolve_acosh): New function.
896         (gfc_resolve_asinh): New function.
897         (gfc_resolve_atanh): New function.
898         * mathbuiltins.def: Add defines.
899         * simplify.c (gfc_simplify_acosh): New function.
900         (gfc_simplify_asinh): New function.
901         (gfc_simplify_atanh): New function.
902
903 2005-06-24  Feng Wang  <fengwang@nudt.edu.cn>
904
905         * simplify.c (gfc_simplify_modulo): Don't clear before get result.
906
907 2005-06-22  Paul Brook  <paul@codesourcery.com>
908
909         PR fortran/21034
910         * symbol.c (gfc_is_var_automatic): New function.
911         (save_symbol): Use it.
912
913 2005-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
914             Paul Thomas  <pault@gcc.gnu.org>
915
916         PR fortran/22010
917         Port from g95.
918         * module.c (mio_namelist): New function. Correct to set
919         namelist_tail and to give error on renaming namelist by use
920         association.
921         (mio_symbol): Call mio_namelist.
922
923 2005-06-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
924
925         * gfortran.h: Add flag_backslash compile-time option.
926         * lang.opt: Add support for -fbackslash option.
927         * options.c: Likewise.
928         * primary.c: Implement behavior for -fno-backslash.
929         * invoke.texi: Add doc for -fbackslash option.
930         * gfortran.texi: Remove mention of -fno-backslash as a
931         possible extension.
932
933 2005-06-20  Steven G. Kargl  <kargls@comcast.net>
934         (port from g95)
935
936         PR fortran/21257
937         * match.c (gfc_match_label): Detect duplicate labels.
938
939
940 2005-06-20  Erik Edelmann  <erik.edelmann@iki.fi>
941
942         * intrinsic.c (check_intrinsic_standard): Fix spelling error
943         in a warning message.
944
945 2005-06-18  Erik Edelman  <eedelman@acclab.helsinki.fi>
946             Steven G. Kargl <kargls@comast.net>
947
948         PR fortran/19926
949         * primary.c (gfc_match_rvalue):  expr_type can be EXPR_CONSTANT
950         for an array; check that sym->as is NULL.
951
952
953 2005-06-18  Steven G. Kargl  <kargls@comcast.net>
954
955         * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
956         functions whose simplification routine return FAILURE.
957
958 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
959
960         * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
961         (rule for installing f95.1 manpage): Does depend on installdirs.
962
963 2005-06-13  Jakub Jelinek  <jakub@redhat.com>
964
965         PR fortran/22038
966         * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
967         in the innermost loop.
968
969         * trans-expr.c (gfc_conv_function_call): Return int instead of
970         void.  Use a local variable for has_alternate_specifier and
971         return it.  Avoid modification of function type's return value
972         in place, since it may be shared.
973         * trans.h (has_alternate_specifier): Remove.
974         (gfc_conv_function_call): Change return type.
975         * trans-stmt.c (has_alternate_specifier): Remove.
976         (gfc_trans_call): Add a local has_alternate_specifier variable,
977         set it from gfc_conv_function_call return value.
978
979 2005-06-12  Richard Henderson  <rth@redhat.com>
980
981         * trans-array.c (gfc_conv_descriptor_data_get): Rename from
982         gfc_conv_descriptor_data.  Cast the result to the DATAPTR type.
983         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
984         (gfc_trans_allocate_array_storage): Use them.
985         (gfc_array_allocate, gfc_array_deallocate): Likewise.
986         (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
987         (gfc_trans_deferred_array): Likewise.
988         * trans-expr.c (gfc_conv_function_call): Likewise.
989         (gfc_trans_subcomponent_assign): Likewise.
990         (gfc_trans_pointer_assignment): Likewise.
991         * trans-intrinsic.c (gfc_conv_allocated): Likewise.
992         * trans-types.c (gfc_array_descriptor_base): New.
993         (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
994         (gfc_get_array_descriptor_base): Break out from ...
995         (gfc_get_array_type_bounds): ... here.  Create type variants.
996         * trans-array.h (gfc_conv_descriptor_data_get): Declare.
997         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
998
999 2005-06-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1000
1001         * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1002         calling conventions.  Look at sym instead of sym->result.
1003         * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1004         Remove condition which is always false with workaround removed.
1005         (gfc_return_by_reference): Always look at sym, never at sym->result.
1006
1007 2005-06-11  Steven G. Kargl  <kargls@comcast.net>
1008         
1009         PR fortran/17792
1010         PR fortran/21375
1011         * trans-array.c (gfc_array_deallocate): pstat is new argument
1012         (gfc_array_allocate): update gfc_array_deallocate() call.
1013         (gfc_trans_deferred_array): ditto.
1014         * trans-array.h: update gfc_array_deallocate() prototype.
1015         * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1016         * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1017
1018 2005-06-07  Jerry DeLisle <jvdelisle@verizon.net>
1019
1020         * intrinsic.texi: Add documentation for dcmplx, digits,
1021         dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1022
1023 2005-06-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1024
1025         PR fortran/21912
1026         * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1027         Generate correct exit condition in case of negative steps in
1028         implied-do loops.
1029
1030         * invoke.texi: Fix description of flags required for compatibility
1031         with g77.
1032
1033 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1034         Erik Schnetter  <schnetter@aei.mpg.de>
1035
1036         PR fortran/19195
1037         * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1038         remove FIXME comment. 
1039
1040 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1041
1042         * match.c (match_forall_iterator): Don't immediately give error if '='
1043         is not followed by an expression.
1044
1045 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1046         Erik Edelmann  <erik.edelmann@iki.fi>
1047
1048         * array.c (gfc_match_array_constructor): Disallow empty array
1049         constructor.
1050
1051 2005-06-03  Jerry DeLisle <jvdelisle@verizon.net>
1052
1053         * fortran/intrinsic.texi: Add documentation for
1054         command_argument_count, conjg, dconjg, count,
1055         cpu_time, cshift, date_and_time, dble, dfloat.
1056
1057 2005-06-01  Roger Sayle  <roger@eyesopen.com>
1058
1059         * intrinsic.c (add_conv): No longer take a "simplify" argument as
1060         its always gfc_convert_constant, instead take a "standard" argument.
1061         (add_conversions): Change all existing calls of add_conv to pass
1062         GFC_STD_F77 as appropriate.  Additionally, if we're allowing GNU
1063         extensions support integer-logical and logical-integer conversions.
1064         (gfc_convert_type_warn): Warn about use the use of these conversions
1065         as a extension when appropriate, i.e. with -pedantic.
1066         * simplify.c (gfc_convert_constant): Add support for integer to
1067         logical and logical to integer conversions, using gfc_int2log and
1068         gfc_log2int.
1069         * arith.c (gfc_log2int, gfc_int2log): New functions.
1070         * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1071         * gfortran.texi: Document this new GNU extension.
1072
1073 2005-06-01  Paul Thomas  <pault@gcc.gnu.org>
1074
1075         * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1076         * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1077         Correct comments and replace convert of integer_one_node with
1078         build_int_cst.
1079
1080 2005-06-01  Jakub Jelinek  <jakub@redhat.com>
1081
1082         PR fortran/21729
1083         * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1084         to avoid giving error multiple times.
1085         (resolve_entries): Don't error about BT_UNKNOWN here.
1086         (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1087         (resolve_fntype): New function.
1088         (gfc_resolve): Call resolve_fntype.
1089
1090 2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>
1091
1092         PR fortran/20883
1093         * fortran/io.c (resolve_tag): Fix error message.
1094
1095 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1096
1097         * fortran/trans-decl.c: Don't include errors.h.
1098         * fortran/Make-lang.in: Updates dependencies.
1099
1100 2005-05-31  Paul Thomas  <pault@gcc.gnu.org>
1101
1102         PR fortran/18109
1103         PR fortran/18283
1104         PR fortran/19107
1105         * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1106         string length from the expression typespec character length value
1107         and set temp_ss->stringlength and backend_decl. Obtain the
1108         tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1109         Dereference the expression to obtain the character.
1110         * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1111         dereference of scalar character pointer structure components.
1112         * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1113         string length for the structure component from the component
1114         expression.
1115
1116 2005-05-30  Roger Sayle  <roger@eyesopen.com>
1117
1118         * gfortran.h (GFC_STD_LEGACY): New "standard" macro.  Reindent.
1119         * options.c (gfc_init_options): By default, allow legacy extensions
1120         but warn about them.
1121         (gfc_post_options): Make -pedantic warn about legacy extensions
1122         even with -std=legacy.
1123         (gfc_handle_option): Make -std=gnu follow the default behaviour
1124         of warning about legacy extensions, but allowing them. Make the
1125         new -std=legacy accept everything and warn about nothing.
1126         * lang.opt (std=legacy): New F95 command line option.
1127         * invoke.texi: Document both -std=f2003 and -std=legacy.
1128         * gfortran.texi: Explain the two types of extensions and document
1129         how they are affected by the various -std= command line options.
1130
1131 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
1132
1133         * trans-expr.c: Remove trailing ^M.
1134
1135         * trans-expr.c: Fix comment typos.
1136
1137 2005-05-29  Paul Thomas  <pault@gcc.gnu.org>
1138
1139         PR fortran/16939
1140         PR fortran/17192
1141         PR fortran/17193
1142         PR fortran/17202
1143         PR fortran/18689
1144         PR fortran/18890
1145         * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1146         length to temp_ss for character pointer array assignments.
1147         * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1148         dereferencing of characters and character pointers.
1149         * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1150         length as return argument for various kinds of handling of return.
1151         Return a char[]* temporary for character pointer functions and
1152         dereference the temporary upon return.
1153
1154 2005-05-29  Janne Blomqvist  <jblomqvi@vipunen.hut.fi>
1155             Steven G. Kargl  <kargls@comcast.net>
1156   
1157         fortran/PR20846
1158         * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1159
1160 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1161
1162         PR libfortran/20006
1163         * io.c (format_item_1): Add check and extension warning for
1164         $ edit descriptor.
1165
1166 2005-05-28  Steven G. Kargl  <kargls@comcast.net>
1167
1168         * arith.c (gfc_arith_init_1): Fix off by one problem;
1169         (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1170
1171 2005-05-28  Jerry DeLisle   <jvdelisle@verizon.net>
1172             Steven G. Kargl  <kargls@comcast.net>
1173
1174         * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1175         and CMPLX
1176
1177 2005-05-27  Steven G. Kargl  <kargls@comcast.net>
1178
1179         * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1180         like types in comparsion.
1181
1182 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
1183
1184         * data.c, parse.c, trans-array.c, trans-decl.c,
1185         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1186         trans.h: Fix comment typos.  Follow spelling conventions.
1187
1188 2005-05-22  Roger Sayle  <roger@eyesopen.com>
1189
1190         * gfortran.texi: Document some more GNU extensions.
1191
1192 2005-05-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1193
1194         * error.c (gfc_warning): Fix typo in comment.
1195
1196 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1197
1198         PR libfortran/21127
1199         * fortran/iresolve.c (gfc_resolve_reshape): Add 
1200         gfc_type_letter (BT_COMPLEX) for complex to
1201         to resolved function name.
1202
1203 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
1204
1205         * array.c (gfc_match_array_constructor): Support [ ... ]
1206         style array constructors.
1207
1208 2005-05-18  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1209
1210         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1211         and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1212         * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1213         to correct enum type.
1214         (gfc_conv_intrinsic_aint): Likewise.  Clarify comment in front of
1215         function.  Add default case to switch, deal with FIX_TRUNC_EXPR
1216         instead of FIX_FLOOR_EXPR.
1217
1218 2005-05-18  Feng Wang  <fengwang@nudt.edu.cn>
1219
1220         PR fortran/20954
1221         * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1222         build character length.
1223
1224 2005-05-17  Zdenek Dvorak  <dvorakz@suse.cz>
1225
1226         * trans-types.c (gfc_array_range_type): New variable.
1227         (gfc_init_types): Initialize gfc_array_range_type.
1228         (gfc_get_array_type_bounds): Use gfc_array_range_type.
1229
1230 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
1231
1232         PR fortran/15080
1233         * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1234         arguments.  If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1235         of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1236         just that as index.
1237         (generate_loop_for_rhs_to_temp): Likewise.
1238         (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1239         It non-NULL, add it to body.
1240         (allocate_temp_for_forall_nest_1): New function, split from
1241         allocate_temp_for_forall_nest.
1242         (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1243         propagate it down to compute_overall_iter_number.  Use
1244         allocate_temp_for_forall_nest_1.
1245         (gfc_trans_assign_need_temp): Remove COUNT2.  Call
1246         compute_inner_temp_size into a new stmtblock_t.  Adjust calls to
1247         allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1248         and generate_loop_for_temp_to_lhs.
1249         (gfc_trans_pointer_assign_need_temp): Adjust calls to
1250         allocate_temp_for_forall_nest.
1251         (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1252         stmtblock_t.  Call compute_overall_iter_number just once, then
1253         allocate_temp_for_forall_nest_1 twice with the same size.
1254         Initialize mask indexes if nested_forall_info != NULL.
1255         (gfc_trans_where_2): Initialize mask indexes before calling
1256         gfc_trans_nested_forall_loop.
1257
1258 2005-05-15  Feng Wang <fengwang@nudt.edu.cn>
1259         Jerry DeLisle <jvdelisle@verizon.net>
1260
1261         PR fortran/17432
1262         * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to 
1263         resolve ICE on assign of format label.
1264         * trans-io.c (set_string): add fold-convert to properly
1265         handle assigned format label in write.
1266  
1267 2005-05-13  Paul Brook  <paul@codesourcery.com>
1268
1269         * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1270
1271 2005-05-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1272
1273         * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1274
1275 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1276
1277         PR fortran/21260
1278         * io.c (check_format): Look for literal characters inside
1279         hollerith constant.
1280
1281 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1282
1283         * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1284         attribute from result symbol to function symbol.
1285         * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1286         instead of sym->result->attr.dimension.
1287
1288 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1289
1290         PR fortran/20178
1291         * gfortran.h (gfc_option): Add flag_f2c.
1292         * invoke.texi: Document '-ff2c' command line option.  Adapt
1293         documentation for '-fno-second-underscore' and '-fno-underscoring'.
1294         * lang.opt (ff2c): New entry.
1295         * options.c (gfc-init_options): Set default calling convention
1296         to -fno-f2c.  Mark -fsecond-underscore unset.
1297         (gfc_post_options): Set -fsecond-underscore if not explicitly set
1298         by user.        
1299         (handle_options): Set gfc_option.flag_f2c according to requested
1300         calling convention.
1301         * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1302         intrinsics where necessary.
1303         (gfc_trans_deferred_vars): Change todo error to assertion.
1304         * trans-expr.c (gfc_conv_variable): Dereference access
1305         to hidden result argument.
1306         (gfc_conv_function_call): Add hidden result argument to argument
1307         list if f2c calling conventions requested.  Slightly restructure
1308         tests.  Convert result of default REAL function to requested type
1309         if f2c calling conventions are used.  Dereference COMPLEX result
1310         if f2c cc are used.
1311         * trans-types.c (gfc_sym_type):  Return double for default REAL
1312         function if f2c cc are used.
1313         (gfc_return_by_reference): Slightly restructure logic.  Return
1314         COMPLEX by reference depending on calling conventions.
1315         (gfc_get_function_type): Correctly make hidden result argument a
1316         pass-by-reference argument for COMPLEX.  Remove old code which does
1317         this for derived types.
1318
1319 2005-05-09  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1320
1321         * match.c (gfc_match_return): Only require space after keyword when
1322         it is obligatory.  Only give stdwarn to after matching is successful.
1323         * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1324
1325 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
1326
1327         * intrinsic.texi: Fix typos.
1328
1329 2005-05-07  Steven G. Kargl  <kargls@comcast.net>
1330
1331         * intrinsic.texi:  Document ASSOCIATED and ATAN2.  Update Bessel function
1332         description to include information about scalar arguments.
1333
1334 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1335
1336         * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1337         match.h, trans-array.h: Update copyright.
1338
1339 2005-04-29  Tom Tromey  <tromey@redhat.com>
1340
1341         * f95-lang.c (poplevel): Updated for change to build_block.
1342
1343 2005-04-29  Jakub Jelinek  <jakub@redhat.com>
1344
1345         PR fortran/13082
1346         PR fortran/18824
1347         * trans-expr.c (gfc_conv_variable): Handle return values in functions
1348         with alternate entry points.
1349         * resolve.c (resolve_entries): Remove unnecessary string termination
1350         after snprintf.  Set result of entry master.
1351         If all entries have the same type, set entry master's type
1352         to that common type, otherwise set mixed_entry_master attribute.
1353         * trans-types.c (gfc_get_mixed_entry_union): New function.
1354         (gfc_get_function_type): Use it for mixed_entry_master functions.
1355         * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1356         * decl.c (gfc_match_entry): Set entry->result properly for
1357         function ENTRY.
1358         * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1359         __entry argument.
1360         (build_entry_thunks): Handle return values in entry thunks.
1361         Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1362         shared between multiple contexts.
1363         (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1364         current_function_decl instead of sym->backend_decl.  Skip over
1365         entry master's entry id argument.  For mixed_entry_master entries or
1366         their results, return a COMPONENT_REF of the fake result.
1367         (gfc_trans_deferred_vars): Don't warn about missing return value if
1368         at least one entry point uses RESULT.
1369         (gfc_generate_function_code): For entry master returning
1370         CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1371         * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1372         values optional just because they are in entry master.
1373
1374 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1375
1376         * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1377         Tobias forgot this in previous commit.
1378         
1379 2005-04-29  Paul Brook   <paul@codesourcery.com>
1380
1381         * trans-expr.c (gfc_conv_expr_present): Fix broken assert.  Update
1382         comment.
1383
1384 2005-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1385
1386         * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1387         * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1388         IMPLICIT NONE, set seen_implicit_none.
1389         (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1390
1391 2005-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1392
1393         * gfortran.h (gfc_gsymbol): Make name a const char *.
1394         * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1395         gfc_get_string.
1396
1397 2005-04-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1398
1399         PR fortran/20865
1400         * resolve.c (resolve_actual_arglist): Issue an error if a statement
1401         functions is used as actual argument.
1402
1403 2005-04-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1404
1405         PR fortran/21177
1406         * interface.c (compare_parameter): Ignore type for EXPR_NULL
1407         only if type is BT_UNKNOWN.
1408
1409 2005-04-25  Paul Brook  <paul@codesourcery.com>
1410         Steven G. Kargl  <kargls@comcast.net>
1411
1412         PR fortran/20879
1413         * check.c (gfc_check_ichar_iachar): New function.
1414         * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1415         * intrinsic.c (add_functions): Use it.
1416         * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1417         character expression lengths.
1418
1419 2005-04-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1420
1421         PR fortran/20059
1422         * trans-common.c (translate_common): Cast offset and
1423         common_segment->offset to type int for warning message.
1424
1425 2005-04-23  DJ Delorie  <dj@redhat.com>
1426
1427         * trans-decl.c: Adjust warning() callers.
1428
1429 2005-04-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1430
1431         * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1432         intermediate representation.  Fix typo in comment.
1433
1434 2005-04-21  Steven G. Kargl  <kargls@comcast.net>
1435
1436         * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1437         simplify logic; Add a gcc_assert.
1438
1439 2005-04-19  Steven G. Kargl  <kargls@comcast.net>
1440
1441         * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1442
1443 2005-04-19  Arnaud Desitter  <arnaud.desitter@ouce.ox.ac.uk>
1444             Steven G. Kargl  <kargls@comcast.net>
1445
1446         * invoke.texi: Update -Waliasing description
1447
1448 2005-04-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1449
1450         PR fortran/16861
1451         * resolve.c (resolve_variable): If e->symtree is not set, this
1452         ought to be a FAILURE, and not a segfault.
1453
1454 2005-04-17  Paul Thomas <pault@gcc.gnu.org>
1455
1456         PR fortran/17472
1457         PR fortran/18209
1458         PR fortran/18396
1459         PR fortran/19467
1460         PR fortran/19657
1461         * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1462         declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1463         declarations of old namelist functions.
1464         (build_dt): Simplified call to transfer_namelist_element.
1465         (nml_get_addr_expr): Generates address expression for start of 
1466         object data. New function.
1467         (nml_full_name): Qualified name for derived type components. New 
1468         function.
1469         (transfer_namelist_element): Modified for calls to new functions 
1470         and improved derived type handling.
1471
1472 2005-04-17  Richard Guenther  <rguenth@gcc.gnu.org>
1473
1474         * scanner.c (gfc_next_char_literal): Reset truncation flag
1475         for lines ending in a comment for both fixed and free form.
1476         (load_line): Do not set truncated flag if only truncating
1477         the EOL marker.
1478
1479 2005-04-15  Richard Guenther  <rguenth@gcc.gnu.org>
1480
1481         PR fortran/14569
1482         * gfortran.h (gfc_linebuf): Add truncated field.
1483         * parse.c (next_statement): Handle warning for truncated
1484         lines.
1485         * scanner.c (load_line): Return if line was truncated.
1486         No longer warn for truncated lines.  Remove unused parameters.
1487         (load_file): Store load_line return value to linebuf.
1488         (gfc_error_recovery): Do not advance line at the end.
1489
1490 2005-04-14  Steven G. Kargl  <kargls@comcast.net>
1491
1492         * gfortran.h (gfc_real_info): Add subnormal struct member.
1493         * arith.c (gfc_arith_init_1): Set it.
1494         (gfc_check_real_range): Use it.
1495         * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1496
1497 2005-04-12  Kazu Hirata  <kazu@cs.umass.edu>
1498
1499         * simplify.c: Fix a comment typo.
1500
1501 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1502
1503         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1504
1505 2005-04-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1506
1507         * simplify.c (gfc_simplify_nearest): Overhaul.
1508
1509 2005-04-10  Kazu Hirata  <kazu@cs.umass.edu>
1510
1511         * interface.c: Fix a comment typo.
1512
1513 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1514
1515         * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1516         Fortran 95.
1517
1518 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
1519
1520         * simplify.c (gfc_simplify_anint): Use mpfr_round()
1521         (gfc_simplify_dnint): ditto.
1522         (gfc_simplify_nint): ditto.
1523
1524 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
1525
1526         PR fortran/13257
1527         * io.c (check_format): Allow an optional comma
1528         between descriptors.
1529
1530 2005-04-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1531
1532         * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1533         comment according to GNU coding style.
1534         (gfc_match_if): Remove gfc_ prefix in call to
1535         match_arithmetic_if.
1536
1537 2005-04-08  Diego Novillo  <dnovillo@redhat.com>
1538
1539         * match.c (gfc_match_arithmetic_if): Declare static.
1540
1541 2005-04-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1542
1543         PR fortran/17229
1544         * match.c (gfc_match_arithmetic_if): New function to match an
1545         arithmetic IF statement.
1546         (gfc_match_if): Use gfc_match_arithmetic_if to match an
1547         arithmetic IF statement embedded in a simple IF statement.
1548
1549 2005-04-07  Steven G. Kargl  <kargls@comcast.net>
1550
1551         * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1552
1553 2005-04-06  Steven G. Kargl  <kargls@comcast.net>
1554
1555         * invoke.texi: Remove documentation of -std=f90 
1556
1557 2005-04-06  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1558
1559         * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1560         non-pointer assignment.
1561
1562 2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>
1563
1564         PR fortran/15959
1565         PR fortran/20713
1566
1567         * array.c (resolve_character_array_constructor): New function. Set
1568         constant character array's character length.
1569         (gfc_resolve_array_constructor): Use it.
1570         * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1571         length.
1572         (gfc_set_constant_character_len): New function. Set constant character
1573         expression according the given length.
1574         * match.h (gfc_set_constant_character_len): Add prototype.
1575
1576 2005-04-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1577
1578         * intrinsic.texi: BES?? functions are not in the f95 standard.
1579
1580 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1581
1582         * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1583
1584 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1585
1586         * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1587         BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1588
1589 2005-04-02  Steven G. Kargl  <kargls@comcast.net>
1590
1591         * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1592
1593 2005-04-01  Kazu Hirata  <kazu@cs.umass.edu>
1594
1595         * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1596         trans.h: Fix comment typos.
1597
1598 2005-03-29  Steven G. Kargl  <kargls@comcast.net>
1599
1600         * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1601         flag_default_integer, flag_default_real
1602         * invoke.texi: Update documentation
1603         * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8   
1604         fdefault-integer-8, and fdefault-real-8 definitions.
1605         * options.c (gfc_init_options): Set option defaults
1606         (gfc_handle_option): Handle command line options.
1607         * trans-types.c (gfc_init_kinds): Use options.
1608
1609 2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
1610
1611         * f95-lang.c (builtin_function): Process the attrs parameter
1612         and apply the "const" attribute to the builtin if found.
1613
1614 2005-03-27  Steven G. Kargl  <kargls@comcast.net>
1615
1616         * intrinsic.texi: Document AIMAG, AINT, ALL
1617
1618 2005-03-26  Steven G. Kargl  <kargls@comcast.net>
1619
1620         * arith.c (check_result): Fix illogical logic.
1621
1622 2005-03-26  Canqun Yang  <canqun@nudt.edu.cn>
1623
1624         * trans-common.c (create_common): Build RECORD_NODE for common blocks
1625         contain no equivalence objects.
1626         (add_equivalences): New argument saw_equiv.
1627         (trans_common): New local variable saw_equiv.
1628         (finish_equivalences): Add a local variable dummy, Always pass true
1629         for the 3rd parameter to create_common.
1630
1631 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
1632
1633         * intrinsic.texi: Fix "make dvi"
1634
1635 2005-03-24  Steven G. Kargl  <kargls@comcast.net>
1636
1637         * intrinsic.texi: New file.
1638         * gfortran.texi: Include it; white space change; fix typo.
1639
1640 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1641
1642         * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1643
1644 2005-03-23  Steven Bosscher  <stevenb@suse.de>
1645
1646         * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1647         * trans-array.c (gfc_trans_allocate_array_storage,
1648         gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1649         gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1650         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1651         gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1652         gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1653         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1654         gfc_conv_expr_descriptor): Likewise.
1655         * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1656         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1657         * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1658         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1659         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1660         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1661         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1662         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1663         gfc_conv_intrinsic_merge, prepare_arg_info,
1664         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1665         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1666         gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1667         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1668         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1669         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1670         Likewise.
1671         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1672         * trans.c (gfc_add_modify_expr): Likewise.
1673
1674 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1675
1676         * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1677         gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1678         gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1679         gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1680         gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1681         gfc_check_perror): new functions to check newly implemented
1682         g77 intrinsics.
1683         * gfortran.h: adding symbols for new intrinsics.
1684         * intrinsic.c (add_functions): adding new intrinsics.
1685         (add_subroutines): adding new intrinsics.
1686         * intrinsic.h: prototype for all checking and resolving
1687         functions.
1688         * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1689         gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1690         gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1691         gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1692         gfc_resolve_kill_sub, gfc_resolve_link_sub,
1693         gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1694         gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1695         gfc_resolve_perror): new functions to resolve intrinsics.
1696         * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1697         for new symbols.
1698
1699 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1700
1701         * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1702         in which the variable is declared.
1703
1704         PR fortran/18525
1705         * resolve.c (was_declared): Also check for dummy attribute.
1706
1707 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1708
1709         * gfortran.h (arith): Remove ARITH_0TO0.
1710         * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1711         (gfc_arith_power): Remove special casing of zero to integral
1712         power zero.
1713
1714 2005-03-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1715
1716         * Make-lang.in (fortran-warn): Remove -Wno-error.
1717         (expr.o-warn, resolve.o-warn, simplify.o-warn,
1718         trans-common.o-warn): Specify -Wno-error.
1719
1720 2005-03-17  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1721
1722         * trans-array.c (gfc_trans_static_array_pointer,
1723         get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1724         comment and formatting typos.
1725
1726 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1727
1728         * invoke.texi: Fix typos.
1729
1730 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1731
1732         * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1733
1734 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1735
1736         * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1737         to zero on label_tree.
1738
1739 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1740
1741         PR fortran/18827
1742         * io.c (resolve_tag): Add checking on assigned label.
1743         (match_dt_format): Does not set symbol assign attribute.
1744         * match.c (gfc_match_goto):Does not set symbol assign attribute.
1745         * resolve.c (resolve_code): Add checking on assigned label.
1746         * trans-common.c (build_field): Deals with common variable assigned
1747         a label.
1748         * trans-stmt.c (gfc_conv_label_variable): New function.
1749         (gfc_trans_label_assign): Use it.
1750         (gfc_trans_goto): Ditto.
1751         * trans-io.c (set_string): Ditto.
1752         * trans.h (gfc_conv_label_variable): Add prototype.
1753
1754 2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1755
1756         PR fortran/20467
1757         * symbol.c (check_conflict): A dummy argument can't be a statement
1758         function.
1759
1760 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
1761
1762         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1763         the argument of the shift to the unsigned type.
1764
1765 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1766
1767         PR fortran/16907
1768         * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1769
1770 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1771
1772         PR fortran/20323
1773         * resolve.c (gfc_resolve): Check if character lengths are
1774         specification expressions.
1775
1776 2005-03-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1777
1778         PR fortran/20361
1779         * trans-array.c (gfc_stack_space_left): Remove unused variable.
1780         (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
1781         code.
1782         * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
1783         Remove declaration / prototype.
1784         * trans-common.c (build_equiv_decl): Give union a name.  Check if
1785         it can be put on the stack.
1786         * trans-decl.c (gfc_stack_space_left): Move function here.
1787         (gfc_build_qualified_array): Fix comment typo.
1788         * trans.h (gfc_put_var_on_stack): Add prototype.
1789
1790 2005-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1791
1792         * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
1793         * decl.c, trans.c: Don't use C++ style comments.
1794         * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
1795         ifsrc): Give names to enums and use ENUM_BITFIELD.
1796         (gfc_access): Remove trailing comma.
1797
1798 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
1799
1800         PR 19936
1801         * primary.c (match_complex_constant): Mangled complex constant may
1802         be an implied do-loop.  Give implied do-loop matcher a chance.
1803
1804 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
1805
1806         PR fortran/19754
1807         * resolve.c (compare_shapes):  New function.
1808         (resolve_operator): Use it.
1809
1810 2005-03-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1811
1812         * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1813         type for COMPLEX constants.
1814
1815 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1816
1817         PR fortran/19673
1818         * trans-expr.c (gfc_conv_function_call): Correctly dereference
1819         argument from a pointer function also if it has a result clause.
1820
1821 2005-03-04  Steven G. Kargl  <kargls@comcast.net>
1822
1823         * expr.c (gfc_copy_shape_excluding): Change && to ||.
1824
1825 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1826
1827         * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1828         clarify comment.
1829
1830 2005-02-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1831         (port from g95)
1832
1833         PR fortran/19479
1834         * simplify.c (gfc_simplify_bound): Rename to ...
1835         (simplify_bound): ... this and overhaul.
1836
1837 2005-02-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1838
1839         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1840         (gfc_conv_intrinsic_function): update function calls
1841
1842 2005-02-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1843
1844         PR fortran/20058
1845         * trans-types.c (gfc_max_integer_kind): Declare
1846         (gfc_init_kinds): Initialize it.
1847         * gfortran.h (gfc_max_integer_kind): extern it.
1848         * primary.c (match_boz_constant): Use it; remove gfortran extension
1849         of kind suffixes on BOZ literal constants
1850
1851
1852 2005-02-27  Steven G. Kargl  <kargls@comcast.net>
1853
1854         * arith.c (gfc_check_real_range):  Remove multiple returns
1855         (check_result): New function.
1856         (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
1857         gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
1858
1859
1860 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1861
1862         * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1863
1864
1865 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-meunchen.de>
1866
1867         Unrevert previously reverted patch.  Adding this fix:
1868         * module.c (find_true_name): Deal with NULL module.
1869
1870 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1871
1872         Revert yesterday's patch:
1873         2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1874
1875                 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1876                 ... argument.  Copy string instead of pointing to it.
1877
1878 2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1879
1880         * gfortran.h (gfc_get_namespace): Add second argument to prototype.
1881         * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
1882         gfc_get_namespace.
1883         * module.c (mio_namespace_ref, load_needed): Likewise.
1884         * parse.c (parse_interface, parse_contained): Likewise.  Here the
1885         correct second argument matters.
1886         * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
1887         parent's implicit types if this is set.
1888         (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
1889         * trans-common.c (build_common_decl): Likewise.
1890
1891         * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
1892         formatting.
1893         * symbol.c (gfc_set_default_type): Issue error only once, by setting
1894         and checking 'untyped' attribute.
1895
1896         * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
1897         fields into new struct 'op' inside the 'value' union.
1898         * arith.c (eval_intrinsic): Adapt all users.
1899         * dependency.c (gfc_check_dependency): Likewise.
1900         * dump-parse-tree.c (gfc_show_expr): Likewise.
1901         * expr.c (gfc_get_expr): Don't clear removed fields.
1902         (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
1903         gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
1904         check_intrinsic_op): Adapt to new field names.
1905         * interface.c (gfc_extend_expr): Likewise.  Also explicitly
1906         nullify 'esym' and 'isym' fields of new function call.
1907         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1908         Adapt to renamed structure fields.
1909         * matchexp.c (build_node, match_level_1, match_expr): Likewise.
1910         * module.c (mio_expr): Likewise.
1911         * resolve.c (resolve_operator): Likewise.
1912         (gfc_find_forall_index): Likewise.  Only look through operands
1913         if dealing with EXPR_OP
1914         * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
1915         * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
1916         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1917
1918         [ Reverted ]
1919         * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
1920         'name' a 'const char *'.
1921         (gfc_symbol): Likewise, also for 'module'.
1922         (gfc_symtree): Make 'name' a 'const char *'.
1923         (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
1924         (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
1925         'char *' argument.
1926         (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
1927         initialize 'SYM->module'.
1928         * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
1929         pointer instead of empty string.
1930         * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
1931         * interface.c (gfc_compare_types): Adapt check to account for possible
1932         NULL pointer.
1933         (compare_actual_formal): Check for NULL pointer instead of empty
1934         string.
1935         * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1936         Add 'const' qualifier.
1937         (conv_name): Return a heap allocated string.
1938         (find_conv): Add 'const' qualifier to 'target'.
1939         (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
1940         (make_generic): Check for NULL pointer instead of empty string.
1941         (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
1942         (add_conv): No need to strcpy result from 'conv_name'.
1943         (sort_actual): Check for NULL pointer instead of empty  string.
1944         * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
1945         Adapt prototype.
1946         * module.c (compare_true_names): Compare pointers instead of strings
1947         for 'module' member.
1948         (find_true_name): Initialize string fields with gfc_get_string.
1949         (mio_pool_string): New function.
1950         (mio_internal_string): Adapt comment.
1951         (mio_component_ref, mio_component, mio_actual_arg): Use
1952         'mio_pool_string' instead of 'mio_internal_string'.
1953         (mio_symbol_interface): Add 'const' qualifier to string arguments.
1954         Add level of indirection. Use 'mio_pool_string' instead of
1955         'mio_internal_string'.
1956         (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
1957         (write_common, write_symbol): Use 'mio_pool_string' instead of
1958         'mio_internal_string'.
1959         (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
1960         instead of empty string.
1961         (write_operator, write_generic): Pass correct type variable to
1962         'mio_symbol_interface'.
1963         (write_symtree): Use 'mio_pool_string' instead of
1964         'mio_internal_string'.
1965         * primary.c (match_keyword_arg): Adapt check to possible
1966         case of NULL pointer.  Use 'gfc_get_string' instead of 'strcpy'.
1967         * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
1968         gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
1969         'strcpy'.
1970         (ambiguous_symbol): Check for NULL pointer instead of empty string.
1971         (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
1972         arguments.
1973         * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
1974         pointer instead of empty string.
1975         * trans-decl.c (gfc_sym_mangled_identifier,
1976         gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
1977         gfc_get_symbol_decl): Likewise.
1978         * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
1979         argument.  Copy string instead of pointing to it.
1980
1981 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
1982
1983         * intrinsic.h, st.c: Update copyright.
1984
1985 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1986
1987         * symbol.c: Typos in comments.
1988
1989 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1990
1991         * expr.c (gfc_type_convert_binary): Typo in comment.
1992
1993 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1994
1995         * check.c (gfc_check_selected_int_kind): New function.
1996         * intrinsic.h: Prototype it.
1997         * intrinsic.c (add_function): Use it.
1998         * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1999           BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2000
2001 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2002
2003         * check.c (gfc_check_int): improve checking of optional kind
2004         * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2005
2006 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2007
2008         * check.c (gfc_check_achar): New function
2009         * intrinsic.h: Prototype it.
2010         * intrinsic.c (add_function): Use it.
2011
2012 2005-02-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2013
2014         * trans-stmt.c (generate_loop_for_temp_to_lhs,
2015         generate_loop_for_rhs_to_temp): Remove if whose condition is
2016         always true.
2017
2018 2005-02-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2019
2020         * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2021         (gfc_use_derived): ... this function.
2022
2023 2005-02-09  Richard Henderson  <rth@redhat.com>
2024
2025         * f95-lang.c (gfc_init_builtin_functions): Call
2026         build_common_builtin_nodes; do not define any functions handled
2027         by it.
2028
2029 2005-02-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2030
2031         * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2032         EXPR_SUBSTRING.
2033         (gfc_is_constant_expr): Check 'ref' to determine if substring
2034         reference is constant.
2035         (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2036         (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2037         and 'op2'.
2038         * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2039
2040 2005-02-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2041
2042         * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2043         gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2044         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2045         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2046         gfc_add_procedure): Add argument.
2047         * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2048         gfc_match_null, match_type_spec, match_attr_spec,
2049         gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2050         Update callers to match.
2051         (gfc_match_entry) : Likewise, fix comment typo.
2052         (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2053         access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2054         gfc_match_derived_decl): Update callers.
2055         * interface.c (gfc_match_interface): Likewise.
2056         * match.c (gfc_match_label, gfc_add_flavor,
2057         gfc_match_call, gfc_match_common, gfc_match_block_data,
2058         gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2059         Likewise.
2060         * parse.c (parse_derived, parse_interface, parse_contained),
2061         primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2062         * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2063         * symbol.c (check_conflict, check_used): Add new 'name' argument,
2064         use when printing error message.
2065         (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2066         gfc_add_generic, gfc_add_in_common, gfc_add_data,
2067         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2068         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2069         gfc_add_procedure): Add new 'name' argument.  Pass along to
2070         check_conflict and check_used.
2071         (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2072         gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2073         gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2074         gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2075         argument in calls to any of the modified functions.
2076
2077 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2078
2079         * gfortran.texi: Don't give last update date.
2080
2081 2006-01-30  Richard Henderson  <rth@redhat.com>
2082
2083         * options.c (gfc_init_options): Zero flag_errno_math.
2084
2085 2005-01-29  Paul Brook  <paul@codesourcery.com>
2086
2087         PR fortran/18565
2088         * check.c (real_or_complex_check): New function.
2089         (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2090         * intrinsic.c (add_functions): Use new check functions.
2091         * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2092         Add prototypes.
2093
2094 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
2095
2096         PR fortran/19589
2097         * expr.c (gfc_check_assign):  Check for conformance of logical operands
2098
2099 2004-01-27  Steven Bosscher  <stevenb@suse.de>
2100
2101         * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2102         TREE_USED for all labels.
2103         (gfc_trans_entry_master_switch): Use it instead of building a
2104         label by hand.
2105         * trans-io.c (add_case): Likewise.
2106         * trans-stmt.c (gfc_trans_integer_select): Likewise.
2107
2108 2004-01-23  Paul Brook  <paul@codesourcery.com>
2109         Steven G. Kargl  <kargls@comcast.net>
2110
2111         PR fortran/17941
2112         * arith.c (gfc_convert_real): Remove sign handling.
2113         * primary.c (match_digits): Allow whitespace after initial sign.
2114         (match_real_const): Handle signs here.  Allow whitespace after
2115         initial sign.  Remove dead code.
2116         (match_const_complex_part): Remove.
2117         (match_complex_part): Use match_{real,integer}_const.
2118         (match_complex_constant): Cross-promote integer types.
2119
2120 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
2121
2122         PR fortran/19294
2123         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2124         transpose_c8 for complex types.
2125
2126 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
2127
2128         * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2129         trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2130         trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2131         Follow spelling conventions.
2132
2133 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
2134
2135         PR fortran/19313
2136         * trans-io.c (gfc_trans_inquire): Added code to support
2137         pad.
2138
2139 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
2140
2141         * intrinsic.c (make_alias):  Add standard argument.
2142         (add_functions): Update make_alias calls.
2143
2144 2005-01-22  Paul Brook  <paul@codesourcery.com>
2145
2146         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2147
2148 2005-01-22  Paul Brook  <paul@codesourcery.com>
2149
2150         * gfortran.h (gfc_check_access): Add prototype.
2151         * match.c (gfc_match_namelist): Remove TODO.
2152         * module.c (check_access): Rename ...
2153         (gfc_check_access): ... to this.  Boolify.  Update callers.
2154         * resolve.c (resolve_symbol): Check for private objects in public
2155         namelists.
2156
2157 2005-01-22  Paul Brook  <paul@codesourcery.com>
2158
2159         * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2160         does not have an explicit type.
2161         (gfc_match_variable): Resolve implicit derived types in all cases.
2162         Resolve contained function types from their own namespace, not the
2163         parent.
2164         * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2165         checking.  Resolve from the contained namespace, not the parent.
2166
2167 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2168
2169         PR fortran/19543
2170         * trans-const.c (gfc_conv_constant_to_tree): Give logical
2171         constants the correct type.
2172
2173         PR fortran/19194
2174         * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2175         length parameters.
2176         (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2177         pointer fields.
2178
2179 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2180
2181         * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2182         gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2183         match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2184         scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2185         trans-io.c, trans-stmt.c, trans.c: Update copyright.
2186
2187 2005-01-17  Ira Rosen  <irar@il.ibm.com>
2188
2189         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2190
2191 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2192
2193         PR fortran/19182
2194         * error.c (error_char): Line-buffer errors / warnings.
2195
2196 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2197
2198         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2199         unsigned issue.  Use build_int_cst instead of converting
2200         integer_zero_node.  Remove unnecessary conversion.
2201
2202         * trans-types.c (gfc_get_character_type_len): : Use
2203         gfc_charlen_type_node as basic type for the range field.
2204
2205         * trans-intrinsic.c (build_fixbound_expr,
2206         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2207         gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2208         gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2209         of converting 'integer_zero_node' or 'integer_one_node'
2210         respectively.
2211         (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2212         evade re-building.
2213         (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2214         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2215         'build_int_cst' instead of converting 'integer_zero_node' or
2216         'integer_one_node' respectively.
2217
2218         * trans-intrinsic.c (gfc_conv_intrinsic_index,
2219         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2220         'gfc'-prefix from local variable, remove dead code, use correct
2221         type when inserting argument.
2222
2223         * trans-intrinsic.c, trans-types.c: Update copyright years.
2224
2225 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
2226
2227         PR 19168
2228         * resolve.c (check_case_overlap): Typo in comment.
2229         (validate_case_label_expr):  Fix up kinds of case values
2230         (resolve_select): Properly handle kind mismatches.
2231
2232 2004-01-16  Paul Brook  <paul@codesourcery.com>
2233
2234         PR fortran/17675
2235         * trans-common.c (translate_common): Remove duplicate function call.
2236         (finish_equivalences): Preserve alignment when biasing offsets.
2237
2238 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
2239
2240         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2241         ASCII-like character encoding.
2242
2243 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
2244
2245         * resolve.c (compare_case): Cleanup.
2246
2247 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
2248
2249         * resolve.c (compare_case): Give arguments correct type.
2250
2251 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
2252
2253         * iresolve.c, trans-common.c, trans-types.c: Fix comment
2254         typos.
2255
2256 2005-01-09  Paul Brook  <paul@codesourcery.com>
2257
2258         PR fortran/17675
2259         * trans-common.c (current_common, current_offset): Remove.
2260         (create_common): Add head argument.
2261         (align_segment): New function.
2262         (apply_segment_offset): New function.
2263         (translate_common): Merge code from new_segment.  Handle alignment.
2264         (new_segment): Remove.
2265         (finish_equivalences): Ensure proper alignment.
2266
2267 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2268
2269         * trans-const.c: Don't include unused math.h.
2270
2271         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2272         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2273         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2274         trailing whitespace.
2275         (prepare_arg_info): Fix formatting, indenting and remove trailing
2276         whitespace.
2277         (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2278         trailing whitespace.
2279
2280         * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2281         gfc_constant_result, gfc_range_check, gfc_arith_power,
2282         eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2283         gfc_real2complex, gfc_complex2int, gfc_complex2real,
2284         gfc_complex2complex): Fix whitespace issues.
2285         * check.c (must_be, type_check, numeric_check, int_or_real_check,
2286         logical_array_check, array_check, scalar_check, nonoptional_check,
2287         variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2288         gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2289         gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2290         gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2291         gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2292         gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2293         gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2294         gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2295         gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2296         gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2297         gfc_check_lbound, gfc_check_logical, min_max_args,
2298         gfc_check_min_max_integer, gfc_check_min_max_real,
2299         gfc_check_min_max_double, gfc_check_matmul,
2300         gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2301         gfc_check_pack, gfc_check_precision, gfc_check_radix,
2302         gfc_check_range, gfc_check_real, gfc_check_repeat,
2303         gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2304         gfc_check_set_exponent): Fix formatting issues.
2305         (gfc_check_size, gfc_check_sign): Alphabetize function order,
2306         remove whitespace-only line.
2307         (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2308         gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2309         gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2310         gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2311         gfc_check_random_number, gfc_check_random_seed,
2312         gfc_check_second_sub, gfc_check_system_clock,
2313         gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2314         gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2315         gfc_check_unlink_sub): Fix formatting issues.
2316
2317 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2318
2319         * gfortran.h: Remove outdated comment.  Don't include stdio.h
2320         explicitly.
2321
2322 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2323
2324         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2325         output of 'gfortran --version'.
2326
2327 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
2328
2329         * arith.c: Add system.h; remove string.h
2330         * decl.c: Ditto
2331         * matchexp.c: Ditto
2332         * parse.c: Ditto
2333         * resolve.c: Ditto
2334         * st.c: Ditto
2335         * check.c: Remove stdlib.h and stdarg.h
2336         * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2337         * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2338         * f95-lang.c: Add system.h; remove stdio.h
2339         * interface.c: Add system.h; remove stdlib.h and string.h
2340         * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2341         * io.c: Remove string.h
2342         * simplify.c: Ditto
2343         * match.c: Remove stdarg.h and string.h
2344         * misc.c: Update copyright; add system.h; remove stdlib.h,
2345         string.h, and sys/stat.h
2346         * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2347         unistd.h, and time.h
2348         * option.c: Remove string.h and stdlib.h
2349         * primary.c: Ditto
2350         * scanner.c: Update copyright; add system.h; remove stdlib.h,
2351         stdio.h, string.h, and strings.h
2352         * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2353         * trans-array.c: Remove stdio.h and gmp.h
2354         * trans-const.c: Ditto
2355         * trans-expr.c: Ditto
2356         * trans-io.c: Ditto
2357         * trans-stmt.c: Ditto
2358         * trans.c: Ditto
2359         * trans-intrinsic.c: Remove stdio.h and string.h
2360
2361 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
2362
2363         * gfortran.h (gfc_case): fix typo in comment.
2364
2365 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2366
2367         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2368         logical shift.  Call fold.  Remove 0-bit shift shortcut.
2369         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2370         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
2371         result if width(arg 1) < 4 bytes.  Call fold.
2372
2373         PR fortran/19032
2374         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2375         in front of function to match the standard.  Correct handling
2376         of MODULO.
2377
2378 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
2379
2380         * trans-expr.c (gfc_conv_cst_int_power): Only check for
2381         flag_unsafe_math_optimizations if we have a float type.
2382
2383 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
2384
2385         * gfortran.texi: Fix typo.
2386
2387 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2388
2389         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2390         comment typo.
2391
2392 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2393
2394         PR fortran/18993
2395         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2396         (gfc_match_nullify): Make sure that ')' is in front of the end of
2397         statement.
2398
2399         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2400         function.
2401
2402 2004-12-14  Richard Henderson  <rth@redhat.com>
2403
2404         * gfortran.h (gfc_expr.function.name): Make const.
2405         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2406         (gfc_get_string): Update prototype.
2407         * iresolve.c: Include tree.h.
2408         (string_node, HASH_SIZE, string_head, hash): Remove.
2409         (gfc_get_string): Use vsnprintf, get_identifier.
2410         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2411         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2412         (gfc_done_1): Don't call gfc_iresolve_done_1.
2413         * module.c (mio_allocated_string): Take and return const char *,
2414         instead of modifying char**.
2415         (mio_expr): Update to match.
2416         * resolve.c (pure_function): Constify name argument.
2417         (resolve_function): Constify name.
2418         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2419
2420 2004-12-12  Richard Henderson  <rth@redhat.com>
2421
2422         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2423         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2424         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2425         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2426         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2427         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2428         gfc_resolve_unpack: Use PREFIX.
2429
2430 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2431
2432         PR fortran/18869
2433         * match.c (gfc_match_common): Skip whitespace.
2434
2435 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
2436
2437         PR fortran/16581
2438         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2439         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2440         integer kind check; Issue error for -std=f95 when needed.
2441         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2442         GFC_STD_F95.
2443         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2444         Promote arguments to same kind.
2445
2446 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
2447         Paul Brook  <paul@codesourcery.com>
2448
2449         PR fortran/16222
2450         * resolve.c (gfc_resolve_iterator_expr): New function.
2451         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
2452         start, end and stride to correct type.
2453         (resolve_code): Pass extra argument.
2454         * array.c (resolve_array_list): Pass extra argument.
2455         * gfortran.h (gfc_resolve): Add prototype.
2456         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2457         Handle real type iterators.
2458
2459 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2460
2461         PR fortran/17175
2462         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2463         same kind as C's 'int'.
2464         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2465
2466 2004-12-08  Richard Henderson  <rth@redhat.com>
2467
2468         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2469         to the output expression.
2470         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2471         warning conversion.
2472         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2473         to index kind.
2474
2475 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2476
2477         PR fortran/18826
2478         * resolve.c (resolve_code): Impose correct restrictions on
2479         assigned variable.
2480
2481         * decl.c (gfc_match_end): Use locus of END when eos is an error.
2482
2483 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2484         Paul Brook  <paul@codesourcery.com>
2485
2486         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2487         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2488         (gfc_check_stat, gfc_check_stat_sub): New functions.
2489         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2490         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2491         fstat, and stat to intrinsics symbol tables.
2492         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2493         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2494         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2495         (gfc_resolve_stat, gfc_resolve_flush): New functions.
2496         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2497         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2498
2499 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2500
2501         * intrinsic.c: Fix and add comments, fix function declarations
2502         (OPTIONAL,REQUIRED): New symbols
2503         (add_functions,add_subroutines): Use symbols
2504         (gmp.h): Remove unused include
2505
2506 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2507
2508         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2509         in diagnostics.
2510
2511 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2512
2513         * options.c (gfc_post_options): Don't clear flag_inline_functions.
2514
2515 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
2516
2517         * check.c (gfc_check_getcwd_sub): Fix seg fault.
2518
2519         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2520         gfc_check_unlink,gfc_check_unlink_sub): New functions
2521         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2522         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2523         exit to intrinsics symbol tables.
2524         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2525         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2526         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2527         gfc_resolve_unlink_sub): Add and sort prototypes.
2528         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2529         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2530         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2531
2532 2004-11-16  Paul Brook  <paul@codesourcery.com>
2533
2534         PR fortran/13010
2535         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2536         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2537         * trans-types.c (gfc_get_dtype): Accept array type rather than element
2538         type.
2539         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2540         (gfc_get_array_type_bounds): Ditto.
2541         (gfc_get_derived_type): Recurse into derived type pointers.
2542         * trans-types.h (gfc_get_dtype): Add prototype.
2543         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2544
2545 2004-11-15  Paul Brook  <paul@codesourcery.com>
2546
2547         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2548
2549 2004-11-10  Paul Brook  <paul@codesourcery.com>
2550
2551         PR fortran/18375
2552         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2553         * trans-io.c (transfer_array_component): Ditto.
2554
2555 2004-11-10  Paul Brook  <paul@codesourcery.com>
2556
2557         * invoke.texi: Fix typo.
2558
2559 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2560
2561         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2562         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2563         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2564         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2565         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2566
2567 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2568
2569         PR fortran/18023
2570         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2571
2572 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
2573
2574         * gfortranspec.c: Replace GNU CC with GCC.
2575
2576 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2577
2578         * gfortranspec.c (lang_specific_driver): Change year to 2004.
2579
2580 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2581
2582         PR fortran/18111
2583         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2584         hidden parameters.
2585
2586 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2587
2588         PR fortran/15164
2589         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2590         module procedures as if they were module variables.
2591
2592 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2593
2594         PR fortran/17535
2595         PR fortran/17583
2596         PR fortran/17713
2597         * module.c (write_symbol1): Set module_name for dummy arguments.
2598
2599 2004-11-02  Paul Brook  <paul@codesourcery.com>
2600
2601         * intrinsic.c (check_intrinsic_standard): Include error locus.
2602         Remove VLA.
2603         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2604         locus to check_intrinsic_standard.
2605
2606 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2607
2608         PR fortran/17590
2609         * gfortran.h: Change GFC_STD_* flags to more appropriate
2610         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2611         gfc_option_t): Add field for warning about use of nonstandard
2612         intrinsics.
2613         * intrinsic.c (add_sym): Add parameter for standard version, check
2614         this against current standard.
2615         (add_sym_0): Pass standard parameter to add_sym.
2616         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2617         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2618         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2619         (make_generic): Add parameter for standard, check this
2620         against currently selected standard.
2621         (add_functions, add_subroutines): Add parameter to tell which
2622         standard an intrinsic belongs to.
2623         (check_intrinsic_standard): New function.
2624         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2625         (gfc_intrinsic_sub_interface): Ditto.
2626         * lang.opt: Add Wnonstd-intrinsics option.
2627         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2628         init new warning.
2629         (set_Wall): Add warning about nonstd intrinsics.
2630         (gfc_handle_option): Change to use new GFC_STD_* flags,
2631         handle new warning.
2632         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2633
2634 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
2635
2636         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2637
2638 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2639
2640         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2641
2642 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2643
2644         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2645         comment typo.
2646
2647 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
2648
2649         * check.c (gfc_check_rand): Allow missing optional argument.
2650         (gfc_check_irand): Ditto.
2651         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2652
2653 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
2654
2655         PR fortran/13490, PR fortran/17912
2656         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2657         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2658         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2659         warning when compiling with pedantic.
2660         * gcc/fortran/arith.c: Set minimum integer values to reflect
2661         realities of two's complement signed integers. Added
2662         pedantic minimum.
2663
2664 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
2665
2666         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2667         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2668         link it in.
2669
2670 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2671
2672         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2673         typo.
2674         (gfc_generate_function_code): Fix formatting issue.
2675
2676 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2677
2678         * module.c: Fix formatting issues.
2679
2680 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2681
2682         * module.c (mio_interface_rest): Set where member of interface
2683         while loading.
2684
2685 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2686
2687         PR fortran/17901
2688         * options.c (gfc_handle_option): Add break after handing the
2689         J/M option.
2690
2691 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
2692
2693         * arith.c: Fix formatting issues.
2694
2695 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2696
2697         PR fortran/17676
2698         * resolve.c (resolve_operator): Use correct operator name in message.
2699
2700 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2701
2702         * primary.c (match_boz_constant): Allow kind parameter suffixes.
2703         Move standard warning further to the front.
2704
2705 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
2706
2707         * trans-stmt.c: Fix a comment typo.
2708
2709 2004-10-07  Paul Brook  <paul@codesourcery.com>
2710
2711         PR fortran/17678
2712         * trans-array.c (gfc_trans_deferred_array): Leave use associated
2713         variables alone.
2714
2715 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2716
2717         PR fortran/17568
2718         * simplify.c (twos_complement): New function.
2719         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2720
2721         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2722
2723 2004-10-06  Paul Brook  <paul@codesourcery.com>
2724
2725         * trans-stmt.c (gfc_trans_simple_do): New function.
2726         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
2727         loop.  Update comments.
2728
2729 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2730
2731         PR fortran/17283
2732         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2733         is scalar.
2734
2735         PR fortran/17631
2736         * intrinsic.c (add_sym_5): Remove.
2737         (add_subroutines): Add resolution function for MVBITS.
2738         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2739         MVBITS
2740         * iresolve.c (gfc_resolve_mvbits): New function.
2741         (gfc_resolve_random_number): Remove empty line at end of function.
2742
2743         * trans-const.c (gfc_build_cstring_const): New function.
2744         (gfc_init_cst): Use new function.
2745         * trans-const.h (gfc_build_cstring_const): Add prototype.
2746         * trans-io.c (set_string, set_error_locus): Use new function.
2747         * trans-stmt.c (gfc_trans_goto): Use new function.
2748
2749         PR fortran/17708
2750         * parse.c (accept_statement): Don't treat END DO like END IF and
2751         END SELECT.
2752         (parse_do_block): Generate possible END DO label inside END DO
2753         block.
2754
2755         PR fortran/17776
2756         * check.c (gfc_check_system_sub): New function.
2757         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2758         * intrinsic.c (add_functions): Add 'system'.
2759         (add_subroutines): Add 'system'.
2760         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2761         Move prototypes to other suborutines.
2762         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
2763         Add prototype.
2764         (gfc_resolve_system_clock): Fix formatting of prototype.
2765         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
2766         functions.
2767         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
2768         GFC_ISYM_SYSTEM.
2769
2770 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
2771
2772         * scanner.c (preprocessor_line): Accept preprocessor lines without
2773         file names.  Check file names for closing quotes.  Handle escaped
2774         quotes in file names.
2775
2776 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2777         Paul Brook  <paul@codesourcery.com>
2778
2779         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
2780         Use gfc_get_expr_charlen.
2781         * trans-expr.c (gfc_get_expr_charlen): New function.
2782         * trans.h (gfc_get_expr_charlen): Add prototype.
2783
2784 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
2785
2786         * trans-intrinsic.c: Fix a comment typo.
2787
2788 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2789
2790         * simplify.c (range_check): Remove blank line at beginning of function.
2791         (gfc_simplify_dint): Same at end of function.
2792         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
2793         (gfc_simplify_bound): Fix indentation.
2794         (gfc_simplify_log10): Simplify calculation.
2795         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
2796         of function.
2797         (gfc_simplify_nearest): Same at end of function.
2798         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
2799         function.
2800         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
2801         gfc_simplify_spacing): Simplify calulations.
2802
2803 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
2804
2805         * trans-intrinsic.c: Fix comments on spacing and rrspacing
2806         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2807
2808 2004-10-01  Jan Hubicka  <jh@suse.cz>
2809
2810         * f95-lang.c (gfc_expand_function): Update call of
2811         tree_rest_of_compilation.
2812         * trans-decl.c (gfc_generate_constructors): Likewise.
2813
2814 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2815
2816         * trans-intrinsic.c: Comment fixes.
2817
2818 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2819
2820         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2821
2822 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2823
2824         * trans-types.c (gfc_return_by_reference): Remove superfluous
2825         assertion.
2826
2827         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2828         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2829
2830         PR fortran/17615
2831         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2832         function to determine return type.
2833
2834 2004-09-20  Jan Hubicka  <jh@suse.cz>
2835
2836         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2837         tree.
2838         (gfc_generate_function_code): Likewise.
2839
2840 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2841
2842         PR fortran/15957
2843         * simplify.c (gfc_simplify_reshape): Set shape of return value
2844         correctly.
2845
2846 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2847             Zack Weinberg  <zack@codesourcery.com>
2848
2849         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2850         enumeration constants.
2851
2852 2004-09-17  Paul Brook  <paul@codesourcery.com>
2853
2854         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
2855         (gfc_linebuf_header_size): Define.
2856         * scanner.c (load_file): Use it.
2857
2858 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2859
2860         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
2861         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
2862         resolve.c, scanner.c, trans-array.c, trans-array.h,
2863         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
2864         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2865         trans.h: Fix comment typos.  Follow spelling conventions.
2866
2867 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
2868
2869         PR/15364
2870         * trans-io.c (transfer_array_component): New function.
2871         (transfer_expr): For array fields, call transfer_array_component.
2872
2873 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2874
2875         * gfortran.texi: Fix a typo.
2876
2877 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2878
2879         * parse.c (eof_buf): Rename eof to eof_buf.
2880         (unexpected_eof): Same.
2881         (gfc_parse_file): Same.
2882
2883 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
2884
2885         * check.c (gfc_check_getcwd_sub): New function.
2886         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
2887         * intrinsic.c (add_functions): Add function definition;
2888         Use symbol.
2889         * intrinsic.c (add_subroutines): Add subroutine definitions.
2890         * intrinsic.h: Add prototypes.
2891         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
2892         New functions.
2893         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
2894
2895 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2896
2897         PR fortran/16485
2898         * module.c (write_symbol): Don't fill in module name here.
2899         (write_symbol0): Fill in here instead.
2900
2901 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2902
2903         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
2904         trans-array.c, trans-common.c, trans-expr.c,
2905         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
2906         comment typos.  Follow spelling conventions.
2907
2908 2004-09-09  Paul Brook  <paul@codesourcery.com>
2909
2910         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2911
2912 2004-09-08  Paul Brook  <paul@codesourcery.com>
2913
2914         * array.c: Don't include assert.h.
2915         * data.c: Don't include assert.h.  Replace assert and abort with
2916         gcc_assert and gcc_unreachable.
2917         * dependency.c: Ditto.
2918         * f95-lang.c: Ditto.
2919         * iresolve.c: Ditto.
2920         * resolve.c: Ditto.
2921         * simplify.c: Ditto.
2922         * symbol.c: Ditto.
2923         * trans-array.c: Ditto.
2924         * trans-common.c: Ditto.
2925         * trans-const.c: Ditto.
2926         * trans-decl.c: Ditto.
2927         * trans-expr.c: Ditto.
2928         * trans-intrinsic.c: Ditto.
2929         * trans-io.c: Ditto.
2930         * trans-stmt.c: Ditto.
2931         * trans-types.c: Ditto.
2932         * trans.c: Ditto.
2933
2934 2004-09-07  Per Bothner  <per@bothner.com>
2935         Paul Brook  <paul@codesourcery.com>
2936
2937         * error.c (show_locus): Handle mapped locations.
2938         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
2939         * gfortran.h: Include input.h.
2940         (struct gfc_linebuf): Use source_location.
2941         * scanner.c (get_file): Initialize linemap.
2942         (preprocessor_line): Pass extra argument to get_file.
2943         (load_file): Ditto.  Setup linemap.
2944         (gfc_new_file): Handle mapped locations.
2945         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
2946         Set decl source locations.
2947         (gfc_trans_common): Set blank common block location.
2948         * trans-decl.c (gfc_set_decl_location): New function.
2949         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
2950         (trans_function_start): Move call to gfc_set_backend_locus..
2951         (build_function_decl): ... to here.
2952         (build_entry_thunks): Set and restore the backend locus.
2953         (gfc_generate_constructors): Remove excess arguments to
2954         init_function_start.
2955         (gfc_generate_block_data): Add comments.  Set the decl locus.
2956         * trans-io.c (set_error_locus): Handle mapped locations.
2957         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
2958         (gfc_trans_code): Use SET_EXPR_LOCATION.
2959         (gfc_generate_code): Override the location of the new symbol.
2960         * trans.h (gfc_set_decl_location): Add prototype.
2961
2962 2004-08-31  Paul Brook  <paul@codesourcery.com>
2963
2964         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2965
2966 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2967
2968         PR fortran/15327
2969         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2970         strings.
2971
2972 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2973
2974         PR fortran/16400
2975         PR fortran/16404
2976         (port from g95)
2977         * resolve.c (resolve_transfer): New function.
2978         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
2979
2980 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2981
2982         PR fortran/16579
2983         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2984         unsigned char.
2985
2986 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2987
2988         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2989
2990 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2991
2992         PR fortran/17244
2993         * trans-types.c (gfc_return_by_reference): Remove TODO error,
2994         add comment pointing out possible issue WRT compatibility with g77.
2995
2996 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2997
2998         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2999         all occurences of 'gfc_strlen_type_node' by
3000         'gfc_charlen_type_node'.
3001         * trans-types.h: Same. Also update comment accordingly.
3002
3003 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3004
3005         * primary.c: Update copyright boilerplate to say GCC.
3006         * f95-lang.c: Change initial comment to say gfortran.
3007
3008 2004-08-31  Paul Brook  <paul@codesourcery.com>
3009
3010         * trans-types.h: Add comments.
3011         (intmax_type_node, string_type_node, const_string_type_node): Remove.
3012
3013 2004-08-30  Richard Henderson  <rth@redhat.com>
3014
3015         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3016         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3017         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3018         c_long, c_long_long.
3019         (gfc_logical_info): Add c_bool.
3020         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3021         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3022         rather than gfc_int[48]_type_node for allocate choice.
3023         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3024         local copies of some kind type nodes.
3025         (gfc_build_builtin_function_decls): Likewise.
3026         * trans-expr.c (gfc_conv_power_op): Likewise.
3027         * trans-intrinsic.c (gfc_conv_intrinsic_index,
3028         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3029         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3030         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3031         gfc_trans_character_select, gfc_trans_allocate): Likewise.
3032         * trans-io.c (gfc_pint4_type_node): Move into ...
3033         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
3034         some kind type nodes.
3035         * trans-types.c (gfc_type_nodes): Remove.
3036         (gfc_character1_type_node, gfc_strlen_type_node): New.
3037         (gfc_integer_types, gfc_logical_types): New.
3038         (gfc_real_types, gfc_complex_types): New.
3039         (gfc_init_kinds): Fill in real mode_precision.
3040         (gfc_build_int_type, gfc_build_real_type): New.
3041         (gfc_build_complex_type, gfc_build_logical_type): New.
3042         (c_size_t_size): New.
3043         (gfc_init_types): Loop over kinds.
3044         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3045         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3046         (gfc_get_character_type_len): Likewise.
3047         (gfc_type_for_size): Loop over kinds; use a reduced set of
3048         unsigned type nodes.
3049         (gfc_type_for_mode): Loop over kinds.
3050         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3051         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3052         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3053         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3054         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3055         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3056         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3057         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3058         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3059         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3060         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3061         gfc_complex8_type_node, gfc_complex16_type_node,
3062         gfc_logical1_type_node, gfc_logical2_type_node,
3063         gfc_logical4_type_node, gfc_logical8_type_node,
3064         gfc_logical16_type_node, gfc_strlen_kind): Remove.
3065         (gfc_character1_type_node): Turn in to a variable.
3066         (gfc_strlen_type_node): Likewise.
3067
3068 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3069
3070         * gfortran.h (gfc_namespace): Add new field is_block_data.
3071         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3072         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3073         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3074         * trans.h (gfc_generate_block_data): Add prototype.
3075         * trans-decl.c (gfc_generate_block_data): New function.
3076
3077 2004-08-29  Richard Henderson  <rth@redhat.com>
3078
3079         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3080         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3081         than two HOST_WIDE_INT.
3082
3083 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3084
3085         PR fortran/13910
3086         * decl.c (free_variable, free_value, gfc_free_data, var_list,
3087         var_element, top_var_list, match_data_constant, top_val_list,
3088         gfc_match_data): Move here from match.c.
3089         (match_old_style_init): New function.
3090         (variable_decl): Match old-style initialization.
3091         * expr.c (gfc_get_variable_expr): New function.
3092         * gfortran.h (gfc_get_variable_expr): Add prototype.
3093         * gfortran.texi: Start documentation for supported extensions.
3094         * match.c: Remove the functions moved to decl.c.
3095         * match.h (gfc_match_data): Move prototype to under decl.c.
3096         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3097         comments.
3098
3099 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3100         Paul Brook  <paul@codesourcery.com>
3101
3102         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3103         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3104         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3105         (build_builtin_fntypes): New function.
3106         (gfc_init_builtin_functions): Use it.
3107         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3108         and GFC_ISYM_ERF{,C}.
3109         (gfc_c_int_kind): Declare.
3110         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3111         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3112         gfc_resolve_g77_math1): Add prototypes.
3113         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3114         * mathbuiltins.def: Add comment.  Change third argument.  Use
3115         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
3116         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3117         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3118         * trans-types.c (gfc_c_int_kind): Declare.
3119         (gfc_init_kinds): Set it.
3120
3121 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3122         Paul Brook  <paul@codesourcery.com>
3123
3124         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3125         (gfc_check_f, gfc_simplify_f): Add f0.
3126         * intrinsic.c (do_check): Call f0.  Flatten.
3127         (add_sym_0): Fix prototype.  Set f0.
3128         (add_functions): Add getgid, getgid and getuid.
3129         (resolve_intrinsic): Remove obsolete comment.
3130         (do_simplify): Call f0.
3131         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3132         gfc_resolve_getuid): Add prototypes.
3133         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3134         gfc_resolve_getuid): New functions.
3135         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3136         GFC_ISYM_GET?ID.
3137
3138 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3139
3140         * error.c (gfc_error_init_1): Remove blank line in front of
3141         function body. Add missing blank.
3142         (gfc_buffer_error, error_char, error_string): Remove blank line in
3143         front of function body.
3144         (show_locus): Add comma in comment.
3145         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3146         gfc_push_error, gfc_pop_error): Remove blank line in front of
3147         function body.
3148         (gfc_get_errors): Typo fix in comment in front of function. Remove
3149         blank line in front of function body.
3150
3151 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3152
3153         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3154         variable declaration of same name.
3155         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3156         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3157         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3158         Replace all calls to gfc_default_*_kind with variable accesses.
3159         * trans-types.c: Same as above.
3160         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3161         static qualifier. Replace all occurences.
3162         (gfc_default_*_kind): Remove functions.
3163
3164 2004-08-26  Richard Henderson  <rth@redhat.com>
3165
3166         * arith.c: Include system.h, not real system headers.
3167         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3168         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3169         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3170         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3171         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3172         gfc_index_integer_kind, gfc_default_integer_kind,
3173         gfc_default_real_kind,gfc_default_double_kind,
3174         gfc_default_character_kind, gfc_default_logical_kind,
3175         gfc_default_complex_kind, validate_integer, validate_real,
3176         validate_logical, validate_character,
3177         gfc_validate_kind): Move to trans-types.c.
3178         (gfc_set_model_kind): Use gfc_validate_kind.
3179         (gfc_set_model): Just copy the current precision to default.
3180         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3181         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3182         * gfortran.h: Update file commentary.
3183         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3184         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3185         gfc_default_double_kind_1, gfc_default_character_kind_1,
3186         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3187         (gfc_init_kinds): New.
3188         (gfc_init_types): Don't set gfc_index_integer_kind here.
3189         * trans-types.h (gfc_init_kinds): Declare.
3190         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3191
3192 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3193
3194         * check.c (gfc_check_atan2): New function.
3195         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3196         * intrinsic.h (gfc_check_atan2): Add prototype.
3197
3198 2004-08-25  Richard Henderson  <rth@redhat.com>
3199
3200         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3201         false and we don't validate the kind.
3202         (gfc_check_integer_range, gfc_check_real_range): Update to match.
3203         * check.c (kind_check): Likewise.
3204         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3205         (match_char_spec, match_logical_spec): Likewise.
3206         * gfortran.h (gfc_validate_kind): Likewise.
3207         * options.c (gfc_handle_option): Likewise.
3208         * primary.c (match_integer_constant, match_real_constant,
3209         match_string_constant, match_logical_constant,
3210         match_const_complex_part): Likewise.
3211         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3212         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3213         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3214         gfc_simplify_maxexponent, gfc_simplify_minexponent,
3215         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3216         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3217         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3218         gfc_simplify_tiny): Likewise.
3219         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3220         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3221         prepare_arg_info): Likewise.
3222
3223 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3224
3225         * expr.c (gfc_check_assign): Add comment. Add new warning.
3226         * trans-expr.c (gfc_conv_function_call): Correctly dereference
3227         result of pointer valued function when not in pointer assignment.
3228
3229 2004-08-25  Paul Brook  <paul@codesourcery.com>
3230
3231         * config-lang.in: Remove dead commented line.
3232         * module.c: Replace g95 with gfortran in comment.
3233
3234 2004-08-25  Paul Brook  <paul@codesourcery.com>
3235
3236         PR fortran/17190
3237         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3238
3239 2004-08-25  Paul Brook  <paul@codesourcery.com>
3240
3241         PR fortran/17144
3242         * trans-array.c (gfc_trans_allocate_temp_array): Remove
3243         string_length argument.
3244         (gfc_trans_array_ctor_element): New function.
3245         (gfc_trans_array_constructor_subarray): Use it.
3246         (gfc_trans_array_constructor_value): Ditto.  Handle constant
3247         character arrays.
3248         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3249         (gfc_trans_array_constructor): Use them.
3250         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3251         (gfc_conv_ss_descriptor): Remember section string length.
3252         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
3253         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3254         (gfc_conv_expr_descriptor): Ditto.
3255         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
3256         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3257         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
3258         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3259         (gfc_conv_variable): Set string_length from section.
3260         (gfc_conv_function_call): Remove extra argument.
3261         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3262         * trans-types.c (gfc_get_character_type_len): New function.
3263         (gfc_get_character_type): Use it.
3264         (gfc_get_dtype): Return zero for internal types.
3265         * trans-types.h (gfc_get_character_type_len): Add prototype.
3266         * trans.h (struct gfc_ss): Move string_length out of union.
3267
3268 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3269
3270         * trans.h (build2_v, build3_v): New macros.
3271         (build_v): Remove.
3272         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3273         build.
3274         * trans-array.c (gfc_conv_descriptor_data,
3275         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3276         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3277         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3278         gfc_trans_allocate_temp_array,
3279         gfc_trans_array_constructor_subarray,
3280         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3281         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3282         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3283         gfc_conv_array_ref, gfc_trans_preloop_setup,
3284         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3285         gfc_conv_loop_setup, gfc_array_init_size,
3286         gfc_conv_array_initializer, gfc_trans_array_bounds,
3287         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3288         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3289         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3290         of build and build_v as appropriate.
3291         * trans-common.c (create_common): Same.
3292         * trans-decl.c (gfc_trans_auto_character_variable,
3293         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3294         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3295         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3296         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3297         gfc_conv_expr_op, gfc_conv_function_call,
3298         gfc_trans_structure_assign): Same.
3299         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3300         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3301         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3302         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3303         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3304         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3305         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3306         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3307         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3308         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3309         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3310         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3311         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3312         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3313         gfc_conv_intrinsic_iargc): Same.
3314         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3315         set_flag, add_case, io_result, transfer_namelist_element,
3316         transfer_expr): Same.
3317         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3318         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3319         gfc_trans_integer_select, gfc_trans_logical_select,
3320         gfc_trans_character_select, gfc_trans_forall_loop,
3321         gfc_trans_nested_forall_loop, gfc_do_allocate,
3322         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3323         compute_inner_temp_size, compute_overall_iter_number,
3324         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3325         gfc_trans_forall_1, gfc_evaluate_where_mask,
3326         gfc_trans_where_assign, gfc_trans_allocate): Same.
3327         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3328         * trans.c (gfc_add_modify_expr, gfc_finish_block,
3329         gfc_build_array_ref, gfc_build_function_call,
3330         gfc_trans_runtime_check): Same.
3331
3332 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3333
3334         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3335         build_int_cst to build_int_cst_wide in accordance to Nathan's
3336         previous patch.
3337
3338 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3339