OSDN Git Service

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