* trans-stmt.c (gfc_trans_goto): Jump to the known label instead
[official-gcc.git] / gcc / fortran / ChangeLog
blobf64e743aff9392f929ee71a9cc97ae460e3b2566
1 2005-07-31  Steven Bosscher  <stevenb@suse.de>
3         * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
4         of the assigned goto variable.
6 2005-07-29  Steven Bosscher  <stevenb@suse.de>
8         * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
10 2005-07-28  Andrew Pinski  <pinskia@physics.uc.edu>
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.
18 2005-07-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
20         PR fortran/22503
21         * resolve.c (resolve_operator): Improve diagnostic for comparison
22         of logicals with invalid operator.
24 2005-07-25  Jakub Jelinek  <jakub@redhat.com>
26         PR fortran/20063
27         * data.c (gfc_assign_data_value_range): Call
28         create_character_initializer if last_ts is a character type.
30 2005-07-22  Manfred Hollstein  <mh@suse.com>
32         * match.c (gfc_match_symbol): Fix uninitialised warnings.
33         * matchexp.c (gfc_match_expr): Likewise.
35 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
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.
46 2005-07-19 Paul Thomas  <pault@gcc.gnu.org>
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.
53 2005-07-16  David Edelsohn  <edelsohn@gnu.org>
55         PR fortran/21730
56         * decl.c (do_parm): Adjust character initializer to character length
57         of symbol before assigning.
59 2005-07-14  Steve Ellcey  <sje@cup.hp.com>
61         * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
63 2005-07-14  Jakub Jelinek  <jakub@redhat.com>
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.
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.
89 2005-07-14  Feng Wang  <fengwang@nudt.edu.cn>
90         Steven G. Kargl  <kargls@comcast.net>
92         * array.c (resolve_character_array_constructor): Allocate gfc_charlen
93         for the array and attach to namespace list for automatic deallocation.
95 2005-07-13  Andreas Schwab  <schwab@suse.de>
97         * Make-lang.in (fortran/dependency.o): Depend on
98         $(GFORTRAN_TRANS_DEPS).
100 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
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.
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.
113 2005-07-08  Jakub Jelinek  <jakub@redhat.com>
115         * primary.c (gfc_match_rvalue): Handle ENTRY the same way
116         as FUNCTION.
118 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
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.
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.
131 2005-07-07  Steven Bosscher  <stevenb@suse.de>
133         * primary.c (match_hollerith_constant): Use int, not unsigned int,
134         for the hollerith length.  Fix indentation.
136 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
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.
171 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
173         PR fortran/22327
174         * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
176 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
178         * decl.c (gfc_match_entry): Allow ENTRY without parentheses
179         even in FUNCTIONs.
181 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
183         * gfortran.texi, intrinsic.texi: Fix typos.
184         * symbol.c: Fix a comment typo.
186 2005-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
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.
194 2005-07-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
196         PR fortran/20842
197         * io.c (match_dt_element): Do not allow END tag in PRINT or
198         WRITE statement.
200 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
202         * lang.opt: Remove "." from end of help texts.
204 2005-07-01  Jerry DeLisle  <jvdelisle@verizon.net>
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.
212 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
214         * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
215         type than boolean_type_node.
217 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
219         * all files: Update FSF address in copyright headers.
221 2005-06-24  Jerry DeLisle <jvdelisle@verizon.net>
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.
235 2005-06-24  Feng Wang  <fengwang@nudt.edu.cn>
237         * simplify.c (gfc_simplify_modulo): Don't clear before get result.
239 2005-06-22  Paul Brook  <paul@codesourcery.com>
241         PR fortran/21034
242         * symbol.c (gfc_is_var_automatic): New function.
243         (save_symbol): Use it.
245 2005-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
246             Paul Thomas  <pault@gcc.gnu.org>
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.
255 2005-06-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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.
265 2005-06-20  Steven G. Kargl  <kargls@comcast.net>
266         (port from g95)
268         PR fortran/21257
269         * match.c (gfc_match_label): Detect duplicate labels.
272 2005-06-20  Erik Edelmann  <erik.edelmann@iki.fi>
274         * intrinsic.c (check_intrinsic_standard): Fix spelling error
275         in a warning message.
277 2005-06-18  Erik Edelman  <eedelman@acclab.helsinki.fi>
278             Steven G. Kargl <kargls@comast.net>
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.
285 2005-06-18  Steven G. Kargl  <kargls@comcast.net>
287         * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
288         functions whose simplification routine return FAILURE.
290 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
292         * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
293         (rule for installing f95.1 manpage): Does depend on installdirs.
295 2005-06-13  Jakub Jelinek  <jakub@redhat.com>
297         PR fortran/22038
298         * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
299         in the innermost loop.
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.
311 2005-06-12  Richard Henderson  <rth@redhat.com>
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.
331 2005-06-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
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.
350 2005-06-07  Jerry DeLisle <jvdelisle@verizon.net>
352         * intrinsic.texi: Add documentation for dcmplx, digits,
353         dim, idim, ddim, dot_product, dprod, dreal, and dtime.
355 2005-06-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
362         * invoke.texi: Fix description of flags required for compatibility
363         with g77.
365 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
366         Erik Schnetter  <schnetter@aei.mpg.de>
368         PR fortran/19195
369         * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
370         remove FIXME comment. 
372 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
374         * match.c (match_forall_iterator): Don't immediately give error if '='
375         is not followed by an expression.
377 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
378         Erik Edelmann  <erik.edelmann@iki.fi>
380         * array.c (gfc_match_array_constructor): Disallow empty array
381         constructor.
383 2005-06-03  Jerry DeLisle <jvdelisle@verizon.net>
385         * fortran/intrinsic.texi: Add documentation for
386         command_argument_count, conjg, dconjg, count,
387         cpu_time, cshift, date_and_time, dble, dfloat.
389 2005-06-01  Roger Sayle  <roger@eyesopen.com>
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.
405 2005-06-01  Paul Thomas  <pault@gcc.gnu.org>
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.
412 2005-06-01  Jakub Jelinek  <jakub@redhat.com>
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.
422 2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>
424         PR fortran/20883
425         * fortran/io.c (resolve_tag): Fix error message.
427 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
429         * fortran/trans-decl.c: Don't include errors.h.
430         * fortran/Make-lang.in: Updates dependencies.
432 2005-05-31  Paul Thomas  <pault@gcc.gnu.org>
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.
448 2005-05-30  Roger Sayle  <roger@eyesopen.com>
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.
463 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
465         * trans-expr.c: Remove trailing ^M.
467         * trans-expr.c: Fix comment typos.
469 2005-05-29  Paul Thomas  <pault@gcc.gnu.org>
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.
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.
492 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
494         PR libfortran/20006
495         * io.c (format_item_1): Add check and extension warning for
496         $ edit descriptor.
498 2005-05-28  Steven G. Kargl  <kargls@comcast.net>
500         * arith.c (gfc_arith_init_1): Fix off by one problem;
501         (gfc_check_integer_range): Chop extra bits in subnormal numbers.
503 2005-05-28  Jerry DeLisle   <jvdelisle@verizon.net>
504             Steven G. Kargl  <kargls@comcast.net>
506         * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
507         and CMPLX
509 2005-05-27  Steven G. Kargl  <kargls@comcast.net>
511         * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
512         like types in comparsion.
514 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
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.
520 2005-05-22  Roger Sayle  <roger@eyesopen.com>
522         * gfortran.texi: Document some more GNU extensions.
524 2005-05-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
526         * error.c (gfc_warning): Fix typo in comment.
528 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
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.
535 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
537         * array.c (gfc_match_array_constructor): Support [ ... ]
538         style array constructors.
540 2005-05-18  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
550 2005-05-18  Feng Wang  <fengwang@nudt.edu.cn>
552         PR fortran/20954
553         * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
554         build character length.
556 2005-05-17  Zdenek Dvorak  <dvorakz@suse.cz>
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.
562 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
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.
590 2005-05-15  Feng Wang <fengwang@nudt.edu.cn>
591         Jerry DeLisle <jvdelisle@verizon.net>
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.
599 2005-05-13  Paul Brook  <paul@codesourcery.com>
601         * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
603 2005-05-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
605         * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
607 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
609         PR fortran/21260
610         * io.c (check_format): Look for literal characters inside
611         hollerith constant.
613 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
620 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
651 2005-05-09  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
657 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
659         * intrinsic.texi: Fix typos.
661 2005-05-07  Steven G. Kargl  <kargls@comcast.net>
663         * intrinsic.texi:  Document ASSOCIATED and ATAN2.  Update Bessel function
664         description to include information about scalar arguments.
666 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
668         * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
669         match.h, trans-array.h: Update copyright.
671 2005-04-29  Tom Tromey  <tromey@redhat.com>
673         * f95-lang.c (poplevel): Updated for change to build_block.
675 2005-04-29  Jakub Jelinek  <jakub@redhat.com>
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.
706 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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>
713         * trans-expr.c (gfc_conv_expr_present): Fix broken assert.  Update
714         comment.
716 2005-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
723 2005-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
725         * gfortran.h (gfc_gsymbol): Make name a const char *.
726         * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
727         gfc_get_string.
729 2005-04-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
731         PR fortran/20865
732         * resolve.c (resolve_actual_arglist): Issue an error if a statement
733         functions is used as actual argument.
735 2005-04-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
737         PR fortran/21177
738         * interface.c (compare_parameter): Ignore type for EXPR_NULL
739         only if type is BT_UNKNOWN.
741 2005-04-25  Paul Brook  <paul@codesourcery.com>
742         Steven G. Kargl  <kargls@comcast.net>
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.
751 2005-04-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
753         PR fortran/20059
754         * trans-common.c (translate_common): Cast offset and
755         common_segment->offset to type int for warning message.
757 2005-04-23  DJ Delorie  <dj@redhat.com>
759         * trans-decl.c: Adjust warning() callers.
761 2005-04-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
763         * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
764         intermediate representation.  Fix typo in comment.
766 2005-04-21  Steven G. Kargl  <kargls@comcast.net>
768         * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
769         simplify logic; Add a gcc_assert.
771 2005-04-19  Steven G. Kargl  <kargls@comcast.net>
773         * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
775 2005-04-19  Arnaud Desitter  <arnaud.desitter@ouce.ox.ac.uk>
776             Steven G. Kargl  <kargls@comcast.net>
778         * invoke.texi: Update -Waliasing description
780 2005-04-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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.
786 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
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.
804 2005-04-17  Richard Guenther  <rguenth@gcc.gnu.org>
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.
811 2005-04-15  Richard Guenther  <rguenth@gcc.gnu.org>
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.
822 2005-04-14  Steven G. Kargl  <kargls@comcast.net>
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.).
829 2005-04-12  Kazu Hirata  <kazu@cs.umass.edu>
831         * simplify.c: Fix a comment typo.
833 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
835         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
837 2005-04-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
839         * simplify.c (gfc_simplify_nearest): Overhaul.
841 2005-04-10  Kazu Hirata  <kazu@cs.umass.edu>
843         * interface.c: Fix a comment typo.
845 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
847         * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
848         Fortran 95.
850 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
852         * simplify.c (gfc_simplify_anint): Use mpfr_round()
853         (gfc_simplify_dnint): ditto.
854         (gfc_simplify_nint): ditto.
856 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
858         PR fortran/13257
859         * io.c (check_format): Allow an optional comma
860         between descriptors.
862 2005-04-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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.
869 2005-04-08  Diego Novillo  <dnovillo@redhat.com>
871         * match.c (gfc_match_arithmetic_if): Declare static.
873 2005-04-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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.
881 2005-04-07  Steven G. Kargl  <kargls@comcast.net>
883         * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
885 2005-04-06  Steven G. Kargl  <kargls@comcast.net>
887         * invoke.texi: Remove documentation of -std=f90 
889 2005-04-06  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
891         * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
892         non-pointer assignment.
894 2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>
896         PR fortran/15959
897         PR fortran/20713
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.
908 2005-04-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
910         * intrinsic.texi: BES?? functions are not in the f95 standard.
912 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
914         * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
916 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
918         * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
919         BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
921 2005-04-02  Steven G. Kargl  <kargls@comcast.net>
923         * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
925 2005-04-01  Kazu Hirata  <kazu@cs.umass.edu>
927         * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
928         trans.h: Fix comment typos.
930 2005-03-29  Steven G. Kargl  <kargls@comcast.net>
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.
941 2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
943         * f95-lang.c (builtin_function): Process the attrs parameter
944         and apply the "const" attribute to the builtin if found.
946 2005-03-27  Steven G. Kargl  <kargls@comcast.net>
948         * intrinsic.texi: Document AIMAG, AINT, ALL
950 2005-03-26  Steven G. Kargl  <kargls@comcast.net>
952         * arith.c (check_result): Fix illogical logic.
954 2005-03-26  Canqun Yang  <canqun@nudt.edu.cn>
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.
963 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
965         * intrinsic.texi: Fix "make dvi"
967 2005-03-24  Steven G. Kargl  <kargls@comcast.net>
969         * intrinsic.texi: New file.
970         * gfortran.texi: Include it; white space change; fix typo.
972 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
974         * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
976 2005-03-23  Steven Bosscher  <stevenb@suse.de>
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.
1006 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
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.
1031 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1033         * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1034         in which the variable is declared.
1036         PR fortran/18525
1037         * resolve.c (was_declared): Also check for dummy attribute.
1039 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1046 2005-03-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
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.
1052 2005-03-17  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1058 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1060         * invoke.texi: Fix typos.
1062 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1064         * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1066 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1068         * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1069         to zero on label_tree.
1071 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
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.
1086 2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1088         PR fortran/20467
1089         * symbol.c (check_conflict): A dummy argument can't be a statement
1090         function.
1092 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
1094         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
1095         the argument of the shift to the unsigned type.
1097 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1099         PR fortran/16907
1100         * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
1102 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1104         PR fortran/20323
1105         * resolve.c (gfc_resolve): Check if character lengths are
1106         specification expressions.
1108 2005-03-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1122 2005-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
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.
1130 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
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.
1136 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
1138         PR fortran/19754
1139         * resolve.c (compare_shapes):  New function.
1140         (resolve_operator): Use it.
1142 2005-03-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1144         * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
1145         type for COMPLEX constants.
1147 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1153 2005-03-04  Steven G. Kargl  <kargls@comcast.net>
1155         * expr.c (gfc_copy_shape_excluding): Change && to ||.
1157 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1159         * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
1160         clarify comment.
1162 2005-02-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1163         (port from g95)
1165         PR fortran/19479
1166         * simplify.c (gfc_simplify_bound): Rename to ...
1167         (simplify_bound): ... this and overhaul.
1169 2005-02-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1171         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
1172         (gfc_conv_intrinsic_function): update function calls
1174 2005-02-27  Steven G. Kargl  <kargl@gcc.gnu.org>
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
1184 2005-02-27  Steven G. Kargl  <kargls@comcast.net>
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.
1192 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1194         * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
1197 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-meunchen.de>
1199         Unrevert previously reverted patch.  Adding this fix:
1200         * module.c (find_true_name): Deal with NULL module.
1202 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1204         Revert yesterday's patch:
1205         2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1207                 * gfortran.h (gfc_component, gfc_actual_arglist, ...
1208                 ... argument.  Copy string instead of pointing to it.
1210 2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
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.
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.
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.
1313 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
1315         * intrinsic.h, st.c: Update copyright.
1317 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1319         * symbol.c: Typos in comments.
1321 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
1323         * expr.c (gfc_type_convert_binary): Typo in comment.
1325 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
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.
1333 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1335         * check.c (gfc_check_int): improve checking of optional kind
1336         * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1338 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
1340         * check.c (gfc_check_achar): New function
1341         * intrinsic.h: Prototype it.
1342         * intrinsic.c (add_function): Use it.
1344 2005-02-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1350 2005-02-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1352         * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1353         (gfc_use_derived): ... this function.
1355 2005-02-09  Richard Henderson  <rth@redhat.com>
1357         * f95-lang.c (gfc_init_builtin_functions): Call
1358         build_common_builtin_nodes; do not define any functions handled
1359         by it.
1361 2005-02-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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'.
1372 2005-02-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1409 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
1411         * gfortran.texi: Don't give last update date.
1413 2006-01-30  Richard Henderson  <rth@redhat.com>
1415         * options.c (gfc_init_options): Zero flag_errno_math.
1417 2005-01-29  Paul Brook  <paul@codesourcery.com>
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.
1426 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
1428         PR fortran/19589
1429         * expr.c (gfc_check_assign):  Check for conformance of logical operands
1431 2004-01-27  Steven Bosscher  <stevenb@suse.de>
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.
1440 2004-01-23  Paul Brook  <paul@codesourcery.com>
1441         Steven G. Kargl  <kargls@comcast.net>
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.
1452 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
1454         PR fortran/19294
1455         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1456         transpose_c8 for complex types.
1458 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
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.
1465 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
1467         PR fortran/19313
1468         * trans-io.c (gfc_trans_inquire): Added code to support
1469         pad.
1471 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
1473         * intrinsic.c (make_alias):  Add standard argument.
1474         (add_functions): Update make_alias calls.
1476 2005-01-22  Paul Brook  <paul@codesourcery.com>
1478         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1480 2005-01-22  Paul Brook  <paul@codesourcery.com>
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.
1489 2005-01-22  Paul Brook  <paul@codesourcery.com>
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.
1499 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1501         PR fortran/19543
1502         * trans-const.c (gfc_conv_constant_to_tree): Give logical
1503         constants the correct type.
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.
1511 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
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.
1519 2005-01-17  Ira Rosen  <irar@il.ibm.com>
1521         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1523 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1525         PR fortran/19182
1526         * error.c (error_char): Line-buffer errors / warnings.
1528 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1534         * trans-types.c (gfc_get_character_type_len): : Use
1535         gfc_charlen_type_node as basic type for the range field.
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.
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.
1555         * trans-intrinsic.c, trans-types.c: Update copyright years.
1557 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
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.
1564 2004-01-16  Paul Brook  <paul@codesourcery.com>
1566         PR fortran/17675
1567         * trans-common.c (translate_common): Remove duplicate function call.
1568         (finish_equivalences): Preserve alignment when biasing offsets.
1570 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
1572         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1573         ASCII-like character encoding.
1575 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
1577         * resolve.c (compare_case): Cleanup.
1579 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
1581         * resolve.c (compare_case): Give arguments correct type.
1583 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
1585         * iresolve.c, trans-common.c, trans-types.c: Fix comment
1586         typos.
1588 2005-01-09  Paul Brook  <paul@codesourcery.com>
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.
1599 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1601         * trans-const.c: Don't include unused math.h.
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.
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.
1649 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1651         * gfortran.h: Remove outdated comment.  Don't include stdio.h
1652         explicitly.
1654 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1656         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1657         output of 'gfortran --version'.
1659 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
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
1693 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
1695         * gfortran.h (gfc_case): fix typo in comment.
1697 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
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.
1710 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
1712         * trans-expr.c (gfc_conv_cst_int_power): Only check for
1713         flag_unsafe_math_optimizations if we have a float type.
1715 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
1717         * gfortran.texi: Fix typo.
1719 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1721         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1722         comment typo.
1724 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1731         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1732         function.
1734 2004-12-14  Richard Henderson  <rth@redhat.com>
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.
1752 2004-12-12  Richard Henderson  <rth@redhat.com>
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.
1762 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1764         PR fortran/18869
1765         * match.c (gfc_match_common): Skip whitespace.
1767 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
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.
1778 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
1779         Paul Brook  <paul@codesourcery.com>
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.
1791 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1798 2004-12-08  Richard Henderson  <rth@redhat.com>
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.
1807 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1809         PR fortran/18826
1810         * resolve.c (resolve_code): Impose correct restrictions on
1811         assigned variable.
1813         * decl.c (gfc_match_end): Use locus of END when eos is an error.
1815 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
1816         Paul Brook  <paul@codesourcery.com>
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.
1831 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
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
1838 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1840         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1841         in diagnostics.
1843 2004-11-24  Steven Bosscher  <stevenb@suse.de>
1845         * options.c (gfc_post_options): Don't clear flag_inline_functions.
1847 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
1849         * check.c (gfc_check_getcwd_sub): Fix seg fault.
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
1864 2004-11-16  Paul Brook  <paul@codesourcery.com>
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.
1877 2004-11-15  Paul Brook  <paul@codesourcery.com>
1879         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1881 2004-11-10  Paul Brook  <paul@codesourcery.com>
1883         PR fortran/18375
1884         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1885         * trans-io.c (transfer_array_component): Ditto.
1887 2004-11-10  Paul Brook  <paul@codesourcery.com>
1889         * invoke.texi: Fix typo.
1891 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
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.
1899 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1901         PR fortran/18023
1902         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1904 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
1906         * gfortranspec.c: Replace GNU CC with GCC.
1908 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1910         * gfortranspec.c (lang_specific_driver): Change year to 2004.
1912 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1914         PR fortran/18111
1915         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1916         hidden parameters.
1918 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
1924 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1926         PR fortran/17535
1927         PR fortran/17583
1928         PR fortran/17713
1929         * module.c (write_symbol1): Set module_name for dummy arguments.
1931 2004-11-02  Paul Brook  <paul@codesourcery.com>
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.
1938 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
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.
1966 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
1968         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1970 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1972         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1974 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1976         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1977         comment typo.
1979 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
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.
1985 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
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.
1996 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
1998         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1999         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2000         link it in.
2002 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2004         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2005         typo.
2006         (gfc_generate_function_code): Fix formatting issue.
2008 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2010         * module.c: Fix formatting issues.
2012 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2014         * module.c (mio_interface_rest): Set where member of interface
2015         while loading.
2017 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2019         PR fortran/17901
2020         * options.c (gfc_handle_option): Add break after handing the
2021         J/M option.
2023 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
2025         * arith.c: Fix formatting issues.
2027 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2029         PR fortran/17676
2030         * resolve.c (resolve_operator): Use correct operator name in message.
2032 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2034         * primary.c (match_boz_constant): Allow kind parameter suffixes.
2035         Move standard warning further to the front.
2037 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
2039         * trans-stmt.c: Fix a comment typo.
2041 2004-10-07  Paul Brook  <paul@codesourcery.com>
2043         PR fortran/17678
2044         * trans-array.c (gfc_trans_deferred_array): Leave use associated
2045         variables alone.
2047 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2049         PR fortran/17568
2050         * simplify.c (twos_complement): New function.
2051         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2053         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2055 2004-10-06  Paul Brook  <paul@codesourcery.com>
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.
2061 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2063         PR fortran/17283
2064         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2065         is scalar.
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.
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.
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.
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.
2102 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
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.
2108 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2109         Paul Brook  <paul@codesourcery.com>
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.
2116 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
2118         * trans-intrinsic.c: Fix a comment typo.
2120 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2135 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
2137         * trans-intrinsic.c: Fix comments on spacing and rrspacing
2138         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
2140 2004-10-01  Jan Hubicka  <jh@suse.cz>
2142         * f95-lang.c (gfc_expand_function): Update call of
2143         tree_rest_of_compilation.
2144         * trans-decl.c (gfc_generate_constructors): Likewise.
2146 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2148         * trans-intrinsic.c: Comment fixes.
2150 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2152         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
2154 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2156         * trans-types.c (gfc_return_by_reference): Remove superfluous
2157         assertion.
2159         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
2160         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
2162         PR fortran/17615
2163         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
2164         function to determine return type.
2166 2004-09-20  Jan Hubicka  <jh@suse.cz>
2168         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
2169         tree.
2170         (gfc_generate_function_code): Likewise.
2172 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2174         PR fortran/15957
2175         * simplify.c (gfc_simplify_reshape): Set shape of return value
2176         correctly.
2178 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2179             Zack Weinberg  <zack@codesourcery.com>
2181         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
2182         enumeration constants.
2184 2004-09-17  Paul Brook  <paul@codesourcery.com>
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.
2190 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
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.
2199 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
2201         PR/15364
2202         * trans-io.c (transfer_array_component): New function.
2203         (transfer_expr): For array fields, call transfer_array_component.
2205 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
2207         * gfortran.texi: Fix a typo.
2209 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
2211         * parse.c (eof_buf): Rename eof to eof_buf.
2212         (unexpected_eof): Same.
2213         (gfc_parse_file): Same.
2215 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
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.
2227 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2229         PR fortran/16485
2230         * module.c (write_symbol): Don't fill in module name here.
2231         (write_symbol0): Fill in here instead.
2233 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
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.
2240 2004-09-09  Paul Brook  <paul@codesourcery.com>
2242         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
2244 2004-09-08  Paul Brook  <paul@codesourcery.com>
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.
2266 2004-09-07  Per Bothner  <per@bothner.com>
2267         Paul Brook  <paul@codesourcery.com>
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.
2294 2004-08-31  Paul Brook  <paul@codesourcery.com>
2296         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
2298 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2300         PR fortran/15327
2301         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
2302         strings.
2304 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2312 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2314         PR fortran/16579
2315         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
2316         unsigned char.
2318 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2320         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
2322 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2328 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2335 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2337         * primary.c: Update copyright boilerplate to say GCC.
2338         * f95-lang.c: Change initial comment to say gfortran.
2340 2004-08-31  Paul Brook  <paul@codesourcery.com>
2342         * trans-types.h: Add comments.
2343         (intmax_type_node, string_type_node, const_string_type_node): Remove.
2345 2004-08-30  Richard Henderson  <rth@redhat.com>
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.
2400 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2409 2004-08-29  Richard Henderson  <rth@redhat.com>
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.
2415 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2431 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2432         Paul Brook  <paul@codesourcery.com>
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.
2453 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
2454         Paul Brook  <paul@codesourcery.com>
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.
2470 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2483 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2496 2004-08-26  Richard Henderson  <rth@redhat.com>
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.
2524 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2530 2004-08-25  Richard Henderson  <rth@redhat.com>
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.
2555 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2561 2004-08-25  Paul Brook  <paul@codesourcery.com>
2563         * config-lang.in: Remove dead commented line.
2564         * module.c: Replace g95 with gfortran in comment.
2566 2004-08-25  Paul Brook  <paul@codesourcery.com>
2568         PR fortran/17190
2569         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2571 2004-08-25  Paul Brook  <paul@codesourcery.com>
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.
2600 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2664 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2670 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
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.
2687 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2689         * trans-decl.c, trans-types.c: Add and remove blank lines as
2690         required.
2692 2004-08-24  Richard Henderson  <rth@redhat.com>
2694         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2696 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2698         * resolve.c (merge_argument_lists): Revert unintentionally
2699         committed change.
2701 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2707         * resolve.c (resolve_entries): Fix a bunch of comment typos.
2709 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2711         * f95-lang.c (gfc_init_decl_processing): Adjust
2712         build_common_tree_nodes call.
2714 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2716         * trans-types.c: Spelling and formatting fixes.
2718 2004-08-23  Richard Henderson  <rth@redhat.com>
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.
2723 2004-08-23  Eric Christopher  <echristo@redhat.com>
2725         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2726         usage. Use build_vector_type_for_mode for vector types.
2728 2004-08-22  Richard Henderson  <rth@redhat.com>
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.
2741 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2743         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2745 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2758 2004-08-20  Paul Brook  <paul@codesourcery.com>
2759         Canqun Yang  <canqun@nudt.edu.cn>
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.
2766 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2767         (Port from g95)
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.
2777 2004-08-19  Paul Brook  <paul@codesourcery.com>
2779         PR fortran/17091
2780         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2781         * symbol.c (gfc_clear_attr): Use memset.
2783 2004-08-19  Paul Brook  <paul@codesourcery.com>
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.
2792 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
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.
2807 2004-08-18  Paul Brook  <paul@codesourcery.com>
2809         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2811 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
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.
2821 2004-08-17  Paul Brook  <paul@codesourcery.com>
2822         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
2869 2004-08-15  Andrew Pinski  <apinski@apple.com>
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.
2888 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
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.
2905 2004-08-14  Paul Brook  <paul@codesourcery.com>
2907         * trans-decl.c (gfc_build_function_decl): Remove dead code.
2909 2004-08-14  Paul Brook  <paul@codesourcery.com>
2911         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2913 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2915         * gfortran.h: Add comments.
2916         * parse.c (parse_contained): Fix comment typo.
2917         * resolve.c (was_declared): Ditto.
2918         * symbol.c: Ditto.
2920 2004-08-11  Paul Brook  <paul@codeourcery.com>
2922         PR fortran/16917
2923         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2925 2004-08-10  Richard Henderson  <rth@redhat.com>
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.
2932 2004-08-10  Paul Brook  <paul@codesourcery.com>
2934         * trans-io.c (transfer_expr): Handle pointters.
2936 2004-08-10  Paul Brook  <paul@codesourcery.com>
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.
2954 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
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.
2965 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
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.
2974 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
2976         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2977         __builtin_pow[f] arguments.
2979 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
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.
3036 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
3037         Paul Brook  <paul@codesourcery.com>
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.
3051 2004-08-01  Roger Sayle  <roger@eyesopen.com>
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.
3058 2004-07-30  Richard Henderson  <rth@redhat.com>
3060         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3061         for TREE_CONSTANTs.
3063 2004-07-25  Richard Henderson  <rth@redhat.com>
3065         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3066         and DECL_IGNORED_P on RESULT_DECL.
3067         (gfc_generate_constructors): Likewise.
3069 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3082 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3084         * trans.h (builtin_function): Declare.
3086 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3108         * parse.c (gfc_check_do_variable): Fix error locus.
3110 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3112         PR fortran/15129
3113         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
3114         for every assumed length character dummy argument.
3116         PR fortran/15140
3117         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
3119         PR fortran/13792
3120         * simplify.c (gfc_simplify_bound): Copy the bound expression.
3122 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3133 2004-07-12  Paul Brook  <paul@codesourcery.com>
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.
3144 2004-07-11  Paul Brook  <paul@codesourcery.com>
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.
3151 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3153         PR fortran/16455
3154         * module.c (gfc_dump_module, gfc_use_module): Print locus
3155         when opening of module file fails.
3157         PR fortran/16404
3158         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
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.
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.
3170         PR fortran/15754
3171         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
3172         warning if assigning NULL().
3174 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
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.
3183 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3189 2004-07-10  Paul Brook  <paul@codesourcery.com>
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.
3196 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3216 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3218         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
3219         and RHS match. Return early if the RHS is NULL().
3221         PR fortran/16336
3222         * match.c (match_common): Fix error reporting for used common.
3224         PR fortran/15969
3225         * trans-expr.c (gfc_conv_structure): Handle initialization
3226         of scalar pointer components.
3228         * parse.c (decode_statement): Fix matching of BLOCK DATA.
3230         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
3231         by fix for PR 15481.
3233 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3235         * trans-common.c: Fix whitespace issues, make variable names
3236         more readable.
3237         (create_common): Additionally, make loop logic more obvious.
3239 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3240         Paul Brook  <paul@codesourcery.com>
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.
3250 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3252         PR fortran/14077
3253         * moduele.c (mio_symbol): Don't I/O initial values unless
3254         symbol is a parameter.
3256 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3264 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3279 2004-07-08  Paul Brook  <paul@codesourcery.com>
3281         * intrinsic.c (add_sym_4s): New function.
3282         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
3284 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3285         Paul Brook  <paul@codesourcery.com>
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.
3305 2004-07-04  Matthias Klose  <doko@debian.org>
3307         * Make-lang.in: Generate and install gfortran man page.
3308         * invoke.texi: Remove extra '@c man end'.
3310 2004-07-04  Richard Henderson  <rth@redhat.com>
3312         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
3314 2004-07-04  Paul Brook  <paul@codesourcery.com>
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.
3327 2004-06-30  Richard Henderson  <rth@redhat.com>
3329         * match.c (var_element): Remove unused variable.
3331         * trans-decl.c (gfc_generate_function_code): Don't set
3332         x_whole_function_mode_p.
3333         (gfc_generate_constructors): Likewise.
3335 2004-06-30  Richard Henderson  <rth@redhat.com>
3337         * trans-decl.c (gfc_generate_function_code): Don't set
3338         immediate_size_expand.
3339         (gfc_generate_constructors): Likewise.
3341 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3361 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3363         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3364         copyright years.
3366 2004-06-29  Steven Bosscher  <stevenb@suse.de>
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.
3401         * trans.c (gfc_add_modify_expr): Add sanity check that types
3402         for the lhs and rhs are the same for scalar assignments.
3404 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3406         * dump-parse-tree.c (show_common): New function.
3407         (gfc_show_namespace): Show commons.
3409 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3410         Andrew Vaught  <andyv@firstinter.net>
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.
3476 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3478         * io.c: Add 2004 to copyright years.
3480 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3481         Andrew Vaught  <andyv@firstinter.net>
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.
3496 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3498         * module.c (mio_gmp_real): Correct writing of negative numbers.
3500 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3502         PR fortran/15963
3503         * expr.c (check_intrinsic_op): Allow comparison of characters.
3504         Make logic easier.
3506 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3507         Andrew Vaught  <andyv@firstinter.net>
3509         * decl.c (contained_procedure): New function.
3510         (match_end): Verify correctness of END STATEMENT in
3511         all cases.
3513 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3514         Andrew Vaught  <andyv@firstinter.net>
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.
3520 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
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.
3539 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
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.
3553 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
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.
3561 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3567 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3569         * array.c (gfc_insert_constructor): Avoid redundant call to
3570         mpz_comp. Add 2004 to copyright years.
3572 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3574         * trans.h (stmtblock_t): Change has_scope to unsigned int.
3576 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
3578         * arith.c (gfc_range_check): correct complex underflow.
3580 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3589 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3591         PR fortran/15211
3592         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3593         of strings.
3595 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3597         PR fortran/15510
3598         * trans-deecl.c (generate_local_decl): Do not issue warning for
3599         unused variables if they're use associated.
3601 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3602         Andrew Vaught <andyv@firstinter.net>
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.
3613 2004-06-14  Paul Brook  <paul@codesourcery.com>
3615         * intrinsic.c (add_sym_2s): Use correct function types.
3617 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3622 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
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.
3635 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3637         PR fortran/14957
3638         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3639         contained procedure.
3641 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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()
3649 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
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.
3655 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3663 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3670 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3677 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3679         * intrinsic.c (sort_actual): Keep track of type of missing
3680         arguments. (Missing from previous commit.)
3682 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3690 2004-06-03  Paul Brook  <paul@codesourcery.com>
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.
3696 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3698         * trans-array.c: Fix spelling in comments.
3700 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3707 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3709         PR fortran/15477
3710         * gfortran.h (GFC_VERSION): Remove.
3711         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3712         where used.
3714 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3716         * trans-types.c: Fix spelling & layout in comments.
3718 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3720         PR fortran/14067
3721         * trans-const.c (gfc_conv_string_init): Allow variable string
3722         length lower than initialization string length.
3724 2004-05-30  Paul Brook  <paul@codesourcery.com>
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.
3736 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
3738         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3740 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
3742         * simplify.c (gfc_simplify_log): Remove useless line of code.
3744 2004-05-29  Paul Brook  <paul@codesourcery.com>
3746         * trans-common.c (find_equivalence): Find multiple rules.
3748 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
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.
3802 2004-05-26  Roger Sayle  <roger@eyesopen.com>
3804         * io.c (format_asterisk): Silence compiler warnings by correcting
3805         the number of elements of a "locus" initializer.
3807 2004-05-25  Roger Sayle  <roger@eyesopen.com>
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.
3817 2004-05-25  Paul Brook  <paul@codesourcery.com>
3819         * expr.c (check_inquiry): Remove bogus tests.
3821 2004-05-23  Paul Brook  <paul@codesourcery.com>
3823         PR fortran/13773
3824         * expr.c (restricted_args): Remove redundant checks/argument.
3825         (external_spec_function): Update to match.
3826         (restricted_intrinsic): Rewrite.
3828 2004-05-23  Paul Brook  <paul@codesourcery.com>
3829         Victor Leikehman  <lei@haifasphere.co.il>
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.
3845 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
3847         * check.c (gfc_check_random_seed): Issue for too many arguments.
3849 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
3851         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3853 2004-05-22  Paul Brook  <paul@codesourcery.com>
3855         * dump-parse-tree.c (gfc_show_equiv): New function.
3856         (gfc_show_namespace): Use it.
3858 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
3860         PR fortran/13249
3861         * symbol.c (gfc_add_common): Disable checks to work around other more
3862         fundamental inadequacies.
3864 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
3866         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3867         only for functions.
3868         (gfc_build_function_decl): Likewise.
3870 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
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.
3879 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
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.
3891 2004-05-21  Roger Sayle  <roger@eyesopen.com>
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.
3897 2004-05-21  Roger Sayle  <roger@eyesopen.com>
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.
3902 2004-05-20  Roger Sayle  <roger@eyesopen.com>
3904         * io.c (check_format): Allow the number before the X format to
3905         be optional when not -pedantic.
3907 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
3908         Paul Brook  <paul@codesourcery.com>
3910         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3911         Create decls for __builtin_pow{,f}.
3912         * gfortran.h (PREFIX_LEN): Define.
3913         * trans-decl.c (gfor_fndecl_math_powi): Add.
3914         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3915         (gfc_build_intrinsic_function_decls): Create decls for powi.
3916         * trans-expr.c (powi_table): Add.
3917         (gfc_conv_integer_power): Remove.
3918         (gfc_conv_powi): New function.
3919         (gfc_conv_cst_int_power): New function.
3920         (gfc_conv_power_op): Use new powi routines.
3921         * trans.h (struct gfc_powdecl_list): Add.
3922         (gfor_fndecl_math_powi): Add.
3923         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3925 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3927         * trans.c, trans-decl.c: Fix comment typos.
3929 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3931         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3933 2004-05-18  Steve Kargl  <kargls@comcast.net>
3935         * arith.c (gfc_int2complex): Fix incorrect range checking.
3937 2004-05-18  Paul Brook  <paul@codesourcery.com>
3939         PR fortran/13930
3940         * decl.c (add_init_expr_to_sym): Remove incorrect check.
3941         (default_initializer): Move to expr.c.
3942         (variable_decl): Don't assign default initializer to variables.
3943         * expr.c (gfc_default_initializer): Move to here.
3944         * gfortran.h (gfc_default_initializer): Add prototype.
3945         * resolve.c (resolve_symbol): Check for illegal initializers.
3946         Assign default initializer.
3948 2004-05-17  Steve Kargl  <kargls@comcast.net>
3950         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3952 2004-05-17  Steve Kargl  <kargls@comcast.net>
3954         * arith.c (gfc_real2complex): Range checking wrong part of complex
3955         number.
3957 2004-05-16  Paul Brook  <paul@codesourcery.com>
3959         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3961 2004-05-16  Paul Brook  <paul@codesourcery.com>
3963         * arith.c (gfc_range_check): Fix logic error.
3965 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3967         * arith.c: Fix comment typos.
3969 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3971         PR fortran/13742
3972         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3973         not initialized in a disallowed fashion.
3974         * match.c (gfc_match_common): Likewise.
3975         (var_element): Verify that variable is not in the blank COMMON,
3976         if it is in a common.
3978 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
3980         * Make-lang.in (f95.generated-manpages): Remove.
3981         (f95.srcextra): New.
3982         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3983         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3984         (f95.dvi): Remove.
3985         (dvi): New.
3986         (f95.install-info): Remove.
3987         (install-info): New.
3989 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
3991         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3993 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3995         * primary.c (match_boz_constant): Use gfc_notify_std() for
3996         issuing a warning or an error.
3998 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4000         PR fortran/13826
4001         * primary.c (match_structure_constructor): Rename ...
4002         (gfc_match_structure_constructor): ... to this. Make non-static.
4003         (gfc_match_rvalue): Call renamed function.
4004         * match.h (gfc_match_structure_constructor): Declare.
4005         * match.c (gfc_match_data_constant): Handle structure
4006         constructor.
4008 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4010         PR fortran/13702
4011         (Port from g95)
4012         * gfortran.h (gfc_linebuf): New typedef.
4013         (linebuf): Remove.
4014         (gfc_file): Revamped, use new gfc_linebuf.
4015         (locus): Revamped, use new types.
4016         (gfc_current_file): Remove.
4017         (gfc_current_form, gfc_source_file): New global variables.
4018         * match.c (gfc_match_space, gfc_match_strings): Use
4019         gfc_current_form to find source form.
4020         * module.c (gfc_dump_module): Use gfc_source_file when printing
4021         module header.
4022         * error.c (show_locus, show_loci) Use new data structures to print
4023         locus.
4024         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4025         Remove.
4026         (file_head, current_file, gfc_current_form, line_head, line_tail,
4027         gfc_current_locus1, gfc_source_file): New global variables.
4028         (gfc_scanner_init1): Set new global variables.
4029         (gfc_scanner_done1): Free new data structures.
4030         (gfc_current_locus): Return pointer to gfc_current_locus1.
4031         (gfc_set_locus): Set gfc_current_locus1.
4032         (gfc_at_eof): Set new variables.
4033         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4034         to new locus structure.
4035         (gfc_check_include): Remove.
4036         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4037         (gfc_skip_comments): Use gfc_current_form, find locus with
4038         gfc_current_locus1.
4039         (gfc_next_char): Use gfc_current_form.
4040         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4041         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4042         comment formatting.
4043         (get_file): New function.
4044         (preprocessor_line, include_line): New functions.
4045         (load_file): Move down, rewrite to match new data structures.
4046         (gfc_new_file): Rewrite to match new data structures.
4047         * parse.c (next_statement): Remove code which is now useless. Use
4048         gfc_source_form and gfc_source_file where appropriate.
4049         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4050         when determining locus of frontend code.
4051         * trans-io.c (set_error_locus): Same.
4052         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4053         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4054         preprocessor flags.
4055         (all): Add missing initializers.
4057 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4059         * Make-lang.in (trans-common.o): Remove redundant dependency.
4060         (data.c): Replace object file name ...
4061         (data.o): ... by the correct one.
4063 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4065         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4066         for ranges when dumping array references.
4068 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
4070         * decl.c (variable_decl): Always apply default initializer.
4072 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4074         PR fortran/15206
4075         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4076         handle zero correctly.
4078 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4080         * match.c (gfc_match): Eliminate dead code.
4082 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4084         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4085         Detect bad continuation line in fixed form sources.
4087 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4089         PR fortran/15205
4090         * iresolve.c (gfc_resolve_nearest): Add new function.
4091         * intrinsic.h: ... declare it here.
4092         * intrinsic.c (add_functions): ... add it as resolving function
4093         for NEAREST.
4095 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4097         PR fortran/14066
4098         * match.c (gfc_match_do): Allow infinite loops with
4099         label-do-stmt. Do not enforce space after comma.
4101 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4103         PR fortran/15051
4104         * parse.c (parse_interface): Allow empty INTERFACE, remove
4105         seen_body.
4107 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4109         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
4110         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
4111         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
4112         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
4113         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
4114         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
4115         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
4116         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
4117         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
4118         trans-types.h, trans.c, trans.h: Update copyright years and
4119         boilerplate.
4120         * data.c: Likewise, also removed two whitespace-only lines.
4121         * gfortranspec.c, lang.opt: Update copyright years.
4123 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4125         PR fortran/14568
4126         * trans-decl.c (generate_local_decl): Don't warn for unused
4127         variables which are in common blocks.
4129 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4131         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
4132         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
4133         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
4135 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
4137         PR fortran/15314
4138         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
4140 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
4142         * gfortran.texi: Use @table @emph instead of @itemize @emph.
4143         Remove "set DEVELOPMENT".
4144         (Compiling GFORTRAN): Remove.
4146 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4148         * array.c (match_subscript, match_array_ref): Add comments
4149         explaining argument 'init'.
4150         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
4151         trans-expr.c, trans.c: Fix some typos in comments.
4152         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
4153         * primary.c (match_digits, match_integer_constant): Add comment
4154         explaining signflag.
4156 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4158         PR fortran/13940
4159         * primary.c: Include system.h and flags.h, needed for pedantic.
4160         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
4161         pedantic is set.
4163 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4165         PR fortran/13940
4166         * match.c (match_data_constant): Handle case where
4167         gfc_find_symbol sets sym to NULL
4169 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
4171         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
4172         dependency on mathbuiltins.def
4174 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
4176         * trans-io.c (transfer_expr): Implemented recursive printing
4177         of derived types.
4179 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
4181         * gfortranspec.c: Do not include multilib.h.
4183 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4185         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
4186         2004 to copyright years.
4187         * trans-expr.c, trans-decl.c: Comment update, we now generate
4188         GENERIC, not SIMPLE. Add 2004 to copyright years.
4190 2004-04-24  Paul Brook  <paul@codesourcery.com>
4192         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
4194 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
4196         PR 14817
4197         * arith.c (gfc_arith_divide): Fix complex divide.
4199 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
4201         * gfortranspec.c: Include the target headers.
4203 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
4205         PR fortran/14921
4206         PR fortran/14540
4207         * arith.c (arctangent2): New function.
4208         * arith.h (arctangent2): Add function prototype.
4209         * simplify.c (gfc_simplify_atan2): Use it.
4210         (gfc_simplify_log): Use it.
4212 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
4214         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
4215         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
4217 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
4219         PR fortran/14872
4220         * trans-io.c (build_dt): Change REC to value.
4222 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4224         PR 14394
4225         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
4226         the real value when converting mpf to string.
4228 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4230         PR 14395
4231         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
4232         the result.
4234 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
4236         PR fortran/14377
4237         * simplify.c (simplify_min_max): Convert the type of the result.
4239 2004-04-11  Paul Brook  <paul@codesourcery.com>
4241         * gfortran.texi: Use full target triplet.
4243 2004-04-11  Paul Brook  <paul@codesourcery.com>
4245         * Make-lang.in (GFORTRAN_TEXI): Set it.
4246         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
4247         (fortran/gfortran.info): Ditto.
4248         * gfortran.texi: Major update.
4249         * invoke.texi: New file.
4251 2004-04-10  Paul Brook  <paul@codesourcery.com>
4253         * trans-array.c (gfc_trans_allocate_temp_array,
4254         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
4255         * trans-decl.c (gfc_build_dummy_array_decl,
4256         gfc_get_symbol_decl, gfc_build_function_decl,
4257         gfc_create_module_variable): Ditto.
4258         * trans-expr.c (gfc_conv_variable): Ditto.
4259         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
4260         * trans.h (GFC_DECL_STRING): Remove.
4261         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
4262         GFC_DECL_ASSIGN): Renumber flags.
4264 2004-04-05  Paul Brook  <paul@codesourcery.com>
4266         PR 13252
4267         PR 14081
4268         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
4269         and stack_restore.
4270         * gfortran.h (struct gfc_charlen): Add backend_decl.
4271         * trans-array.c (gfc_trans_allocate_temp_array,
4272         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
4273         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
4274         Remove old, broken string handling.
4275         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4276         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4277         gfc_trans_deferred_array): Handle character arrays.
4278         * trans-const.c (gfc_conv_const_charlen): New function.
4279         * trans-const.h (gfc_conv_const_charlen): Add prototype.
4280         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
4281         as static.
4282         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
4283         (gfc_create_string_length): New function.
4284         (gfc_get_symbol_decl): Create lengths for character variables.
4285         (gfc_get_fake_result_decl): Ditto.
4286         (gfc_build_function_decl): Only set length for assumed length
4287         character arguments.
4288         (gfc_trans_dummy_character): New function.
4289         (gfc_trans_auto_character_variable): Rewrite.
4290         (gfc_trans_deferred_vars): Handle more types of character variable.
4291         (gfc_create_module_variable): String lengths have moved.
4292         (gfc_generate_function_code): Initialize deferred var chain earlier.
4293         * trans-expr.c (gfc_conv_init_string_length): Rename ...
4294         (gfc_trans_init_string_length):  ... to this.
4295         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
4296         gfc_conv_function_call): Update to new format for character variables.
4297         (gfc_conv_string_length): Remove.
4298         (gfc_conv_string_parameter): Update assertion.
4299         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
4300         * trans-io.c (set_string): Use new macro names.
4301         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
4302         * trans-types.c (gfc_get_character_type): Use existing length expr.
4303         (gfc_is_nodesc_array): Make public.
4304         (gfc_get_dtype_cst): Rename ...
4305         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
4306         (gfc_get_nodesc_array_type): Use new name.
4307         (gfc_sym_type): New character variable code.
4308         (gfc_get_derived_type): Ditto.
4309         (gfc_get_function_type): Evaluate character variable lengths.
4310         * trans-types.h (gfc_strlen_kind): Define.
4311         (gfc_is_nodesc_array): Add prototype.
4312         * trans.h: Update prototypes.
4313         (struct lang_type): Update comments.
4314         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
4315         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
4317 2004-04-04  Paul Brook  <paul@codesourcery.com>
4319         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
4320         * options.c (gfc_init.options, gfc_handle_option): Ditto.
4321         * trans-expr.c (gfc_conv_function_call): Ditto.
4322         * trans-types.c (gfc_is_nodesc_array): Ditto
4323         * lang.opt (fg77-calls): Remove.
4325 2004-04-04  Paul Brook  <paul@codesourcery.com>
4327         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
4328         (gfc_conv_descriptor_base): Rename ...
4329         (gfc_conv_descriptor_offset): ... to this.
4330         (gfc_trans_allocate_array_storage): Set offset to zero.
4331         (gfc_conv_array_base): Rename ...
4332         (gfc_conv_array_offset): ... to this.
4333         (gfc_conv_array_index_ref): Add offset parameter.
4334         (gfc_conv_array_ref): Include offset.
4335         (gfc_trans_preloop_setup): Use existing offset.
4336         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
4337         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4338         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4339         gfc_conf_ss_descriptor): Set offset.
4340         * trans-array.h: Rename prototypes.
4341         * trans-const.h (gfc_index_zero_node): Define.
4342         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4343         * trans-types.c (gfc_get_array_type_bounds): Ditto.
4344         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4346 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
4348         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4350 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
4352         PR 14055
4353         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
4354         before conversion by gmp library call.
4356 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
4358         PR 12921
4359         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4361 2004-02-24  Richard Henderson  <rth@redhat.com>
4363         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4365 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
4367         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4368         (fortran/gfortran.info): ... to here.
4369         (f95.srcinfo): New.
4371 2004-02-16  Richard Henderson  <rth@redhat.com>
4373         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4374         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4375         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4376         (gfc_expand_function): Rename from expand_function_body, make static,
4377         don't do anything except invoke tree_rest_of_compilation.
4378         (gfc_be_parse_file): Invoke cgraph.
4379         (gfc_expand_decl): Remove.
4380         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4381         __builtin_adjust_trampoline.
4382         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4383         (gfc_finalize): New.
4384         (gfc_generate_function_code): Use it.  Lower nested functions.
4385         * trans-expr.c (gfc_conv_function_call): Add static chain operand
4386         to call_expr.
4387         * trans.c (gfc_build_function_call): Likewise.
4388         * trans.h (expand_function_body): Remove.
4390 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
4392         PR gfortran/13433
4393         * trans-decl.c (gfc_build_function_decl) For functions
4394         returning CHARACTER pass an extra length argument,
4395         following g77 calling conventions.
4396         * trans-types.c (gfc_get_function_type) Ditto.
4397         * trans-expr.c (gfc_conv_function_call) Ditto.
4399 2004-02-14  Paul Brook  <paul@codesourcery.com>
4401         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4403 2004-02-12  Paul Brook  <paul@nowt.org>
4405         * BUGS: Remove.
4407 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4409         * gfortran.texi: Fix typos.
4411 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
4413         PR gfortran/13909
4414         * intrinsic.c (add_conversions) Use logical conversion instead
4415         of real.
4416         * trans-types.c (gfc_get_logical_type) implemented logical*1
4417         and logical*2.
4419 2004-01-17  Paul Brook  <paul@codesourcery.com>
4421         * lang-specs.h: Remove %<fixed-form.
4423 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
4425         * lang-specs.h: Enable preprocessing of source files
4426         ending in .F, .fpp, .FPP, .F90 and .F95.
4428 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
4430         PR fortran/12912
4431         * lang-specs.h: Enable compilation of files ending
4432         in .f, .for and .FOR.
4434 2004-01-11  Paul Brook  <paul@codesourcery.com>
4436         * trans-stmt.c (gfc_trans_if_1): New function.
4437         (gfc_trans_if): Use it.
4439 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
4441         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4442         (gfc_option_t): Add max_identifier_length.
4443         * lang.opt: Add fmax-identifier-length.
4444         * match.c (parse_name): Use limit.
4445         * options.c (gfc_init_options): Set max_identifier_length.
4446         (gfc_handle_option): Ditto.
4448 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
4450         * intrinsic.c (add_functions): Add resolve function to dcmplx.
4451         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4452         * iresolve.c (gfc_resolve_dcmplx): New function.
4454 2004-01-10  Paul Brook  <paul@codesourcery.com>
4456         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4457         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4458         (gfc_return_by_reference): Correct condition.
4459         (gfc_get_function_type): Ditto.
4461 2004-01-10  Paul Brook  <paul@codesourcery.com>
4463         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4464         types.
4466 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
4468         * iresolve.c: Use correct kind.
4470 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
4472         PR fortran/13467
4473         * trans-decl.c (gfc_create_module_variable):  Output array valued
4474         parameters.
4476 2004-01-10  Paul Brook  <paul@codesourcery.com>
4478         * resolve.c (resolve_branch): Get error message right way round.
4480 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
4482         * trans-array (gfc_conv_loop_setup): Adjust comment to track
4483         reality.
4484         (gfc_array_allocate): Don't count size of element twice.
4486 2004-01-04  Paul Brook  <paul@codesourcery.com>
4488         * lang.opt (i8, r8, std=*): Remove RejectNegative.
4490 2004-01-04  Paul Brook  <paul@codesourcery.com>
4492         * error.c (gfc_notify_std): New function.
4493         * gfortran.h (gfc_notify_std): Declare.
4494         (GFC_STD_*): Define.
4495         (gfc_option_t): Add warn_std and allow_std.
4496         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4497         (gfc_intrinsic_func_interface): Use gfc_notify_std.
4498         * check.c (check_rest): Use gfc_notify_std.
4499         * match.c (gfc_match_pause): Ditto.
4500         (gfc_match_assign): Ditto.
4501         (gfc_match_goto): Ditto.
4502         * resolve.c (resolve_branch): Ditto.
4503         * lang.opt: Add std=<foo> and w.
4504         * options.c (gfc_init_options): Set allow_std and warn_std.
4505         (gfc_handle_option): Handle OPT_std_* and OPT_w.
4507 2004-01-01  Paul Brook  <paul@codesourcery.com>
4509         * array.c (gfc_append_constructor): Take constructor, not expression.
4510         * data.c (struct gfc_expr_stack): Remove.
4511         (expr_stack): Remove.
4512         (find_con_by_offset): Rename from find_expr_in_con.
4513         (find_con_by_component): Rename from find_component_in_con.
4514         (gfc_get_expr_stack): Remove.
4515         (gfc_assign_data_value): Rewrite.
4516         (gfc_expr_push): Remove.
4517         (gfc_expr_pop): Remove.
4518         (gfc_advance_section): Rename from
4519         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
4520         (gfc_get_section_index): Handle unbounded sections.
4521         * gfortran.h: Update prototypes.
4522         * resolve.c (check_data_variable): Array section maight not be the
4523         last ref.
4525 2004-01-01  Paul Brook  <paul@codesourcery.com>
4527         PR fortran/13432
4528         * resolve.c (resolve_symbol): Allow assumed length function results.
4530 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4532         * match.c (gfc_match_pause): Fix spelling.
4534 2004-01-01  Steven Bosscher  <stevenb@suse.de>
4536         PR fortran/13251
4537         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4538         reference from the expression.
4540 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
4542         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4543         dumping.
4544         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4545         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4546         (symbol_attribute):New variable attribute: assign.
4547         * io.c (resolve_tag):Integer variable is allowed.
4548         (match_dt_format): Add ASSIGN statement. Set assign flag.
4549         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4550         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4551         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4552         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4553         (next_statement): Add ST_LABEL_ASSIGNMENT.
4554         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4555         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4556         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4557         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4558         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4559         assign.  Put them into the stuct lang_decl.
4560         * trans-io.c (set_string): Add the assign statement.
4561         * trans-stmt.c (gfc_trans_label_assign): New function.
4562         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4563         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4564         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4565         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4566         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4567         (GFC_DECL_ASSIGN(node)): New macro to access flag.
4569 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
4571         PR fortran/13434
4572         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4573         minval/maxval.
4575 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
4577         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4578         that arguments to subroutines/functions can't alias themselves, nor global
4579         memory.
4581 2003-12-20  Steven Bosscher  <stevenb@suse.de>
4583         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4584         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4586 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
4588         * primary.c (match_substring): Fix substring bug for start point
4589         or end point is NULL.
4590         * trans-expr.c (gfc_conv_substring): Ditto
4591         * trans-types.c (gfc_sym_type): Get correct type of scalar
4592         character variables.
4593         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4594         derived type.
4596 2003-12-10  Richard Henderson  <rth@redhat.com>
4598         * options.c (gfc_post_options): Don't ever use rtl inlining.
4600 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
4602         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4603         * trans-equivalence.c: Remove.
4604         * trans-decl.c (gfc_get_symbol_decl): Update to match.
4605         (gfc_generate_function_code): Ditto.
4606         * trans-array.c (gfc_conv_array_parameter): Ditto.
4607         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4608         (F95_ADDITIONAL_OBJS): Add stor-layout.o
4609         * trans.h (gfc_trans_equivalence): Remove.
4610         * gfortran.h (struct gfc_equiv): Add used field.
4611         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4612         equiv_offset fields.
4614 2003-12-05  Richard Henderson  <rth@redhat.com>
4616         * trans.c (gfc_build_addr_expr): New.
4617         (gfc_build_indirect_ref, gfc_build_array_ref): New.
4618         * trans.h: Declare them.
4619         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4620         trans-stmt.c, trans.c (*): Use them.
4622         * f95-lang.c (gfc_post_options): Remove dead prototype.
4623         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4624         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4625         allocation size.
4627 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
4629         * io.c (gfc_match_format): Check for missing format label.
4631 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4633         PR fortran/13155
4634         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4635         from interfaces in modules.
4637 2003-11-30  Paul Brook  <paul@nowt.org>
4639         * trans-array.c (gfc_trans_g77_array): Make non-static.
4640         (gfc_trans_assumed_size): Remove.
4641         (gfc_trans_dummy_array_bias): Explicitly free temporary.
4642         * trans-array.h (gfc_trans_g77_array): Add prototype.
4643         (gfc_trans_assumed_size): Remove.
4644         * trans-decls.c (gfor_fndecl_push_context): Remove.
4645         (gfor_fndecl_pop_context): Remove.
4646         (gfc_build_function)decls): Don't create them.
4647         (gfc_trans_deferred_vars): Update to match. Remove dead code.
4648         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4650 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
4652         * trans-array.c (gfc_conv_array_parameter): Simplify
4653         array argument passing for array name actual argument.
4654         * trans-expr.c (gfc_conv_function_call): Ditto
4655         * trans-types.c (gfc_is_nodesc_array):Ditto.
4657 2003-11-30  Paul Brook  <paul@nowt.org>
4659         * f95-lang.c (gfc_post_options): Move ...
4660         * options.c (gfc_post_options): .. to here.  Handle inlining options.
4661         * gfortran.h (gfc_post_options): Add prototype.
4663 2003-11-28  Richard Henderson  <rth@redhat.com>
4665         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4667 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4669         * trans.h (has_alternate_specifier): New global variable.
4670         * match.c (gfc_match_call): Handle actual arguments associated with
4671         alternate return indicators.
4672         * trans-expr.c (gfc_conv_function_call): Ditto
4673         * trans-stmt.c (gfc_trans_call): Ditto
4674         (gfc_trans_return): Handle return statement with value.
4675         * trans-decl.c (gfc_generate_function_code): Handle functions with
4676         asterisk dummy.
4677         (gfc_get_fake_result_decl): Ditto
4678         * trans-types.c (gfc_get_function_type): Ditto
4679         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4680         (resolve_formal_arglist): Check asterisk dummy.
4682 2003-11-27  Paul Brook  <paul@nowt.org>
4684         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4685         allocation interface.
4686         (gfc_conv_ array_parameter): Ditto.
4687         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4688         * trans-array.c: Update prototype.
4689         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4690         (gfc_trans_auto_character_variable): Use new memory alloc interface.
4691         * trans-expr.c (gfc_conv_string_tmp): Ditto.
4692         (gfc_conv_function_call): Use gfc_conv_string_tmp.
4693         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
4694         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4695         * trans.h (gfc_ss_info): Remove unused pdata field.
4696         * trans.c (gfc_create_var_np): Change T to V.
4698 2003-11-26  Richard Henderson  <rth@redhat.com>
4700         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4701         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
4702         FRACTION, NEAREST, SET_EXPONENT.
4703         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4704         Fix GTY marking.  Remove unnecessary const's.
4705         (LIBM_FUNCTION): Rename from I_LIB.
4706         (LIBF_FUNCTION): New.
4707         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4708         conventions.  Assume the expr signature is correct.  Mark const.
4709         (gfc_conv_intrinsic_exponent): Use library functions.
4710         (gfc_conv_intrinsic_set_exponent): Remove.
4711         (gfc_conv_intrinsic_scale): Remove.
4712         (gfc_conv_intrinsic_nearest): Remove.
4713         (gfc_conv_intrinsic_fraction): Remove.
4714         (gfc_conv_intrinsic_function): Update.
4715         * trans-decl.c (gfor_fndecl_math_exponent4): New.
4716         (gfor_fndecl_math_exponent8): New.
4717         (gfc_build_intrinsic_function_decls): Set them.
4718         * trans.h: Declare them.
4720 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
4722         * trans-common.c (gfc_layout_global_equiv): Locate the error for
4723         underflow COMMON block.
4724         (gfc_trans_one_common): Fix bug for size of COMMON block containing
4725         EQUIVALENCE object. Also fix typo in an error message.
4727 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
4729         * Make-lang.in: Add check-gfortran to lang_checks.
4730         (check-f95): Alias for check-gfortran.
4732 2003-11-25  Jason Merrill  <jason@redhat.com>
4734         * Make-lang.in (f95.tags): Create TAGS.sub files in each
4735         directory and TAGS files that include them for each front end.
4737 2003-11-24  Paul Brook  <paul@nowt.org>
4739         PR fortran/13154
4740         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4742 2003-11-24  Paul Brook  <paul@nowt.org>
4744         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4745         handle.
4746         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4748 2003-11-24  Paul Brook  <paul@nowt.org>
4750         PR fortran/13105
4751         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4752         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4754 2003-11-20  Richard Henderson  <rth@redhat.com>
4756         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4757         (gfc_conv_array_base): Likewise.
4758         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4759         * trans-expr.c (gfc_conv_string_tmp): Likewise.
4760         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4761         * trans-stmt.c (gfc_trans_character_select): Likewise.
4763 2003-11-13  Paul Brook  <paul@nowt.org>
4765         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4767 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
4769         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4770         (resolve_equivalence): New function.
4771         (resolve_equivalence_derived): New function.
4773 2003-11-12  Richard Henderson  <rth@redhat.com>
4775         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4776         annotate_all_with_locus.
4778 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
4780         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4781         * trans-decl.c (gfc_finish_var_decl): Modified.
4783 2003-11-08  Paul Brook  <paul@nowt.org>
4785         PR fortran/12704
4786         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4787         arrays.
4789 2003-11-06  Paul Brook  <paul@nowt.org>
4791         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4793 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
4795         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4797 2003-10-27  Anthony Green  <green@redhat.com>
4799         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4800         (f95.stagefeedback): Ditto.
4802 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
4804         PR fortran/12682
4805         * Make-lang.in (f95.stageprofile): Add.
4806         (f95.stagefeedback): Add.
4808 2003-10-23  Richard Henderson  <rth@redhat.com>
4810         * f96-lang.c (gfc_gimplify_expr): Remove.
4811         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4812         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4814 2003-10-23  Richard Henderson  <rth@redhat.com>
4816         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4818 2003-10-20  Paul Brook  <paul@nowt.org>
4820         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4821         * trans-stmt.c (gfc_trans_do_while): Ditto.
4823 2003-10-17  Paul Brook  <paul@nowt.org>
4825         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4827 2003-10-17  Paul Brook  <paul@nowt.org>
4829         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4831 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
4833         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4834         (gfc_resolve_minloc): Ditto.
4835         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4836         Return the value after subtracting the lower bound.
4838 2003-10-16  Richard Henderson  <rth@redhat.com>
4840         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4842 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
4844         * lang.c: Remove -M option for now, it's in the way for C.
4846 2003-10-14  Jason Merrill  <jason@redhat.com>
4848         * Make-lang.in (f95.tags): New rule.
4850 2003-10-13  Richard Henderson  <rth@redhat.com>
4852         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4854 2003-10-13  Paul Brook  <paul@nowt.org>
4856         * trans-decl.c (generate_local_decl): Don't create junk variables.
4858 2003-10-13  Paul Brook  <paul@nowt.org>
4860         * resolve.c (resolve_formal_arglist): Use function result decl in
4861         preference to function decl.
4863 2003-10-12  Richard Henderson  <rth@redhat.com>
4865         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
4866         TREE_READONLY.  Update all callers.
4868 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
4870         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4871         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4872         (gfc_is_intrinsic_libcall): Add CSHIFT.
4874 2003-10-12  Richard Henderson  <rth@redhat.com>
4876         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4877         (gfc_trans_array_constructor_value): Likewise.
4878         (gfc_conv_array_initializer): Likewise.
4879         * trans-stmt.c (gfc_trans_character_select): Likewise.
4881 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4883         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4885 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4887         * check.c (gfc_check_repeat): Check arguments are scalar.
4888         (gfc_check_trim): New function.
4889         * intrinsic.h (gfc_check_trim): Add prototype.
4890         * intrinsic.c (add_functions): Use it.
4891         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4892         Decalare.
4893         * trans-decl.c: Ditto.
4894         (gfc_build_intrinsic_fucntion_decls): Set them.
4895         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4896         (gfc_conv_intrinsic_trim): New function.
4897         (gfc_conv_intrinsic_repeat): New function.
4898         (gfc_conv_intrinsic_function): Use them.
4900 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4902         * trans-types.c (gfc_sym_type): Handle result variables.
4904 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
4906         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4907         gfc_get_character_type.
4909 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
4911         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4913 2003-10-11  Paul Brook  <paul@nowt.org>
4915         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4916         (gfc_resolve_dprod): New function.
4917         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4918         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4919         (gfc_resolve_dprod): Declare.
4920         * intrinsic.c (add_functions): Use them.
4921         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4923 2003-10-06  Richard Henderson  <rth@redhat.com>
4925         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4926         * trans-intrinsic.c (call_builtin_clz): Use it.
4928 2003-10-05  Paul Brook  <paul@nowt.org>
4930         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4931         * trans-decl.c (gfc_generate_function_code): Set
4932         cfun->function_end_locus.
4934 2003-09-24  Jason Merrill  <jason@redhat.com>
4936         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4937         TREE_LOCUS.
4939 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
4940         Paul Brook  <paul@nowt.org>
4942         * Make-lang.in (F95_OBJS): Add fortran/data.o.
4943         * array.c (gfc_inser_constructor): New function.
4944         (gfc_get_constructor): New function.
4945         (gfc_free_constructor): Initialize offset and repeat.
4946         (iterator_stack): Remove.
4947         (expand_info): Add offset, component and repeat fields.
4948         (expand_constructor): Set them.
4949         (expand): Set new fields.
4950         (gfc_copy_constructor): Ditto. Avoid recursion.
4951         * gfortran.h: Add prototypes for new functions.
4952         (gfc_constructor): Add offset, component and repeat.
4953         (iteratio_stack): Move to here.
4954         * resolve.c (check_data_variable): Convert data values into variable
4955         initializers.
4956         (traverse_data_list): Build implicit loop chain.
4957         (gfc_resolve): Ditto.
4958         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4959         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4960         * trans-expr.c (gfc_conv_structure): Handle array initializers.
4961         (gfc_conv_expr): Update to match.
4962         * trans.h (gfc_conv_structure): Declare.
4963         * data.c: New file.
4965 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4967         * trans.h: Add declarations for gfor_fndecl_si_kind and
4968         gfor_fndecl_sr_kind.
4969         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4970         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4971         (g95_conv_intrinsic_sr_kind): New function.
4972         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4973         SELECTED_REAL_KIND.
4975 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
4977         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4978         instead of _4 and _8 as postfix for libgfortran calls.
4980 2003-09-16  Paul Brook  <paul@nowt.org>
4982         * array.c (compare_bounds): New function.
4983         (gfc_compare_array_spec): Use it.
4985 2003-09-14  Paul Brook  <paul@nowt.org>
4987         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4988         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4990 2003-09-14  Paul Brook  <paul@nowt.org>
4992         * check.c (dim_rank_check): Allow assumed bounds if requested.
4993         (gfc_check_lbound): Call it.
4994         (gfc_check_ubound): Ditto.
4995         (gfc_check_size): Change to match.
4996         * simplify.c (gfc_simplify_bound): New function.
4997         (gfc_simplify_lbound): New function.
4998         (gfc_simplify_ubound): New function.
4999         * intrinsic.h: Declare them.
5000         * intrinsic.c (add_functions): Use them.
5002 2003-09-14  Paul Brook  <paul@nowt.org>
5004         * io.c (format_lex): Initialize negative_flag.
5005         (check_format): Intialize repeat.
5006         * trans-io.c (gfc_new_nml_name_expr): Declare static.
5007         (gfc_new_var_expr): Ditto.
5009 2003-09-14  Paul Brook  <paul@nowt.org>
5011         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5012         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5014 2003-09-12  Paul Brook  <paul@nowt.org>
5016         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5018 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5020         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5021         for a correct expression.
5023 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5025         * trans-intrinsic.c (real_compnt_info): New struct.
5026         (prepare_arg_info): New function.
5027         (gfc_conv_intrinsic_set_exponent): New function.
5028         (gfc_conv_intrinsic_scale): New function.
5029         (gfc_conv_intrinsic_nearest): New function.
5030         (gfc_conv_intrinsic_fraction): New function.
5031         (gfc_conv_intrinsic_exponent): New function.
5032         (gfc_conv_intrinsic_spacing): New function.
5033         (gfc_conv_intrinsic_rrspacing): New function.
5034         (gfc_conv_intrinsic_function): Use them.
5036 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
5038         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5039         build_int_2 changed from (high, low) to (low, high).
5040         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5041         ioparm_namelist_read_mode, iocall_set_nml_val_int,
5042         iocall_set_nml_val_float, iocall_set_nml_val_char,
5043         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5044         (gfc_build_io_library_fndecls): Add variable initialization.
5045         (gfc_new_nml_name_expr, get_new_var_expr): New function.
5046         (build_dt): Add namelist support.
5047         * io.c (value): New variable.
5048         (check_format): Support FMT_H now.
5050 2003-09-07  Paul Brook  <paul@nowt.org>
5052         * io.c (gfc_resolve_dt): Error if format label is not defined.
5054 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5056         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5057         about case_switch's break. The other is about building the condition
5058         statement tree, which judges the argument in the range of the
5059         corresponding integer type.
5060         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5061         for the large values.
5063 2003-09-05  Paul Brook  <paul@nowt.org>
5065         * f95-lang.c (expand_function_body): Gimplify the function.
5067 2003-09-04  Jeff Law  <law@redhat.com>
5069         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5070         index zero!
5072 2003-09-04  Paul Brook  <paul@nowt.org>
5074         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5075         (gfc_expand_stmt): New function.
5076         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5077         (expand_function_body): Use tree_rest_of_compilation.
5078         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5080 2003-09-03  Jeff Law  <law@redhat.com>
5082         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5083         index zero!
5085 2003-08-30  Paul Brook  <paul@nowt.org>
5087         * f95-lang.c (builtin_function): Remove #if 0 code.
5088         (gfc_define_builtin): New function.
5089         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5090         * mathbuiltins.def: New file.
5091         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5092         (gfc_intrinsic_map): Use mathbuiltins.def.
5093         (gfc_intrinsic_builtin_t): Remove.
5094         (gfc_build_intrinsic_lib_fndecls): Update.
5095         * trans-types.c (gfc_init_types): Remove redundant initilaization of
5096         signed_size_type_node.
5098 2003-08-29  Paul Brook  <paul@nowt.org>
5100         * arith.c (gfc_real_kinds): Use correct minimum exponents.
5102 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5104         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
5105         (gfc_conv_intrinsic_function): Add MODULO.
5107 2003-08-22  Jason Merrill  <jason@redhat.com>
5109         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
5111 2003-08-22  Andreas Jaeger  <aj@suse.de>
5113         * Make-lang.in (f95.install-common): Add DESTDIR support.
5114         * (f95.install-info): Likewise.
5115         (f95.uninstall): Likewise.
5117 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
5119         * trans-types.c (gfc_init_types): Initialize
5120         signed_size_type_node with size_type_node.
5122 2003-08-18  Paul Brook  <paul@nowt.org>
5124         * dependency.c (gfc_dependency): New enum.
5125         (check_another_array_ref): Remove.
5126         (gfc_get_array_from_component): Remove.
5127         (get_x): Remove.
5128         (get_range): Remove.
5129         (get_no_of_elements): Use mpz_t, not mpf_t.
5130         (transform_sections): New function.
5131         (gfc_check_range_range): Rename ...
5132         (gfc_check_section_vs_section): ... to this.  Use new function.
5133         (gfc_is_inside_range): Rewrite to match.
5134         (gfc_check_element_vs_section): Ditto.
5135         (gfc_check_element_vs_element): Ditto.
5136         (get_deps): Ditto.
5137         (gfc_dep_resolver): Ditto.  Remove unused parameter.
5138         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
5139         gfc_check_element_vs_element, gfc_is_inside_range,
5140         gfc_get_array_from_component): Remove prototypes for static functions.
5141         (gfc_dep_resolver): Update prototype.
5142         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
5144 2003-08-15  Paul Brook  <paul@nowt.org>
5146         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
5147         return values to parent scope.
5148         (gfc_build_dummy_array_decl): Ditto.
5150 2003-08-14  Paul Brook  <paul@nowt.org>
5152         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
5153         size of the type, not the pointer.
5154         * resolve.c (resolve_symbol): Give more accurate error message.
5156 2003-08-10  Paul Brook  <paul@nowt.org>
5158         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
5160 2003-08-10  Paul Brook  <paul@nowt.org>
5162         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
5163         type components.
5165 2003-08-10  Chun Huang  <compiler@sohu.com>
5167         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
5168         (resolve_symbol): Ditto.
5169         * trans-expr.c (gfc_conv_statement_function): New function.
5170         (gfc_conv_function_expr): Use it.
5172 2003-08-10  Paul Brook  <paul@nowt.org>
5174         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
5175         (walk_function_expr): Set section rank.
5176         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
5178 2003-08-10  Paul Brook  <paul@nowt.org>
5180         * intrinsic.c (add_sym): Prefix names with correct string.
5181         (add_sym_0s): New function.
5182         (add_subroutines): Register abort.
5184 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
5186         * gfortran.h: Introduce options to control the mangling.
5187         * lang.opt: Likewise.
5188         * options.c (gfc_init_options): Handle the options.
5189         * trans-common.c (gfc_sym_mangled_common_id): New function.
5190         (gfc_build_common_decl): Call it.
5191         * trans-decl.c (gfc_sym_mangled_function_id): New function.
5192         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
5194 2003-08-09  Paul Brook  <paul@nowt.org>
5196         * module.c (mio_symbol): Always ouput a namespace for formal args.
5197         (load_needed): Namespace now belong to their proper symbol.
5198         (gfc_dump_module): Change G95=>GFORTRAN.
5200 2003-08-05  Paul Brook  <paul@nowt.org>
5202         * options.c: Force -fg77-calls.
5204 2003-08-02  Paul Brook  <paul@nowt.org>
5206         * Makelang.in: Rename G95_* to GFORTRAN_*.
5207         * All sources: Rename G95_* to GFC_*.
5209 2003-08-01  Paul Brook  <paul@nowt.org>
5211         * fortran/Make-lang.in: Use GMPLIBS.
5212         * fortran/config-lang.in: Set need_gmp.
5213         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
5215 2003-07-27  Andreas Jaeger  <aj@suse.de>
5217         * trans-decl.c (gfc_generate_constructors): Convert prototype to
5218         ISO C90.
5219         * trans-const.c (gfc_init_constants): Likewise.
5220         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
5222         * gfortranspec.c: Convert to ISO C90.
5223         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
5225 2003-07-26  Paul Brook  <paul@nowt.org>
5227         * lang.opt: Add -fdump-parse-tree.
5228         * options.c (gfc_handle_option): Ditto.
5229         * resolve.c (resolve_forall_iterators): Convert to proper type.
5230         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
5232 2003-07-26  Paul Brook  <paul@nowt.org>
5234         * Makefile.in: Add build dependencies on files common with rest of gcc.
5236 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
5238         * trans.h: Declare g95_trans_pointer_assignment.
5239         * trans-expr.c (g95_trans_pointer_assignment): New function.
5240         (g95_trans_pointer_assign): Use it.
5241         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
5242         (g95_trans_pointer_assign_need_temp): New function.
5244 2003-07-26  Paul Brook  <paul@nowt.org>
5246         * gfortran.texi: Replace references to g95.
5248 2003-07-26  Paul Brook  <paul@nowt.org>
5250         Rename g95_* to gfc_*.
5252 2003-07-25  Paul Brook  <paul@nowt.org>
5254         * gfortran.h: Rename from g95.h.
5255         * trans-types.c (boolean_type_node, booelan_true_node,
5256         boolean_false_node): Remove.
5257         * trans-types.h: Ditto.
5259 2003-07-25  Chun Huang  <compiler@sohu.com>
5261         * parse.c (accept_statement): Implement BLOCK DATA statement.
5262         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
5263         variables.
5265 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
5267         * trans-stmt.c (temporary_list): Define.
5268         (g95_trans_assign_need_temp): New function.
5269         (g95_trans_forall_1): Modified for WHERE.
5270         (g95_trans_where_assign): Modified.
5271         (g95_trans_where_2): Modified.
5272         (g95_evaluate_where_mask): Modified.
5273         (g95_trans_where): Modified.
5274         (g95_get_temp_expr): Removed.
5275         (g95_add_to_where_stmt_list): Removed.
5276         (compute_overall_iter_number): Modified for WHERE.
5277         * trans.h: Remove where_stmt_list.
5279 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5281         * lang.opt: Correct description of options -J and -M.
5283 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
5285         * lang.opt: Move help text to here.
5286         * lang-options.h: Remove.
5288 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5289         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
5290         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
5291         on kind.
5293 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
5294         Paul Brook  <paul@nowt.org>
5296         * check.c (check_rest): Use global pedantic flag.
5297         * io.c (data_desc): Ditto.
5298         * error.c (g95_warning, g95_warning_now): Use global flag.
5299         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
5300         (expand_function_body): Update to new prototypes.
5301         (g95_init): Use new option names.
5302         * g95.h (g95_option_t): Standardize names.
5303         (g95_init_options, g95_handle_option): Update prototypes.
5304         * interface.c: Use new option names.
5305         * match.c: Ditto.
5306         * module.c: Ditto.
5307         * parse.c: Ditto.
5308         * primary.c: Ditto.
5309         * resolve.c: Ditto.
5310         * scanner.c: Ditto.
5311         * simplify.c: Ditto.
5312         * symbol.c: Ditto.
5313         * trans-array.c: Ditto.
5314         * trans-expr.c: Ditto.
5315         * trans-types.c: Ditto.
5316         * trans-decl.c: Ditto.
5317         (g95_build_library_function_decl): Remove obsolete VPARAMS.
5318         * trans.h: Ditto.
5319         * options.c (g95_display_help): Remove.
5320         (g95_init_options): Convert to new scheme.
5321         (set_Wall): Ditto
5322         (g95module_option): Ditto, rename from g95_parse_arg.
5323         (g95_handle_module_path_options): New function.
5324         * trans-equivalence.c: Fix error message.
5325         * lang.opt: Corrections.
5327 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
5329         * lang.opt: New file.
5331 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5333         * decl.c (match_attr_spec): Set colon_seen.
5335 2003-07-14  Paul Brook  <paul@nowt.org>
5337         * trans-array.c: Update comment.
5338         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5339         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5340         minmaxloc,minmaxval): Ditto.
5341         * trans-io.c (g95_trans_transfer): Ditto.
5342         * trans-stmt.c: Remove unneeded prototypes.
5343         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5344         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5345         (compute_inner_temp_size): Remove bits of dead code. Add comments.
5346         Don't share loopinfo.
5347         (compute_overall_iter_number): Declare as static.
5348         (allocate_temp_for_forall_nest): Ditto.
5349         (g95_trans_forall_1): Don't pass shared loopinfo.
5350         * trans.c (g95_start_block): Expand comment.
5352 2003-07-12  Paul Brook  <paul@nowt.org>
5354         * arith.c (g95_index_integer_kind): Remove unused initializer.
5355         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5356         index by size of element.
5357         (generate_loop_for_rhs_to_temp): Ditto.
5358         (allocate_temp_for_forall_nest): Use element size, not index size.
5360 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5362         * arith.c (g95_index_integer_kind): Add a TODO.
5363         * simplify.c (g95_simplify_nearest): Add a TODO.
5365 2003-07-09  Chun Huang  <compiler@sohu.com>
5367         * trans.h: Add declarations for gfor_fndecl_string_scan and
5368         gfor_fndecl_string_verify.
5369         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5370         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5371         (g95_conv_intrinsic_verify): New function.
5372         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5373         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5374         of parameter 'BACK=.TRUE.'
5376 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
5378         * trans-stmt.c (iter_info, forall_info): Define.
5379         (g95_trans_forall_block): Remove.
5380         (g95_trans_forall_loop): Use forall info blocks.
5381         (g95_trans_nested_forall_loop): New function.
5382         (g95_do_allocate): Handle things other than logical masks.
5383         (generate_loop_for_temp_to_lhs): New function.
5384         (generate_loop_for_rsh_to_temp): New function.
5385         (compute_inner_temp_size): New function.
5386         (compute_overall_iter_number): New function.
5387         (allocate_temp_for_forall_nest): New function.
5388         (g95_trans_forall): Move body ...
5389         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
5391 2003-07-02  Paul Brook  <paul@nowt.org>
5393         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5394         in correct scope.  Change callers to match.
5395         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5396         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5398 2003-07-02  Paul Brook  <paul@nowt.org>
5400         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
5401         expression shape for all expressions.
5402         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5404 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5406         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5407         g95_parse_arg), intrinsic.c (g95_convert_type): support of
5408         -Wconversion.
5409         * intrinsic.c, g95.h: Add g95_convert_type_warn,
5410         * resolve.c (g95_resolve_index): Call it.
5412 2003-07-02  Paul Brook  <paul@nowt.org>
5414         * iresolve.c (g95_resolve_reshape): Set expression shape.
5415         (g95_resolve_shape): Ditto.
5416         * simplify.c (g95_simplify_shape): Move common code outside condition.
5417         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5419 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5421         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5422         conformance checks.
5424 2003-06-29  Paul Brook  <paul@nowt.org>
5426         * array.c (g95_simplify_iterator_var): Don't bother with return value.
5427         * expr.c (find_array_element, find_component_ref): New functions.
5428         (remove_subobject_ref): New function.
5429         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
5430         (simplify_ref_chain): New function.
5431         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
5432         (g95_specification_expr): Simplify the expression.
5433         * resolve.c (resolve_operator): Check simplifications return code.
5434         (g95_resolve_expr): Ditto.
5436 2003-06-26  Paul Brook  <paul@nowt.org>
5438         * expr.c (simplify_component_ref): New function.
5439         (g95_simplify_expr): Use it.
5440         * resolve.c (resolve_structure_cons): Handle references.
5442 2003-06-25  Paul Brook  <paul@nowt.org>
5444         * trans-io.c (build_dt): Handle internal units.
5446 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
5448         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5449         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5450         Use g95_array_index_type instead of integer_type_node.
5451         (g95_build_common_decl, g95_set_common_master_type): Use
5452         g95_character1_type_node instead of char_type_node.
5453         * trans-equivalence.c (g95_layout_local_equiv): As above.
5455 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
5457         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5458         remove last remains of -fquiet.
5460 2003-06-22  Paul Brook  <paul@nowt.org>
5462         * resolve.c (resolve_operator): Don't fail if we can't simplify.
5463         (g95_resolve_expr): Ditto.
5464         (resolce_code): Mark as static.
5465         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5466         gimplifer doesn't (yet).
5468 2003-06-20  Paul Brook  <paul@nowt.org>
5470         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5471         * match.c (g95_match_if): Add ST_PAUSE.
5472         (g95_match_stopcode): New function.
5473         (g95_match_pause, g95_match_stop): Use it.
5474         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5475         (decode_stmt, next_statement, parse_executable): Ditto.
5476         * resolve.c (resolve_code): Ditto.
5477         * st.c (g95_free_statement): Ditto.
5478         * trans-stmt.c (g95_trans_pause): New function.
5479         * trans-stmt.h: Declare it.
5480         * trans.c (g95_trans_code): Use it.
5481         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5482         Declare.
5483         (g95_build_builtin_function_decls): Initialize them.
5484         * trans.h: Ditto.
5485         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5487 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5489         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5490         match_filepos): Fix error handling.
5492 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5494         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5495         Add assertions on arguments.
5496         * resolve.c (expression_shape): Remove useless &.
5497         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5498         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5499         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5500         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5501         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5502         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5503         (g95_simplify_not, g95_simplify_scale): Add assertions.
5505 2003-06-15  Paul Brook  <paul@nowt.org>
5507         Clean up stuff to work with the ssa optimizers.
5508         * convert.c (convert): Handle BOOLEAN_TYPEs.
5509         * f95-lang.c (g95_truthvalue_conversion): Implement.
5510         * trans-array.c (g95_trans_array_constructor_value): Group multiple
5511         scalar values.
5512         * trans.h (g95_truthvalue_conversion): Declare.
5513         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5514         * trans-stmt.c (g95_trans_character_select): Don't create array
5515         assignments.  Mark labels as indirect jump targets.
5516         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5517         (g95_get_dtype_cst): Handle LOGICAL types.
5519 2003-06-14  Paul Brook  <paul@nowt.org>
5521         * f95-lang.c (g95_gimplify_expr): New function.
5522         * trans-array.c (g95_trans_array_constructor_value): Don't create
5523         array assignments.
5524         (g95_conv_expr_descriptor): Rename simple->gimple.
5525         * trans-expr.c (conv_expr_op): Use proper logical operators.
5526         * trans-intrinsic.c (build_fixbound_expr): New function.
5527         (build_fix_expr): Ditto.
5528         (g95_conv_intinsic_aint): Use them. Use builtin functions.
5529         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5531 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5533         * array.c (g95_compare_array_spec): Remove unreachable code.
5534         * expr.c (g95_copy_expr): Likewise.
5535         * intrinsic.c (g95_convert_type): Likewise.
5536         * misc.c (g95_code2string): Likewise.
5537         * simplify.c (g95_simplify_ishft, g95_simplify_real,
5538         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5539         * trans-stmt.c (g95_trans_select): Likewise.
5540         * primary.c (extend_ref): Add an assertion.
5541         * simplify.c (g95_convert_constant): Add const.
5542         * intrinsic.h: Remove g95_check_x_ni.
5543         * f95-lang.c (g95_finish): Call g95_release_include_path.
5545 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5547         * resolve.c (resolve_contained_functions): Fix typo introduced on
5548         2003-01-13.
5550 2003-06-09  Paul Brook  <paul@nowt.org>
5552         * g95.h: Include system.h not hwint.h.
5553         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
5554         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5556 2003-06-09  Paul Brook  <paul@nowt.org>
5558         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5559         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5560         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5561         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5562         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5563         objects.
5564         * trans.h (g95_trans_equivalence, g95_trans_common,
5565         g95_add_decl_to_function): Declare.
5566         * trans-common.c, trans-equivalence.c: New files.
5568 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
5570         * intrinsic.c (g95_intrinsic_extension): Remove.
5571         (add_functions): Substitute g95_check_x for g95_check_x_ni
5572         everywhere.
5573         (g95_init_expr_extensions): New function.
5574         (g95_intrinsic_func_interface): Use it.
5575         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5576         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5577         g95_check_precision, g95_check_present, g95_check_radix,
5578         g95_check_range, g95_check_selected_real_kind): Do not set
5579         g95_intrinsic_extension.
5580         (g95_check_x_ni): Remove now duplicate of g95_check_x.
5582         * expr.c (check_inquiry): Add FIXME, fixup some code style.
5584 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5586         * g95.h (ref_type): Name this type explicitly.
5587         * module.c (MIO_NAME): Add specialisations of mio_name.
5588         (mio_symbol_attribute, mio_typespec, mio_array_ref,
5589         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5590         (ab_attribute): Name this type explicitly.
5591         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5593 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5595         * trans-intrinsic.c (g95_conv_allocated): New function.
5596         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5598 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
5600         * f95-lang.c: Don't include g95-support.h
5601         (g95_mark_addressable): Add prototype.
5602         (g95_init_decl_processing): Remove C front end hack.
5603         * f95-tree.c: Remove file.
5604         * support.c: Remove file.
5605         * g95-support.h: Remove file.
5606         * trans-types.c (g95_init_types): Set up boolean
5607         type related tree nodes.
5608         * Make-lang.in: Remove rules for dead files and
5609         dependencies on them.
5611 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
5613         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5614         C front end dependency.  Also, convert.c does not depend on
5615         g95-support.h anymore.
5616         * convert.c: Don't include c-common.h and g95-support.h
5617         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5618         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5619         stmts_are_full_exprs_p, current_stmt_tree,
5620         current_scope_stmt_stack): Remove.
5621         * g95-support.h (unsigned_conversion_warning): Kill proto.
5622         (boolean_type_node, boolean_true_node, boolean_false_node):
5623         Don't define here.  Instead, make then true tree nodes in
5624         trans-types.
5625         * support.c (c_global_trees): Die, C front end, die!!!
5626         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5627         uintmax_type_node, string_type_node and const_string_type_node.
5628         (decl_constant_value, overflow_warning): Make static functions.
5629         They are in death row too, though.
5630         (default_conversion, c_expand_asm_operands): Remove.
5631         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5632         trans.c: Don't include c-common.h.
5633         * trans-types.c (boolean_type_node, boolean_true_node,
5634         boolean_false_node): Make them real tree nodes.
5635         * trans-types.h (intmax_type_node, string_type_node,
5636         const_string_type_node): Hack to work around C dependencies
5637         in builtin-types.def.
5639 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5641         * decl.c (decl_types): Add some iterators-like sentinels.
5642         * decl.c (match_attr_spec): Use them.
5643         Use "decl_types" instead of "int".
5644         Add cast in call to g95_match_strings.
5645         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
5646         instead of "int".
5647         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5648         (g95_interface_info): Use "g95_intrinsic_op".
5649         * dump-parse-tree.c (g95_show_namespace): Use them.
5650         * interface.c (g95_check_interfaces): Use them.
5651         * module.c (read_module, write_module): Use them.
5652         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5653         Use "g95_intrinsic_op".
5654         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5655         Add a default case in switch statement.
5656         * intrinsic.h (g95_generic_isym_id): Moved to...
5657         * g95.h (g95_generic_isym_id): here.
5658         (g95_intrinsic_sym): Use "g95_generic_isym_id".
5659         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5660         * trans-intrinsic.c (g95_intrinsic_map_t,
5661          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5662         * match.c (g95_match_intrinsic_op): Add cast in call to
5663         g95_match_strings.
5665 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
5667         * support.c (skip_evaluation, warn_conversion, lvalue_p,
5668         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5669         constant_fits_type_p, convert_and_check,
5670         unsigned_conversion_warning): Remove these ugly remnants
5671         we inherited from the C front end.
5672         (function_types_compatible): Remove '#if 0'-edcode.
5673         (build_modify_expr): Likewise.
5674         (convert_for_assignment): Don't use the deceased functions.
5675         The parameter fundecl is now unused.
5676         (decl_constant_value): Always just return decl.  In fact
5677         this function is not used at present, but it might be in
5678         the future, when we start using the tree inliner.
5679         (overflow_warning, default_conversion, c_expand_asm_operands):
5680         Abort when these are called, they are part of the C type
5681         checking implementation and therefore poison to Fortran.
5683 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
5685         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5686         c-pretty-print.o and c-dump.o.  Add a comment on why we
5687         depend on c-semantics.c.
5688         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5689         Don't use the C front end tree dumper hook to dump the
5690         language specific tree representation -- we don't have
5691         one.  So instead, inherit the default langhook.
5693 2003-06-02  Paul Brook  <paul@nowt.org>
5695         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5697 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5699         * check.c (g95_check_associated): Use proper types.  Remove
5700         extraneous argument in call to g95_error().
5702 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5704         * resolve.c (resolve_operator): Make logical operands convert to the
5705         type with higher kind.
5707 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5709         * check.c (g95_check_associated): Make sure both pointer and target has
5710         the same type and rank. Null pointer or array section with vector
5711         subscript as target are not allowed.
5712         * trans.h: Declare gfor_fndecl_associated.
5713         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5714         gfor_fndecl_associated.
5715         * trans-intrinsic.c (g95_conv_associated): New function.
5716         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5718 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5720         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5721         according to POINTER itself rather than TARGET.
5722         (g95_conv_expr_descriptor): Make lbound start at 1.
5723         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5725 2003-06-01  Paul Brook  <paul@nowt.org>
5727         * expr.c (g95_type_convert_binary): Make it match the standard.
5728         * g95.texi: Remove dead link.
5730 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
5732         * g95.texi: Cleanup somewhat in preparation for inclusion
5733         in GCC CVS.
5735 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5736             Canqun Yang  <canqun@yahoo.com.cn>
5738         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5739         type.
5740         (g95_find_forall_index): Return proper value.
5741         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5742         compare the return value from g95_find_forall_index.
5744 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5745         * g95.h, io.c (g95_st_label): Remove "length".
5746         (g95_symtree): Remove "link".
5747         (g95_case): Remove "code".
5748         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5749         g95_convert_real): Make an argument pointer to const.
5750         * decl.c (colon_seen): Add a TODO.
5751         * interface.c (g95_compare_types): Fix typo.
5752         * interface.c (compare_interfaces): Preserve value of "p".
5753         * intrinsic.c (sort_actual): Remove "i".
5754         * match.c (g95_match_assign): Proper type in call to g95_match().
5755         * parse.c (next_free): Avoid duplicate call due to macro.
5756         * parse.c (check_statement_label): wrong type in call to g95_error.
5757         * primary.c (match_real_constant): Add a TODO.
5758         * resolve.c (resolve_select):  Remove useless conditional.
5759         * simplify.c (g95_simplify_repeat): Proper assignment to
5760         "value.character.string".
5761         * simplify.c (g95_simplify_reshape): Wrong variable in call to
5762         g95_error.
5764 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
5766         * trans-stmt.c: Remove unnecessary include file defaults.h.
5768 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
5770         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5771         stride.
5772         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5773         actual variables used as FORALL indexes.
5775 2003-05-15  Paul Brook  <paul@nowt.org>
5777         * trans-array.c (g95_trans_static_array_pointer): Use
5778         null_pointer_node.
5779         (g95_trans_deferred_array): Initialize static array pointers.
5780         * trans-expr.c (g95_conv_function_call): Use formal arglist to
5781         correctly pass POINTER and absent CHARACTER arguments.
5783 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
5785         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5786         (g95_resolve_forall_body): Resolve FORALL body.
5787         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5788         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5789         (g95_find_forall_index): Check whether the FORALL index appears in
5790         the expression or not.
5791         (resolve_code): Modified.
5793 2003-05-14  Paul Brook  <paul@nowt.org>
5795         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5797 2003-05-13  Paul Brook  <paul@nowt.org>
5799         * trans-types.c (g95_max_array_element_size): Now a tree node.
5800         (g95_init_types): Work out max size properly.
5801         (g95_get_dtype_cst): Modify to match.
5803 2003-05-11  Paul Brook  <paul@nowt.org>
5805         * trans-io.c (add_case): Create a label decl for case labels.
5807 2003-05-11  Paul Brook  <paul@nowt.org>
5809         * arith.c (g95_integer_index_kind): New variable.
5810         * f95-lang.c (g95_init): Move frontend initialization here ...
5811         (g95_post_options): ... from here.
5812         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5813         * intrinsic.c (add_functions): Use index kinds.
5814         * iresolve.c: Convert to index_kind where needed.
5815         * resolve.c (g95_resolve_index): Make public, use index_kind.
5816         (resolve_array_ref): Adjust to match.
5817         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5818         * trans-stmt.c: Ditto.
5819         * trans-types.c: Ditto.
5820         * trans-types.h (g95_array_index_kind): Remove declaration.
5821         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5823 2003-05-07  Paul Brook  <paul@nowt.org>
5825         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5826         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5827         of bound indices.
5829 2003-05-07  Paul Brook  <paul@nowt.org>
5831         * trans-array.c (trans_static_array_pointer,
5832         g95_trans_array_constructor_value, g95_conv_array_initializer,
5833         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5834         (g95_add_loop_ss_code): Convert subscripts to the correct type.
5835         * trans-stmt.c (g95_trans_character_select): Ditto.
5836         * trans-types.c (g95_init_types): Ditto.
5838 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
5840         * f95-lang.c (expand_function_body): Use input_line, not lineno.
5841         * trans-decl.c (g95_generate_function_code,
5842         g95_generate_constructors): Likewise.
5843         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5844         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5845         Likewise.
5847 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5848         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5849         with components point to the DERIVED type itself, and two DERIVED
5850         type with components point to each other.
5851         * trans-expr.c (g95_conv_componet_ref): Modified
5853 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5854         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5855         null_pointer_node.
5856         (g95_trans_pointer_assign): Implement Nullify.
5858 2003-05-01  Paul Brook  <paul@nowt.org>
5860         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5861         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5863 2003-05-01  Paul Brook  <paul@nowr.org>
5865         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5866         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5867         IS_EMPTY_STMT.
5869 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
5871         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5872         CASE_LABEL_EXPR.
5874 2003-04-28  Paul Brook  <paul@nowt.org>
5876         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5877         as their kind suggests.
5878         (g95_resolve_reshape): Ditto.
5880 2003-04-28  Chun Huang  <compiler@sohu.com>
5882         * trans-expr.c (g95_conv_substring_expr): New function.
5883         (g95_conv_expr): Use it.
5885 2003-04-28  Paul Brook  <paul@nowt.org>
5887         * iresolve.c (g95_resolve_transpose): Make it match the
5888         implementation.
5889         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5891 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
5893         * trans-types.c (g95_add_field_to_struct): New function to
5894         add a field to a UNION_TYPE or RECORD_TYPE.
5895         * trans-types.h (g95_add_field_to_struct): Prototype.
5896         (g95_get_derived_type): Use g95_add_field_to_struct to add
5897         components.
5898         * trans-io.c (g95_add_field): Remove.
5899         (ADD_FIELD): Use new g95_add_field_to_struct function.
5900         (ADD_STRING): Likewise.
5901         * trans-stmt.c (g95_trans_select): Likewise.
5902         (g95_add_field): Remove duplicated function.
5904 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
5906         Port implementation for CHARACTER SELECT from Andy's tree.
5907         * trans-stmt.c (g95_trans_character_select): Implement character
5908         select. (g95_add_field): New function.
5909         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5910         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5911         * g95.h (struct g95_case): Add field 'int n'.
5912         * trans.h: Declare 'gfor_fndecl_select_string'.
5914 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
5916         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5917         (g95_insert_bbd): Die on duplicates.
5918         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5920 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
5922         * g95.texi: Require GMP 4.0 -- like we actually
5923         do.  Explain the testsuite and what-goes-where.
5924         Don't use undefined texinfo symbol.  Break very
5925         long line.  Remove finished item from the list
5926         of open projects.
5928 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
5930         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5931         LOGICAL type.
5933 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
5935         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5936         (g95_trans_forall_body): New function.
5938 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
5940         * resolve.c (resove_where): New function.
5941         (resolve_where_shape): New function.
5942         (resolve_code): Add call to 'resolve_where'
5943         * trans-stmt.c (g95_trans_where): Modified.
5944         (g95_trans_where_2): New function.
5945         (g95_trans_where_assign): New function.
5946         (g95_evaluate_where_mask): New function.
5947         (g95_add_to_stmt_list): New function.
5948         (g95_get_temp_expr): New function.
5949         * trans.h (where_stmt_list): New structure.
5951 2003-04-10  Paul Brook  <paul@nowt.org>
5953         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5954         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5956 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
5958         Update after mainline -> tree-ssa-branch merge.
5959         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5960         call.
5961         (g95_init): Update for new lang_hooks definition.
5962         (g95_post_options): New langhook.
5963         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5964         * scanner.c (g95_new_file): Comment update.
5966 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
5968         * g95.h, lang-options.h: Add -Wimplicit-interface.
5969         * options.c (g95_init_options, g95_parse_arg): Set it.
5970         * interface.c (check_intents): Warn about call with implicit
5971         interface.
5972         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5973         g95_procedure_use.
5975 2003-04-05  Paul Brook  <paul@nowt.org>
5977         * iresolve.c (g95_resolve_spread): Don't resole based on type.
5978         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5980 2003-03-29  Paul Brook  <paul@nowt.org>
5982         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5983         (g95_resolve_unpack): Ditto.
5984         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5985         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
5986         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5988 2003-03-25  Paul Brook  <paul@nowt.org>
5990         * arith.c (g95_unary_user, g95_user): Remove dead functions.
5991         * arith.h: Ditto.
5992         * array.c (g95_free_array_ref): Ditto.
5993         * g95.h: Ditto.
5994         * symbol.c (g95_use_derived_tree): Ditto.
5995         * intrinsic.c (add_functions): Use simplification for SCALE.
5996         * primary.c (g95_match_rvalue): Test sym, not symtree.
5998 2003-03-25  Paul Brook  <paul@nowt.org>
6000         * trans-decl.c (build_function_decl): Add parameter before it gets
6001         turned into a constant.
6002         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6003         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6004         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6006 2003-03-22  Paul Brook  <paul@nowt.org>
6008         * trans-array.c (g95_conv_array_initializer): Allow scalar
6009         expressions.
6010         * trans-decl.c (g95_finish_var_decl): Result variables are not
6011         module variables.
6012         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6013         (g95_conv_intrinsic_function): Use it.
6014         * trans-types.h (g95_type_spec): Remove dead declaration.
6016 2003-03-21  Paul Brook  <paul@nowt.org>
6018         * trans-decl.c (g95_build_function_decl): Mark string parameters.
6020 2003-03-20  Paul Brook  <paul@nowt.org>
6022         * trans-decl.c (g95_build_function_decl): Put character length
6023         parameters at the end of the function declaration.
6024         * trans-expr.c (g95_conv_function_call): Ditto.
6025         * trans-types.c (g95_get_function_type): Ditto.
6027 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6029         * resolve.c (resolve_formal_arglist): Don't impose intent for
6030         procedure arguments of pure functions.
6031         (resolve_select): Remove redundant assignment.
6033 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6035         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6036         Remove option l1.
6037         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6038         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6039         const.
6040         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6041         Order list.
6042         * symbol.c (g95_add_type): Fix typo in comment.
6045 2003-03-16  Paul Brook  <paul@nowt.org>
6047         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6048         * expr.c (g95_build_call): Remove.
6049         * f95-lang.c (puchdecl_top_level): New function.
6050         * g95.h (g95_code): Store resolved symbol, not just the name.
6051         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6052         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6053         (g95_get_intrinsic_sub_symbol): New function.
6054         * iresolve.c (g95_resolve_cpu_time): Use it.
6055         (g95_resolve_random_number): Ditto.
6056         * resolve.c: Set code->resolved_sym instead of code->sub_name.
6057         * trans-decl.c (g95_get_extern_function_decl): Give external decls
6058         the correct DECL_CONTEXT.  Add global symbold to the global scope.
6059         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6060         fixed.
6062 2003-03-16  Paul Brook  <paul@nowt.org>
6064         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6065         * options.c (g95_parse_arg): Ditto.
6066         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6067         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6068         for the procedure, not the parameter.
6069         * trans-array.c (g95_trans_g77_array): New function.
6070         (g95_trans_assumed_size): Use it.
6071         (g95_trans_dummy_array_bias): Ditto.
6072         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6073         (g95_conv_expr_descriptor): ... to here.  Update callers.
6074         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6075         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6076         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6077         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6078         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6079         (g95_sym_type): Ditto.
6081 2003-03-15  Paul Brook  <paul@nowt.org>
6083         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6084         first chain.
6085         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6087 2003-03-14  Paul Brook  <paul@nowt.org>
6089         * trans-array.c (g95_array_is_packed): Remove.
6090         (g95_conv_array_base): Correctly handle all descriptorless cases.
6091         (g95_conv_array_stride): Use descriptorless strides.
6092         (g95_trans_dummy_array_bias): Don't always repack the array.
6093         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6094         packed.
6095         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
6096         dummy and non-dummy arrays...
6097         (g95_sym_type, g95_get_derived_type): ... like these.
6098         (g95_get_array_type_bounds): Allow discontiguous arrays.
6100 2003-03-12  Paul Brook  <paul@nowt.org>
6102         * array.c (g95_resolve_array_spec): Fix comment.
6103         * g95.h (symbol_attributes): New flag always_explicit.
6104         * resolve.c (resolve_formal_arglist): Set it always_explicit.
6105         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
6106         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
6107         (g95_trans_array_bounds): Allow assumed shape arrays.
6108         (g95_trans_repack_array): Remove.
6109         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
6110         * trans-decl.c (g95_build_qualified_array): Only ignore absent
6111         bounds for assumed size arrays.
6112         (g95_build_dummy_array_decl): Use descriptorless arrays.
6113         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
6114         (g95_trans_pointer_assign): Fix typo.
6115         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
6116         code.
6117         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
6118         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
6119         Also modify callers.
6120         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
6122 2003-03-08  Paul Brook  <paul@nowt.org>
6124         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
6125         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
6126         * resolve.c (compare_spec_to_ref): Allow full array sections.
6128 2003-03-08  Paul Brook  <paul@nowt.org>
6130         * expr.c (g95_simplify_expr): Also simplify array index and
6131         substring expressions.
6132         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
6133         * trans-array.c (g95_trans_array_bounds): New function.
6134         (g95_trans_auto_array_allocation): Use it.
6135         (g95_trans_assumed_size): Rewrite.
6136         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6137         (gfor_fndecl_repack): Remove.
6138         (g95_build_qualified_array): Handle absent upper bounds.
6139         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
6140         (g95_get_symbol_decl): Update.
6141         (g95_build_intrinsic_function_decls): Initialize new decls.
6142         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
6143         (gfor_fndecl_repack): Remove.
6144         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
6145         * trans-types.c: (g95_build_array_type): Merge duplicated code..
6146         (g95_get_nodesc_array_type): Handle absent bounds.
6147         * trans-types.h (g95_get_nodesc_array_type): Declare.
6149 2003-03-04  Paul Brook  <paul@nowt.org>
6151         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
6152         builtin-types.def.
6154 2003-03-02  Paul Brook  <paul@nowt.org>
6156         * options.c (g95_init_options): Drfault to 1.
6157         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
6158         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
6159         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
6160         Handle non-constant size automatic arrays.
6161         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
6162         generic bound functions.
6163         (g95_trans_auto_array_allocation): Don't create a descriptor.
6164         (g95_trans_assumed_size): New function (broken).
6165         (g95_trans_dummy_array_bias): Remove unused var.
6166         * trans-array.h (g95_trans_assumed_size): Declare.
6167         * trans-decl.c (create_index_var): New fuction.
6168         (g95_build_qualified_array): New function.
6169         (g95_get_symbol_decl): Use it.
6170         (g95_trans_deferred_vars): Handle assumed shape seperately.
6171         * trans-types.c (get_element_type): Handle heap allocated arrays.
6172         (g95_is_nodesc_array): Include non-const size arrays.
6173         (g95_get_nodesc_array_type): Ditto.
6175 2003-02-23  Paul Brook  <paul@nowt.org>
6177         * trans-array.c (g95_array_init_size): Should use stride, not size of
6178         last dimension.
6180 2003-02-18  Paul Brook  <paul@nowt.org>
6182         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
6183         after intrinsic function check.
6185 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6187         * io.c (match_io): Fix missing return value and remove useless
6188         assignment.
6189         * match.c (g95_match): Remove useless assignment.
6190         * module.c (parse_string):  Remove useless post increment.
6191         * simplify.c (g95_simplify_verify): Remove useless assignment.
6193 2003-02-15  Paul Brook  <paul@nowt.org>
6195         * expr.c (restricted_intrinsic): Handle bad values gracefully.
6196         * g95.h (symbol_attribute): Add referenced member.
6197         (g95_symbol): Add dummy_order member.
6198         (g95_set_sym_referenced): Declare.
6199         * match.c (g95_match_assignment, g95_match_call): Use it
6200         * primary.c (match_actual_arg, g95_match_rvalue,
6201         g95_match_variable): Ditto.
6202         * symbol.c (next_dummy_order): New variable.
6203         (g95_set_sym_referenced): New function.
6204         (check_done): New function.
6205         (g95_add_*): Use it.
6206         * trans-decl.c: Make formatting conform to GCC standards.
6207         (g95_defer_symbol_init): Add dummy variables in the right order.
6208         (g95_get_symbol_decl): Only accept referenced variables.
6209         (g95_create_module_variable): Module variables are always required.
6210         (generatr_local_decls): New function.
6211         (generate_local_vars): New function.
6212         (g95_generate_function_code): Use it.
6214 2003-02-13  Paul Brook  <paul@nowt.org>
6216         * trans-decl.c (g95_conv_struct_cons): Remove.
6217         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
6218         * trans-expr.c (g95_conv_structure): New function.
6219         (g95_conv_expr): Use it.
6221 2003-02-09  Paul Brook  <paul@nowt.org>
6223         * trans-array.c (g95_array_init_size): Don't evaluate the linit
6224         expressions multiple times.
6225         (g95_trans_auto_arry_allocation): Use pointer not tmp.
6227 2003-02-08  Paul Brook  <paul@nowt.org>
6229         * module.c (mio_symtree_ref): Declare as static.
6230         (mio_expr): Remove dead code.
6231         (read_module): Set the symtree link for fixups.
6232         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
6233         (build_round_expr): ... to this.
6234         (g95_conv_intrinsic_aint): New function.
6235         (g95_conv_intrinsic_function): Use it.
6237 2003-02-08  Paul Brook  <paul@nowt.org>
6239         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
6240         offset after modificaton, not the increment expression.
6241         * dependency.c: Kill excess whitespace.
6243 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
6245         * dependency.h: Remove some function declarations.
6246         * dependency.c (get_no_of_elements): Change this function not to
6247         return int.
6248         * other: Add comments for all modified functions.
6250 2003-02-06  Paul Brook  <paul@nowt.org>
6252         * g95spec.c (lang_specific_functions): Fix initializer warning.
6253         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
6254         for structure type names.
6255         * trans-decl.c (g95_cons_structure_cons): New function.
6256         (g95_get_symbol_decl): Use it.
6257         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
6258         referencing code.
6260 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6262         * resolve.c (compare_cases): Add const to casts.
6264 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6266         * g95.h (g95_check_f): Change a1 to f1m.
6267         * intrinsic.c (add_sym_1m, check_specific,
6268         g95_intrinsic_func_interface): Use it.
6270         * module.c (init_pi_tree): Remove useless cast.
6271         (fp2): Fix argument type.
6273         * parse.c (parse_select_block): Add comment.
6275 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
6277         * lang-options.h: Fix warning involving C90 concatenated
6278         strings.
6280 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6281             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6283         * io.c (format_asterisk): Complete initializer to kill warning.
6284         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
6285         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
6286         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
6287         new defines to complete initializers.  Kills all warnings.
6289         * Make-lang.in: Comment cleanup.
6291 2003-02-05  Paul Brook  <paul@nowt.org>
6293         * array.c (g95_free_constructor): Handle NULL expressions.
6294         * resolve.c (resolve_structure_cons): Ditto.
6295         * decl.c (g95_match_null): New Function.
6296         (variable_decl): Use it.
6297         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
6298         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
6299         * trans-types.c (g95_set_decl_attributes): Remove empty function.
6301 2003-02-05  Paul Brook  <paul@nowt.org>
6303         * trans.h (build1_v): New macro.
6304         (build_v): Remove pointless and incorrect prototype.
6305         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
6306         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
6308 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6310         * Make-lang.in (F95_OBJS): Remove one more dead file.
6312 2003-02-01  Paul Brook  <paul@nowt.org>
6314         * lang-specs.h: Don't pass -ffixed-form to the linker.
6315         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
6317 2003-02-01  Paul Brook  <paul@nowt.org>
6319         * Make-lang.in (F95_OBJS): Remove dead files.
6320         * trans-array.c (g95_array_init_size): Do the right thing when
6321         ubound=NULL.
6322         * trans-decl.c (g95_generate_function_code): Initialize deffered
6323         symbol list before translating contained subroutines.
6324         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
6325         scalar invariant values here...
6326         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
6327         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
6329 2003-01-29  Paul Brook  <paul@nowt.org>
6331         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6332         (g95_walk_elemental_function_args): Reverse chains before adding.
6333         (g95_reverse_ss): Move about a bit.
6334         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6335         function arguments.
6337 2003-01-28  Paul Brook  <paul@nowt.org>
6339         * intrinsic.c (resolve_intrinsic): Use correct union member.
6340         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6341         parameters.
6342         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6343         use associated variables.
6344         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6345         * trans-expr.c (g95_conv_expr_present): ... to here.
6346         * trans.h: Declare it.
6347         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6349 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6351         * array.c (expand_iterator): Suppress useless assignment.
6352         * decl.c (match_char_spec): Ditto.
6353         * io.c (match_io_iterator): Ditto.
6354         * primary.c (match_real_constant): Ditto.
6355         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6356         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
6357         * matchexp.c (match_add_operand, match_level_5): Likewise.
6358         * module.c (parse_atom, find_enum): Likewise.
6359         * resolve.c: move #include <string.h>
6360         (resolve_select): Fix serious typo.
6362 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
6364         * Make-lang.in: Don't build with broken tree-ssa-pre.
6366 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6368         * resolve.c (resolve_index): Add a TODO.
6369         * symbol.c: Remove useless "#include <ctype.h>".
6371 2003-01-27  Paul Brook  <paul@nowt.org>
6373         * check.c (check_rest): Allow different type kinds as an extension.
6374         * g95.h (g95_resolve_f): Add f1m.
6375         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6376         * intrinsic.h: Chenge prototypes for MIN and MAX.
6377         * iresolve.c (g95_resolve_minmax): New function.
6378         (g95_resolve_min, g95_resolve_max): Use it.
6379         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6380         arguments once.
6381         (g95_conv_intrinsic_present): Fix logic.
6383 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
6385         * g95.h (g95_case): Don't be a tree, be a double linked list.
6386         * match.c (match_case_selector): Remove redundant semantics check.
6387         Clean up a few goto's to make it a tiny little bit faster.
6388         * resolve.c (case_tree): Die.
6389         (compare_cases): Accept and compare unbounded cases too.
6390         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
6391         whole list of g95_cases passed from resolve_select.
6392         (sane_logical_select): Die.
6393         (check_case_expr): Return FAILURE if a CASE label is of the wrong
6394         type kind.
6395         (resolve_select): Fixup case expression for computed GOTOs, put it
6396         in expr, not expr2, for easier handing in the parse tree dumper and
6397         the code generator.  Rewrite the rest of the function: Kill
6398         unreachable case labels and unreachable case blocks.
6399         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6400         an EXEC_SELECT, not case2 anymore.
6401         * trans-const.c (g95_conv_constant_to_tree): New function.
6402         (g95_conv_constant): Use it.
6403         * trans-const.h: Declare prototype for the new function.
6404         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6405         g95_trans_character_select): New static functions.
6406         (g95_trans_select): Rewrite.
6408 2003-01-26  Paul Brook  <paul@nowt.org>
6410         * intrinsic.c (add_fnctions): Properly add dreal.
6411         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6412         (g95_conv_intrinsic_function): Use it.
6413         * trans-io.c (build_dt): Abort on internal files (unimplemented).
6415 2003-01-26  Paul Brook  <paul@nowt.org>
6417         Widespread changes to the handling of symbols in expressions.  These
6418         are now linked via g95_symtree nodes.
6419         * parse.c (g95_fixup_sibling symbols): New function.
6420         (parse_contained): Use it.
6421         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
6422         contained procedure that has bee correctly fixed up.
6423         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6425 2003-01-24  Paul Brook  <paul@nowt.org>
6427         * trans-array.c (g95_walk_expr): Function result attributes are in
6428         sym->result.
6429         * trans-expr.c (g95_conv_function_call,
6430         g95_trans_arrayfunc_assign): Ditto.
6431         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6433 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6435         * expr.c (check_restricted): Fix error message.
6436         * symbol.c (free_st_labels): Plug memleak.
6438 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6440         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6441         reduce_binary_aa, reduce_binary, eval_intrinsic,
6442         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6443         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6444         for typesafe intrinsics helper functions.
6445         (g95_intrinsic_sym): Use them.
6446         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6447         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6448         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6449         check_specific, g95_intrinsic_func_interface,
6450         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6451         helper functions.
6452         * trans-decl.c (g95_get_extern_function_decl): Likewise.
6453         * Make-lang.in: Don't disable warnings for strict prototypes
6454         any longer, everything is typesafe now.
6456 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6458         * bbt.c (duplicate_node): Make static.
6459         * module.c (module_name): Make static.
6460         * scanner.c (include_dirs): Make static.
6462 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6464         Hard coded _gfor_'s should not show up anymore.
6465         * g95.h (PREFIX): New macro.
6466         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6467         hard-coded "_gfor".
6468         (g95_resolve_random_number): Likewise.
6469         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6470         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
6471         the new PREFIX macro from g95.h.
6473 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6475         The troubles of forking... Andy implemented this just now too.
6476         Let's stick to that and keep the trees close.
6477         * g95.h (g95_st_label): 'format' member is now a g95_expr.
6478         * io.c: Revert previous changes.
6479         (g95_match_format): Match the format string as a character
6480         literal expression.
6481         * match.h (g95_statement_label): Declare external.
6482         * parse.c: Revert previous changes.
6483         * symbol.c (g95_free_st_label): Free a g95_expr instead
6484         if a 'char *'.
6485         * trans-io.c: Revert previous changes.
6486         (build_dt): Use set_string to set the format string.
6488 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6490         * io.c (format_string): Make non-static.
6491         (g95_match_format): Remember the format string.
6492         (terminate_io): Add I/O termination for empty I/O lists.
6493         * match.h: Declare external format_string.
6494         * parse.c (check_statement_label): Attack the format string
6495         to a format label for FORMAT statements.
6496         * trans-io.c (g95_add_field): Define prefix macro.  Replace
6497         all uses of PREFIX define with a use of this macro.
6498         (build_dt): Implement formatted I/O for format labels.
6500 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6502         * lang-options.h: Kill "-std=F".
6503         * options.c: Remove unimplemented "-std=F".  Modify
6504         web address.
6505         * misc.c (g95_terminal_width): New function.
6506         * error.c (g95_error_init_1): Use g95_terminal_width.
6507         * g95.h: Add prototype for g95_terminal_width, remove
6508         fmode flag.
6510 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6512         * Make-lang.in: Fix typo.
6514 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6516         * g95.h (struct g95_case): Remove unused cruft, new member
6517         'where' to keep track of the locus of the default case.
6518         * match.c (g95_match_case): Add locus to the current case.
6519         (match_case_selector): Likewise.
6520         * parse.c (parse_select_block): Move semantics check for
6521         multiple DEFAULT cases out of here to...
6522         * resolve.c (check_case_overlap): ...here.  Return sooner
6523         when possible.
6524         (check_case_expr): Take two g95_cases now, use to sure the
6525         expression kinds are the same.
6526         (resolve_select): Cleanup.
6528 2003-01-18  Paul Brook  <paul@nowt.org>
6530         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6531         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6532         variables.
6533         (g95_get_extern_function_decl): Put decls in the correct context.
6535 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6537         * trans-io.c: Port changes from Andy to set ERR flag.
6539 2003-01-17  Paul Brook  <paul@nowt.org>
6541         * trans-array.c: Add various comments.
6542         (g95_ss_terminator): Declare as const.
6543         (g95_walk_expr): Remove first parameter and update all callers.
6544         (g95_walk_op_expr): Initialize scalar SS properly.
6545         * trans-array.h (g95_walk_expr): Update prototype.
6546         * trans-expr.c: Update for new g95_walk_expr.
6547         * trans-intrinsic.c: Ditto.
6548         * trans-io.c: Ditto.
6549         * trans.h: Various comments for SS chains.
6551 2003-01-17  Paul Brook  <paul@nowt.org>
6553         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6554         and RRSPACING.
6555         * intrinsic.c (add_functions): Use them.
6556         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6557         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6559 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6561         Fallout of a small merge conflict:
6562         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6564 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6566         * initrinsic.c: New add_sym_* functions for strong typing.
6567         (add_conv): Make prototype strict.
6568         * dump-parse-tree.c, dependency.c: Include config.h
6569         * resolve.c, trans-io.c: Fix typos.
6571 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6573         * dump-parse-tree.c (g95_show_code_node): Show the
6574         condition for a computed GOTO that was transformed
6575         to a SELECT CASE construct.
6576         * resolve.c (check_case_overlap): Revert previous switch
6577         to treaps, it was too slow and didn't catch all trouble.
6578         (resolve_symbol): Be more flexible about module procedures.
6579         * symbol.c (check_conflict): Point to relevant section in
6580         the standard for dubious conflict.  Allow procedure
6581         dummy arguments to be optional again.
6582         * trans-io (add_field): Rename to g95_add_field.  Change
6583         all callers.
6584         * trans-stmt (trans_select): Handle unbounded cases for
6585         integer SELECT CASE constructs.  Fix/add more comment.
6587 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6589         * g95.h: Uses GCC's function attribute macros.
6590         * error.c, module.c, parse.c, g95.h: More function attributes.
6592 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6593         Forgot a file...
6594         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6595         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6596         DECL_SOURCE_FILE.
6598 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6600         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6601         DECL_SOURCE_LINE.
6602         * trans.c (g95_trans_code): Use annotate_all_with_file_line
6603         instead of nowdead wrap_all_with_wfl.
6605 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6607         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6608         before generating code, so we can still see it even if the code
6609         generation phase dies.
6611 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6613         * decl.c (build_sym): Split out initialization expression parts...
6614         (add_init_expr_to_sym): ...to here.
6615         (variable_decl): Add the symbol following an attribute list to the
6616         symbol tree before parsing the optional initialization expression
6617         if the symbol is not of a derived type.
6618         * primary.c (g95_match_rvalue): Don't assume a symbol always has
6619         a value if it is a PARAMETER.
6621 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6623         * misc.c: Don't #include <mcheck.h>
6624         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
6625         ever was a glibc bug, then either this was never reported to
6626         glibc people, or it has been fixed for so long that there's
6627         no information you can find about it, anywhere.
6629 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6631         Fix warnings:
6632         * module.c (attr_bits, bt_types, array_spec_types):
6633         Switch 'const' and 'static'.
6634         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6636         GNU'ify source code:
6637         * trans-io.c: Numerous fixes, one fixed warning and a few
6638         TODO markers so that we don't forget about them.
6640 2003-01-13  Paul Brook  <paul@nowt.org>
6642         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6643         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6644         Add G95_ISYM_SCALE.
6645         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6646         * match.c (g95_match_stop): Fix dumb == -> != error.
6648 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6650         * dump-parse-tree.c (show_indent): Add line breaks.  This
6651         whole dumping process needs cleanups.
6652         * f95-lang.c (g95_mark_addressable): Fix prototype to match
6653         the langhook.  Fix 'return's accordingly.
6654         * g95-support.h: Adjust prototype.
6655         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6656         * lang-options.h: Add '-fsyntax-only'.
6657         * options.c (g95_init_options): Init 'no_backend'.
6658         (g95_parse_arg): Deal with '-fsyntax-only'.
6659         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6660         is set.
6662 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6663         Patch from Arnaud
6664         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6665         arguments.  Also make sure that if a symbol is marked INTRINSIC,
6666         an intrinsic with the symbol's name actually exists.
6667         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6668         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6669         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6671 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6673         * resolve.c (resolve_contained_functions): Fix condition, don't
6674         throw internal_error if a child namespace has no name.  Apparently
6675         this can be the case?
6677 2003-01-11  Paul Brook  <paul@nowt.org>
6679         Port changes from Andy's tree:
6680         * g95.h (g95_code): Add stop_code.
6681         * match.c (g95_match_stop): Detter syntax checking.
6682         * resolve.c (resolve_generic_f0): Return match type.
6683         (resolve_generic_f): Remove dead/duplicated code.
6684         (resolve_specific_f): Ditto.
6685         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6686         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6687         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6689 2003-01-11  Paul Brook  <paul@nowt.org>
6691         * trans-array.c: Various documentation/comment changes.
6692         * trans-stmt.c: Ditto.
6695 2003-01-10  Paul Brook  <paul@nowt.org>
6697         * options.c/h: Add -fdump-parse-tree as alias of -v.
6699 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6701         * dump-parse-tree.c (g95_show_namespace): Fixed another
6702         typo.  Sorry, it's Friday...
6704 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6706         Spotted by Tobi:
6707         * trans-array.c, trans-array.h, trans.c, trans-const.c,
6708         trans-const.h, trans-decl.c, trans-expr.c, trans.h
6709         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6710         trans-types.c: Fix bogus copyright years, add 2003.
6711         * trans-types.h: Give copyright header.
6713 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6715         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6716         * expr.c, options.c, scanner.c: Add some more 'const' markers.
6717         * intrinsic.c: Some constant strings moved to read-only memory.
6718         * io.c (format_asterisk): Move to...
6719         * g95.h: ...here.
6721 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6723         * dump-parse-tree.c (g95_show_namespace): Dump implicit
6724         types for ranges instead of per-letter.  Indent the
6725         'CONTAINS' just like everything else.
6726         * resolve.c (resolve_contained_functions): Clarify comment.
6727         Explain non-obvious conditional expression.  Improve
6728         diagnostics if tyoe cannot be resolved.
6729         Port semi-fix from Andy's tree:
6730         (was_declared): Move up before first use.
6731         (generic_sym, specific_sym): New functions.  Code moved
6732         out if procedure_kind.
6733         (procedure_kind): Simplify using new functions.
6734         (resolve_generic_f): Make sure the functions we find in
6735         a parent namespace is generic.
6736         (resolve_specific_f): Ditto for specific functions.
6738 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6740         * trans-stmt.c, trans.c: Fix some code style issues. Add
6741         some more comment (but still not enough!).
6743 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6745         * symbol.c (flavors, procedures, intents, acces_types,
6746         access_types, ifsrc_types): Make const.
6747         * misc.c (g95_string2code): Make 'm' param 'const'.
6748         * module.c (find_enum, write_atom, mio_name): Make
6749         'm' param 'const'.
6750         (attr_bits, bt_types, array_spec_types, array_ref_types,
6751         ref_types, expr_types): Make const.
6752         * g95.h: Adjust external decls.
6754 2003-01-09  Paul Brook  <paul@nowt.org>
6756         * Testsuite: Add a load of new cases.
6758 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6760         * Make-file.in: Add dependency on back end header files;
6761         a parallel build should work now.
6762         * f95-lang-c (lang_identifier): Remove bogus comment.
6763         (g95_be_parse_file): Fix prototype.
6764         (g95_init): Make static.
6765         (g95_finish): Make static.
6766         * error.c (g95_syntax_error): Kill. Make define in...
6767         * g95.h (g95_syntax_error): Define.
6768         (g95.options): Make 'source' member 'const'.
6769         * interface.c (g95_match_interface): Explain
6770         hard-to-read condition.
6771         (g95_match_end_interface): Ditto.
6772         * trans_const.c (g95_build_string_const): Make 's' parameter
6773         'const'.
6774         * trans_const.h: Adjust protoype accordingly.
6775         * trans-decl.c: Include tree-dump.h
6776         (g95_generate_function_code): Build fixes for recent changes
6777         in the tree-ssa branch.
6779 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6781         * format.c: Kill, move code from here...
6782         * io.c: ...to here.
6783         * Make-lang.in: Adjust.
6784         * MANIFEST: Ditto.
6785         * match.h: Ditto.
6786         * BUGS: Mention where to submit bugs.  Move old content...
6787         * TODO: ...to here.  New file.
6789 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6790         Fix most warnings, and suppress the ones we can't fix for now.
6791         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6792         these warnings just clutter the screen and there's not much
6793         we can do about them for now anyway.
6794         * check.c, iresolve.c: Mark unused function parameters.
6795         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6796         they should be resolved before they get here.
6797         * error.c: Remove unused FILE *status_out.
6798         * f95-lang.c (g95_init): Remove bogus cast.
6799         * Many files: Make things 'const' where required.
6800         * g95.h: Fix prototypes for all modified functions above.
6801         (g95_options): Remove 'object' member.
6803 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6805         * Make-file.in: Cleanup bogus targets.  Add more comment.
6806         * lang-options.h: New option '-w'.
6807         * g95.h: add no_options field to struct g95_options.
6808         * options.c (g95_init_options): Default no_warnings to off.
6809         (g95_parse_arg): Recognise the '-w' switch and its alias,
6810         '-fno-warnings'.
6811         * error.c (g95_warning, g95_warning_now): Don't emit warning if
6812         no_warning option is set.
6813         * iresolve.c (g95_resolve_shape): Fix warning.
6815 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6817         * primary.c (g95_next_string_char): Rename next_string_char, and
6818         make static.  Adjust callers accordingly.
6819         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
6820         callers accordingly.
6821         * g95.h: Split out all g95_match* functions to...
6822         * match.h: ...here. New file.
6823         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6824         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6826 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6828         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6829         g95_merge_new_implicit): New functions.
6830         (g95_match_implicit_none, g95_match_implicit): Move from here...
6831         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6832         Modify to use the new functions in symbol.c.
6833         * g95.h: Add and move prototypes.
6835 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6837         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6838         node compare function.
6839         (g95_insert_bbt): Likewise.
6840         (g95_insert_bbt_with_overlap): Likewise.
6841         (g95_delete_bbt): Likewise.
6842         (delete_treap): Likewise. Also fix a potential bug when calling it.
6843         * module.c (compare_pointers): Change proto to compare_fn.
6844         (compare_integers): Likewise.
6845         (compare_true_names): Likewise.
6846         (find_true_name): Adjust call to compare_true_names to match proto.
6847         (require_atom, write_atom, mio_name): Fix 'const' warnings.
6848         (init_pi_tree): Make compare a compare_fn instead of (int *).
6849         * resolve.c (compare_cases): Change proto to compare_fn.
6850         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6851         it static, and rename to compare_symtree.
6852         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6853         function.
6854         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6855         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6857 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6858         * Make-lang.in: Fix spaces/tabs issues from previous patch.
6859         * patch.options: Blow away Paul's checkin mistake :-)
6860         * io.c (terminate_io): Fix memory leak (Arnaud).
6862 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6864         * Make-lang.in: Teach about building DVI, info manual.
6865         * g95.texi: New file.
6867 2003-01-02  Paul Brook  <paul@nowt.org>
6869         * trans-array.c (g95_reverse_ss): Make static and don't use.
6870         (g95_conv_ss_descriptor): Don't use g95_loopinfo
6871         (g95_conv_array_parameters): Modify for pointer assignments.
6872         (g95_walk_subexpr): New function.
6873         (g95_walk_expr*): Use it.
6874         * trans-array.h (g95_reverse_ss): Remove prototype.
6875         * trans-expr.c (g95_trans_pointer_assign): Implement.
6876         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6877         * trans-intrinsic.c: Sync with scalarizer changes.
6878         * trans-io.c: Ditto.
6880 2002-12-29  Paul Brook  <paul@nowt.org>
6882         * trans-array.c: Document calling convention for arrays.
6884 2002-12-19  Paul Brook  <paul@nowt.org>
6886         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6887         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6888         optional parameters for some intrinsics.
6889         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6890         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6891         optional parameters.
6892         * trans.h (g95_se): Add ignore_optional flag.
6894 2002-12-15  Paul Brook  <paul@nowt.org>
6896         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6897         * trans-decl.c (g95_generate_function_code): Use TDI_original.
6899 2002-12-14  Paul Brook  <paul@nowt.org>
6901         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6903 2002-12-12  Paul Brook  <paul@nowt.org>
6905         * trans-array.c (g95_trans_array_constructor_subarray): Fully
6906         initialize the scalarizer.
6907         (various): Update to new format of g95_expr->value.constructor.
6909 2002-12-08  Paul Brook  <paul@nowt.org>
6911         * trans-array.c (g95_put_offset_into_var): New function.
6912         (g95_trans_array_constructor_subarray): New function.
6913         (g95_trans_array_constructor_value): Use it.
6914         (g95_array_cons_size): Don't abort() on array components.
6916 2002-12-08  Paul Brook  <paul@nowt.org>
6918         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6919         * support.c: Update #includes.
6920         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6921         * trans-array.c: Update #includes.
6922         * trans.c: Ditto.
6923         * trans-const.c: Ditto.
6924         * trans-io.c: Ditto.
6925         * trans-types.c: Ditto.
6926         (g95_init_types): Set size_type_node.
6927         * trans-decl.c: Update #includes.
6928         (gfor_fndecl_adjust{l,r}): Declare and initialize.
6929         * trans-stmt.c: Update #includes.
6930         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6931         (g95_trans_select): Fix check for unbounded ranges.
6932         * trans-expr.c: Update #includes.
6933         (g95_conv_string_tmp): New function.
6934         (g95_conv_concat_op): Use it.
6935         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6936         * Trans-intrisic.c: Update #includes.
6937         (g95_conv_intrinsic_strcmp): New function.
6938         (g95_conv_intrinsic_adjust): Ditto.
6939         (g95_conv_intrinsic_function: Use them.
6941 2002-11-30  Paul Brook  <paul@nowt.org>
6943         * trans-array.c (g95_walk_function_expr): Handle non-array return by
6944         reference.
6945         * trans-dec.c (g95_build_function_decl): Handle character return
6946         parammeters.
6947         (g95_get_fake_result_decl): Ditto.
6948         (g95_trans_deferred_vars): Ditto.
6949         * trans-expr.c (g95_conv_function_call): Ditto.
6950         (g95_trans_arrayfunc_assign) Limit to array valued functions.
6951         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6952         (g95_conv_intrinsic_function): Use it.
6953         * trans-types.c (g95_sym_type): Handle functions returning strings.
6954         (g95_return_by_reference): Ditto.
6955         (g95_get_function_type): Ditto.
6957 2002-11-18  Paul Brook  <paul@nowt.org>
6959         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6960         requires a temporary.
6961         (g95_trans_select): Handle computed gotos.
6962         * trans-types.c (g95_build_array_type): Warn about non-functional
6963         assumed shape arrays.
6964         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6965         blocks.
6966         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6967         (g95_conv_intrinsic_int): New function.
6968         (g95_conv_intrinsic_mod): New function.
6969         (g95_conv_intrinsic_ichar): New function.
6970         (g95_conv_intrinsic_function): Use them.
6971         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6973 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
6975         * trans-types.c (g95_build_array_type): Assumed
6976         sized arrays can have rank > 1.
6977         * trans.c (g95_trans_code): Remove erroneous
6978         warning about CONTINUE.
6979         * trans-expr.c (g95_conv_variable): Remove
6980         erroneous assert.
6982 2002-11-15  Paul Brook  <paul@nowt.org>
6984         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6986 2002-10-31  Paul Brook  <paul@nowt.org>
6988         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6989         * trans-expr.c (g95_conv_component_ref): Handle character string
6990         components.
6991         (g95_conv_string_parameter): Ditto.
6992         * trans-types.c (g95_get_derived_type): Add length decl to caracter
6993         string components.
6995 2002-10-10  Paul Brook  <paul@nowt.org>
6997         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6998         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6999         check.
7000         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7001         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7002         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7003         * trans-types.c (pvoid_type_node): Declare and initialize.
7004         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7005         (g95_array_allocate): Fix when base==data.
7006         (g95_conv_array_parameter): Correctly handle reduced rank sections.
7007         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7009 2002-10-09  Paul Brook  <paul@nowt.org>
7011         * (g95_conv_expr_reference): Handle character strings correctly.
7013 2002-10-07  Paul Brook  <paul@nowt.org>
7015         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7016         langhook.
7017         * trans-array.c (g95_build_array_initializer): Remove.
7018         (g95_conv_array_initializer): New Function.
7019         (g95_trans_auto_arry_allocation): Cleanup.
7020         (g95_trans_init_character_array): Remove.
7021         * g95spec.c: Link in libgforbegin.
7022         * trans.c (g95_generate_code): Rename main function to MAIN__.
7023         (g95_create_var): New function.
7024         (g95_create_var_np): New function.
7025         (g95_evaluate_now): New function.
7026         (g95_start_block): New function.
7027         (g95_finish_block): New function.
7028         (g95_add_expr_to_block): New function.
7029         (g95_add_block_to_block): New function.
7030         * trans-expr.c (g95_conv_componen_ref): New function.
7031         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7032         (F95_OBJS): Add dependency.o.
7033         * f95-lang.c (g95_is_simple_stmt): Remove.
7034         * f95-tree.c (mark_not_simple): New function.
7035         (unshare_all_trees): New function.
7036         (create_tmp_var, create_tmp_alias_var): Remove.
7037         * support.c (declare_tmp_vars, tree_last_decl): Remove.
7038         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
7039         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7041 2002-10-01  Paul Brook  <paul@nowt.org>
7043         * trans-array.c: Add support for descriptorless arrays.
7044         (g95_conv_array_data): New function.
7045         (g95_conv_array_base): New function.
7046         * trans-array.h: Declare these here.
7047         * trans-decl.c(g95_create_mopdule_variable): Perform variable
7048         initialization and creation here.
7049         (g95_create_module_vars): Instead of here.
7050         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7051         * trans-intrinsic.c: Ditto.
7052         * trans-types.c (g95_is_nodesc_array): New function.
7053         (g95_get_nodesc_array_type): New function.
7054         (g95_sym_type, g95_get_derived_type): Use them.
7055         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7057 2002-09-28  Paul Brook  <paul@nowt.org>
7059         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7060         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7061         parameters.
7063 2002-09-24  Paul Brook  <paul@nowt.org>
7065         * f95-lang.c (listify): Remove declaration.
7066         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7067         (listify)
7068         * f95-tree.c (get_name): New function.
7069         * trans.c (module_namespace): Remove.
7070         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7071         * trans-types.c: Ditto.
7073 2002-09-19  Paul Brook  <paul@nowt.org>
7075         * trans-array.c (g95_get_array_cons_size): New Function.
7076         (g95_con_ss_startstride): Handle Array constructors.
7077         (g95_conv_loop_setup): Ditto.
7078         (g95_conv_array_parameter): Ditto.
7079         * tras-decl.c (g95_finish_var_decl): Make initializes variables
7080         static.
7082 2002-09-19  Paul Brook  <paul@nowt.org>
7084         * trans.c (g95_simple_fold_tmp): Detect variables inside
7085         NON_LVALUE_EXPR.
7086         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7088 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
7090         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7092 2002-09-14  Paul Brook  <paul@nowt.org>
7094         * trans.c (g95_create_module_variable): Move to trans-decl.c.
7095         * trans-const.c (g95_conv_string_init): New Function.
7096         * trans-const.h: Declare it.
7097         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
7098         variables. Don't bail on intrinsic symbols.
7099         (get_extern_function_decl): Handle specific intrinsic functions.
7100         * trans-types.c (g95_sym_type): Dummy functions don't return
7101         reference types.
7102         * trans-array.c (g95_build_array_initializer): New Function.
7103         (g95_trans_auto_array_allocation): Build initializer for static decls.
7104         Don't use mpz_addmul, it's GMP4 only.
7106 2002-09-12  Paul Brook  <paul@nowt.org>
7108         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
7109         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
7110         assembler names for module procedures.
7112 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
7114         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
7115         dependency/
7117 2002-09-10  Paul Brook  <paul@nowt.org>
7119         * trans-array.c: Change format of G95_SS_TEMP strictures.
7120         (g95_check_fncall_dependancy): New function.
7121         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
7122         offsets.
7123         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
7124         result variables.
7125         (g95_build_function_decl): Don't assume result arrays are packed.
7126         (g95_trans-deferred-vars): Handle array result variables.
7127         (g95_generate_fuction_code): Clear saved_function_decls.
7128         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
7129         reference.
7130         (g95_trans_arrayfunc_assign): New function.
7131         (g95_trans_assignment): Use it.
7132         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
7133         (g95_se): Add direct_byref.
7134         * trans-types.c: Use sym->result rather than sym where appropriate.
7135         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
7136         Update other functions to use this.
7137         (g95_is_intrinsic_libcall): New function.
7138         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
7139         (g95_walk_intrinsic_function): Ditto.
7141 2002-09-08  Paul Brook  <paul@nowt.org>
7143         * trans-types.c: Change rank field to dtype field in array descriptor.
7144         * trans-array.c: Implement filling of dtype array descriptor field.
7145         * trans-intrinsic.c: Fix broken LEN intrinsic.
7147 2002-09-07  Paul Brook  <paul@nowt.org>
7149         * trans-intrinsic.c: Remove outdated todo intrinsic list.
7150         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
7151         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
7153 2002-09-06  Paul Brook  <paul@nowt.org>
7155         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
7156         (gt-f95-trans-types.h): Add dependancy information.
7157         * config-lang.in (gtfiles): Add trans-types.c
7158         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
7159         back to top-level code.
7160         * trans-array.c, trans-types.c: Change format of array descriptor.
7161         (g95_conv_descriptor_dimension): New function.
7162         * trans-types.h (g95_conv_descriptor_rank): define.
7163         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
7164         intrinsics.
7166 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7168         * trans-array.c, trans-types.c: Add rank information to descriptor.
7170 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
7172         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
7174 2002-09-04  Paul Brook  <paul@nowt.org>
7176         * f95-lang.c (g95_create_decls): New function.
7177         (g95_init):  Move initialization of external decls to above, and call
7178         from g95_be_parse_file.
7179         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
7180         * trans-types.c (g95_init_types): Always name integer and char types.
7181         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
7183 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7185         * Make-lang.in: Add options.c to F95_PARSER_OBJS
7187 2002-09-02  Paul Brook  <paul@nowt.org>
7189         * g95_generate_code: Clear the attr for __fortran_main.
7190         * trans-types.c (g95_finish_type): New function.
7191         * g95_init_io_state_type: Use g95_finish_type.
7192         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
7194 2002-09-01  Paul Brook  <paul@nowt.org>
7196         * README.backend: Warn about the dangers of extra config.h files.
7197         Remove obsolete libgfor stuff.
7198         * config-lang.in: Add target-libgfor dependancy.
7199         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
7201 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
7203         * g95_conv_mpz_to_tree: Free storage pointed to by q,
7204         not by buff.
7206 2002-08-30  Paul Brook  <paul@nowt.org>
7208         * trans-intrinsic.c (g95_conv_intrinsic_function,
7209         g95_walk_intrinsic_function): Added ANY and ALL.
7210         (g95_conv_intrinsic_anyall): New function.
7211         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
7212         mangled name