OSDN Git Service

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