OSDN Git Service

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