OSDN Git Service

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