OSDN Git Service

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