OSDN Git Service

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