1 2005-12-23 Paul Thomas <pault@gcc.gnu.org>
5 *resolve.c(resolve_function): Remove assumed size checking for SIZE
6 and UBOUND and rely on their built-in checking.
8 2005-12-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
11 * gfortran.h (gfc_charlen): Add resolved field.
12 * expr.c (gfc_specification_expr): Accept NULL argument.
13 * resolve.c (gfc_resolve_charlen, gfc_resolve_derived): New.
14 (gfc_resolve_symbol): Resolve derived type definitions. Use
15 resolve_charlen to resolve character lengths.
17 2005-12-22 Paul Thomas <pault@gcc.gnu.org>
20 *resolve.c(resolve_structure_cons): Do not attempt to convert
21 the type of mismatched pointer type components, except when
22 the constructor component is BT_UNKNOWN; emit error instead.
26 *resolve.c(check_assumed_size_reference): New function to check for upper
27 bound in assumed size array references.
28 (resolve_assumed_size_actual): New function to do a very restricted scan
29 of actual argument expressions of those procedures for which incomplete
30 assumed size array references are not allowed.
31 (resolve_function, resolve_call): Switch off assumed size checking of
32 actual arguments, except for elemental procedures and array valued
33 intrinsics; excepting LBOUND.
34 (resolve_variable): Call check_assumed_size_reference.
40 *interface.c(gfc_compare_types): Broken into two.
41 (gfc_compare_derived_types): Second half of gfc_compare_types with
42 corrections for a missing check that module name is non-NULL and
43 a check for private components.
44 *symbol.c(gfc_free_dt_list): New function.
45 (gfc_free_namespace): Call gfc_free_dt_list.
46 *resolve.c(resolve_symbol): Build the list of derived types in the
48 *gfortran.h: Define the structure type gfc_dt_list. Add a new field,
49 derived_types to gfc_namespace. Provide a prototye for the new
50 function gfc_compare_derived_types.
51 *trans_types.c(gfc_get_derived_type): Test for the derived type being
52 available in the host namespace. In this case, the host backend
53 declaration is used for the structure and its components. If an
54 unbuilt, equal structure that is not use associated is found in the
55 host namespace, build it there and then. On exit,traverse the
56 namespace of the derived type to see if there are equal but unbuilt.
57 If so, copy the structure and its component declarations.
58 (copy_dt_decls_ifequal): New functions to copy declarations to other
59 equal structure types.
62 * io.c (gfc_match_format): Make the appearance of a format statement
63 in a module specification block an error.
66 * match.c (gfc_match_namelist): Set assumed shape arrays in
67 namelists as std=GFC_STD_GNU and assumed size arrays as an
71 * match.c (gfc_match_namelist): Set the respecification of a USE
72 associated namelist group as std=GFC_STD_GNU. Permit the concatenation
82 * io.c (resolve_tag): Change std on IOSTAT != default integer to
83 GFC_STD_GNU and change message accordingly. Add same error for
85 (match_dt_element, gfortran.h): Add field err_where to gfc_dt and
86 set it when tags are being matched.
87 (gfc_resolve_dt): Remove tests that can be done before resolution
88 and add some of the new ones here.
89 (check_io_constraints): New function that checks for most of the
90 data transfer constraints. Some of these were previously done in
91 match_io, from where this function is called, and some were done
93 (match_io): Remove most of the tests of constraints and add the
94 call to check_io_constraints.
96 2005-12-21 Erik Edelmann <eedelman@gcc.gnu.org>
99 * parse.c (parse_where_block): break instead of "fall
100 through" after parsing nested WHERE construct.
102 2005-12-18 Paul Thomas <pault@gcc.gnu.org>
105 *expr.c(check_inquiry): Return FAILURE if there is no symtree to
106 provide a name. Error/warning for assumed character length argument
107 to LEN for an initialization expression, using GFC_GNU_STD. Add an
108 argument to flag that the expression is not restricted.
109 (check_init_expr): Improve the message for a failing variable.
110 (gfc_match_init_expr): Call check_enquiry again to make sure that
111 unsimplified expressions are not causing unnecessary errors.
113 2005-12-17 Steven G. Kargl <kargls@comcast.net>
114 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
117 * simplify.c (gfc_simplify_ibset, gfc_simplify_not): Add call to
120 2005-12-17 Steven G. Kargl <kargls@comcast.net>
122 * decl.c (gfc_match_old_kind_spec,match_type_spec): Use gfc_std_notify
123 to report nonstandard intrinsic type declarations.
125 2005-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
128 * io.c (format_lex): Allow whitespace within text of format specifier.
130 2005-12-16 Steven G. Kargl <kargls@comcast.net>
134 * match.c (gfc_match_small_literal_int): Add cnt argument;
135 (gfc_match_st_label,gfc_match_stopcode): Account for cnt argument.
136 * match.h (gfc_match_small_literal_int): Update prototype.
137 * decl.c (match_char_length,gfc_match_old_kind_spec): Account for cnt.
138 * parse.c (next_free): Ditto.
139 * primary.c (match_kind_param): Ditto.
141 2005-12-16 Richard Guenther <rguenther@suse.de>
143 * trans.h (tree): Remove declaration of gfc_build_function_call.
144 * trans.c (gfc_build_function_call): Remove.
145 (gfc_build_array_ref): Use build_function_call_expr.
146 (gfc_trans_runtime_check): Likewise.
147 * trans-array.c (gfc_trans_allocate_array_storage): Likewise.
148 (gfc_grow_array): Likewise.
149 (gfc_trans_array_ctor_element): Likewise.
150 (gfc_trans_array_constructor_value): Likewise.
151 (gfc_array_allocate): Likewise.
152 (gfc_array_deallocate): Likewise.
153 (gfc_trans_auto_array_allocation): Likewise.
154 (gfc_trans_dummy_array_bias): Likewise.
155 (gfc_conv_array_parameter): Likewise.
156 * trans-expr.c (gfc_conv_power_op): Likewise.
157 (gfc_conv_string_tmp): Likewise.
158 (gfc_conv_concat_op): Likewise.
159 (gfc_conv_expr_op): Likewise.
160 (gfc_trans_string_copy): Likewise.
161 * trans-decl.c (build_entry_thunks): Likewise.
162 (gfc_generate_function_code): Likewise.
163 (gfc_generate_constructors): Likewise.
164 * trans-io.c (gfc_trans_open): Likewise.
165 (gfc_trans_close): Likewise.
166 (build_filepos): Likewise.
167 (gfc_trans_inquire): Likewise.
168 (transfer_namelist_element): Likewise.
169 (build_dt): Likewise.
170 (gfc_trans_dt_end): Likewise.
171 (transfer_expr): Likewise.
172 (transfer_array_desc): Likewise.
173 * trans-stmt.c (gfc_trans_pause): Likewise.
174 (gfc_trans_stop): Likewise.
175 (gfc_trans_character_select): Likewise.
176 (gfc_do_allocate): Likewise.
177 (gfc_trans_assign_need_temp): Likewise.
178 (gfc_trans_pointer_assign_need_temp): Likewise.
179 (gfc_trans_forall_1): Likewise.
180 (gfc_trans_where): Likewise.
181 (gfc_trans_allocate): Likewise.
182 (gfc_trans_deallocate): Likewise.
183 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Likewise.
184 (gfc_conv_intrinsic_lib_function): Likewise.
185 (gfc_conv_intrinsic_exponent): Likewise.
186 (gfc_conv_intrinsic_abs): Likewise.
187 (gfc_conv_intrinsic_sign): Likewise.
188 (gfc_conv_intrinsic_ctime): Likewise.
189 (gfc_conv_intrinsic_fdate): Likewise.
190 (gfc_conv_intrinsic_ttynam): Likewise.
191 (gfc_conv_intrinsic_ishftc): Likewise.
192 (gfc_conv_intrinsic_len_trim): Likewise.
193 (gfc_conv_intrinsic_index): Likewise.
194 (gfc_conv_intrinsic_size): Likewise.
195 (gfc_conv_intrinsic_strcmp): Likewise.
196 (gfc_conv_intrinsic_adjust): Likewise.
197 (gfc_conv_associated): Likewise.
198 (gfc_conv_intrinsic_scan): Likewise.
199 (gfc_conv_intrinsic_verify): Likewise.
200 (call_builtin_clz): Likewise.
201 (gfc_conv_intrinsic_si_kind): Likewise.
202 (gfc_conv_intrinsic_sr_kind): Likewise.
203 (gfc_conv_intrinsic_trim): Likewise.
204 (gfc_conv_intrinsic_repeat): Likewise.
205 (gfc_conv_intrinsic_iargc): Likewise.
207 2005-12-16 Richard Guenther <rguenther@suse.de>
209 * trans.h (gfc_build_indirect_ref): Remove declaration.
210 * trans.c (gfc_build_indirect_ref): Remove.
211 * trans-array.c (gfc_trans_array_ctor_element): Use
212 build_fold_indirect_ref instead of gfc_build_indirect_ref.
213 (gfc_trans_array_constructor_value): Likewise.
214 (gfc_conv_array_index_offset): Likewise.
215 (gfc_conv_scalarized_array_ref): Likewise.
216 (gfc_conv_array_ref): Likewise.
217 (gfc_trans_dummy_array_bias): Likewise.
218 (gfc_conv_expr_descriptor): Likewise.
219 (gfc_conv_array_parameter): Likewise.
220 * trans-decl.c (gfc_finish_cray_pointee): Likewise.
221 (gfc_get_symbol_decl): Likewise.
222 * trans-expr.c (gfc_conv_substring): Likewise.
223 (gfc_conv_component_ref): Likewise.
224 (gfc_conv_variable): Likewise.
225 (gfc_add_interface_mapping): Likewise.
226 (gfc_conv_function_call): Likewise.
227 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Likewise.
228 (gfc_conv_intrinsic_transfer): Likewise.
229 * trans-io.c (nml_get_addr_expr): Likewise.
230 (transfer_namelist_element): Likewise.
231 (transfer_expr): Likewise.
232 * trans-stmt.c (gfc_trans_nested_forall_loop): Likewise.
233 (allocate_temp_for_forall_nest_1): Likewise.
234 (gfc_trans_forall_1): Likewise.
236 2005-12-16 Richard Guenther <rguenther@suse.de>
238 * trans-array.c (gfc_conv_descriptor_data_addr): Use
239 build_fold_addr_expr where appropriate.
240 (gfc_trans_allocate_array_storage): Likewise.
241 (gfc_trans_array_constructor_value): Likewise.
242 (gfc_conv_array_data): Likewise.
243 (gfc_conv_expr_descriptor): Likewise.
244 (gfc_conv_array_parameter): Likewise.
245 * trans-expr.c (gfc_conv_variable): Likewise.
246 (gfc_conv_function_val): Likewise.
247 (gfc_conv_function_call): Likewise.
248 (gfc_conv_expr_reference): Likewise.
249 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Likewise.
250 (gfc_conv_intrinsic_fdate): Likewise.
251 (gfc_conv_intrinsic_ttynam): Likewise.
252 (gfc_conv_intrinsic_si_kind): Likewise.
253 (gfc_conv_intrinsic_trim): Likewise.
254 * trans-io.c (set_parameter_ref): Likewise.
255 (gfc_convert_array_to_string): Likewise.
256 (gfc_trans_open): Likewise.
257 (gfc_trans_close): Likewise.
258 (build_filepos): Likewise.
259 (gfc_trans_inquire): Likewise.
260 (nml_get_addr_expr): Likewise.
261 (transfer_namelist_element): Likewise.
262 (build_dt): Likewise.
263 (gfc_trans_dt_end): Likewise.
264 (transfer_array_component): Likewise.
265 (transfer_expr): Likewise.
266 (transfer_array_desc): Likewise.
267 (gfc_trans_transfer): Likewise.
268 * trans-stmt.c (gfc_trans_allocate): Likewise.
269 (gfc_trans_deallocate): Likewise.
271 2005-12-16 Kazu Hirata <kazu@codesourcery.com>
273 * dependency.c, resolve.c, trans-array.c: Fix comment typos.
274 * gfortran.texi: Fix typos.
276 2005-12-14 Erik Edelmann <eedelman@gcc.gnu.org>
279 * resolve.c (resolve_formal_arglist): Remove code to set
280 the type of a function symbol from it's result symbol.
282 2005-12-13 Richard Guenther <rguenther@suse.de>
284 * trans-expr.c (gfc_conv_substring): Use fold_build2 and
287 2005-12-13 Richard Sandiford <richard@codesourcery.com>
289 * Make-lang.in (fortran/trans-resolve.o): Depend on
290 fortran/dependency.h.
291 * gfortran.h (gfc_expr): Add an "inline_noncopying_intrinsic" flag.
292 * dependency.h (gfc_get_noncopying_intrinsic_argument): Declare.
293 (gfc_check_fncall_dependency): Change prototype.
294 * dependency.c (gfc_get_noncopying_intrinsic_argument): New function.
295 (gfc_check_argument_var_dependency): New function, split from
296 gfc_check_fncall_dependency.
297 (gfc_check_argument_dependency): New function.
298 (gfc_check_fncall_dependency): Replace the expression parameter with
299 separate symbol and argument list parameters. Generalize the function
300 to handle dependencies for any type of expression, not just variables.
301 Accept a further argument giving the intent of the expression being
302 tested. Ignore intent(in) arguments if that expression is also
304 * resolve.c: Include dependency.h.
305 (find_noncopying_intrinsics): New function.
306 (resolve_function, resolve_call): Call it on success.
307 * trans-array.h (gfc_conv_array_transpose): Declare.
308 (gfc_check_fncall_dependency): Remove prototype.
309 * trans-array.c (gfc_conv_array_transpose): New function.
310 * trans-intrinsic.c (gfc_conv_intrinsic_function): Don't use the
311 libcall handling if the expression is to be evaluated inline.
312 Add a case for handling inline transpose()s.
313 * trans-expr.c (gfc_trans_arrayfunc_assign): Adjust for the new
314 interface provided by gfc_check_fncall_dependency.
316 2005-12-12 Steven G. Kargl <kargls@comcast.net>
319 * match.c (gfc_match_equivalence): Count number of objects.
321 2005-12-11 Aldy Hernandez <aldyh@redhat.com>
323 * lang.opt: Add RejectNegative to ffixed-form and ffree-form.
325 2005-12-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
328 * io.c (resolve_tag): Add correct diagnostic for F2003 feature.
330 2005-12-10 Thomas Koenig <Thomas.Koenig@online.de>
333 * io.c (top level): Add convert to io_tag.
334 (resolve_tag): convert is GFC_STD_GNU.
335 (match_open_element): Add convert.
336 (gfc_free_open): Likewise.
337 (gfc_resolve_open): Likewise.
338 (gfc_free_inquire): Likewise.
339 (match_inquire_element): Likewise.
340 * dump-parse-tree.c (gfc_show_code_node): Add
341 convet for open and inquire.
342 gfortran.h: Add convert to gfc_open and gfc_inquire.
343 * trans-io.c (gfc_trans_open): Add convert.
344 (gfc_trans_inquire): Likewise.
345 * ioparm.def: Add convert to open and inquire.
346 * gfortran.texi: Document CONVERT.
348 2005-12-09 Roger Sayle <roger@eyesopen.com>
351 * f95-lang.c (gfc_truthvalue_conversion): Use a zero of the correct
352 integer type when building an inequality.
354 2005-12-09 Richard Guenther <rguenther@suse.de>
356 * f95-lang.c (build_builtin_fntypes): Use correct
357 return types, as indicated by comments.
359 2005-12-08 Erik Edelmann <eedelman@gcc.gnu.org>
362 * check.c (gfc_check_associated): Allow function results
363 as actual arguments to ASSOCIATED. Moved a misplaced
366 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
368 * Make-lang.in (fortran.all.build, fortran.install-normal): Remove.
370 2005-12-07 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
372 * Make-lang.in: Remove all dependencies on s-gtype, except for
375 2005-12-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
378 * parse.c (next_free): Use new prototype for gfc_match_st_label.
379 Correctly emit hard error if a label is zero.
380 * match.c (gfc_match_st_label): Never allow zero as a valid
382 (gfc_match, gfc_match_do, gfc_match_goto): Use new prototype for
384 * primary.c (): Use new prototype for gfc_match_st_label.
388 2005-12-02 Richard Guenther <rguenther@suse.de>
390 * trans.h (build1_v): Use build1, not build to build the
393 2005-12-01 Erik Schnetter <schnetter@aei.mpg.de>
395 * decl.c (gfc_match_old_kind_spec): Improve handling of old style
398 2005-12-01 Paul Thomas <pault@gcc.gnu.org>
401 * trans-decl.c (gfc_get_symbol_decl): Move the expression for
402 unit size of automatic character length, dummy pointer array
403 elements down a few lines from the version that fixed PR15809.
405 2005-11-30 Bernhard Fischer <rep.nop@aon.at>
408 * lang.opt: New options -ffree-line-length- and -ffree-line-length-none.
409 * gfortran.h: Add free_line_length and add description of
410 free_line_length and fixed_line_length.
411 * options.c (gfc_init_options, gfc_handle_option): Initialize
412 and set free_line_length and fixed_line_length.
413 * scanner.c (load_line): Set free_line_length to 132 and
414 fixed_line_length to 72 or user requested values.
415 * scanner.c: Typo in comment.
416 * invoke.texi: Document -ffree-line-length- and
417 -ffree-line-length-none
419 2005-11-30 Paul Thomas <pault@gcc.gnu.org>
422 * trans-decl.c (gfc_get_symbol_decl): In the case of automatic
423 character length, dummy pointer arrays, build an expression for
424 unit size of the array elements, to be picked up and used in the
426 * trans-io.c (gfc_trans_transfer): Modify the detection of
427 components of derived type arrays to use the gfc_expr references
428 instead of the array descriptor dtype. This allows the latter
429 to contain expressions.
431 2005-11-30 Erik Edelmann <erik.edelmann@iki.fi>
434 * trans-array.c (gfc_trans_deferred_array): Allow PARM_DECLs past
435 in addition to VAR_DECLs.
437 2005-11-29 Jakub Jelinek <jakub@redhat.com>
439 * io.c (gfc_resolve_open): RESOLVE_TAG access field as well.
441 2005-11-27 Bernhard Fischer <rep.nop@aon.at>
443 * gfortran.h: remove superfluous whitespace and use GNU
444 comment-style for the documentation of backend_decl.
446 2005-11-27 Steven G. Kargl <kargls@comcast.net>
449 * primary.c (match_boz_constant): Implement postfix BOZ constants;
450 (match_string_constant): Peek for b, o, z, and x
452 2005-11-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
455 * iresolve.c (gfc_resolve_dim, gfc_resolve_mod,
456 gfc_resolve_modulo): When arguments have different kinds, fold
457 the lower one to the largest kind.
458 * check.c (gfc_check_a_p): Arguments of different kinds is not
459 a hard error, but an extension.
460 * simplify.c (gfc_simplify_dim, gfc_simplify_mod,
461 gfc_simplify_modulo): When arguments have different kinds, fold
462 the lower one to the largest kind.
464 2005-11-21 Jakub Jelinek <jakub@redhat.com>
468 * Make-lang.in (fortran/trans-io.o): Depend on fortran/ioparm.def.
469 * dump-parse-tree.c (gfc_show_code_node): Dump c->block for
470 EXEC_{READ,WRITE,IOLENGTH} nodes.
471 * io.c (terminate_io, match_io, gfc_match_inquire): Put data
472 transfer commands into EXEC_{READ,WRITE,IOLENGTH}'s code->block.
473 * resolve.c (resolve_blocks): Handle EXEC_{READ,WRITE,IOLENGTH}.
474 * trans-io.c (ioparm_unit, ioparm_err, ioparm_end, ioparm_eor,
475 ioparm_list_format, ioparm_library_return, ioparm_iostat,
476 ioparm_exist, ioparm_opened, ioparm_number, ioparm_named,
477 ioparm_rec, ioparm_nextrec, ioparm_size, ioparm_recl_in,
478 ioparm_recl_out, ioparm_iolength, ioparm_file, ioparm_file_len,
479 ioparm_status, ioparm_status_len, ioparm_access, ioparm_access_len,
480 ioparm_form, ioparm_form_len, ioparm_blank, ioparm_blank_len,
481 ioparm_position, ioparm_position_len, ioparm_action,
482 ioparm_action_len, ioparm_delim, ioparm_delim_len, ioparm_pad,
483 ioparm_pad_len, ioparm_format, ioparm_format_len, ioparm_advance,
484 ioparm_advance_len, ioparm_name, ioparm_name_len,
485 ioparm_internal_unit, ioparm_internal_unit_len,
486 ioparm_internal_unit_desc, ioparm_sequential, ioparm_sequential_len,
487 ioparm_direct, ioparm_direct_len, ioparm_formatted,
488 ioparm_formatted_len, ioparm_unformatted, ioparm_unformatted_len,
489 ioparm_read, ioparm_read_len, ioparm_write, ioparm_write_len,
490 ioparm_readwrite, ioparm_readwrite_len, ioparm_namelist_name,
491 ioparm_namelist_name_len, ioparm_namelist_read_mode, ioparm_iomsg,
492 ioparm_iomsg_len, ioparm_var): Remove.
493 (enum ioparam_type, enum iofield_type, enum iofield,
494 enum iocall): New enums.
495 (gfc_st_parameter_field, gfc_st_parameter): New typedefs.
496 (st_parameter, st_parameter_field, iocall): New variables.
497 (ADD_FIELD, ADD_STRING): Remove.
498 (dt_parm, dt_post_end_block): New variables.
499 (gfc_build_st_parameter): New function.
500 (gfc_build_io_library_fndecls): Use it. Initialize iocall
501 array rather than ioparm_*, add extra first arguments to
503 (set_parameter_const): New function.
504 (set_parameter_value): Add type argument, return a bitmask.
505 Changed to set a field in automatic structure variable rather
506 than set a field in a global _gfortran_ioparm variable.
507 (set_parameter_ref): Likewise. If requested var has different
508 size than what field should point to, call with a temporary and
509 then copy into the user variable. Add postblock argument.
510 (set_string): Remove var_len argument, add type argument, return
511 a bitmask. Changed to set fields in automatic structure variable
512 rather than set a field in a global _gfortran_ioparm variable.
513 (set_internal_unit): Remove iunit, iunit_len, iunit_desc arguments,
514 add var argument. Return a bitmask. Changed to set fields in
515 automatic structure variable rather than set a field in a global
516 _gfortran_ioparm variable.
518 (io_result): Add var argument. Changed to read common.flags field
519 from automatic structure variable and bitwise AND it with 3.
520 (set_error_locus): Add var argument. Changed to set fields in
521 automatic structure variable rather than set a field in a global
522 _gfortran_{filename,line} variables.
523 (gfc_trans_open): Use gfc_start_block rather than gfc_init_block.
524 Create a temporary st_parameter_* structure. Adjust callers of
525 all above mentioned functions. Pass address of the temporary
526 variable as first argument to the generated function call.
527 Use iocall array rather than ioparm_* separate variables.
528 (gfc_trans_close, build_filepos, gfc_trans_inquire): Likewise.
529 (build_dt): Likewise. Change first argument to tree from tree *.
530 Don't dereference code->ext.dt if last_dt == INQUIRE. Emit
531 IOLENGTH argument setup here. Set dt_parm/dt_post_end_block
532 variables and gfc_trans_code the nested data transfer commands
534 (gfc_trans_iolength): Just set last_dt and call build_dt immediately.
535 (transfer_namelist_element): Pass address of dt_parm variable
536 to generated functions. Use iocall array rather than ioparm_*
538 (gfc_trans_backspace, gfc_trans_endfile, gfc_trans_rewind,
539 gfc_trans_flush, gfc_trans_read, gfc_trans_write): Use iocall array
540 rather than ioparm_* separate variables.
541 (gfc_trans_dt_end): Likewise. Pass address of dt_parm variable
542 as first argument to generated function. Adjust io_result caller.
543 Prepend dt_post_end_block before io_result code.
544 (transfer_expr): Use iocall array rather than ioparm_* separate
545 variables. Pass address of dt_parm variables as first argument
546 to generated functions.
547 * ioparm.def: New file.
549 2005-11-21 Paul Thomas <pault@gcc.gnu.org>
552 * resolve.c (resolve_contained_fntype) Error if an internal
553 function is assumed character length.
556 * trans-decl.c (gfc_create_module_variable) Skip ICE in
557 when backend decl has been built and the symbol is marked
558 as being in an equivalence statement.
560 2005-11-20 Toon Moene <toon@moene.indiv.nluug.nl>
562 * invoke.texi: Remove superfluous @item.
564 2005-11-19 Janne Blomqvist <jb@gcc.gnu.org>
567 * trans-io.c (gfc_trans_transfer): Handle arrays of derived type.
569 2005-11-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
572 * scanner.c (gfc_open_included_file): Add an extra include_cwd
573 argument. Only include files in the current working directory if
575 * gfortran.h: Change prototype for gfc_open_included_file.
576 (load_file): Don't search for include files in the current working
578 * options.c (gfc_post_options): Add the directory of the source file
579 to the list of paths for included files.
580 * module.c (gfc_use_module): Look for module files in the current
583 2005-11-16 Alan Modra <amodra@bigpond.net.au>
586 * trans-types.c (gfc_init_kinds): Use one less for max_exponent
587 of IBM extended double format.
589 2005-11-13 Francois-Xavier Coudert <coudert@clipper.ens.fr>
591 * intrinsic.c (add_functions): Add COMPLEX, FTELL, FGETC, FGET,
592 FPUTC, FPUT, AND, XOR and OR intrinsic functions.
593 (add_subroutines): Add FGETC, FGET, FPUTC, FPUT and FTELL intrinsic
595 * gfortran.h: Add GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET,
596 GFC_ISYM_FGETC, GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL,
597 GFC_ISYM_OR, GFC_ISYM_XOR.
598 * iresolve.c (gfc_resolve_and, gfc_resolve_complex,
599 gfc_resolve_or, gfc_resolve_fgetc, gfc_resolve_fget,
600 gfc_resolve_fputc, gfc_resolve_fput, gfc_resolve_ftell,
601 gfc_resolve_xor, gfc_resolve_fgetc_sub, gfc_resolve_fget_sub,
602 gfc_resolve_fputc_sub, gfc_resolve_fput_sub, gfc_resolve_ftell_sub):
604 * check.c (gfc_check_complex, gfc_check_fgetputc_sub,
605 gfc_check_fgetputc, gfc_check_fgetput_sub, gfc_check_fgetput,
606 gfc_check_ftell, gfc_check_ftell_sub, gfc_check_and): New functions.
607 * simplify.c (gfc_simplify_and, gfc_simplify_complex, gfc_simplify_or,
608 gfc_simplify_xor): New functions.
609 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
610 GFC_ISYM_AND, GFC_ISYM_COMPLEX, GFC_ISYM_FGET, GFC_ISYM_FGETC,
611 GFC_ISYM_FPUT, GFC_ISYM_FPUTC, GFC_ISYM_FTELL, GFC_ISYM_OR and
613 * intrinsic.h: Add prototypes for all functions added to iresolve.c,
614 simplify.c and check.c.
616 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
617 Steven G. Kargl <kargls@comcast.net>
620 * resolve.c (resolve_symbol): Disallow automatic arrays in module scope.
622 2005-11-10 Paul Thomas <pault@gcc.gnu.org>
626 * match.c (recursive_stmt_fcn): Add checks that symtree exists
627 for the expression to weed out inline intrinsic functions and
631 * module.c (mio_symtree_ref): Correct the patch of 0923 so that
632 a symbol is not substituted for by a the symbol for the module
633 itself and to prevent the promotion of a formal argument.
635 2005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
638 * primary.c (match_varspec): Check for implicitly typed CHARACTER
639 variables before matching substrings.
641 2005-11-09 Steven G. Kargl <kargls@comcast.net>
643 * trans-intrinsic.c: Typo in comment.
645 2005-11-09 Erik Edelmann <eedelman@gcc.gnu.org>
648 * trans-decl.c(build_function_decl): Don't set
649 DECL_IS_PURE (fndecl) = 1 for return-by-reference
652 2005-11-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
654 * dump-parse-tree.c: Fix comment typo, add a few blank lines.
656 2005-11-07 Steven G. Kargl <kargls@comcast.net>
658 * error.c: Use flag_fatal_error.
659 * invoke.texi: Remove -Werror from list of options.
661 2005-11-06 Paul Thomas <pault@gcc.gnu.org>
664 * resolve.c (resolve_symbol): Exclude case of PRIVATE declared
665 within derived type from error associated with PRIVATE type
666 components within derived type.
670 * gfortran.h: Add prototype for gfc_has_vector_index.
671 * io.c (gfc_resolve_dt): Error if internal unit has a vector index.
672 * expr.c (gfc_has_vector_index): New function to check if any of
673 the array references of an expression have vector inidices.
674 (gfc_check_pointer_assign): Error if internal unit has a vector index.
677 * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
678 and replace by a standard dependent warning/error if overwriting an
679 existing initialization.
680 * decl.c (gfc_data_variable): Remove old error for already initialized
681 variable and the unused error check for common block variables. Add
682 error for hots associated variable and standard dependent error for
683 common block variables, outside of blockdata.
684 * symbol.c (check_conflict): Add constraints for DATA statement.
686 2005-11-06 Janne Blomqvist <jb@gcc.gnu.org>
690 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind
691 argument to transfer_array.
692 (transfer_array_desc): Add kind argument.
694 2005-11-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
696 * intrinsic.c (add_functions): Add ctime and fdate intrinsics.
697 (add_subroutines): Likewise.
698 * intrinsic.h: Prototypes for gfc_check_ctime,
699 gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime,
700 gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub.
701 * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE.
702 * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate,
703 gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions.
704 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
705 gfor_fndecl_fdate and gfor_fndecl_ctime.
706 * check.c (gfc_check_ctime, gfc_check_ctime_sub,
707 gfc_check_fdate_sub): New functions.
708 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
709 gfc_conv_intrinsic_fdate): New functions.
710 (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME
712 * intrinsic.texi: Documentation for the new CTIME and FDATE
714 * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate.
716 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
718 * decl.c, trans-decl.c: Fix comment typos.
719 * gfortran.texi: Fix a typo.
721 2005-11-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
723 * intrinsic.c (add_functions): Add function version of TTYNAM.
724 * intrinsic.h: Add prototypes for gfc_check_ttynam and
726 * gfortran.h: Add case for GFC_ISYM_TTYNAM.
727 * iresolve.c (gfc_resolve_ttynam): New function.
728 * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree
729 for function call to library ttynam.
730 * check.c (gfc_check_ttynam): New function.
731 * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function.
732 (): Call gfc_conv_intrinsic_ttynam.
733 * trans.h: Add prototype for gfor_fndecl_ttynam.
735 2005-11-04 Steven G. Kargl <kargls@comcast.net>
738 * match.c (gfc_match_stopcode): Set stop_code = -1.
740 2005-11-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
743 * lang-specs.h: Pass -lang-fortran to the preprocessor.
745 2005-11-02 Andrew Pinski <pinskia@physics.uc.edu>
748 * trans-array.c (gfc_conv_resolve_dependencies): Use the correct
749 type for the temporary array.
750 * trans-expr.c (gfc_trans_assignment): Pass lss
751 instead of lss_section
752 to gfc_conv_resolve_dependencies to get the
755 2005-11-02 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
757 * decl.c (gfc_match_entry): Function entries don't need an argument
758 list if there's no RESULT clause.
760 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
763 * decl.c (gfc_match_entry): Function entries need an argument list.
765 2005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
768 * trans.c (gfc_generate_code): Move code to create a main
769 program symbol from here ...
770 * parse.c (main_program_symbol): ... to this new
771 function, setting the locus from gfc_current_locus
772 instead of ns->code->loc.
773 (gfc_parse_file): Call main_program_symbol for main programs.
775 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
778 * resolve.c (resolve_symbol): Output symbol names in more error
779 messages, clarify error message.
781 2005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
783 * dump-parse-tree.c (show_symtree): Revert change unintentionally
784 committed in r106246.
786 2005-11-01 Paul Thomas <pault@gcc.gnu.org>
789 * symbol.c (check_conflict): An object cannot be in a namelist and in
793 * resolve.c (resolve_symbol): Set the error flag to
794 gfc_set_default_type, in the case of an external symbol, so that
795 an error message is emitted if IMPLICIT NONE is set.
798 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
799 * check.c (gfc_check_secnds): New function.
800 * intrinsic.c (add_functions): Add call to secnds.
801 * iresolve.c (gfc_resolve_secnds): New function.
802 * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
803 secnds via case GFC_ISYM_SECNDS.
804 * intrinsic.texi: Add documentation for secnds.
806 2005-10-31 Andreas Schwab <schwab@suse.de>
808 * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define.
809 (GFORTRAN_CROSS_NAME): Remove.
810 (fortran.install-common): Correctly install a cross compiler.
811 (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of
814 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
816 * gfortran.texi: Update contributors.
818 2005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
821 * trans-decl.c (gfc_finish_var_decl): Add decl to the
822 current function, rather than the parent. Make
823 assertion accept fake result variables.
824 * trans-expr.c (gfc_conv_variable): If the character
825 length of an ENTRY isn't set, get the length from
826 the master function instead.
828 2005-10-30 Thomas Koenig <Thomas.Koenig@online.de>
830 * gfortran.texi: Remove reservations about I/O usability. Document
831 that array intrinsics mostly work.
833 2005-10-30 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
835 * gfortran.texi: Move license stuff to back. Add information
836 on ENUM and ENUMERATOR.
837 * invoke.texi: Document -fshort-enums.
839 2005-10-30 Gaurav Gautam <gauravga@noida.hcltech.com>
840 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
842 * arith.c (gfc_enum_initializer): New function.
843 (gfc_check_integer_range): Made extern.
844 * decl.c (enumerator_history): New typedef.
845 (last_initializer, enum_history, max_enum): New variables.
846 (create_enum_history, gfc_free_enum_history): New functions.
847 (add_init_expr_to_sym): Call create_enum_history if parsing ENUM.
848 (variable_decl): Modified to parse enumerator definition.
849 (match_attr_spec): Add PARAMETER attribute to ENUMERATORs.
850 (gfc_match_data_decl): Issues error, if match_type_spec do not
851 return desired return values.
852 (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New
854 (gfc_match_end): Deal with END ENUM.
855 * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM
857 (symbol_attribute): Bit field for enumerator added.
858 (gfc_options): Add fshort_enums.
859 (gfc_enum_initializer, gfc_check_integer_range): Add prototypes.
860 * options.c: Include target.h
861 (gfc_init_options): Initialize fshort_enums.
862 (gfc_handle_option): Deal with fshort_enums.
863 * parse.c (decode_statement): Match ENUM and ENUMERATOR statement.
864 (gfc_ascii_statement): Deal with the enumerator statements.
865 (parse_enum): New function to parse enum construct.
866 (parse_spec): Added case ST_ENUM.
867 * parse.h (gfc_compile_state): COMP_ENUM added.
868 (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history):
870 * symbol.c (gfc_copy_attr): Copy enumeration attribute.
871 * lang.opt (fshort-enums): Option added.
873 2005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
875 * check.c (gfc_check_malloc, gfc_check_free): New functions.
876 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC.
877 * intrinsic.c (add_functions): Add symbols for MALLOC function.
878 (add_subroutines): Add symbol for FREE subroutine.
879 * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free,
880 gfc_resolve_malloc and gfc_resolve_free.
881 * intrinsic.texi: Add doc for FREE and MALLOC intrinsics.
882 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New
884 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for
887 2005-10-30 Steven Bosscher <stevenb@suse.de>
889 * gfortran.texi: Update contributors.
891 2005-10-29 Steven Bosscher <stevenb@suse.de>
893 * interface.c: Fix previous checkin (an incomplete patch
894 was commited for me).
896 2005-10-29 Joseph S. Myers <joseph@codesourcery.com>
898 * intrinsic.texi: Remove empty @cindex line.
900 2005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
902 * check.c (gfc_check_alarm_sub, gfc_check_signal,
903 gfc_check_signal_sub): New functions.
904 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
905 * intrinsic.c (add_functions): Add signal intrinsic.
906 (add_subroutines): Add signal and alarm intrinsics.
907 * intrinsic.texi: Document the new intrinsics.
908 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
909 gfc_resolve_signal_sub): New functions.
910 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
912 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
913 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
914 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
916 2005-10-28 Steven Bosscher <stevenb@suse.de>
919 * interface.c (gfc_match_end_interface): Fix typo in
920 INTERFACE_USER_OP case.
922 2005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
925 * resolve.c (resolve_symbol): Remove the use of whynot, so that
926 error messages are not built from pieces.
928 2005-10-26 Paul Thomas <pault@gcc.gnu.org>
931 * decl.c (gfc_match_data_decl): Correct broken bit of code
932 that prevents undefined derived types from being used as
933 components of another derived type.
934 * resolve.c (resolve_symbol): Add backstop error when derived
935 type variables arrive here with a type that has no components.
937 2005-10-25 Jakub Jelinek <jakub@redhat.com>
939 * trans.h (gfc_conv_cray_pointee): Remove.
940 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
941 * trans-array.c (gfc_conv_array_parameter): Likewise.
942 * trans-decl.c (gfc_conv_cray_pointee): Remove.
943 (gfc_finish_cray_pointee): New function.
944 (gfc_finish_var_decl): Use it. Don't return early for Cray
946 (gfc_create_module_variable): Revert 2005-10-24 change.
947 * decl.c (cray_pointer_decl): Update comment.
948 * gfortran.texi: Don't mention Cray pointees aren't visible in the
951 * symbol.c (check_conflict): Add conflict between cray_pointee
952 and in_common resp. in_equivalence.
953 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
955 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
956 (attr_bits): Likewise.
957 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
958 (mio_symbol): For cray_pointee write/read cp_pointer reference.
960 2005-10-25 Feng Wang <fengwang@nudt.edu.cn>
963 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
965 (gfc_get_symbol_decl): Use it when a variable, including dummy
966 argument, is assigned a label.
967 (gfc_trans_assign_aux_var): New function. Set initial value of
968 the auxiliary variable explicitly.
969 (gfc_trans_deferred_vars): Use it.
970 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
972 2005-10-24 Asher Langton <langton2@llnl.gov>
976 * check.c (gfc_check_loc): New function.
977 * decl.c (variable_decl): New variables cp_as and sym. Added a
978 check for variables that have already been declared as Cray
979 Pointers, so we can get the necessary attributes without adding
981 (attr_decl1): Added code to catch pointee symbols and "fix"
983 (cray_pointer_decl): New method.
984 (gfc_match_pointer): Added Cray pointer parsing code.
985 (gfc_mod_pointee_as): New method.
986 * expr.c (gfc_check_assign): Added a check to catch vector-type
987 assignments to pointees with an unspecified final dimension.
988 * gfortran.h: (GFC_ISYM_LOC): New.
989 (symbol_attribute): Added cray_pointer and cray_pointee bits.
990 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
991 (gfc_symbol): Added gfc_symbol *cp_pointer.
992 (gfc_option): Added flag_cray_pointer.
993 (gfc_add_cray_pointee): Declare.
994 (gfc_add_cray_pointer ): Declare.
995 (gfc_mod_pointee_as): Declare.
996 * intrinsic.c (add_functions): Add code for loc() intrinsic.
997 * intrinsic.h (gfc_check_loc): Declare.
998 (gfc_resolve_loc): Declare.
999 * iresolve.c (gfc_resolve_loc): New.
1000 * lang.opt: Added fcray-pointer flag.
1001 * options.c (gfc_init_options): Initialized.
1002 gfc_match_option.flag_cray_pointer.
1003 (gfc_handle_option): Deal with -fcray-pointer.
1004 * parse.c:(resolve_equivalence): Added code prohibiting Cray
1005 pointees in equivalence statements.
1006 * resolve.c (resolve_array_ref): Added code to prevent bounds
1007 checking for Cray Pointee arrays.
1008 (resolve_equivalence): Prohibited pointees in equivalence
1010 * symbol.c (check_conflict): Added Cray pointer/pointee
1012 (gfc_add_cray_pointer): New.
1013 (gfc_add_cray_pointee): New.
1014 (gfc_copy_attr): New code for Cray pointers and pointees.
1015 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
1016 prevent space from being allocated for pointees.
1017 (gfc_conv_array_parameter): Added code to catch pointees and
1018 correctly set their base address.
1019 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
1020 pointee declarations from making it to the back end.
1021 (gfc_create_module_variable): Same.
1022 * trans-expr.c (gfc_conv_variable): Added code to detect and
1024 (gfc_conv_cray_pointee): New.
1025 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
1026 (gfc_conv_intrinsic_function): Added entry point for loc
1028 * trans.h (gfc_conv_cray_pointee): Declare.
1030 * gfortran.texi: Added section on Cray pointers, removed Cray
1031 pointers from list of proposed extensions.
1032 * intrinsic.texi: Added documentation for loc intrinsic.
1033 * invoke.texi: Documented -fcray-pointer flag.
1035 2005-10-24 Asher Langton <langton2@llnl.gov>
1037 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
1038 warnings in the absence of strict standard conformance
1039 * symbol.c (gfc_add_save): Same.
1041 2005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1044 * arith.c (gfc_arith_error): Change message to include locus.
1045 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
1046 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
1047 the new gfc_arith_error.
1048 (arith_error): Rewrite full error messages instead of building
1050 * check.c (must_be): Removed.
1051 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
1052 kind_check, double_check, logical_array_check, array_check,
1053 scalar_check, same_type_check, rank_check, kind_value_check,
1054 variable_check, gfc_check_allocated, gfc_check_associated,
1055 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
1056 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
1057 gfc_check_pack, gfc_check_precision, gfc_check_present,
1058 gfc_check_spread): Rewrite full error messages instead of
1059 building them from pieces.
1060 * decl.c (gfc_match_entry): Rewrite full error messages instead
1061 of building them from pieces.
1062 * parse.c (gfc_state_name): Remove.
1063 * parse.h: Remove prototype for gfc_state_name.
1065 2005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
1068 * check.c (gfc_check_ichar_iachar): Move the code around so
1069 that the check on the length is after check for
1072 2005-10-23 Asher Langton <langton2@llnl.gov>
1074 * decl.c (match_type_spec): Add a BYTE type as an extension.
1076 2005-10-23 Paul Thomas <pault@gcc.gnu.org>
1079 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
1080 if there is a component ref during an array ref to force
1081 use of temporary in assignment.
1085 * fortran/iresolve.c (check_charlen_present): New function to
1086 add a charlen to the typespec, in the case of constant
1088 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
1089 (gfc_resolve_spread): Make calls to library functions that
1090 handle the case of the spread intrinsic with a scalar source.
1092 2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
1095 * decl.c (variable_decl): Don't assign default initializers to
1098 2005-10-21 Jakub Jelinek <jakub@redhat.com>
1100 * interface.c (compare_actual_formal): Issue error when attempting
1101 to pass an assumed-size array as assumed-shape array argument.
1103 2005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
1106 * resolve.c (expr_to_initialize): New function.
1107 (resolve_allocate_expr): Take current statement as new
1108 argument. Add default initializers to variables of
1109 derived types, if they need it.
1110 (resolve_code): Provide current statement as argument to
1111 resolve_allocate_expr().
1113 2005-10-19 Paul Thomas <pault@gcc.gnu.org>
1116 * resolve.c (resolve_symbol): Correct error in check for
1117 assumed size array with default initializer by testing
1118 for arrayspec before dereferencing it.
1120 2005-10-17 Paul Thomas <pault@gcc.gnu.org>
1123 * gfortran.h: Primitive for gfc_is_formal_arg.
1124 * resolve.c(gfc_is_formal_arg): New function to signal across
1125 several function calls that formal argument lists are being
1127 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
1128 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
1129 symbol is part of an formal argument declaration.
1132 * decl.c (add_init_expr_to_sym): Make a new character
1133 length for each variable, when the expression is NULL
1134 and link to cl_list.
1137 * match.c (recursive_stmt_fcn): New function that tests if
1138 a statement function resurses through itself or other other
1139 statement functions.
1140 (gfc_match_st_function): Call recursive_stmt_fcn to check
1141 if this is recursive and to raise error if so.
1145 * resolve.c (resolve_symbol): Errors for assumed size arrays
1146 with default initializer and for external objects with an
1150 * decl.c (match_attr_spec): Prevent PUBLIC from being used
1153 2005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
1156 * expr.c (check_inquiry): Add "len" to inquiry_function.
1158 2005-10-14 Jakub Jelinek <jakub@redhat.com>
1160 * primary.c (match_boz_constant): Add missing break after gfc_error.
1162 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
1165 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
1166 declaration for derived types, building if necessary. Return the
1167 derived type if the fields have been built by this process. Otherwise,
1168 continue as before but using the already obtained backend_decls for the
1169 derived type components. Change the gcc_assert to act on the field.
1171 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
1174 * decl.c (variable_decl): Make a new copy of the character
1175 length for each variable, when the expression is not a
1178 2005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1180 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
1181 member to options_t.
1182 * invoke.texi: Document the new -ffpe-trap option.
1183 * lang.opt: Add -ffpe-trap option.
1184 * options.c (gfc_init_options): Initialize the FPE option.
1185 (gfc_handle_fpe_trap_option): New function to parse the argument
1186 of the -ffpe-trap option.
1187 (gfc_handle_option): Add case for -ffpe-trap.
1188 * trans-decl.c: Declare a tree for the set_fpe library function.
1189 (gfc_build_builtin_function_decls): Build this tree.
1190 (gfc_generate_function_code): Generate a call to set_fpe at
1191 the beginning of the main program.
1192 * trans.h: New tree for the set_fpe library function.
1194 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
1198 * symbol.c (check_conflict): Prevent common variables and
1199 function results from having the SAVE attribute,as required
1202 2005-10-12 Paul Thomas <pault@gcc.gnu.org>
1205 * resolve.c (resolve_symbol): Exclude use and host associated
1206 symbols from the test for private objects in a public namelist.
1208 2005-10-12 Jakub Jelinek <jakub@redhat.com>
1210 * trans-common.c (build_field): Fix comment typo.
1211 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
1212 variables to a VAR_DECL with the COMPONENT_REF in
1213 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
1214 * f95-lang.c (gfc_expand_function): Emit debug info for
1215 EQUIVALENCEd variables if the equiv union is going to be output.
1217 2005-10-11 Steven G. Kargl <kargls@comcast.net>
1220 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
1223 2005-10-11 Jakub Jelinek <jakub@redhat.com>
1225 * f95-lang.c (gfc_init_decl_processing): Initialize
1228 2005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
1231 * resolve.c (find_array_spec): Search through the list of
1232 components in the symbol of the type instead of the symbol of the
1235 2005-10-05 Richard Guenther <rguenther@suse.de>
1238 * parse.c (gfc_parse_file): Exit early for empty files.
1240 2005-10-03 Steve Ellcey <sje@cup.hp.com>
1242 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
1243 and long double floating point types through to Fortran compiler.
1245 2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1248 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
1249 double builtin function.
1250 (gfc_init_builtin_functions): Add mfunc_longdouble,
1251 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
1252 them for round, trunc, cabs, copysign and pow functions.
1253 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
1254 case for kind 10 and 16.
1255 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
1256 exponent10 and exponent16.
1257 (gfc_build_intrinsic_function_decls): Build nodes for int16,
1258 real10, real16, complex10 and complex16 types. Build all possible
1259 combinations for function _gfortran_pow_?n_?n. Build function
1260 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
1261 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
1262 real(10) and real(16).
1263 * trans-intrinsic.c: Add suppport for long double builtin
1264 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
1266 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
1268 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
1269 and real16_decl in library functions.
1270 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
1272 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
1274 (gfc_conv_intrinsic_sign): Likewise.
1275 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
1276 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
1277 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
1278 the case of kinds not available.
1279 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
1280 exponent10 and exponent16.
1282 2005-10-01 Paul Thomas <pault@gcc.gnu.org>
1291 * gfortran.h: Prototype for gfc_add_in_equivalence.
1292 * match.c (gfc_match_equivalence): Make a structure component
1293 an explicit,rather than a syntax, error in an equivalence
1294 group. Call gfc_add_in_equivalence to add the constraints
1295 imposed in check_conflict.
1296 * resolve.c (resolve_symbol): Add constraints: No public
1297 structures with private-type components and no public
1298 procedures with private-type dummy arguments.
1299 (resolve_equivalence_derived): Add constraint that prevents
1300 a structure equivalence member from having a default
1302 (sequence_type): New static function to determine whether an
1303 object is default numeric, default character, non-default
1304 or mixed sequence. Add corresponding enum typespec.
1305 (resolve_equivalence): Add constraints to equivalence groups
1306 or their members: No more than one initialized member and
1307 that different types are not equivalenced for std=f95. All
1308 the simple constraints have been moved to check_conflict.
1309 * symbol.c (check_conflict): Simple equivalence constraints
1310 added, including those removed from resolve_symbol.
1311 (gfc_add_in_equivalence): New function to interface calls
1312 match_equivalence to check_conflict.
1314 2005-09-27 Jakub Jelinek <jakub@redhat.com>
1317 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
1318 If it is true, set TREE_STATIC on the decl.
1319 (create_common): If any symbol in equivalence has SAVE attribute,
1320 pass true as last argument to build_equiv_decl.
1322 2005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
1324 * trans-io.c (gfc_build_io_library_fndecls): Add entry
1325 iocall_x_array for transfer_array.
1326 (transfer_array_desc): New function.
1327 (gfc_trans_transfer): Add code to call transfer_array_desc.
1329 2005-09-26 Jakub Jelinek <jakub@redhat.com>
1332 * symbol.c (gfc_is_var_automatic): Return true if character length
1333 is non-constant rather than constant.
1334 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
1336 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
1337 to 0 for -fno-automatic.
1339 2005-09-23 Paul Thomas <pault@gcc.gnu.org>
1342 * module.c (mio_component_ref): Return if the symbol is NULL
1343 and wait for another iteration during module reads.
1344 (mio_symtree_ref): Suppress the writing of contained symbols,
1345 when a symbol is available in the main namespace.
1346 (read_module): Restrict scope of special treatment of contained
1347 symbols to variables only and suppress redundant call to
1350 2005-09-22 Steven G. Kargl <kargls@comcast.net>
1353 * interface.c (check_interface1): Fix NULL dereference.
1355 2005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
1358 * resolve.c (derived_inaccessible): New function.
1359 (resolve_transfer): Use it to check for private
1362 2005-09-22 Steven G. Kargl <kargls@comcast.net>
1365 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
1367 * intrinsic.h: Prototypes for gfc_simplify_realpart and
1368 gfc_resolve_realpart.
1369 * intrinsic.texi: Document intrinsic procedures.
1370 * simplify.c (gfc_simplify_realpart): New function.
1371 * irseolve.c (gfc_resolve_realpart): New function.
1373 2005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
1376 * trans-stmt.c (gfc_trans_deallocate): Check if the
1377 object to be deallocated is an array by looking at
1378 expr->rank instead of expr->symtree->n.sym->attr.dimension.
1380 2005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1383 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
1384 (match_io): Fix usage of gfc_find_symbol.
1386 2005-09-20 Jakub Jelinek <jakub@redhat.com>
1389 * primary.c (match_actual_arg): Handle ENTRY the same way
1392 2005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1394 * Make-lang.in: Make check-fortran alias for check-gfortran.
1396 2005-09-18 Andreas Jaeger <aj@suse.de>
1398 * module.c (read_module): Add missed line from last patch.
1400 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
1403 * resolve.c (resolve_symbol): Don't assign default
1404 initializer to pointers.
1406 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
1409 * module.c (read_module): Give symbols from module procedures
1410 different true_name entries to those from the module proper.
1412 2005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1415 * arith.c (gfc_arith_error): Add translation support for error
1417 * array.c (gfc_match_array_ref): Likewise.
1418 (gfc_match_array_spec): Likewise.
1419 * check.c (must_be): Add msgid convention to third argument.
1420 (same_type_check): Add translation support for error message.
1421 (rank_check): Likewise.
1422 (kind_value_check): Likewise.
1423 (gfc_check_associated): Correct typo.
1424 (gfc_check_reshape): Add translation support for error message.
1425 (gfc_check_spread): Likewise.
1426 * error.c (error_printf): Add nocmsgid convention to argument.
1427 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
1428 (gfc_error, gfc_error_now): Likewise.
1429 (gfc_status): Add cmsgid convention to argument.
1430 * expr.c (gfc_extract_int): Add translation support for error
1432 (gfc_check_conformance): Add msgid convention to argument.
1433 (gfc_check_pointer_assign): Correct tabbing.
1434 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
1435 * gfortranspec.c: Include intl.h header.
1436 (lang_specific_driver): Add translation support for --version.
1437 * io.c (check_format): Add translation support for error message.
1438 (format_item_1): Likewise.
1439 (data_desc): Likewise.
1440 * matchexp.c: Likewise.
1441 * misc.c (gfc_article): Remove function.
1442 * module.c (bad_module): Use msgid convention. Add translation support
1444 (require_atom): Add translation support for error messages.
1445 * parse.c (gfc_ascii_statement): Likewise.
1446 (gfc_state_name): Likewise.
1447 * primary.c (match_boz_constant): Reorganise error messages for
1449 * resolve.c (resolve_entries): Likewise.
1450 (resolve_operator): Add translation support for error messages.
1451 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
1453 (resolve_symbol): Add translation support for error messages.
1454 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
1455 * trans-const.c (gfc_build_string_const): Use msgid convention.
1457 2005-09-16 Paul Brook <paul@codesourcery.com>
1460 * dependency.c (transform_sections): Divide by correct value.
1463 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
1465 PR fortran/21875 Internal Unit Array I/O, NIST
1466 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
1467 array descriptor to IOPARM structure.
1468 * fortran/trans-io.c (set_internal_unit): New function to generate code
1469 to store the character (array) and the character length for an internal
1471 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
1473 2005-09-14 Paul Thomas <pault@gcc.gnu.org>
1476 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
1477 which uses dim[i].upper for lbound, rather than dim[i].lower.
1479 2005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
1482 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
1483 of attr.elemental for specific function instead of generic name.
1485 2005-09-13 Richard Sandiford <richard@codesourcery.com>
1488 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
1489 of argse. Remove now-redundant want_pointer assignment.
1490 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
1491 a pointer, keep the original bounds of a full array reference.
1493 2005-09-13 Richard Sandiford <richard@codesourcery.com>
1496 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
1497 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
1498 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
1499 for character-based operations.
1500 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
1501 (gfc_resolve_unpack): Copy the whole typespec from the vector.
1502 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
1503 case, get the string length from the scalarization state.
1505 2005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1507 * Make-lang.in: Change targets prefixes from f95 to fortran.
1508 * config-lang.in: Change language name to "fortran".
1509 * lang.opt: Change language name to "fortran".
1510 * options.c: Change CL_F95 to CL_Fortran.
1512 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
1514 gfortran.texi: Document IOSTAT= specifier.
1516 2005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
1518 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
1519 gfc_inquire and gfc_dt.
1520 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
1521 for open, close, file positioning, inquire and namelist.
1522 * io.c (io_tag): Add tag_iomsg.
1523 (resolve_tag): Add standards warning for iomsg.
1524 (match_open_element): Add iomsg.
1525 (gfc_free_open): Add iomsg.
1526 (gfc_resolve_open): Add iomsg.
1527 (gfc_free_close): Add iomsg.
1528 (match_close_element): Add iomsg.
1529 (gfc_resolve_close): Add iomsg.
1530 (gfc_free_filepos): Add iomsg.
1531 (match_file_element): Add iomsg.
1532 (gfc_resolve_filepos): Add iostat and iomsg.
1533 (match-dt_element): Add iomsg.
1534 (gfc_free_dt): Add iomsg.
1535 (gfc_resolve_dt): Add iomsg.
1536 (gfc_free_inquire): Add iomsg.
1537 (match_inquire_element): Add iomsg.
1538 (gfc_resolve_inquire): Add iomsg.
1539 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
1540 (gfc_build_io_library_fndecls): Add iomsg as last field.
1541 (gfc_trans_open): Add iomsg.
1542 (gfc_trans_close): Add iomsg.
1543 (build_fileos): Call set_string for iomsg.
1544 (gfc_trans_inquire): Add iomsg.
1545 (build_dt): Add iomsg.
1547 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1549 * match.h (gfc_match_equiv_variable): Declare.
1551 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1554 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
1555 * dependency.h (gfc_ref_needs_temporary_p): Declare.
1556 * dependency.c (gfc_ref_needs_temporary_p): New function.
1557 (gfc_check_fncall_dependency): Use it instead of inlined check.
1558 By so doing, take advantage of the fact that character substrings
1559 within an array reference also need a temporary.
1560 * trans.h (GFC_SS_VECTOR): Adjust comment.
1561 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
1562 (gfc_set_vector_loop_bounds): New function.
1563 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
1564 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
1565 the vector expression and caching its descriptor for use within
1567 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
1568 (gfc_conv_array_index_offset): Handle scalar, vector and range
1569 dimensions as separate cases of a switch statement. In the vector
1570 case, use the loop variable to calculate a vector index and use the
1571 referenced element as the dimension's index. Perform bounds checking
1572 on this final index.
1573 (gfc_conv_section_upper_bound): Return null for vector indexes.
1574 (gfc_conv_section_startstride): Give vector indexes a start value
1575 of 0 and a stride of 1.
1576 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
1577 (gfc_conv_expr_descriptor): Expand comments. Generalize the
1578 handling of the !want_pointer && !direct_byref case. Use
1579 gfc_ref_needs_temporary_p to decide whether the variable case
1581 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
1582 GFC_SS_VECTOR index.
1583 * trans-expr.c: Include dependency.h.
1584 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
1586 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1589 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
1591 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1592 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1593 (gfc_apply_interface_mapping): Declare.
1594 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
1595 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1596 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
1597 (gfc_trans_allocate_array_storage): Replace loop argument with
1598 separate pre and post blocks.
1599 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
1600 Update call to gfc_trans_allocate_array_storage.
1601 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
1602 interface to gfc_trans_allocate_temp_array.
1603 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
1605 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1606 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
1607 (gfc_apply_interface_mapping): Make extern.
1608 (gfc_conv_function_call): Build an interface mapping for array
1609 return values too. Call gfc_set_loop_bounds_from_array_spec.
1610 Adjust call to gfc_trans_allocate_temp_array so that code is
1611 added to SE rather than LOOP.
1613 2005-09-09 Richard Sandiford <richard@codesourcery.com>
1616 * trans.h (gfor_fndecl_internal_realloc): Declare.
1617 (gfor_fndecl_internal_realloc64): Declare.
1618 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
1619 (gfor_fndecl_internal_realloc64): New variable.
1620 (gfc_build_builtin_function_decls): Initialize them.
1621 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
1622 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
1623 to say whether the array can grow later. Don't allocate the array
1624 on the stack if so. Don't call malloc for zero-sized arrays.
1625 (gfc_trans_allocate_temp_array): Add a similar argument here.
1626 Pass it along to gfc_trans_allocate_array_storage.
1627 (gfc_get_iteration_count, gfc_grow_array): New functions.
1628 (gfc_iterator_has_dynamic_bounds): New function.
1629 (gfc_get_array_constructor_element_size): New function.
1630 (gfc_get_array_constructor_size): New function.
1631 (gfc_trans_array_ctor_element): Replace pointer argument with
1633 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
1634 argument to say whether the variable-sized part of the constructor
1635 must be allocated using realloc. Grow the array when this
1637 (gfc_trans_array_constructor_value): Likewise.
1638 (gfc_get_array_cons_size): Delete.
1639 (gfc_trans_array_constructor): If the loop bound has not been set,
1640 split the allocation into a static part and a dynamic part. Set
1641 loop->to to the bounds for static part before allocating the
1642 temporary. Adjust call to gfc_trans_array_constructor_value.
1643 (gfc_conv_loop_setup): Allow any constructor to determine the
1644 loop bounds. Check whether the constructor has a dynamic size
1645 and prefer to use something else if so. Expect the loop bound
1646 to be set later. Adjust call to gfc_trans_allocate_temp_array.
1647 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
1649 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1652 * module.c (find_use_name_n): Based on original
1653 find_use_name. Either counts number of use names for a
1654 given real name or returns use name n.
1655 (find_use_name, number_use_names): Interfaces to the
1656 function find_use_name_n.
1657 (read_module): Add the logic and calls to these functions,
1658 so that mutiple reuses of the same real name are loaded.
1660 2005-09-09 Paul Thomas <pault@gcc.gnu.org>
1667 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
1668 common.c so that it is accessible to module.c. Add common_head
1669 field to gfc_symbol structure. Add field for the equivalence
1670 name AND new attr field, in_equivalence.
1671 * match.c (gfc_match_common, gfc_match_equivalence): In loops
1672 that flag common block equivalences, emit an error if the
1673 common blocks are different, using sym->common_head as the
1674 common block identifier. Ensure that symbols that are equivalence
1675 associated with a common block are marked as being in_common.
1676 * module.c (write_blank_common): New.
1677 (write_common): Use unmangled common block name.
1678 (load_equiv): New function ported from g95.
1679 (read_module): Call load_equiv.
1680 (write_equiv): New function ported from g95. Correct
1681 string referencing for gfc functions. Give module
1682 equivalences a unique name.
1683 (write_module): Call write_equiv and write_blank_common.
1684 * primary.c (match_variable) Old gfc_match_variable, made
1685 static and third argument provided to indicate if parent
1686 namespace to be visited or not.
1687 (gfc_match_variable) New. Interface to match_variable.
1688 (gfc_match_equiv_variable) New. Interface to match_variable.
1689 * trans-common.c (finish_equivalences): Provide the call
1690 to create_common with a gfc_common_header so that
1691 module equivalences are made external, rather than local.
1692 (find_equivalences): Ensure that all members in common block
1693 equivalences are marked as used. This prevents the subsequent
1694 call to this function from making local unions.
1695 * trans-decl.c (gfc_generate_function_code): Move the call to
1696 gfc_generate_contained_functions to after the call to
1697 gfc_trans_common so the use-associated, contained common
1698 blocks produce the correct references.
1699 (gfc_create_module_variable): Return for equivalenced symbols
1700 with existing backend declaration.
1702 2005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1705 * match.c (gfc_match_common): Remove unnecessary / wrong special
1706 cases for end-of-statement.
1708 2005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
1710 * gfortran.texi: Add section about implemented F2003 features.
1712 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1715 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
1716 the GFC_SS_FUNCTION case too.
1717 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
1718 to function pointers as well as function decls.
1719 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
1720 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1721 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
1722 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
1723 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
1724 (gfc_apply_interface_mapping_to_ref)
1725 (gfc_apply_interface_mapping_to_expr)
1726 (gfc_apply_interface_mapping): New functions.
1727 (gfc_conv_function_call): Evaluate the arguments before working
1728 out where the result should go. Make the null pointer case provide
1729 the string length in parmse.string_length. Cope with non-constant
1730 string lengths, using the above functions to evaluate such lengths.
1731 Use a temporary typespec; don't assign to sym->cl->backend_decl.
1732 Don't assign to se->string_length when returning a cached array
1735 2005-09-08 Richard Sandiford <richard@codesourcery.com>
1738 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
1739 after handling scalarized references. Make "indexse" inherit from
1740 "se" when handling AR_ELEMENTs.
1741 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
1742 substring or scalar reference that follows an array section.
1743 * trans-expr.c (gfc_conv_variable): When called from within a
1744 scalarization loop, start out with "ref" pointing to the scalarized
1745 part of the reference. Don't call gfc_advance_se_ss_chain here.
1747 2005-09-07 Richard Sandiford <richard@codesourcery.com>
1750 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
1751 descriptor if the rhs is not a null pointer or variable.
1753 2005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
1756 * symbol.c(check_conflict): Add conflict for parameter/save,
1758 2005-09-06 Richard Sandiford <richard@codesourcery.com>
1761 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
1762 the source, not the first element of the return value.
1764 2005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1767 * io.c (match_io): Correctly backup if PRINT followed by
1768 symbol which is not a namelist. Force blank between PRINT
1769 and namelist in free form.
1771 2005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1774 * gfortran.h (gfc_option_t): Add flag_automatic.
1775 * invoke.texi: Document the -fno-automatic option.
1776 * lang.opt: Add a -fautomatic option.
1777 * options.c (gfc_init_options): Default for -fautomatic is on.
1778 (gfc_handle_option): Add handling of -fautomatic option.
1779 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
1780 needed variables as SAVE.
1782 2005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
1784 * trans-array.c (gfc_trans_deferred_array): Fix comments.
1786 2005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
1788 * primary.c (match_charkind_name): Fix typo in comment leading to
1791 2005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
1794 * symbol.c (find_special): Remove.
1795 (build_sym, add_init_expr, attr_decl1): Remove calls to
1796 find_special in favor of calls to gfc_get_symbol.
1798 2005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
1801 * gfortran.h (symbol_attribute): Add noreturn to the structure.
1802 (gfc_intrinsic_sym): Add noreturn to the structure.
1803 * intrinsic.c (make_noreturn): New function.
1804 (add_subroutines): Mark subroutines abort and exit as noreturn.
1805 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
1806 isym to the resolved symbol.
1807 * trans-decl.c (gfc_get_extern_function_decl): Set function
1808 as VOLATILE (== noreturn) if the noreturn attribute is set.
1810 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1812 * decl.c: Typo in comment.
1814 2005-08-21 Steven G. Kargl <kargls@comcast.net>
1816 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
1818 2005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1820 * gfortran.h (gfc_option_t): Remove source field. Add
1822 (gfc_new_file): Remove arguments in prototype.
1823 (gfc_source_file): Make 'const char *'.
1824 * f95-lang.c (gfc_init): Use gfc_source_file instead of
1825 gfc_option.source. Call gfc_new_file without arguments.
1826 * invoke.texi: Document new options '-fd-lines-as-code' and
1827 '-fd-lines-as-comment'.
1828 * lang.opt: Add new options. Alphabetize.
1829 * options.c (gfc_init_options): Initialize gfc_source_file instead
1830 of gfc_option.source. Initialize gfc_option.flag_d_lines.
1831 (form_from_filename): Move here from scanner.c. Make
1832 'filename' argument 'const'.
1833 (gfc_post_options): Set gfc_source_file. Determine source form.
1834 Warn if 'd-lines*' are used in free form.
1835 * scanner.c (gfc_source_file): Constify.
1836 (skip_fixed_comments): Deal with d-lines.
1837 (get_file): Constify argument 'name'.
1838 (load_file): Constify argument 'filename'.
1839 (form_from_filename): Moved to options.c.
1840 (gfc_new_file): Remove arguments. Don't initialize
1841 gfc_source_file, don't determine source form.
1842 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
1843 of gfc_option.source.
1845 2005-08-19 Steven G. Kargl <kargls@comcast.net>
1848 * gfortran.h: Remove PATH_MAX definition.
1849 * module.c (write_module, gfc_dump_module): Use alloca to allocate
1851 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
1853 2004-08-16 Huang Chun <chunhuang73@hotmail.com>
1855 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
1858 2005-08-14 Asher Langton <langton2@llnl.gov>
1860 * parse.c (match): Enclose macro in do...while(0) and braces.
1862 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1865 * gfortran.texi: Document PRINT namelist.
1867 2005-08-14 Paul Thomas <pault@gcc.gnu.org>
1870 * io.c (match_io): Add code to implement PRINT namelist.
1872 2005-08-14 Canqun Yang <canqun@nudt.edu.cn>
1874 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
1877 2005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1878 Steven Bosscher <stevenb@suse.de>
1881 * gfortran.h: Add is_main_program member to symbol_attribute.
1882 * trans-decl: Add a gfor_fndecl_set_std tree.
1883 (gfc_build_builtin_function_decls): Create it.
1884 (gfc_generate_function_code): Add this call at the beginning of
1886 * trans.c (gfc_generate_code): Move main_program and attr.
1887 * trans.h: Add declaration for gfor_fndecl_set_std.
1889 2005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1892 gfortran.h: Declare new function gfc_resolve_dim_arg.
1893 resolve.c: New function gfc_resolve_dim_arg.
1894 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1895 (gfc_resolve_any): Likewise.
1896 (gfc_resolve_count): Likewise.
1897 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1898 gfc_default_integer_kind, convert it to default integer type.
1899 (gfc_resolve_eoshift): Likewise.
1900 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1901 (gfc_resolve_maxval): Likewise.
1902 (gfc_resolve_minloc): Likewise.
1903 (gfc_resolve_minval): Likewise.
1904 (gfc_resolve_product): Likewise.
1905 (gfc_resolve_spread): Likewise.
1906 (gfc_resolve_sum): Likewise.
1908 2005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1910 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1911 functions for new intrinsics TTYNAM and ISATTY.
1912 * intrinsic.c (add_functions, add_subroutines): Add new
1914 * intrinsic.h: Add prototypes for new check and resolve
1916 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1917 resolve functions for intrinsics TTYNAM and ISATTY.
1918 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1919 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1921 2005-08-09 Jakub Jelinek <jakub@redhat.com>
1923 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1926 2005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
1929 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1930 * gfortran.h: Add enums for FLUSH.
1931 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1932 comment appropriately. (gfc_match_flush): New function.
1933 * match.c (gfc_match_if): Add match for flush.
1934 * match.h: Add prototype.
1935 * parse.c (decode_statement): Add flush to 'f' case.
1936 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1937 * resolve.c (resolve_code): Add flush case.
1938 * st.c (gfc_free_statement): Add flush case.
1939 * trans-io.c: Add prototype for flush.
1940 (gfc_build_io_library_fndecls): Build fndecl for flush.
1941 (gfc_trans_flush): New function.
1942 * trans-stmt.h: Add prototype.
1943 * trans.c (gfc_trans_code): Add case for flush.
1945 2005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1947 * primary.c (match_hollerith_constant): Fix typo.
1949 2005-08-06 Kazu Hirata <kazu@codesourcery.com>
1951 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1952 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1953 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1954 comment/doc typos. Follow spelling conventions.
1956 2005-08-06 Jakub Jelinek <jakub@redhat.com>
1960 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1961 attributes, call gfc_match_array_ref up to twice and don't do any
1962 substring or component processing.
1963 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1964 REF_SUBSTRING or nothing if needed. Check that substrings
1965 don't have zero length.
1967 2005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1969 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1970 stop_numeric and stop_string as non-returning.
1972 2005-08-04 Paul Brook <paul@codesourcery.com>
1974 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1975 (gfc_conv_expr_lhs): Fix assertion.
1976 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1978 2005-08-02 David Edelsohn <edelsohn@gnu.org>
1981 * expr.c (simplify_parameter_variable): Do not copy the subobject
1982 references if the expression value is a constant.
1984 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1986 2005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1988 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1989 fix description of ceiling in index.
1991 2005-07-31 Steven Bosscher <stevenb@suse.de>
1993 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1994 malloc functions the 'malloc' attribute. Give runtime_error the
1995 'noreturn' attribute.
1997 2005-07-31 Steven Bosscher <stevenb@suse.de>
1999 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
2000 of the assigned goto variable.
2002 2005-07-29 Steven Bosscher <stevenb@suse.de>
2004 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
2006 2005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
2008 * fortran/f95-lang.c (language_function): Remove
2009 named_labels, shadowed_labels, returns_value, returns_abnormally,
2010 warn_about_return_type, and extern_inline fields.
2011 (named_labels): Remove variable.
2012 (gfc_init_decl_processing): Remove setting of named_labels.
2014 2005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2017 * resolve.c (resolve_operator): Improve diagnostic for comparison
2018 of logicals with invalid operator.
2020 2005-07-25 Jakub Jelinek <jakub@redhat.com>
2023 * data.c (gfc_assign_data_value_range): Call
2024 create_character_initializer if last_ts is a character type.
2026 2005-07-22 Manfred Hollstein <mh@suse.com>
2028 * match.c (gfc_match_symbol): Fix uninitialised warnings.
2029 * matchexp.c (gfc_match_expr): Likewise.
2031 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
2033 Make CONSTRUCTOR use VEC to store initializers.
2034 * trans-array.c (gfc_build_null_descriptor,
2035 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
2036 Update to cope with VEC in CONSTRUCTOR_ELTS.
2037 * trans-common.c (create_common): Likewise.
2038 * trans-expr.c (gfc_conv_structure): Likewise.
2039 * trans-stmt.c (gfc_trans_character_select): Use
2040 build_constructor_from_list instead of build_constructor.
2042 2005-07-19 Paul Thomas <pault@gcc.gnu.org>
2045 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
2046 is matched against interfaces in parent namespaces. If there
2047 the symtree is set to point to the interface.
2049 2005-07-16 David Edelsohn <edelsohn@gnu.org>
2052 * decl.c (do_parm): Adjust character initializer to character length
2053 of symbol before assigning.
2055 2005-07-14 Steve Ellcey <sje@cup.hp.com>
2057 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
2059 2005-07-14 Jakub Jelinek <jakub@redhat.com>
2061 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
2062 (gfc_error_buf): Add allocated and index fields. Change message
2063 field from array to a pointer.
2064 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
2065 (cur_error_buffer): New variable.
2066 (error_char): Use cur_error_buffer->{message,index} instead of
2067 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
2069 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
2070 cur_error_buffer and its index rather than {warning,error}_ptr
2071 and use_warning_buffer.
2072 (gfc_warning_check, gfc_error_check): Don't print anything if
2074 (gfc_push_error): Allocate saved message with xstrdup.
2075 (gfc_pop_error): Free saved message with gfc_free.
2076 (gfc_free_error): New function.
2077 * primary.c (match_complex_constant): Call gfc_free_error if
2078 gfc_pop_error will not be called.
2079 * match.c (gfc_match_st_function): Likewise.
2082 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
2083 file. Fix file left but not entered warning.
2085 2005-07-14 Feng Wang <fengwang@nudt.edu.cn>
2086 Steven G. Kargl <kargls@comcast.net>
2088 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
2089 for the array and attach to namespace list for automatic deallocation.
2091 2005-07-13 Andreas Schwab <schwab@suse.de>
2093 * Make-lang.in (fortran/dependency.o): Depend on
2094 $(GFORTRAN_TRANS_DEPS).
2096 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2098 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
2100 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
2101 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
2102 Don't clear maskindexes here.
2104 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
2106 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
2109 2005-07-08 Jakub Jelinek <jakub@redhat.com>
2111 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
2114 2005-07-07 Jakub Jelinek <jakub@redhat.com>
2116 * scanner.c (load_line): Add pbuflen argument, don't make
2117 buflen static. If maxlen == 0 or preprocessor_flag,
2118 don't truncate at buflen, but at maxlen. In xrealloc add
2119 1 byte at the end for the terminating '\0'. Don't fill
2120 with spaces up to buflen, but gfc_option.fixed_line_length.
2121 (load_file): Adjust load_line caller. Add line_len variable.
2123 * scanner.c (preprocessor_line): Only set current_file->line when errors
2124 have not been encountered. Warn and don't crash if a file leave
2125 preprocessor line has no corresponding entering line. Formatting.
2127 2005-07-07 Steven Bosscher <stevenb@suse.de>
2129 * primary.c (match_hollerith_constant): Use int, not unsigned int,
2130 for the hollerith length. Fix indentation.
2132 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
2137 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
2138 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
2140 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
2141 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
2142 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
2144 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
2145 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
2146 (gfc_check_assign): Enable conversion from Hollerith to other.
2147 * gfortran.h (bt): Add BT_HOLLERITH.
2148 (gfc_expr): Add from_H flag.
2149 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
2150 (add_conversions): Add conversions from Hollerith constant to other.
2151 (do_simplify): Don't simplify if Hollerith constant arguments exist.
2152 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
2153 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
2154 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
2155 * primary.c (match_hollerith_constant): New function.
2156 (gfc_match_literal_constant): Add match Hollerith before Integer.
2157 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
2159 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
2160 convert Hollerith constant to tree.
2161 * trans-io.c (gfc_convert_array_to_string): Get array's address and
2162 length to set string expr.
2163 (set_string): Deal with array assigned Hollerith constant and character
2165 * gfortran.texi: Document Hollerith constants as extention support.
2167 2005-07-07 Feng Wang <fengwang@nudt.edu.cn>
2170 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
2172 2005-07-07 Jakub Jelinek <jakub@redhat.com>
2174 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
2177 2005-07-03 Kazu Hirata <kazu@codesourcery.com>
2179 * gfortran.texi, intrinsic.texi: Fix typos.
2180 * symbol.c: Fix a comment typo.
2182 2005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2184 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
2185 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
2186 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
2187 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
2190 2005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2193 * io.c (match_dt_element): Do not allow END tag in PRINT or
2196 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
2198 * lang.opt: Remove "." from end of help texts.
2200 2005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
2202 * gfortran.texi: Fix typos and grammar.
2203 * invoke.texi: Fix typos and grammar.
2204 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
2205 exit. Fixed alignment of text for dtime syntax. Fixed a few line
2208 2005-06-25 Jakub Jelinek <jakub@redhat.com>
2210 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
2211 type than boolean_type_node.
2213 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
2215 * all files: Update FSF address in copyright headers.
2217 2005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
2220 * gfortran.h: Add symbols for new intrinsic functions.
2221 * intrinsic.c: Add new functions acosh, asinh, and atanh.
2222 * intrinsic.h: Add prototypes for the new functions.
2223 * iresolve.c (gfc_resolve_acosh): New function.
2224 (gfc_resolve_asinh): New function.
2225 (gfc_resolve_atanh): New function.
2226 * mathbuiltins.def: Add defines.
2227 * simplify.c (gfc_simplify_acosh): New function.
2228 (gfc_simplify_asinh): New function.
2229 (gfc_simplify_atanh): New function.
2231 2005-06-24 Feng Wang <fengwang@nudt.edu.cn>
2233 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
2235 2005-06-22 Paul Brook <paul@codesourcery.com>
2238 * symbol.c (gfc_is_var_automatic): New function.
2239 (save_symbol): Use it.
2241 2005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2242 Paul Thomas <pault@gcc.gnu.org>
2246 * module.c (mio_namelist): New function. Correct to set
2247 namelist_tail and to give error on renaming namelist by use
2249 (mio_symbol): Call mio_namelist.
2251 2005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2253 * gfortran.h: Add flag_backslash compile-time option.
2254 * lang.opt: Add support for -fbackslash option.
2255 * options.c: Likewise.
2256 * primary.c: Implement behavior for -fno-backslash.
2257 * invoke.texi: Add doc for -fbackslash option.
2258 * gfortran.texi: Remove mention of -fno-backslash as a
2261 2005-06-20 Steven G. Kargl <kargls@comcast.net>
2265 * match.c (gfc_match_label): Detect duplicate labels.
2268 2005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
2270 * intrinsic.c (check_intrinsic_standard): Fix spelling error
2271 in a warning message.
2273 2005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
2274 Steven G. Kargl <kargls@comast.net>
2277 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
2278 for an array; check that sym->as is NULL.
2281 2005-06-18 Steven G. Kargl <kargls@comcast.net>
2283 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
2284 functions whose simplification routine return FAILURE.
2286 2005-06-13 Geoffrey Keating <geoffk@apple.com>
2288 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
2289 (rule for installing f95.1 manpage): Does depend on installdirs.
2291 2005-06-13 Jakub Jelinek <jakub@redhat.com>
2294 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
2295 in the innermost loop.
2297 * trans-expr.c (gfc_conv_function_call): Return int instead of
2298 void. Use a local variable for has_alternate_specifier and
2299 return it. Avoid modification of function type's return value
2300 in place, since it may be shared.
2301 * trans.h (has_alternate_specifier): Remove.
2302 (gfc_conv_function_call): Change return type.
2303 * trans-stmt.c (has_alternate_specifier): Remove.
2304 (gfc_trans_call): Add a local has_alternate_specifier variable,
2305 set it from gfc_conv_function_call return value.
2307 2005-06-12 Richard Henderson <rth@redhat.com>
2309 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
2310 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
2311 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
2312 (gfc_trans_allocate_array_storage): Use them.
2313 (gfc_array_allocate, gfc_array_deallocate): Likewise.
2314 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
2315 (gfc_trans_deferred_array): Likewise.
2316 * trans-expr.c (gfc_conv_function_call): Likewise.
2317 (gfc_trans_subcomponent_assign): Likewise.
2318 (gfc_trans_pointer_assignment): Likewise.
2319 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
2320 * trans-types.c (gfc_array_descriptor_base): New.
2321 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
2322 (gfc_get_array_descriptor_base): Break out from ...
2323 (gfc_get_array_type_bounds): ... here. Create type variants.
2324 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
2325 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
2327 2005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2329 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
2330 calling conventions. Look at sym instead of sym->result.
2331 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
2332 Remove condition which is always false with workaround removed.
2333 (gfc_return_by_reference): Always look at sym, never at sym->result.
2335 2005-06-11 Steven G. Kargl <kargls@comcast.net>
2339 * trans-array.c (gfc_array_deallocate): pstat is new argument
2340 (gfc_array_allocate): update gfc_array_deallocate() call.
2341 (gfc_trans_deferred_array): ditto.
2342 * trans-array.h: update gfc_array_deallocate() prototype.
2343 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
2344 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
2346 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
2348 * intrinsic.texi: Add documentation for dcmplx, digits,
2349 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
2351 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2354 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
2355 Generate correct exit condition in case of negative steps in
2358 * invoke.texi: Fix description of flags required for compatibility
2361 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2362 Erik Schnetter <schnetter@aei.mpg.de>
2365 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
2366 remove FIXME comment.
2368 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2370 * match.c (match_forall_iterator): Don't immediately give error if '='
2371 is not followed by an expression.
2373 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2374 Erik Edelmann <erik.edelmann@iki.fi>
2376 * array.c (gfc_match_array_constructor): Disallow empty array
2379 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
2381 * fortran/intrinsic.texi: Add documentation for
2382 command_argument_count, conjg, dconjg, count,
2383 cpu_time, cshift, date_and_time, dble, dfloat.
2385 2005-06-01 Roger Sayle <roger@eyesopen.com>
2387 * intrinsic.c (add_conv): No longer take a "simplify" argument as
2388 its always gfc_convert_constant, instead take a "standard" argument.
2389 (add_conversions): Change all existing calls of add_conv to pass
2390 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
2391 extensions support integer-logical and logical-integer conversions.
2392 (gfc_convert_type_warn): Warn about use the use of these conversions
2393 as a extension when appropriate, i.e. with -pedantic.
2394 * simplify.c (gfc_convert_constant): Add support for integer to
2395 logical and logical to integer conversions, using gfc_int2log and
2397 * arith.c (gfc_log2int, gfc_int2log): New functions.
2398 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
2399 * gfortran.texi: Document this new GNU extension.
2401 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
2403 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
2404 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
2405 Correct comments and replace convert of integer_one_node with
2408 2005-06-01 Jakub Jelinek <jakub@redhat.com>
2411 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
2412 to avoid giving error multiple times.
2413 (resolve_entries): Don't error about BT_UNKNOWN here.
2414 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
2415 (resolve_fntype): New function.
2416 (gfc_resolve): Call resolve_fntype.
2418 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
2421 * fortran/io.c (resolve_tag): Fix error message.
2423 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2425 * fortran/trans-decl.c: Don't include errors.h.
2426 * fortran/Make-lang.in: Updates dependencies.
2428 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
2433 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
2434 string length from the expression typespec character length value
2435 and set temp_ss->stringlength and backend_decl. Obtain the
2436 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
2437 Dereference the expression to obtain the character.
2438 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
2439 dereference of scalar character pointer structure components.
2440 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
2441 string length for the structure component from the component
2444 2005-05-30 Roger Sayle <roger@eyesopen.com>
2446 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
2447 * options.c (gfc_init_options): By default, allow legacy extensions
2448 but warn about them.
2449 (gfc_post_options): Make -pedantic warn about legacy extensions
2450 even with -std=legacy.
2451 (gfc_handle_option): Make -std=gnu follow the default behaviour
2452 of warning about legacy extensions, but allowing them. Make the
2453 new -std=legacy accept everything and warn about nothing.
2454 * lang.opt (std=legacy): New F95 command line option.
2455 * invoke.texi: Document both -std=f2003 and -std=legacy.
2456 * gfortran.texi: Explain the two types of extensions and document
2457 how they are affected by the various -std= command line options.
2459 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
2461 * trans-expr.c: Remove trailing ^M.
2463 * trans-expr.c: Fix comment typos.
2465 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
2473 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
2474 length to temp_ss for character pointer array assignments.
2475 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
2476 dereferencing of characters and character pointers.
2477 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
2478 length as return argument for various kinds of handling of return.
2479 Return a char[]* temporary for character pointer functions and
2480 dereference the temporary upon return.
2482 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
2483 Steven G. Kargl <kargls@comcast.net>
2486 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
2488 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2491 * io.c (format_item_1): Add check and extension warning for
2494 2005-05-28 Steven G. Kargl <kargls@comcast.net>
2496 * arith.c (gfc_arith_init_1): Fix off by one problem;
2497 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
2499 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
2500 Steven G. Kargl <kargls@comcast.net>
2502 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
2505 2005-05-27 Steven G. Kargl <kargls@comcast.net>
2507 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
2508 like types in comparsion.
2510 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
2512 * data.c, parse.c, trans-array.c, trans-decl.c,
2513 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
2514 trans.h: Fix comment typos. Follow spelling conventions.
2516 2005-05-22 Roger Sayle <roger@eyesopen.com>
2518 * gfortran.texi: Document some more GNU extensions.
2520 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2522 * error.c (gfc_warning): Fix typo in comment.
2524 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
2527 * fortran/iresolve.c (gfc_resolve_reshape): Add
2528 gfc_type_letter (BT_COMPLEX) for complex to
2529 to resolved function name.
2531 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
2533 * array.c (gfc_match_array_constructor): Support [ ... ]
2534 style array constructors.
2536 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2538 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
2539 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
2540 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
2541 to correct enum type.
2542 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
2543 function. Add default case to switch, deal with FIX_TRUNC_EXPR
2544 instead of FIX_FLOOR_EXPR.
2546 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
2549 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
2550 build character length.
2552 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
2554 * trans-types.c (gfc_array_range_type): New variable.
2555 (gfc_init_types): Initialize gfc_array_range_type.
2556 (gfc_get_array_type_bounds): Use gfc_array_range_type.
2558 2005-05-17 Jakub Jelinek <jakub@redhat.com>
2561 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
2562 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
2563 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
2565 (generate_loop_for_rhs_to_temp): Likewise.
2566 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
2567 It non-NULL, add it to body.
2568 (allocate_temp_for_forall_nest_1): New function, split from
2569 allocate_temp_for_forall_nest.
2570 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
2571 propagate it down to compute_overall_iter_number. Use
2572 allocate_temp_for_forall_nest_1.
2573 (gfc_trans_assign_need_temp): Remove COUNT2. Call
2574 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
2575 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
2576 and generate_loop_for_temp_to_lhs.
2577 (gfc_trans_pointer_assign_need_temp): Adjust calls to
2578 allocate_temp_for_forall_nest.
2579 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
2580 stmtblock_t. Call compute_overall_iter_number just once, then
2581 allocate_temp_for_forall_nest_1 twice with the same size.
2582 Initialize mask indexes if nested_forall_info != NULL.
2583 (gfc_trans_where_2): Initialize mask indexes before calling
2584 gfc_trans_nested_forall_loop.
2586 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
2587 Jerry DeLisle <jvdelisle@verizon.net>
2590 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
2591 resolve ICE on assign of format label.
2592 * trans-io.c (set_string): add fold-convert to properly
2593 handle assigned format label in write.
2595 2005-05-13 Paul Brook <paul@codesourcery.com>
2597 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
2599 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2601 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
2603 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2606 * io.c (check_format): Look for literal characters inside
2609 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2611 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
2612 attribute from result symbol to function symbol.
2613 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
2614 instead of sym->result->attr.dimension.
2616 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2619 * gfortran.h (gfc_option): Add flag_f2c.
2620 * invoke.texi: Document '-ff2c' command line option. Adapt
2621 documentation for '-fno-second-underscore' and '-fno-underscoring'.
2622 * lang.opt (ff2c): New entry.
2623 * options.c (gfc-init_options): Set default calling convention
2624 to -fno-f2c. Mark -fsecond-underscore unset.
2625 (gfc_post_options): Set -fsecond-underscore if not explicitly set
2627 (handle_options): Set gfc_option.flag_f2c according to requested
2629 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
2630 intrinsics where necessary.
2631 (gfc_trans_deferred_vars): Change todo error to assertion.
2632 * trans-expr.c (gfc_conv_variable): Dereference access
2633 to hidden result argument.
2634 (gfc_conv_function_call): Add hidden result argument to argument
2635 list if f2c calling conventions requested. Slightly restructure
2636 tests. Convert result of default REAL function to requested type
2637 if f2c calling conventions are used. Dereference COMPLEX result
2639 * trans-types.c (gfc_sym_type): Return double for default REAL
2640 function if f2c cc are used.
2641 (gfc_return_by_reference): Slightly restructure logic. Return
2642 COMPLEX by reference depending on calling conventions.
2643 (gfc_get_function_type): Correctly make hidden result argument a
2644 pass-by-reference argument for COMPLEX. Remove old code which does
2645 this for derived types.
2647 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2649 * match.c (gfc_match_return): Only require space after keyword when
2650 it is obligatory. Only give stdwarn to after matching is successful.
2651 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
2653 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2655 * intrinsic.texi: Fix typos.
2657 2005-05-07 Steven G. Kargl <kargls@comcast.net>
2659 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
2660 description to include information about scalar arguments.
2662 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2664 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
2665 match.h, trans-array.h: Update copyright.
2667 2005-04-29 Tom Tromey <tromey@redhat.com>
2669 * f95-lang.c (poplevel): Updated for change to build_block.
2671 2005-04-29 Jakub Jelinek <jakub@redhat.com>
2675 * trans-expr.c (gfc_conv_variable): Handle return values in functions
2676 with alternate entry points.
2677 * resolve.c (resolve_entries): Remove unnecessary string termination
2678 after snprintf. Set result of entry master.
2679 If all entries have the same type, set entry master's type
2680 to that common type, otherwise set mixed_entry_master attribute.
2681 * trans-types.c (gfc_get_mixed_entry_union): New function.
2682 (gfc_get_function_type): Use it for mixed_entry_master functions.
2683 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
2684 * decl.c (gfc_match_entry): Set entry->result properly for
2686 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
2688 (build_entry_thunks): Handle return values in entry thunks.
2689 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
2690 shared between multiple contexts.
2691 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
2692 current_function_decl instead of sym->backend_decl. Skip over
2693 entry master's entry id argument. For mixed_entry_master entries or
2694 their results, return a COMPONENT_REF of the fake result.
2695 (gfc_trans_deferred_vars): Don't warn about missing return value if
2696 at least one entry point uses RESULT.
2697 (gfc_generate_function_code): For entry master returning
2698 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
2699 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
2700 values optional just because they are in entry master.
2702 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2704 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
2705 Tobias forgot this in previous commit.
2707 2005-04-29 Paul Brook <paul@codesourcery.com>
2709 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
2712 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2714 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
2715 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
2716 IMPLICIT NONE, set seen_implicit_none.
2717 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
2719 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2721 * gfortran.h (gfc_gsymbol): Make name a const char *.
2722 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
2725 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2728 * resolve.c (resolve_actual_arglist): Issue an error if a statement
2729 functions is used as actual argument.
2731 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2734 * interface.c (compare_parameter): Ignore type for EXPR_NULL
2735 only if type is BT_UNKNOWN.
2737 2005-04-25 Paul Brook <paul@codesourcery.com>
2738 Steven G. Kargl <kargls@comcast.net>
2741 * check.c (gfc_check_ichar_iachar): New function.
2742 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
2743 * intrinsic.c (add_functions): Use it.
2744 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
2745 character expression lengths.
2747 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2750 * trans-common.c (translate_common): Cast offset and
2751 common_segment->offset to type int for warning message.
2753 2005-04-23 DJ Delorie <dj@redhat.com>
2755 * trans-decl.c: Adjust warning() callers.
2757 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2759 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
2760 intermediate representation. Fix typo in comment.
2762 2005-04-21 Steven G. Kargl <kargls@comcast.net>
2764 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
2765 simplify logic; Add a gcc_assert.
2767 2005-04-19 Steven G. Kargl <kargls@comcast.net>
2769 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
2771 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
2772 Steven G. Kargl <kargls@comcast.net>
2774 * invoke.texi: Update -Waliasing description
2776 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2779 * resolve.c (resolve_variable): If e->symtree is not set, this
2780 ought to be a FAILURE, and not a segfault.
2782 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
2789 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
2790 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
2791 declarations of old namelist functions.
2792 (build_dt): Simplified call to transfer_namelist_element.
2793 (nml_get_addr_expr): Generates address expression for start of
2794 object data. New function.
2795 (nml_full_name): Qualified name for derived type components. New
2797 (transfer_namelist_element): Modified for calls to new functions
2798 and improved derived type handling.
2800 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
2802 * scanner.c (gfc_next_char_literal): Reset truncation flag
2803 for lines ending in a comment for both fixed and free form.
2804 (load_line): Do not set truncated flag if only truncating
2807 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
2810 * gfortran.h (gfc_linebuf): Add truncated field.
2811 * parse.c (next_statement): Handle warning for truncated
2813 * scanner.c (load_line): Return if line was truncated.
2814 No longer warn for truncated lines. Remove unused parameters.
2815 (load_file): Store load_line return value to linebuf.
2816 (gfc_error_recovery): Do not advance line at the end.
2818 2005-04-14 Steven G. Kargl <kargls@comcast.net>
2820 * gfortran.h (gfc_real_info): Add subnormal struct member.
2821 * arith.c (gfc_arith_init_1): Set it.
2822 (gfc_check_real_range): Use it.
2823 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
2825 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
2827 * simplify.c: Fix a comment typo.
2829 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
2831 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2833 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2835 * simplify.c (gfc_simplify_nearest): Overhaul.
2837 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
2839 * interface.c: Fix a comment typo.
2841 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2843 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
2846 2005-04-09 Steven G. Kargl <kargls@comcast.net>
2848 * simplify.c (gfc_simplify_anint): Use mpfr_round()
2849 (gfc_simplify_dnint): ditto.
2850 (gfc_simplify_nint): ditto.
2852 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
2855 * io.c (check_format): Allow an optional comma
2856 between descriptors.
2858 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2860 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
2861 comment according to GNU coding style.
2862 (gfc_match_if): Remove gfc_ prefix in call to
2863 match_arithmetic_if.
2865 2005-04-08 Diego Novillo <dnovillo@redhat.com>
2867 * match.c (gfc_match_arithmetic_if): Declare static.
2869 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2872 * match.c (gfc_match_arithmetic_if): New function to match an
2873 arithmetic IF statement.
2874 (gfc_match_if): Use gfc_match_arithmetic_if to match an
2875 arithmetic IF statement embedded in a simple IF statement.
2877 2005-04-07 Steven G. Kargl <kargls@comcast.net>
2879 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
2881 2005-04-06 Steven G. Kargl <kargls@comcast.net>
2883 * invoke.texi: Remove documentation of -std=f90
2885 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2887 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2888 non-pointer assignment.
2890 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2895 * array.c (resolve_character_array_constructor): New function. Set
2896 constant character array's character length.
2897 (gfc_resolve_array_constructor): Use it.
2898 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2900 (gfc_set_constant_character_len): New function. Set constant character
2901 expression according the given length.
2902 * match.h (gfc_set_constant_character_len): Add prototype.
2904 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2906 * intrinsic.texi: BES?? functions are not in the f95 standard.
2908 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2910 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2912 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2914 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2915 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2917 2005-04-02 Steven G. Kargl <kargls@comcast.net>
2919 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2921 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2923 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2924 trans.h: Fix comment typos.
2926 2005-03-29 Steven G. Kargl <kargls@comcast.net>
2928 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2929 flag_default_integer, flag_default_real
2930 * invoke.texi: Update documentation
2931 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
2932 fdefault-integer-8, and fdefault-real-8 definitions.
2933 * options.c (gfc_init_options): Set option defaults
2934 (gfc_handle_option): Handle command line options.
2935 * trans-types.c (gfc_init_kinds): Use options.
2937 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2939 * f95-lang.c (builtin_function): Process the attrs parameter
2940 and apply the "const" attribute to the builtin if found.
2942 2005-03-27 Steven G. Kargl <kargls@comcast.net>
2944 * intrinsic.texi: Document AIMAG, AINT, ALL
2946 2005-03-26 Steven G. Kargl <kargls@comcast.net>
2948 * arith.c (check_result): Fix illogical logic.
2950 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2952 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2953 contain no equivalence objects.
2954 (add_equivalences): New argument saw_equiv.
2955 (trans_common): New local variable saw_equiv.
2956 (finish_equivalences): Add a local variable dummy, Always pass true
2957 for the 3rd parameter to create_common.
2959 2005-03-25 Steven G. Kargl <kargls@comcast.net>
2961 * intrinsic.texi: Fix "make dvi"
2963 2005-03-24 Steven G. Kargl <kargls@comcast.net>
2965 * intrinsic.texi: New file.
2966 * gfortran.texi: Include it; white space change; fix typo.
2968 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2970 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2972 2005-03-23 Steven Bosscher <stevenb@suse.de>
2974 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2975 * trans-array.c (gfc_trans_allocate_array_storage,
2976 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2977 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2978 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2979 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2980 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2981 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2982 gfc_conv_expr_descriptor): Likewise.
2983 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2984 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2985 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2986 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2987 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2988 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2989 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2990 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2991 gfc_conv_intrinsic_merge, prepare_arg_info,
2992 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2993 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2994 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2995 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2996 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2997 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2999 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
3000 * trans.c (gfc_add_modify_expr): Likewise.
3002 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3004 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
3005 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
3006 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
3007 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
3008 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
3009 gfc_check_perror): new functions to check newly implemented
3011 * gfortran.h: adding symbols for new intrinsics.
3012 * intrinsic.c (add_functions): adding new intrinsics.
3013 (add_subroutines): adding new intrinsics.
3014 * intrinsic.h: prototype for all checking and resolving
3016 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
3017 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
3018 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
3019 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
3020 gfc_resolve_kill_sub, gfc_resolve_link_sub,
3021 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
3022 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
3023 gfc_resolve_perror): new functions to resolve intrinsics.
3024 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
3027 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3029 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
3030 in which the variable is declared.
3033 * resolve.c (was_declared): Also check for dummy attribute.
3035 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3037 * gfortran.h (arith): Remove ARITH_0TO0.
3038 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
3039 (gfc_arith_power): Remove special casing of zero to integral
3042 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3044 * Make-lang.in (fortran-warn): Remove -Wno-error.
3045 (expr.o-warn, resolve.o-warn, simplify.o-warn,
3046 trans-common.o-warn): Specify -Wno-error.
3048 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3050 * trans-array.c (gfc_trans_static_array_pointer,
3051 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
3052 comment and formatting typos.
3054 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3056 * invoke.texi: Fix typos.
3058 2005-03-15 Zack Weinberg <zack@codesourcery.com>
3060 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
3062 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
3064 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
3065 to zero on label_tree.
3067 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
3070 * io.c (resolve_tag): Add checking on assigned label.
3071 (match_dt_format): Does not set symbol assign attribute.
3072 * match.c (gfc_match_goto):Does not set symbol assign attribute.
3073 * resolve.c (resolve_code): Add checking on assigned label.
3074 * trans-common.c (build_field): Deals with common variable assigned
3076 * trans-stmt.c (gfc_conv_label_variable): New function.
3077 (gfc_trans_label_assign): Use it.
3078 (gfc_trans_goto): Ditto.
3079 * trans-io.c (set_string): Ditto.
3080 * trans.h (gfc_conv_label_variable): Add prototype.
3082 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3085 * symbol.c (check_conflict): A dummy argument can't be a statement
3088 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
3090 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
3091 the argument of the shift to the unsigned type.
3093 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3096 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
3098 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3101 * resolve.c (gfc_resolve): Check if character lengths are
3102 specification expressions.
3104 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3107 * trans-array.c (gfc_stack_space_left): Remove unused variable.
3108 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
3110 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
3111 Remove declaration / prototype.
3112 * trans-common.c (build_equiv_decl): Give union a name. Check if
3113 it can be put on the stack.
3114 * trans-decl.c (gfc_stack_space_left): Move function here.
3115 (gfc_build_qualified_array): Fix comment typo.
3116 * trans.h (gfc_put_var_on_stack): Add prototype.
3118 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3120 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
3121 * decl.c, trans.c: Don't use C++ style comments.
3122 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
3123 ifsrc): Give names to enums and use ENUM_BITFIELD.
3124 (gfc_access): Remove trailing comma.
3126 2005-03-05 Steven G. Kargl <kargls@comcast.net>
3129 * primary.c (match_complex_constant): Mangled complex constant may
3130 be an implied do-loop. Give implied do-loop matcher a chance.
3132 2005-03-05 Steven G. Kargl <kargls@comcast.net>
3135 * resolve.c (compare_shapes): New function.
3136 (resolve_operator): Use it.
3138 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3140 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
3141 type for COMPLEX constants.
3143 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3146 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3147 argument from a pointer function also if it has a result clause.
3149 2005-03-04 Steven G. Kargl <kargls@comcast.net>
3151 * expr.c (gfc_copy_shape_excluding): Change && to ||.
3153 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3155 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
3158 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3162 * simplify.c (gfc_simplify_bound): Rename to ...
3163 (simplify_bound): ... this and overhaul.
3165 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
3167 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
3168 (gfc_conv_intrinsic_function): update function calls
3170 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
3173 * trans-types.c (gfc_max_integer_kind): Declare
3174 (gfc_init_kinds): Initialize it.
3175 * gfortran.h (gfc_max_integer_kind): extern it.
3176 * primary.c (match_boz_constant): Use it; remove gfortran extension
3177 of kind suffixes on BOZ literal constants
3180 2005-02-27 Steven G. Kargl <kargls@comcast.net>
3182 * arith.c (gfc_check_real_range): Remove multiple returns
3183 (check_result): New function.
3184 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
3185 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
3188 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3190 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
3193 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
3195 Unrevert previously reverted patch. Adding this fix:
3196 * module.c (find_true_name): Deal with NULL module.
3198 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3200 Revert yesterday's patch:
3201 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3203 * gfortran.h (gfc_component, gfc_actual_arglist, ...
3204 ... argument. Copy string instead of pointing to it.
3206 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3208 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
3209 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
3211 * module.c (mio_namespace_ref, load_needed): Likewise.
3212 * parse.c (parse_interface, parse_contained): Likewise. Here the
3213 correct second argument matters.
3214 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
3215 parent's implicit types if this is set.
3216 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
3217 * trans-common.c (build_common_decl): Likewise.
3219 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
3221 * symbol.c (gfc_set_default_type): Issue error only once, by setting
3222 and checking 'untyped' attribute.
3224 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
3225 fields into new struct 'op' inside the 'value' union.
3226 * arith.c (eval_intrinsic): Adapt all users.
3227 * dependency.c (gfc_check_dependency): Likewise.
3228 * dump-parse-tree.c (gfc_show_expr): Likewise.
3229 * expr.c (gfc_get_expr): Don't clear removed fields.
3230 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
3231 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
3232 check_intrinsic_op): Adapt to new field names.
3233 * interface.c (gfc_extend_expr): Likewise. Also explicitly
3234 nullify 'esym' and 'isym' fields of new function call.
3235 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
3236 Adapt to renamed structure fields.
3237 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
3238 * module.c (mio_expr): Likewise.
3239 * resolve.c (resolve_operator): Likewise.
3240 (gfc_find_forall_index): Likewise. Only look through operands
3241 if dealing with EXPR_OP
3242 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
3243 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
3244 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
3247 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
3248 'name' a 'const char *'.
3249 (gfc_symbol): Likewise, also for 'module'.
3250 (gfc_symtree): Make 'name' a 'const char *'.
3251 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
3252 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
3254 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
3255 initialize 'SYM->module'.
3256 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
3257 pointer instead of empty string.
3258 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
3259 * interface.c (gfc_compare_types): Adapt check to account for possible
3261 (compare_actual_formal): Check for NULL pointer instead of empty
3263 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
3264 Add 'const' qualifier.
3265 (conv_name): Return a heap allocated string.
3266 (find_conv): Add 'const' qualifier to 'target'.
3267 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
3268 (make_generic): Check for NULL pointer instead of empty string.
3269 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
3270 (add_conv): No need to strcpy result from 'conv_name'.
3271 (sort_actual): Check for NULL pointer instead of empty string.
3272 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
3274 * module.c (compare_true_names): Compare pointers instead of strings
3275 for 'module' member.
3276 (find_true_name): Initialize string fields with gfc_get_string.
3277 (mio_pool_string): New function.
3278 (mio_internal_string): Adapt comment.
3279 (mio_component_ref, mio_component, mio_actual_arg): Use
3280 'mio_pool_string' instead of 'mio_internal_string'.
3281 (mio_symbol_interface): Add 'const' qualifier to string arguments.
3282 Add level of indirection. Use 'mio_pool_string' instead of
3283 'mio_internal_string'.
3284 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
3285 (write_common, write_symbol): Use 'mio_pool_string' instead of
3286 'mio_internal_string'.
3287 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
3288 instead of empty string.
3289 (write_operator, write_generic): Pass correct type variable to
3290 'mio_symbol_interface'.
3291 (write_symtree): Use 'mio_pool_string' instead of
3292 'mio_internal_string'.
3293 * primary.c (match_keyword_arg): Adapt check to possible
3294 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
3295 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
3296 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
3298 (ambiguous_symbol): Check for NULL pointer instead of empty string.
3299 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
3301 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
3302 pointer instead of empty string.
3303 * trans-decl.c (gfc_sym_mangled_identifier,
3304 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
3305 gfc_get_symbol_decl): Likewise.
3306 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
3307 argument. Copy string instead of pointing to it.
3309 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
3311 * intrinsic.h, st.c: Update copyright.
3313 2005-02-20 Steven G. Kargl <kargls@comcast.net>
3315 * symbol.c: Typos in comments.
3317 2005-02-20 Steven G. Kargl <kargls@comcast.net>
3319 * expr.c (gfc_type_convert_binary): Typo in comment.
3321 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3323 * check.c (gfc_check_selected_int_kind): New function.
3324 * intrinsic.h: Prototype it.
3325 * intrinsic.c (add_function): Use it.
3326 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
3327 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
3329 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3331 * check.c (gfc_check_int): improve checking of optional kind
3332 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
3334 2005-02-19 Steven G. Kargl <kargls@comcast.net>
3336 * check.c (gfc_check_achar): New function
3337 * intrinsic.h: Prototype it.
3338 * intrinsic.c (add_function): Use it.
3340 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3342 * trans-stmt.c (generate_loop_for_temp_to_lhs,
3343 generate_loop_for_rhs_to_temp): Remove if whose condition is
3346 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3348 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
3349 (gfc_use_derived): ... this function.
3351 2005-02-09 Richard Henderson <rth@redhat.com>
3353 * f95-lang.c (gfc_init_builtin_functions): Call
3354 build_common_builtin_nodes; do not define any functions handled
3357 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3359 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
3361 (gfc_is_constant_expr): Check 'ref' to determine if substring
3362 reference is constant.
3363 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
3364 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
3366 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
3368 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3370 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
3371 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
3372 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
3373 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
3374 gfc_add_procedure): Add argument.
3375 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
3376 gfc_match_null, match_type_spec, match_attr_spec,
3377 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
3378 Update callers to match.
3379 (gfc_match_entry): Likewise, fix comment typo.
3380 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
3381 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
3382 gfc_match_derived_decl): Update callers.
3383 * interface.c (gfc_match_interface): Likewise.
3384 * match.c (gfc_match_label, gfc_add_flavor,
3385 gfc_match_call, gfc_match_common, gfc_match_block_data,
3386 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
3388 * parse.c (parse_derived, parse_interface, parse_contained),
3389 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
3390 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
3391 * symbol.c (check_conflict, check_used): Add new 'name' argument,
3392 use when printing error message.
3393 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
3394 gfc_add_generic, gfc_add_in_common, gfc_add_data,
3395 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
3396 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
3397 gfc_add_procedure): Add new 'name' argument. Pass along to
3398 check_conflict and check_used.
3399 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
3400 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
3401 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
3402 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
3403 argument in calls to any of the modified functions.
3405 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
3407 * gfortran.texi: Don't give last update date.
3409 2006-01-30 Richard Henderson <rth@redhat.com>
3411 * options.c (gfc_init_options): Zero flag_errno_math.
3413 2005-01-29 Paul Brook <paul@codesourcery.com>
3416 * check.c (real_or_complex_check): New function.
3417 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
3418 * intrinsic.c (add_functions): Use new check functions.
3419 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
3422 2005-01-29 Steven G. Kargl <kargls@comcast.net>
3425 * expr.c (gfc_check_assign): Check for conformance of logical operands
3427 2004-01-27 Steven Bosscher <stevenb@suse.de>
3429 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
3430 TREE_USED for all labels.
3431 (gfc_trans_entry_master_switch): Use it instead of building a
3433 * trans-io.c (add_case): Likewise.
3434 * trans-stmt.c (gfc_trans_integer_select): Likewise.
3436 2004-01-23 Paul Brook <paul@codesourcery.com>
3437 Steven G. Kargl <kargls@comcast.net>
3440 * arith.c (gfc_convert_real): Remove sign handling.
3441 * primary.c (match_digits): Allow whitespace after initial sign.
3442 (match_real_const): Handle signs here. Allow whitespace after
3443 initial sign. Remove dead code.
3444 (match_const_complex_part): Remove.
3445 (match_complex_part): Use match_{real,integer}_const.
3446 (match_complex_constant): Cross-promote integer types.
3448 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
3451 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
3452 transpose_c8 for complex types.
3454 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
3456 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
3457 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3458 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
3459 Follow spelling conventions.
3461 2005-01-22 Bud Davis <bdavis9659@comcast.net>
3464 * trans-io.c (gfc_trans_inquire): Added code to support
3467 2005-01-22 Steven G. Kargl <kargls@comcast.net>
3469 * intrinsic.c (make_alias): Add standard argument.
3470 (add_functions): Update make_alias calls.
3472 2005-01-22 Paul Brook <paul@codesourcery.com>
3474 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
3476 2005-01-22 Paul Brook <paul@codesourcery.com>
3478 * gfortran.h (gfc_check_access): Add prototype.
3479 * match.c (gfc_match_namelist): Remove TODO.
3480 * module.c (check_access): Rename ...
3481 (gfc_check_access): ... to this. Boolify. Update callers.
3482 * resolve.c (resolve_symbol): Check for private objects in public
3485 2005-01-22 Paul Brook <paul@codesourcery.com>
3487 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
3488 does not have an explicit type.
3489 (gfc_match_variable): Resolve implicit derived types in all cases.
3490 Resolve contained function types from their own namespace, not the
3492 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
3493 checking. Resolve from the contained namespace, not the parent.
3495 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3498 * trans-const.c (gfc_conv_constant_to_tree): Give logical
3499 constants the correct type.
3502 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
3504 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
3507 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
3509 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
3510 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
3511 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
3512 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
3513 trans-io.c, trans-stmt.c, trans.c: Update copyright.
3515 2005-01-17 Ira Rosen <irar@il.ibm.com>
3517 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
3519 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3522 * error.c (error_char): Line-buffer errors / warnings.
3524 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3526 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
3527 unsigned issue. Use build_int_cst instead of converting
3528 integer_zero_node. Remove unnecessary conversion.
3530 * trans-types.c (gfc_get_character_type_len): Use
3531 gfc_charlen_type_node as basic type for the range field.
3533 * trans-intrinsic.c (build_fixbound_expr,
3534 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
3535 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
3536 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
3537 of converting 'integer_zero_node' or 'integer_one_node'
3539 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
3541 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
3542 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
3543 'build_int_cst' instead of converting 'integer_zero_node' or
3544 'integer_one_node' respectively.
3546 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3547 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
3548 'gfc'-prefix from local variable, remove dead code, use correct
3549 type when inserting argument.
3551 * trans-intrinsic.c, trans-types.c: Update copyright years.
3553 2005-01-16 Steven G. Kargl <kargls@comcast.net>
3556 * resolve.c (check_case_overlap): Typo in comment.
3557 (validate_case_label_expr): Fix up kinds of case values
3558 (resolve_select): Properly handle kind mismatches.
3560 2004-01-16 Paul Brook <paul@codesourcery.com>
3563 * trans-common.c (translate_common): Remove duplicate function call.
3564 (finish_equivalences): Preserve alignment when biasing offsets.
3566 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
3568 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
3569 ASCII-like character encoding.
3571 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3573 * resolve.c (compare_case): Cleanup.
3575 2005-01-14 Steven G. Kargl <kargls@comcast.net>
3577 * resolve.c (compare_case): Give arguments correct type.
3579 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
3581 * iresolve.c, trans-common.c, trans-types.c: Fix comment
3584 2005-01-09 Paul Brook <paul@codesourcery.com>
3587 * trans-common.c (current_common, current_offset): Remove.
3588 (create_common): Add head argument.
3589 (align_segment): New function.
3590 (apply_segment_offset): New function.
3591 (translate_common): Merge code from new_segment. Handle alignment.
3592 (new_segment): Remove.
3593 (finish_equivalences): Ensure proper alignment.
3595 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3597 * trans-const.c: Don't include unused math.h.
3599 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
3600 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
3601 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
3602 trailing whitespace.
3603 (prepare_arg_info): Fix formatting, indenting and remove trailing
3605 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
3606 trailing whitespace.
3608 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
3609 gfc_constant_result, gfc_range_check, gfc_arith_power,
3610 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
3611 gfc_real2complex, gfc_complex2int, gfc_complex2real,
3612 gfc_complex2complex): Fix whitespace issues.
3613 * check.c (must_be, type_check, numeric_check, int_or_real_check,
3614 logical_array_check, array_check, scalar_check, nonoptional_check,
3615 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
3616 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
3617 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
3618 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
3619 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
3620 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
3621 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
3622 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
3623 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
3624 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
3625 gfc_check_lbound, gfc_check_logical, min_max_args,
3626 gfc_check_min_max_integer, gfc_check_min_max_real,
3627 gfc_check_min_max_double, gfc_check_matmul,
3628 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
3629 gfc_check_pack, gfc_check_precision, gfc_check_radix,
3630 gfc_check_range, gfc_check_real, gfc_check_repeat,
3631 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
3632 gfc_check_set_exponent): Fix formatting issues.
3633 (gfc_check_size, gfc_check_sign): Alphabetize function order,
3634 remove whitespace-only line.
3635 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
3636 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
3637 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
3638 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
3639 gfc_check_random_number, gfc_check_random_seed,
3640 gfc_check_second_sub, gfc_check_system_clock,
3641 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
3642 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
3643 gfc_check_unlink_sub): Fix formatting issues.
3645 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3647 * gfortran.h: Remove outdated comment. Don't include stdio.h
3650 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3652 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
3653 output of 'gfortran --version'.
3655 2005-01-03 Steven G. Kargl <kargls@comcast.net>
3657 * arith.c: Add system.h; remove string.h
3663 * check.c: Remove stdlib.h and stdarg.h
3664 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
3665 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
3666 * f95-lang.c: Add system.h; remove stdio.h
3667 * interface.c: Add system.h; remove stdlib.h and string.h
3668 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
3669 * io.c: Remove string.h
3671 * match.c: Remove stdarg.h and string.h
3672 * misc.c: Update copyright; add system.h; remove stdlib.h,
3673 string.h, and sys/stat.h
3674 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
3675 unistd.h, and time.h
3676 * option.c: Remove string.h and stdlib.h
3678 * scanner.c: Update copyright; add system.h; remove stdlib.h,
3679 stdio.h, string.h, and strings.h
3680 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
3681 * trans-array.c: Remove stdio.h and gmp.h
3682 * trans-const.c: Ditto
3683 * trans-expr.c: Ditto
3685 * trans-stmt.c: Ditto
3687 * trans-intrinsic.c: Remove stdio.h and string.h
3689 2004-12-29 Steven G. Kargl <kargls@comcast.net>
3691 * gfortran.h (gfc_case): fix typo in comment.
3693 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3695 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
3696 logical shift. Call fold. Remove 0-bit shift shortcut.
3697 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
3698 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
3699 result if width(arg 1) < 4 bytes. Call fold.
3702 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
3703 in front of function to match the standard. Correct handling
3706 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
3708 * trans-expr.c (gfc_conv_cst_int_power): Only check for
3709 flag_unsafe_math_optimizations if we have a float type.
3711 2004-12-23 Steven G. Kargl <kargls@comcast.net>
3713 * gfortran.texi: Fix typo.
3715 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3717 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
3720 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3723 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
3724 (gfc_match_nullify): Make sure that ')' is in front of the end of
3727 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
3730 2004-12-14 Richard Henderson <rth@redhat.com>
3732 * gfortran.h (gfc_expr.function.name): Make const.
3733 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3734 (gfc_get_string): Update prototype.
3735 * iresolve.c: Include tree.h.
3736 (string_node, HASH_SIZE, string_head, hash): Remove.
3737 (gfc_get_string): Use vsnprintf, get_identifier.
3738 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3739 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
3740 (gfc_done_1): Don't call gfc_iresolve_done_1.
3741 * module.c (mio_allocated_string): Take and return const char *,
3742 instead of modifying char**.
3743 (mio_expr): Update to match.
3744 * resolve.c (pure_function): Constify name argument.
3745 (resolve_function): Constify name.
3746 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
3748 2004-12-12 Richard Henderson <rth@redhat.com>
3750 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3751 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
3752 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
3753 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
3754 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
3755 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
3756 gfc_resolve_unpack: Use PREFIX.
3758 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3761 * match.c (gfc_match_common): Skip whitespace.
3763 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3766 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
3767 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
3768 integer kind check; Issue error for -std=f95 when needed.
3769 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
3771 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
3772 Promote arguments to same kind.
3774 2004-12-12 Steven G. Kargl <kargls@comcast.net>
3775 Paul Brook <paul@codesourcery.com>
3778 * resolve.c (gfc_resolve_iterator_expr): New function.
3779 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
3780 start, end and stride to correct type.
3781 (resolve_code): Pass extra argument.
3782 * array.c (resolve_array_list): Pass extra argument.
3783 * gfortran.h (gfc_resolve): Add prototype.
3784 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
3785 Handle real type iterators.
3787 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3790 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
3791 same kind as C's 'int'.
3792 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
3794 2004-12-08 Richard Henderson <rth@redhat.com>
3796 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
3797 to the output expression.
3798 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
3800 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
3803 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3806 * resolve.c (resolve_code): Impose correct restrictions on
3809 * decl.c (gfc_match_end): Use locus of END when eos is an error.
3811 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3812 Paul Brook <paul@codesourcery.com>
3814 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
3815 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
3816 (gfc_check_stat, gfc_check_stat_sub): New functions.
3817 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
3818 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
3819 fstat, and stat to intrinsics symbol tables.
3820 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
3821 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
3822 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
3823 (gfc_resolve_stat, gfc_resolve_flush): New functions.
3824 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
3825 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
3827 2004-12-02 Steven G. Kargl <kargls@comcast.net>
3829 * intrinsic.c: Fix and add comments, fix function declarations
3830 (OPTIONAL,REQUIRED): New symbols
3831 (add_functions,add_subroutines): Use symbols
3832 (gmp.h): Remove unused include
3834 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3836 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
3839 2004-11-24 Steven Bosscher <stevenb@suse.de>
3841 * options.c (gfc_post_options): Don't clear flag_inline_functions.
3843 2004-11-20 Steven G. Kargl <kargls@comcast.net>
3845 * check.c (gfc_check_getcwd_sub): Fix seg fault.
3847 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
3848 gfc_check_unlink,gfc_check_unlink_sub): New functions
3849 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
3850 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
3851 exit to intrinsics symbol tables.
3852 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
3853 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
3854 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
3855 gfc_resolve_unlink_sub): Add and sort prototypes.
3856 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
3857 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
3858 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
3860 2004-11-16 Paul Brook <paul@codesourcery.com>
3863 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
3864 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
3865 * trans-types.c (gfc_get_dtype): Accept array type rather than element
3867 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
3868 (gfc_get_array_type_bounds): Ditto.
3869 (gfc_get_derived_type): Recurse into derived type pointers.
3870 * trans-types.h (gfc_get_dtype): Add prototype.
3871 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
3873 2004-11-15 Paul Brook <paul@codesourcery.com>
3875 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
3877 2004-11-10 Paul Brook <paul@codesourcery.com>
3880 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
3881 * trans-io.c (transfer_array_component): Ditto.
3883 2004-11-10 Paul Brook <paul@codesourcery.com>
3885 * invoke.texi: Fix typo.
3887 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3889 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3890 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3891 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3892 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3893 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3895 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3898 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3900 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3902 * gfortranspec.c: Replace GNU CC with GCC.
3904 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3906 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3908 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3911 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3914 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3917 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3918 module procedures as if they were module variables.
3920 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3925 * module.c (write_symbol1): Set module_name for dummy arguments.
3927 2004-11-02 Paul Brook <paul@codesourcery.com>
3929 * intrinsic.c (check_intrinsic_standard): Include error locus.
3931 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3932 locus to check_intrinsic_standard.
3934 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3937 * gfortran.h: Change GFC_STD_* flags to more appropriate
3938 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3939 gfc_option_t): Add field for warning about use of nonstandard
3941 * intrinsic.c (add_sym): Add parameter for standard version, check
3942 this against current standard.
3943 (add_sym_0): Pass standard parameter to add_sym.
3944 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3945 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3946 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3947 (make_generic): Add parameter for standard, check this
3948 against currently selected standard.
3949 (add_functions, add_subroutines): Add parameter to tell which
3950 standard an intrinsic belongs to.
3951 (check_intrinsic_standard): New function.
3952 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3953 (gfc_intrinsic_sub_interface): Ditto.
3954 * lang.opt: Add Wnonstd-intrinsics option.
3955 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3957 (set_Wall): Add warning about nonstd intrinsics.
3958 (gfc_handle_option): Change to use new GFC_STD_* flags,
3960 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3962 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3964 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3966 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3968 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3970 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3972 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3975 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3977 * check.c (gfc_check_rand): Allow missing optional argument.
3978 (gfc_check_irand): Ditto.
3979 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3981 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3983 PR fortran/13490, PR fortran/17912
3984 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3985 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
3986 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
3987 warning when compiling with pedantic.
3988 * gcc/fortran/arith.c: Set minimum integer values to reflect
3989 realities of two's complement signed integers. Added
3992 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3994 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3995 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3998 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4000 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
4002 (gfc_generate_function_code): Fix formatting issue.
4004 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4006 * module.c: Fix formatting issues.
4008 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4010 * module.c (mio_interface_rest): Set where member of interface
4013 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
4016 * options.c (gfc_handle_option): Add break after handing the
4019 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
4021 * arith.c: Fix formatting issues.
4023 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4026 * resolve.c (resolve_operator): Use correct operator name in message.
4028 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4030 * primary.c (match_boz_constant): Allow kind parameter suffixes.
4031 Move standard warning further to the front.
4033 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
4035 * trans-stmt.c: Fix a comment typo.
4037 2004-10-07 Paul Brook <paul@codesourcery.com>
4040 * trans-array.c (gfc_trans_deferred_array): Leave use associated
4043 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4046 * simplify.c (twos_complement): New function.
4047 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
4049 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
4051 2004-10-06 Paul Brook <paul@codesourcery.com>
4053 * trans-stmt.c (gfc_trans_simple_do): New function.
4054 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
4055 loop. Update comments.
4057 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4060 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
4064 * intrinsic.c (add_sym_5): Remove.
4065 (add_subroutines): Add resolution function for MVBITS.
4066 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
4068 * iresolve.c (gfc_resolve_mvbits): New function.
4069 (gfc_resolve_random_number): Remove empty line at end of function.
4071 * trans-const.c (gfc_build_cstring_const): New function.
4072 (gfc_init_cst): Use new function.
4073 * trans-const.h (gfc_build_cstring_const): Add prototype.
4074 * trans-io.c (set_string, set_error_locus): Use new function.
4075 * trans-stmt.c (gfc_trans_goto): Use new function.
4078 * parse.c (accept_statement): Don't treat END DO like END IF and
4080 (parse_do_block): Generate possible END DO label inside END DO
4084 * check.c (gfc_check_system_sub): New function.
4085 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
4086 * intrinsic.c (add_functions): Add 'system'.
4087 (add_subroutines): Add 'system'.
4088 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
4089 Move prototypes to other suborutines.
4090 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
4092 (gfc_resolve_system_clock): Fix formatting of prototype.
4093 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
4095 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
4098 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
4100 * scanner.c (preprocessor_line): Accept preprocessor lines without
4101 file names. Check file names for closing quotes. Handle escaped
4102 quotes in file names.
4104 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4105 Paul Brook <paul@codesourcery.com>
4107 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
4108 Use gfc_get_expr_charlen.
4109 * trans-expr.c (gfc_get_expr_charlen): New function.
4110 * trans.h (gfc_get_expr_charlen): Add prototype.
4112 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
4114 * trans-intrinsic.c: Fix a comment typo.
4116 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4118 * simplify.c (range_check): Remove blank line at beginning of function.
4119 (gfc_simplify_dint): Same at end of function.
4120 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
4121 (gfc_simplify_bound): Fix indentation.
4122 (gfc_simplify_log10): Simplify calculation.
4123 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
4125 (gfc_simplify_nearest): Same at end of function.
4126 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
4128 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
4129 gfc_simplify_spacing): Simplify calulations.
4131 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
4133 * trans-intrinsic.c: Fix comments on spacing and rrspacing
4134 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
4136 2004-10-01 Jan Hubicka <jh@suse.cz>
4138 * f95-lang.c (gfc_expand_function): Update call of
4139 tree_rest_of_compilation.
4140 * trans-decl.c (gfc_generate_constructors): Likewise.
4142 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4144 * trans-intrinsic.c: Comment fixes.
4146 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4148 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
4150 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4152 * trans-types.c (gfc_return_by_reference): Remove superfluous
4155 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
4156 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
4159 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
4160 function to determine return type.
4162 2004-09-20 Jan Hubicka <jh@suse.cz>
4164 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
4166 (gfc_generate_function_code): Likewise.
4168 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4171 * simplify.c (gfc_simplify_reshape): Set shape of return value
4174 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
4175 Zack Weinberg <zack@codesourcery.com>
4177 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
4178 enumeration constants.
4180 2004-09-17 Paul Brook <paul@codesourcery.com>
4182 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
4183 (gfc_linebuf_header_size): Define.
4184 * scanner.c (load_file): Use it.
4186 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
4188 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
4189 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
4190 resolve.c, scanner.c, trans-array.c, trans-array.h,
4191 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
4192 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
4193 trans.h: Fix comment typos. Follow spelling conventions.
4195 2004-09-16 Victor Leikehman <lei@il.ibm.com>
4198 * trans-io.c (transfer_array_component): New function.
4199 (transfer_expr): For array fields, call transfer_array_component.
4201 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
4203 * gfortran.texi: Fix a typo.
4205 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
4207 * parse.c (eof_buf): Rename eof to eof_buf.
4208 (unexpected_eof): Same.
4209 (gfc_parse_file): Same.
4211 2004-09-15 Steven G. Kargl <kargls@comcast.net>
4213 * check.c (gfc_check_getcwd_sub): New function.
4214 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
4215 * intrinsic.c (add_functions): Add function definition;
4217 * intrinsic.c (add_subroutines): Add subroutine definitions.
4218 * intrinsic.h: Add prototypes.
4219 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
4221 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
4223 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4226 * module.c (write_symbol): Don't fill in module name here.
4227 (write_symbol0): Fill in here instead.
4229 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
4231 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
4232 trans-array.c, trans-common.c, trans-expr.c,
4233 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
4234 comment typos. Follow spelling conventions.
4236 2004-09-09 Paul Brook <paul@codesourcery.com>
4238 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
4240 2004-09-08 Paul Brook <paul@codesourcery.com>
4242 * array.c: Don't include assert.h.
4243 * data.c: Don't include assert.h. Replace assert and abort with
4244 gcc_assert and gcc_unreachable.
4245 * dependency.c: Ditto.
4246 * f95-lang.c: Ditto.
4247 * iresolve.c: Ditto.
4249 * simplify.c: Ditto.
4251 * trans-array.c: Ditto.
4252 * trans-common.c: Ditto.
4253 * trans-const.c: Ditto.
4254 * trans-decl.c: Ditto.
4255 * trans-expr.c: Ditto.
4256 * trans-intrinsic.c: Ditto.
4257 * trans-io.c: Ditto.
4258 * trans-stmt.c: Ditto.
4259 * trans-types.c: Ditto.
4262 2004-09-07 Per Bothner <per@bothner.com>
4263 Paul Brook <paul@codesourcery.com>
4265 * error.c (show_locus): Handle mapped locations.
4266 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
4267 * gfortran.h: Include input.h.
4268 (struct gfc_linebuf): Use source_location.
4269 * scanner.c (get_file): Initialize linemap.
4270 (preprocessor_line): Pass extra argument to get_file.
4271 (load_file): Ditto. Setup linemap.
4272 (gfc_new_file): Handle mapped locations.
4273 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
4274 Set decl source locations.
4275 (gfc_trans_common): Set blank common block location.
4276 * trans-decl.c (gfc_set_decl_location): New function.
4277 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
4278 (trans_function_start): Move call to gfc_set_backend_locus..
4279 (build_function_decl): ... to here.
4280 (build_entry_thunks): Set and restore the backend locus.
4281 (gfc_generate_constructors): Remove excess arguments to
4282 init_function_start.
4283 (gfc_generate_block_data): Add comments. Set the decl locus.
4284 * trans-io.c (set_error_locus): Handle mapped locations.
4285 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
4286 (gfc_trans_code): Use SET_EXPR_LOCATION.
4287 (gfc_generate_code): Override the location of the new symbol.
4288 * trans.h (gfc_set_decl_location): Add prototype.
4290 2004-08-31 Paul Brook <paul@codesourcery.com>
4292 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
4294 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4297 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
4300 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4305 * resolve.c (resolve_transfer): New function.
4306 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
4308 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4311 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
4314 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4316 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
4318 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4321 * trans-types.c (gfc_return_by_reference): Remove TODO error,
4322 add comment pointing out possible issue WRT compatibility with g77.
4324 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4326 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
4327 all occurences of 'gfc_strlen_type_node' by
4328 'gfc_charlen_type_node'.
4329 * trans-types.h: Same. Also update comment accordingly.
4331 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4333 * primary.c: Update copyright boilerplate to say GCC.
4334 * f95-lang.c: Change initial comment to say gfortran.
4336 2004-08-31 Paul Brook <paul@codesourcery.com>
4338 * trans-types.h: Add comments.
4339 (intmax_type_node, string_type_node, const_string_type_node): Remove.
4341 2004-08-30 Richard Henderson <rth@redhat.com>
4343 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
4344 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
4345 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
4346 c_long, c_long_long.
4347 (gfc_logical_info): Add c_bool.
4348 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
4349 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
4350 rather than gfc_int[48]_type_node for allocate choice.
4351 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
4352 local copies of some kind type nodes.
4353 (gfc_build_builtin_function_decls): Likewise.
4354 * trans-expr.c (gfc_conv_power_op): Likewise.
4355 * trans-intrinsic.c (gfc_conv_intrinsic_index,
4356 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
4357 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
4358 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
4359 gfc_trans_character_select, gfc_trans_allocate): Likewise.
4360 * trans-io.c (gfc_pint4_type_node): Move into ...
4361 (gfc_build_io_library_fndecls): ... here. Cache local copies of
4362 some kind type nodes.
4363 * trans-types.c (gfc_type_nodes): Remove.
4364 (gfc_character1_type_node, gfc_strlen_type_node): New.
4365 (gfc_integer_types, gfc_logical_types): New.
4366 (gfc_real_types, gfc_complex_types): New.
4367 (gfc_init_kinds): Fill in real mode_precision.
4368 (gfc_build_int_type, gfc_build_real_type): New.
4369 (gfc_build_complex_type, gfc_build_logical_type): New.
4370 (c_size_t_size): New.
4371 (gfc_init_types): Loop over kinds.
4372 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
4373 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
4374 (gfc_get_character_type_len): Likewise.
4375 (gfc_type_for_size): Loop over kinds; use a reduced set of
4376 unsigned type nodes.
4377 (gfc_type_for_mode): Loop over kinds.
4378 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
4379 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
4380 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
4381 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
4382 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
4383 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
4384 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
4385 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
4386 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
4387 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
4388 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
4389 gfc_complex8_type_node, gfc_complex16_type_node,
4390 gfc_logical1_type_node, gfc_logical2_type_node,
4391 gfc_logical4_type_node, gfc_logical8_type_node,
4392 gfc_logical16_type_node, gfc_strlen_kind): Remove.
4393 (gfc_character1_type_node): Turn in to a variable.
4394 (gfc_strlen_type_node): Likewise.
4396 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4398 * gfortran.h (gfc_namespace): Add new field is_block_data.
4399 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
4400 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
4401 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
4402 * trans.h (gfc_generate_block_data): Add prototype.
4403 * trans-decl.c (gfc_generate_block_data): New function.
4405 2004-08-29 Richard Henderson <rth@redhat.com>
4407 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
4408 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
4409 than two HOST_WIDE_INT.
4411 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4414 * decl.c (free_variable, free_value, gfc_free_data, var_list,
4415 var_element, top_var_list, match_data_constant, top_val_list,
4416 gfc_match_data): Move here from match.c.
4417 (match_old_style_init): New function.
4418 (variable_decl): Match old-style initialization.
4419 * expr.c (gfc_get_variable_expr): New function.
4420 * gfortran.h (gfc_get_variable_expr): Add prototype.
4421 * gfortran.texi: Start documentation for supported extensions.
4422 * match.c: Remove the functions moved to decl.c.
4423 * match.h (gfc_match_data): Move prototype to under decl.c.
4424 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
4427 2004-08-29 Steven G. Kargl <kargls@comcast.net>
4428 Paul Brook <paul@codesourcery.com>
4430 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
4431 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
4432 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
4433 (build_builtin_fntypes): New function.
4434 (gfc_init_builtin_functions): Use it.
4435 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
4436 and GFC_ISYM_ERF{,C}.
4437 (gfc_c_int_kind): Declare.
4438 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
4439 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
4440 gfc_resolve_g77_math1): Add prototypes.
4441 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
4442 * mathbuiltins.def: Add comment. Change third argument. Use
4443 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
4444 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
4445 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
4446 * trans-types.c (gfc_c_int_kind): Declare.
4447 (gfc_init_kinds): Set it.
4449 2004-08-29 Steven G. Kargl <kargls@comcast.net>
4450 Paul Brook <paul@codesourcery.com>
4452 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
4453 (gfc_check_f, gfc_simplify_f): Add f0.
4454 * intrinsic.c (do_check): Call f0. Flatten.
4455 (add_sym_0): Fix prototype. Set f0.
4456 (add_functions): Add getgid, getgid and getuid.
4457 (resolve_intrinsic): Remove obsolete comment.
4458 (do_simplify): Call f0.
4459 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
4460 gfc_resolve_getuid): Add prototypes.
4461 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
4462 gfc_resolve_getuid): New functions.
4463 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
4466 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4468 * error.c (gfc_error_init_1): Remove blank line in front of
4469 function body. Add missing blank.
4470 (gfc_buffer_error, error_char, error_string): Remove blank line in
4471 front of function body.
4472 (show_locus): Add comma in comment.
4473 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
4474 gfc_push_error, gfc_pop_error): Remove blank line in front of
4476 (gfc_get_errors): Typo fix in comment in front of function. Remove
4477 blank line in front of function body.
4479 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4481 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
4482 variable declaration of same name.
4483 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
4484 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
4485 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
4486 Replace all calls to gfc_default_*_kind with variable accesses.
4487 * trans-types.c: Same as above.
4488 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
4489 static qualifier. Replace all occurences.
4490 (gfc_default_*_kind): Remove functions.
4492 2004-08-26 Richard Henderson <rth@redhat.com>
4494 * arith.c: Include system.h, not real system headers.
4495 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
4496 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
4497 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
4498 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
4499 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
4500 gfc_index_integer_kind, gfc_default_integer_kind,
4501 gfc_default_real_kind,gfc_default_double_kind,
4502 gfc_default_character_kind, gfc_default_logical_kind,
4503 gfc_default_complex_kind, validate_integer, validate_real,
4504 validate_logical, validate_character,
4505 gfc_validate_kind): Move to trans-types.c.
4506 (gfc_set_model_kind): Use gfc_validate_kind.
4507 (gfc_set_model): Just copy the current precision to default.
4508 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
4509 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
4510 * gfortran.h: Update file commentary.
4511 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
4512 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
4513 gfc_default_double_kind_1, gfc_default_character_kind_1,
4514 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
4515 (gfc_init_kinds): New.
4516 (gfc_init_types): Don't set gfc_index_integer_kind here.
4517 * trans-types.h (gfc_init_kinds): Declare.
4518 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
4520 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4522 * check.c (gfc_check_atan2): New function.
4523 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
4524 * intrinsic.h (gfc_check_atan2): Add prototype.
4526 2004-08-25 Richard Henderson <rth@redhat.com>
4528 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
4529 false and we don't validate the kind.
4530 (gfc_check_integer_range, gfc_check_real_range): Update to match.
4531 * check.c (kind_check): Likewise.
4532 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
4533 (match_char_spec, match_logical_spec): Likewise.
4534 * gfortran.h (gfc_validate_kind): Likewise.
4535 * options.c (gfc_handle_option): Likewise.
4536 * primary.c (match_integer_constant, match_real_constant,
4537 match_string_constant, match_logical_constant,
4538 match_const_complex_part): Likewise.
4539 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
4540 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
4541 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
4542 gfc_simplify_maxexponent, gfc_simplify_minexponent,
4543 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
4544 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
4545 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
4546 gfc_simplify_tiny): Likewise.
4547 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
4548 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
4549 prepare_arg_info): Likewise.
4551 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4553 * expr.c (gfc_check_assign): Add comment. Add new warning.
4554 * trans-expr.c (gfc_conv_function_call): Correctly dereference
4555 result of pointer valued function when not in pointer assignment.
4557 2004-08-25 Paul Brook <paul@codesourcery.com>
4559 * config-lang.in: Remove dead commented line.
4560 * module.c: Replace g95 with gfortran in comment.
4562 2004-08-25 Paul Brook <paul@codesourcery.com>
4565 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
4567 2004-08-25 Paul Brook <paul@codesourcery.com>
4570 * trans-array.c (gfc_trans_allocate_temp_array): Remove
4571 string_length argument.
4572 (gfc_trans_array_ctor_element): New function.
4573 (gfc_trans_array_constructor_subarray): Use it.
4574 (gfc_trans_array_constructor_value): Ditto. Handle constant
4576 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
4577 (gfc_trans_array_constructor): Use them.
4578 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
4579 (gfc_conv_ss_descriptor): Remember section string length.
4580 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
4581 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
4582 (gfc_conv_expr_descriptor): Ditto.
4583 (gfc_conv_loop_setup): Ditto. Spelling fixes.
4584 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
4585 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
4586 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
4587 (gfc_conv_variable): Set string_length from section.
4588 (gfc_conv_function_call): Remove extra argument.
4589 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
4590 * trans-types.c (gfc_get_character_type_len): New function.
4591 (gfc_get_character_type): Use it.
4592 (gfc_get_dtype): Return zero for internal types.
4593 * trans-types.h (gfc_get_character_type_len): Add prototype.
4594 * trans.h (struct gfc_ss): Move string_length out of union.
4596 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4598 * trans.h (build2_v, build3_v): New macros.
4600 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
4602 * trans-array.c (gfc_conv_descriptor_data,
4603 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
4604 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
4605 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
4606 gfc_trans_allocate_temp_array,
4607 gfc_trans_array_constructor_subarray,
4608 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
4609 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
4610 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
4611 gfc_conv_array_ref, gfc_trans_preloop_setup,
4612 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
4613 gfc_conv_loop_setup, gfc_array_init_size,
4614 gfc_conv_array_initializer, gfc_trans_array_bounds,
4615 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
4616 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
4617 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
4618 of build and build_v as appropriate.
4619 * trans-common.c (create_common): Same.
4620 * trans-decl.c (gfc_trans_auto_character_variable,
4621 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
4622 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4623 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
4624 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
4625 gfc_conv_expr_op, gfc_conv_function_call,
4626 gfc_trans_structure_assign): Same.
4627 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
4628 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
4629 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
4630 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
4631 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
4632 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4633 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
4634 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
4635 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
4636 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
4637 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
4638 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
4639 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
4640 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
4641 gfc_conv_intrinsic_iargc): Same.
4642 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
4643 set_flag, add_case, io_result, transfer_namelist_element,
4644 transfer_expr): Same.
4645 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
4646 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
4647 gfc_trans_integer_select, gfc_trans_logical_select,
4648 gfc_trans_character_select, gfc_trans_forall_loop,
4649 gfc_trans_nested_forall_loop, gfc_do_allocate,
4650 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4651 compute_inner_temp_size, compute_overall_iter_number,
4652 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
4653 gfc_trans_forall_1, gfc_evaluate_where_mask,
4654 gfc_trans_where_assign, gfc_trans_allocate): Same.
4655 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
4656 * trans.c (gfc_add_modify_expr, gfc_finish_block,
4657 gfc_build_array_ref, gfc_build_function_call,
4658 gfc_trans_runtime_check): Same.
4660 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4662 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
4663 build_int_cst to build_int_cst_wide in accordance to Nathan's
4666 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4668 * trans-array.c (gfc_trans_array_constructor_value): Adjust
4669 build_int_cst calls.
4670 * trans-const.c (gfc_build_string_const, gfc_init_constants,
4671 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
4672 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
4673 gfc_trans_entry_master_switch): Likewise.
4674 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4675 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4676 * trans-io.c (add_case, set_error_locus,
4677 transfer_namelist_element, transfer_expr): Likewise.
4678 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4679 gfc_trans_stop, gfc_trans_character_select): Likewise.
4680 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4681 * trans.c (gfc_trans_runtime_check): Likewise.
4683 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4685 * trans-decl.c, trans-types.c: Add and remove blank lines as
4688 2004-08-24 Richard Henderson <rth@redhat.com>
4690 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
4692 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4694 * resolve.c (merge_argument_lists): Revert unintentionally
4697 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4699 * trans-decl.c (build_function_decl): Fix spelling in comment.
4700 (build_entry_thunks): Remove code with no function.
4701 (gfc_build_intrinsic_function_decls): Remove empty line.
4703 * resolve.c (resolve_entries): Fix a bunch of comment typos.
4705 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4707 * f95-lang.c (gfc_init_decl_processing): Adjust
4708 build_common_tree_nodes call.
4710 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4712 * trans-types.c: Spelling and formatting fixes.
4714 2004-08-23 Richard Henderson <rth@redhat.com>
4716 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
4717 of going through an intermediate string. Fix 32/64 int/long bug.
4719 2004-08-23 Eric Christopher <echristo@redhat.com>
4721 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
4722 usage. Use build_vector_type_for_mode for vector types.
4724 2004-08-22 Richard Henderson <rth@redhat.com>
4727 * data.c (find_con_by_offset): Search ordered list; handle
4728 elements with repeat counts.
4729 (gfc_assign_data_value_range): New.
4730 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
4731 (gfc_assign_data_value_range): Declare.
4732 * match.c (top_val_list): Extract repeat count into a temporary.
4733 * resolve.c (values): Make left unsigned.
4734 (next_data_value): Don't decrement left.
4735 (check_data_variable): Use gfc_assign_data_value_range.
4737 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4739 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
4741 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4743 * check.c (gfc_check_reduction): Rename to ...
4744 (check_reduction): ... this. Make static. Don't check type of
4746 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
4747 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
4748 SUM to use new check functions.
4749 (check_specific): Change logic to call new functions.
4750 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
4752 (gfc_check_reduction): Remove prototype.
4754 2004-08-20 Paul Brook <paul@codesourcery.com>
4755 Canqun Yang <canqun@nudt.edu.cn>
4758 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
4759 for automatic arrays.
4760 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
4762 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4766 * match.c (match_simple_forall, match_simple_where): Forward-declare.
4767 (gfc_match_if): Order statement list alphabetically, add WHERE and
4768 FORALL, remove double PAUSE.
4769 (gfc_match_simple_where, match_forall_header,
4770 gfc_match_simple_forall): New functions.
4771 (gfc_match_forall): Use match_forall_header.
4773 2004-08-19 Paul Brook <paul@codesourcery.com>
4776 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
4777 * symbol.c (gfc_clear_attr): Use memset.
4779 2004-08-19 Paul Brook <paul@codesourcery.com>
4783 * data.c (assign_substring_data_value): Remove.
4784 (create_character_intializer): New function.
4785 (gfc_assign_data_value): Track the typespec for the current
4786 subobject. Use create_character_intializer.
4788 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
4791 * check.c (gfc_check_reduction): New function.
4792 (gfc_check_minval_maxval): Removed.
4793 (gfc_check_product): Removed.
4794 (gfc_check_sum): Removed.
4795 * intrinsic.h: Add/remove declarations for these.
4796 * gfortran.h: Add field f3red to union gfc_check_f.
4797 * intrinsic.c (add_sym_3red): New function.
4798 (add_functions): Register maxval, minval, product, and sum intrinsics
4799 through add_sym_3red.
4800 (check_specific): Handle f3red union field.
4801 * iresolve.c: Whitespace change.
4803 2004-08-18 Paul Brook <paul@codesourcery.com>
4805 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
4807 2004-08-18 Victor Leikehman <lei@il.ibm.com>
4810 * trans-io.c (transfer_namelist_element): New. Recursively handle
4811 derived-type variables. Pass string lengths.
4812 (build_dt): Code moved to build_namelist, with some
4813 changes and additions.
4814 (gfc_build_io_library_fndecls): Declare the fifth
4815 argument in st_set_nml_var_char -- string_length.
4817 2004-08-17 Paul Brook <paul@codesourcery.com>
4818 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4821 * decl.c (get_proc_name): Update mystery comment.
4822 (gfc_match_entry): Check for errors earlier. Add entry point to list.
4823 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
4824 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
4825 (struct gfc_entry_list): Define.
4826 (gfc_get_entry_list): Define.
4827 (struct gfc_namespace): Add refs and entries.
4828 (enum gfc_exec_op): Add EXEC_ENTRY.
4829 (struct gfc_code): Add ext.entry.
4830 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
4831 (mio_symbol_attribute): Don't save/reture addr->entry.
4832 (mio_namespace_ref): Refcount namespaces.
4833 * parse.c (accept_statement): Handle ST_ENTRY.
4834 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
4835 (parse_contained): Fixup sibling references to entry points
4836 after parsing the procedure body.
4837 * resolve.c (resolve_contained_fntype): New function.
4838 (merge_argument_lists, resolve_entries): New functions.
4839 (resolve_contained_functions): Use them.
4840 (resolve_code): Handle EXEC_ENTRY.
4841 (gfc_resolve): Call resolve_entries.
4842 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
4843 * symbol.c (gfc_get_namespace): Refcount namespaces.
4844 (gfc_free_namespace): Ditto.
4845 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
4846 optional when multiple entry points are present.
4847 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
4848 (gfc_get_extern_function_decl): Add assertion. Fix coment.
4849 (create_function_arglist, trans_function_start, build_entry_thunks):
4851 (gfc_build_function_decl): Rename ...
4852 (build_function_decl): ... to this.
4853 (gfc_create_function_decl): New function.
4854 (gfc_generate_contained_functions): Use it.
4855 (gfc_trans_entry_master_switch): New function.
4856 (gfc_generate_function_code): Use new functions.
4857 * trans-stmt.c (gfc_trans_entry): New function.
4858 * trans-stmt.h (gfc_trans_entry): Add prototype.
4859 * trans-types.c (gfc_get_function_type): Add entry point argument.
4860 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
4861 (gfc_generate_module_code): Call gfc_create_function_decl.
4862 * trans.h (gfc_build_function_decl): Remove.
4863 (gfc_create_function_decl): Add prototype.
4865 2004-08-15 Andrew Pinski <apinski@apple.com>
4868 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
4869 for cabs{,f} and copysign{,f}.
4870 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
4871 (gfor_fndecl_math_cabs): Delete.
4872 (gfor_fndecl_math_sign4): Delete.
4873 (gfor_fndecl_math_sign8): Delete.
4874 (gfc_build_intrinsic_function_decls): Remove the
4875 initializing of cabs{,f} and copysign{,f} functions.
4876 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
4877 instead of the functions definitions.
4878 (gfc_conv_intrinsic_sign): Likewise.
4879 * trans.h (gfor_fndecl_math_cabsf): Delete.
4880 (gfor_fndecl_math_cabs): Delete.
4881 (gfor_fndecl_math_sign4): Delete.
4882 (gfor_fndecl_math_sign8): Delete.
4884 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4886 * trans-array.c (gfc_trans_array_constructor_value): Use
4888 * trans-const.c (gfc_build_string_const,
4889 gfc_init_constants, gfc_conv_mpz_to_tree,
4890 gfc_conv_constant_to_tree): Likewise.
4891 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4892 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4893 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4894 * trans-io.c (add_case, set_error_locus, build_dt,
4895 transfer_expr): Likewise.
4896 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4897 gfc_trans_stop, gfc_trans_character_select): Likewise.
4898 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4899 * trans.c (gfc_trans_runtime_check): Likewise.
4901 2004-08-14 Paul Brook <paul@codesourcery.com>
4903 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4905 2004-08-14 Paul Brook <paul@codesourcery.com>
4907 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4909 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4911 * gfortran.h: Add comments.
4912 * parse.c (parse_contained): Fix comment typo.
4913 * resolve.c (was_declared): Ditto.
4916 2004-08-11 Paul Brook <paul@codeourcery.com>
4919 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4921 2004-08-10 Richard Henderson <rth@redhat.com>
4923 * f95-lang.c (gfc_init_builtin_functions): Remove
4924 __builtin_stack_alloc, add __builtin_alloca.
4925 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4926 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4928 2004-08-10 Paul Brook <paul@codesourcery.com>
4930 * trans-io.c (transfer_expr): Handle pointters.
4932 2004-08-10 Paul Brook <paul@codesourcery.com>
4935 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4936 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4937 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4938 Handle GFC_SS_COMPONENT.
4939 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4940 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4942 (gfc_conv_array_initializer): Call specific initializer routines.
4943 * trans-expr.c (gfc_trans_structure_assign): New function.
4944 (gfc_trans_subarray_assign): New function.
4945 (gfc_trans_subcomponent_assign): New fucntion
4946 (gfc_conv_structure): Use them.
4947 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4948 (gfc_ss): Add shape.
4950 2004-08-08 Victor Leikehman <lei@il.ibm.com>
4952 * simplify.c (gfc_simplify_shape): Bugfix.
4953 * expr.c (gfc_copy_shape_excluding): New function.
4954 * gfortran.h (gfc_get_shape): Bugfix.
4955 (gfc_copy_shape_excluding): Added declaration.
4956 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4957 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4958 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4959 time resolution of shape.
4961 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4963 * intrinsic.c (add_subroutines): Add getenv and
4964 get_environment_variable. (add_sym_5s): New function.
4965 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4967 * iresolve.c (gfc_resolve_get_environment_variable): New
4970 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4972 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4973 __builtin_pow[f] arguments.
4975 2004-08-06 Steven G. Kargl <kargls@comcast.net>
4977 * arith.c: Add #define for model numbers. Remove global GMP variables.
4978 (natural_logarithm,common_logarithm,exponential,sine,
4979 cosine,arctangent,hypercos,hypersine ): Remove.
4980 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4981 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4982 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4983 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4984 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4985 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4986 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4987 gfc_real2int,gfc_real2real,gfc_real2complex,
4988 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4989 to MPFR, use new functions.
4990 * arith.h: Remove extern global variables.
4991 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4992 arctangent,hypercos,hypersine): Remove prototypes.
4993 (arctangent2): Update prototype from GMP to MPFR.
4994 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4995 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4996 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4997 * gfortran.h (GFC_REAL_BITS): Remove.
4998 (arith): Add ARITH_NAN.
4999 Include mpfr.h. Define GFC_RND_MODE.
5000 Rename GCC_GFORTRAN_H GFC_GFC_H.
5001 (gfc_expr): Convert GMP to MPFR.
5002 * module.c: Add arith.h, correct type in comment.
5003 (mio_gmp_real): Convert GMP to MPFR.
5004 (mio_expr): Use gfc_set_model_kind().
5005 * primary.c: Update copyright date with 2004.
5006 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
5007 * simplify.c: Remove global GMP variables
5008 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
5009 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
5010 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
5011 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
5012 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
5013 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
5014 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
5015 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
5016 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
5017 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
5018 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
5019 gfc_simplify_rrspacing,gfc_simplify_scale,
5020 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
5021 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
5022 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
5023 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
5025 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
5026 gfc_conv_mpf_to_tree. Convert it to use MPFR
5027 (gfc_conv_constant_to_tree): Use it.
5028 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
5029 * trans-intrinsic.c: Add arith.h, remove gmp.h
5030 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
5032 2004-08-06 Victor Leikehman <lei@il.ibm.com>
5033 Paul Brook <paul@codesourcery.com>
5035 * trans-array.c (gfc_trans_allocate_array_storage,
5036 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
5037 gfc_conv_loop_setup): For functions, if the shape of the result
5038 is not known in compile-time, generate an empty array descriptor for
5039 the result and let the callee to allocate the memory.
5040 (gfc_trans_dummy_array_bias): Do nothing for pointers.
5041 (gfc_conv_expr_descriptor): Use function return values directly.
5042 * trans-expr.c (gfc_conv_function_call): Always add byref call
5044 (gfc_trans_pointer_assignment): Add comments.
5045 (gfc_trans_arrayfunc_assign): Don't chain on expression.
5047 2004-08-01 Roger Sayle <roger@eyesopen.com>
5049 * options.c (gfc_init_options): Don't warn about the use GNU
5050 extensions by default.
5051 (gfc_post_options): Warn about GNU extensions with -pedantic.
5052 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
5054 2004-07-30 Richard Henderson <rth@redhat.com>
5056 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
5059 2004-07-25 Richard Henderson <rth@redhat.com>
5061 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
5062 and DECL_IGNORED_P on RESULT_DECL.
5063 (gfc_generate_constructors): Likewise.
5065 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5068 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
5070 (ffixed-line-length-80, ffixed-line-length-132): Remove.
5071 * options.c (gfc_handle_options): Deal with changed options.
5072 * scanner.c (load_line): Change second arg to 'char **',
5073 allocate if pointing to NULL. Keep track of buffer's length.
5074 Adapt buffer size to overlong lines. Pad lines to full length
5076 (load_file): Adapt to new interface of load_line.
5078 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5080 * trans.h (builtin_function): Declare.
5082 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5085 (parts ported from g95)
5086 * parse.h (gfc_state_data): New field do_variable.
5087 (gfc_check_do_variable): Add prototype.
5088 * parse.c (push_state): Initialize field 'do_variable'.
5089 (gfc_check_do_variable): New function.
5090 (parse_do_block): Remember do iterator variable.
5091 (parse_file): Initialize field 'do_variable'.
5092 * match.c (gfc_match_assignment, gfc_match_do,
5093 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
5094 Add previously missing checks.
5095 (gfc_match_return): Reformat error message.
5096 * io.c (match_out_tag): New function.
5097 (match_open_element, match_close_element,
5098 match_file_element, match_dt_element): Call match_out_tag
5099 instead of match_vtag where appropriate.
5100 (match_io_iterator, match_io_element): Add missing check.
5101 (match_io): Reformat error message.
5102 (match_inquire_element): Call match_out_tag where appropriate.
5104 * parse.c (gfc_check_do_variable): Fix error locus.
5106 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5109 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
5110 for every assumed length character dummy argument.
5113 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
5116 * simplify.c (gfc_simplify_bound): Copy the bound expression.
5118 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5121 * trans-array.c gfc_trans_g77_array,
5122 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
5123 for assumed length characters.
5124 (gfc_conv_expr_descriptor): Set se->string_length if dealing
5125 with a character expression.
5126 (gfc_cvonv_array_parameter): Pass string length when passing
5127 character array according to g77 conventions.
5129 2004-07-12 Paul Brook <paul@codesourcery.com>
5131 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
5132 * trans-array.c (gfc_trans_auto_array_allocation): Remove
5133 initialization code.
5134 * trans-common.c (create_common): Use gfc_conv_initializer.
5135 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
5136 * trans-expr.c (gfc_conv_initializer): New function.
5137 (gfc_conv_structure): Use it.
5138 * trans.h (gfc_conv_initializer): Add prototype.
5140 2004-07-11 Paul Brook <paul@codesourcery.com>
5143 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
5145 (parse_contained): Mark contained symbols as referenced.
5147 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5150 * module.c (gfc_dump_module, gfc_use_module): Print locus
5151 when opening of module file fails.
5154 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
5157 * match.c (gfc_match_program): A program name is obligatory.
5158 (gfc_match_return): RETURN in main program is an extension.
5159 (gfc_match_block_data): A space is required before a block data
5163 * primary.c (match_boz_constant): Call gfc_notify_std only if
5164 we actually have a non-standard boz-literal-constant.
5167 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
5168 warning if assigning NULL().
5170 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5172 * f95-lang.c (set_block): Remove.
5173 (gfc_clear_binding_stack): New.
5174 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5175 (struct binding_level): Remove block_created_by_back_end.
5176 (clear_binding_level): Likewise.
5177 (poplevel): Don't handle block_created_by_back_end.
5179 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5181 * trans-decl.c (gfc_create_module_variable): Nothing to do if
5182 symbol is in common, because we ...
5183 (gfc_generate_module_vars): Call gfc_trans_common.
5185 2004-07-10 Paul Brook <paul@codesourcery.com>
5187 * trans-array.c (gfc_build_null_descriptor): New function.
5188 (gfc_trans_static_array_pointer): Use it.
5189 * trans-array.h (gfc_build_null_descriptor): Add prototype.
5190 * trans-expr.c (gfc_conv_structure): Handle array pointers.
5192 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5195 * decl.c (gfc_match_save): Use-associated common block
5197 * gfortran.h (gfc_common_head): Add new field 'name'.
5198 Fix typo in comment after #endif.
5199 * match.c (gfc_get_common): Add new argument from_common,
5200 mangle name if flag is set, fill in new field in structure
5202 (match_common): Set new arg in call to gfc_get_common,
5203 use-associated common block doesn't collide.
5204 * match.h (gfc_get_common): Adapt prototype.
5205 * module.c (load_commons): Set new arg in call to
5207 * symbol.c (free_common_tree): New function.
5208 (gfc_free_namespace): Call new function.
5209 * trans-common.c (several functions): Remove argument
5210 'name', use name from gfc_common_head instead.
5212 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5214 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
5215 and RHS match. Return early if the RHS is NULL().
5218 * match.c (match_common): Fix error reporting for used common.
5221 * trans-expr.c (gfc_conv_structure): Handle initialization
5222 of scalar pointer components.
5224 * parse.c (decode_statement): Fix matching of BLOCK DATA.
5226 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
5227 by fix for PR 15481.
5229 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5231 * trans-common.c: Fix whitespace issues, make variable names
5233 (create_common): Additionally, make loop logic more obvious.
5235 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5236 Paul Brook <paul@codesourcery.com>
5239 * trans-common.c (calculate_length): Remove ...
5240 (get_segment_info): Merge into here. Save field type.
5241 (build_field): Use saved type.
5242 (create_common, new_condition, new_segment, finish_equivalences):
5243 Use new get_segment_info.
5244 * trans-types.c: Update comment.
5246 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5249 * moduele.c (mio_symbol): Don't I/O initial values unless
5250 symbol is a parameter.
5252 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5255 * resolve.c (resolve_symbol): Verify that the shape of a
5256 parameter array is not only explicit, but also constant.
5257 * array.c (gfc_is_compile_time_shape): New function.
5258 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
5260 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5266 * module.c (write_symbol, write_symtree): Remove workaround.
5267 * primary.c (match_actual_arglist): Enhance comment.
5268 (gfc_match_rvalue): Handle function call with first argument
5269 a keyword argument correctly.
5270 * resolve.c (resolve_symbol): Change call to
5271 gfc_set_default_type to issue error if no implicit type
5273 * trans-decl.c (gfc_create_module_variable): Remove workaround.
5275 2004-07-08 Paul Brook <paul@codesourcery.com>
5277 * intrinsic.c (add_sym_4s): New function.
5278 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
5280 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
5281 Paul Brook <paul@codesourcery.com>
5285 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
5286 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
5287 * intrinsic.c (add_functions): Identify iargc. Add
5288 command_argument_count.
5289 (add_subroutines): Resolve getarg. Add get_command and
5290 get_command_argument.
5291 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
5292 gfc_resolve_get_command_argument): Add prototypes.
5293 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
5294 gfc_resolve_get_command_argument): New functions.
5295 * trans-decl.c (gfor_fndecl_iargc): New variable.
5296 (gfc_build_intrinsic_function_decls): Set it.
5297 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
5298 (gfc_conv_intrinsic_function): Use it.
5299 * trans.h (gfor_fndecl_iargc): Declare.
5301 2004-07-04 Matthias Klose <doko@debian.org>
5303 * Make-lang.in: Generate and install gfortran man page.
5304 * invoke.texi: Remove extra '@c man end'.
5306 2004-07-04 Richard Henderson <rth@redhat.com>
5308 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
5310 2004-07-04 Paul Brook <paul@codesourcery.com>
5312 * decl.c (gfc_match_implicit_range): Don't use typespec.
5313 (gfc_match_implicit): Handle character selectors.
5314 * gfortran.h (gfc_set_implicit): Remove prototype.
5315 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
5316 * parse.c (accept_statement): Don't call gfc_set_implicit.
5317 * symbol.c (new_ts): Remove.
5318 (gfc_set_implicit_none): Use same loop bounds as other functions.
5319 (gfc_set_implicit): Remove.
5320 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
5321 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
5323 2004-06-30 Richard Henderson <rth@redhat.com>
5325 * match.c (var_element): Remove unused variable.
5327 * trans-decl.c (gfc_generate_function_code): Don't set
5328 x_whole_function_mode_p.
5329 (gfc_generate_constructors): Likewise.
5331 2004-06-30 Richard Henderson <rth@redhat.com>
5333 * trans-decl.c (gfc_generate_function_code): Don't set
5334 immediate_size_expand.
5335 (gfc_generate_constructors): Likewise.
5337 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5340 * decl.c (gfc_match_type_spec): Rename second argument to
5341 'implicit_flag', reverse meaning. Don't match_char_spec if
5342 'implicit_flag' is set. Rename to ...
5343 (match_type_spec): ... this.
5344 (gfc_match_implicit_none, match_implicit_range): Move here
5346 (gfc_match_implicit): Move here from match.c, try to
5347 match_char_len if match_implicit_range doesn't succeed for
5348 CHARACTER implicits. Call renamed fucntion match_type_spec.
5349 (gfc_match_data_decl, match_prefix): Call renamed function
5351 * match.c (gfc_match_implicit_none, match_implicit_range,
5352 gfc_match_implicit): Move to decl.c.
5353 * match.h (gfc_match_implicit_none, gfc_match_implicit):
5354 Move protoypes to section 'decl.c'.
5355 (gfc_match_type_spec): Remove prototype.
5357 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5359 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
5362 2004-06-29 Steven Bosscher <stevenb@suse.de>
5364 Make sure types in assignments are compatible. Mostly mechanical.
5365 * trans-const.h (gfc_index_one_node): New define.
5366 * trans-array.c (gfc_trans_allocate_array_storage,
5367 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
5368 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
5369 gfc_conv_array_ubound, gfc_conv_array_ref,
5370 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
5371 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
5372 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
5373 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
5374 types in assignments, conversions and conditionals for expressions.
5375 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
5376 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
5377 gfc_conv_function_call, gfc_trans_pointer_assignment,
5378 gfc_trans_scalar_assign): Likewise.
5379 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
5380 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
5381 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
5382 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
5383 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
5384 gfc_conv_allocated, gfc_conv_associated,
5385 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
5386 * trans-io.c (set_string): Likewise.
5387 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
5388 gfc_do_allocate, generate_loop_for_temp_to_lhs,
5389 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
5390 compute_overall_iter_number, gfc_trans_assign_need_temp,
5391 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
5392 gfc_evaluate_where_mask, gfc_trans_where_assign,
5393 gfc_trans_where_2): Likewise.
5394 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
5395 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
5397 * trans.c (gfc_add_modify_expr): Add sanity check that types
5398 for the lhs and rhs are the same for scalar assignments.
5400 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5402 * dump-parse-tree.c (show_common): New function.
5403 (gfc_show_namespace): Show commons.
5405 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5406 Andrew Vaught <andyv@firstinter.net>
5410 * decl.c (gfc_match_save): Adapt to new common structures,
5411 don't allow saving USE-associated common.
5412 * dump-parse-tree (gfc_show_attr): (saved_)common are not
5413 symbol attributes any longer.
5414 (gfc_show_symbol): Don't show old-style commons any longer.
5415 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
5417 * gfortran.h (symbol_attribute): Remove common and saved_common
5419 (gfc_symbol): Remove common_head element.
5420 (gfc_common_head): New struct.
5421 (gfc_get_common_head): New macro.
5422 (gfc_symtree): Add field 'common' to union.
5423 (gfc_namespace): Add field 'common_root'; change type of field
5424 'blank_common' to blank_common.
5425 (gfc_add_data): New prototype.
5426 (gfc_traverse_symtree): Expect a symtree as first argument
5427 instead of namespace.
5428 * match.c (gfc_get_common): New function.
5429 (match_common_name): Change to take char * as argument, adapt,
5430 fix bug with empty name.
5431 (gfc_match_common): Adapt to new data structures. Disallow
5432 redeclaration of USE-associated COMMON-block. Fix bug with
5434 (var_element): Adapt to new common structures.
5435 * match.h (gfc_get_common): Declare.
5436 * module.c: Add 2004 to copyright years, add commons to module
5437 file layout description.
5438 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
5439 for removed attributes.
5440 (mio_symbol): Adapt to new way of storing common relations.
5441 (load_commons): New function.
5442 (read_module): Skip common list on first pass, load_commons at
5444 (write_commons): New function.
5445 (write_module): Call write_commons().
5446 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
5447 functions related to removed attributes.
5448 (gfc_add_data): New function.
5449 (gfc_clear_attr): Don't set removed attributes.
5450 (gfc_copy_attr): Don't copy removed attributes.
5451 (traverse_symtree): Remove.
5452 (gfc_traverse_symtree): Don't traverse symbol
5453 tree of the passed namespace, but require a symtree to be passed
5454 instead. Unify with traverse_symtree.
5455 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
5457 (save_symbol): Remove setting of removed attribute.
5458 * trans-common.c (gfc_sym_mangled_common_id): Change to
5459 take 'char *' argument instead of 'gfc_symbol'.
5460 (build_common_decl, new_segment, translate_common): Adapt to new
5461 data structures, add new
5463 (create_common): Adapt to new data structures, add new
5464 argument name. Fix typo in intialization of derived types.
5465 (finish_equivalences): Add second argument in call to
5467 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
5468 (gfc_trans_common): Adapt to new data structures.
5469 * trans-decl.c (gfc_create_module_variables): Remove test for
5472 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5474 * io.c: Add 2004 to copyright years.
5476 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5477 Andrew Vaught <andyv@firstinter.net>
5479 * gfortran.h (gfc_gsymbol): New typedef.
5480 (gfc_gsym_root): New variable.
5481 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
5482 * parse.c (global_used): New function.
5483 (parse_block_data): Check for double empty BLOCK DATA,
5484 use global symbol table.
5485 (parse_module): Use global symbol table.
5486 (add_global_procedure, add_global_program): New functions.
5487 (gfc_parse_file): Use global symbol table.
5488 * symbol.c (gfc_gsym_root): New variable.
5489 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
5492 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5494 * module.c (mio_gmp_real): Correct writing of negative numbers.
5496 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5499 * expr.c (check_intrinsic_op): Allow comparison of characters.
5502 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5503 Andrew Vaught <andyv@firstinter.net>
5505 * decl.c (contained_procedure): New function.
5506 (match_end): Verify correctness of END STATEMENT in
5509 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5510 Andrew Vaught <andyv@firstinter.net>
5513 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
5514 (decode_statement): Enforce required space in free-form.
5516 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5518 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
5519 * trans-array.c (gfc_conv_descriptor_data): Add operand
5521 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
5522 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
5523 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
5524 * trans-common.c (create_common): Likewise.
5525 * trans-expr.c (gfc_conv_component_ref): Likewise.
5526 * trans-io.c (set_parameter_value): Likewise.
5527 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
5528 (transfer_expr): Likewise.
5529 * trans-decl.c (gfc_trans_auto_character_variable):
5530 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
5531 (gfc_gimplify_function): New function.
5532 (gfc_generate_function-code): Properly handle nested functions.
5533 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
5535 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
5538 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
5539 (gfc_resolve_inquire): Resolve the iolength tag. Return
5540 SUCCESS at end of function if no failure has occured.
5541 * resolve.c (resolve_code): Resolve if iolength is encountered.
5542 * trans-io.c: (ioparm_iolength, iocall_iolength,
5543 iocall_iolength_done): New variables.
5544 (last_dt): Add IOLENGTH.
5545 (gfc_build_io_library_fndecls ): Set iolength related variables.
5546 (gfc_trans_iolength): Implement.
5547 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
5549 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
5552 * scanner.c (load_line): Don't truncate preprocessor lines.
5553 Reformat error message.
5554 (preprocessor_line): Issue warning in case of malformed
5557 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5559 * resolve.c (resolve_symbol): Add comment in function body.
5560 (check_data_variable): Change type of mark to ar_type, adapt code
5563 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5565 * array.c (gfc_insert_constructor): Avoid redundant call to
5566 mpz_comp. Add 2004 to copyright years.
5568 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
5570 * trans.h (stmtblock_t): Change has_scope to unsigned int.
5572 2004-06-20 Steven G. Kargl <kargls@comcast.net>
5574 * arith.c (gfc_range_check): correct complex underflow.
5576 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5579 * match.c (match_case_selector): Call gfc_match_init_expr
5580 instead of gfc_match_expr.
5581 * resolve.c (validate_case_label_expr): No need to check for
5582 constant, since it wouldn't have been matched with the fix to
5585 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5588 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
5591 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5594 * trans-deecl.c (generate_local_decl): Do not issue warning for
5595 unused variables if they're use associated.
5597 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5598 Andrew Vaught <andyv@firstinter.net>
5601 * gfortran.h (gfc_check_f): Add new field f3ml.
5602 * check.c (gfc_check_minloc_maxloc): Take argument list instead
5603 of individual arguments, reorder if necessary.
5604 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
5605 * intrinsic.c (add_sym_3ml): New function.
5606 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
5607 (check_specific): Catch special case MINLOC, MAXLOC.
5609 2004-06-14 Paul Brook <paul@codesourcery.com>
5611 * intrinsic.c (add_sym_2s): Use correct function types.
5613 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5615 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
5616 * data.c (gfc_get_section_index): Remove dependency on trans.h.
5618 2004-06-12 Steven G. Kargl <kargls@comcast.net>
5620 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
5621 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
5622 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
5623 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
5624 * trans-intrinsic.c: Use symbols.
5625 * intrinsic.c (add_sym_2s): New function.
5626 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
5627 * intrinsic.h: Function prototypes.
5628 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
5629 gfc_resolve_srand): New functions.
5631 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5634 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
5635 contained procedure.
5637 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5640 * interface.c (compare_parameter, compare_actual_formal): Don't
5641 check types and array shapes for NULL()
5642 * trans-expr.c (conv_function_call): No double indirection for
5645 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
5647 * trans-expr.c (gfc_conv_cst_int_power): Compute
5648 x**(-n) by converting it to (1/x)**n instead of
5651 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5654 * module.c (write_symbol, write_symtree): Don't write symbols
5655 wrongly added to namespace.
5656 * trans-decl.c (gfc_create_module_variable): Don't create a
5657 backend decl for a symbol incorrectly added to namespace.
5659 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5662 * resolve.c (resolve_symbol): Verify that parameter array has an
5663 explicit shape. Fix typos and coding style issues in surrounding
5666 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5669 * gfortran.texi: The documentation doesn't contain infomration on
5670 how to report bugs, and shouldn't, so remove the line which
5673 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5675 * intrinsic.c (sort_actual): Keep track of type of missing
5676 arguments. (Missing from previous commit.)
5678 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5680 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
5681 * interface.c (compare_actual_formal): Keep type of omitted
5683 * trans-expr.c (gfc_conv_function_call): Add string length
5684 argument for omitted string argument.
5686 2004-06-03 Paul Brook <paul@codesourcery.com>
5688 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
5689 lists instead of compound expr chains.
5690 (gfc_trans_code): Annotate statement lists.
5692 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5694 * trans-array.c: Fix spelling in comments.
5696 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5699 * data.c (assign_substring_data_value): New function.
5700 (gfc_assign_data_value): Call the new function if we're dealing
5701 with a substring LHS.
5703 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5706 * gfortran.h (GFC_VERSION): Remove.
5707 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
5710 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5712 * trans-types.c: Fix spelling & layout in comments.
5714 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5717 * trans-const.c (gfc_conv_string_init): Allow variable string
5718 length lower than initialization string length.
5720 2004-05-30 Paul Brook <paul@codesourcery.com>
5723 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
5724 * trans-expr.c (gfc_trans_string_copy): New function.
5725 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
5727 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
5728 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
5729 * trans.h (struct gfc_saved_var): Define.
5730 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
5732 2004-05-30 Steven G. Kargl <kargls@comcast.net>
5734 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
5736 2004-05-29 Steven G. Kargl <kargls@comcast.net>
5738 * simplify.c (gfc_simplify_log): Remove useless line of code.
5740 2004-05-29 Paul Brook <paul@codesourcery.com>
5742 * trans-common.c (find_equivalence): Find multiple rules.
5744 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5746 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
5747 (gfc_current_locus): Declare new global variable.
5748 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
5749 (gfc_current_locus1): Rename ...
5750 (gfc_current_locus): ... to this.
5751 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
5752 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
5753 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
5754 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
5755 and gfc_current_locus(), respectively.
5756 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
5757 match_array_cons_element, gfc_match_array_constructor):
5758 Read/modify gfc_current_locus instead of calling gfc_set_locus()
5759 and gfc_current_locus().
5760 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
5761 match_attr_spec, gfc_match_function_decl, gfc_match_end,
5762 attr_decl1, gfc_match_save): Likewise.
5763 * error.c (error_print, gfc_internal_error): Likewise.
5764 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
5765 * interface.c (gfc_add_interface): Likewise.
5766 * io.c (gfc_match_format, match_dt_format, match_dt_element,
5767 match_io_iterator, match_io): Likewise.
5768 * match.c (gfc_match_space, gfc_match_eos,
5769 gfc_match_small_literal_int, gfc_match_st_label,
5770 gfc_match_strings, gfc_match_name, gfc_match_iterator,
5771 gfc_match_char, gfc_match, gfc_match_assignment,
5772 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
5773 gfc_match_nullify, gfc_match_call, match_implicit_range,
5774 gfc_match_implicit, gfc_match_data, match_case_selector,
5775 gfc_match_case, match_forall_iterator): Likewise.
5776 * matchexp.c (gfc_match_defined_op_name, next_operator,
5777 match_level_1, match_mult_operand, match_ext_mult_operand,
5778 match_add_operand, match_ext_add_operand, match_level_2,
5779 match_level_3, match_level_4, match_and_operand, match_or_operand,
5780 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
5781 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
5782 * parse.c (match_word, decode_statement, next_free, next_fixed,
5783 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
5785 * primary.c (match_digits, match_integer_constant,
5786 match_boz_constant, match_real_constant, match_substring,
5787 next_string_char, match_charkind_name, match_string_constant,
5788 match_logical_constant, match_const_complex_part,
5789 match_complex_constant, match_actual_arg, match_keyword_arg,
5790 gfc_match_actual_arglist, gfc_match_structure_constructor,
5791 gfc_match_rvalue, gfc_match_variable): Likewise.
5792 * st.c (gfc_get_code): Likewise.
5793 * symbol.c (check_conflict, check_used, check_done,
5794 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
5795 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
5796 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
5798 2004-05-26 Roger Sayle <roger@eyesopen.com>
5800 * io.c (format_asterisk): Silence compiler warnings by correcting
5801 the number of elements of a "locus" initializer.
5803 2004-05-25 Roger Sayle <roger@eyesopen.com>
5806 * matchexp.c: Allow unary operators after arithmetic operators
5808 (match_ext_mult_operand, match_ext_add_operand): New functions.
5809 (match_mult_operand): Tweak to call match_ext_mult_operand.
5810 (match_add_operand): Tweak to call match_ext_mult_operand.
5811 (match_level_2): Rearrange to call match_ext_add_operand.
5813 2004-05-25 Paul Brook <paul@codesourcery.com>
5815 * expr.c (check_inquiry): Remove bogus tests.
5817 2004-05-23 Paul Brook <paul@codesourcery.com>
5820 * expr.c (restricted_args): Remove redundant checks/argument.
5821 (external_spec_function): Update to match.
5822 (restricted_intrinsic): Rewrite.
5824 2004-05-23 Paul Brook <paul@codesourcery.com>
5825 Victor Leikehman <lei@haifasphere.co.il>
5827 * gfortran.h (struct gfc_symbol): Add equiv_built.
5828 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
5830 (current_length): Remove.
5831 (add_segments): New function.
5832 (build_equiv_decl): Create initialized common blocks.
5833 (build_common_decl): Always add decl to bindings.
5834 (create_common): Create initializers.
5835 (find_segment_info): Reformat to match coding conventions.
5836 (new_condition): Use add_segments.
5837 (add_condition, find_equivalence, add_equivalences): Move iteration
5838 inside functions. Only process each segment once.
5839 (new_segment, finish_equivalences, translate_common): Simplify.
5841 2004-05-23 Steven G. Kargl <kargls@comcast.net>
5843 * check.c (gfc_check_random_seed): Issue for too many arguments.
5845 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5847 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
5849 2004-05-22 Paul Brook <paul@codesourcery.com>
5851 * dump-parse-tree.c (gfc_show_equiv): New function.
5852 (gfc_show_namespace): Use it.
5854 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
5857 * symbol.c (gfc_add_common): Disable checks to work around other more
5858 fundamental inadequacies.
5860 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
5862 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
5864 (gfc_build_function_decl): Likewise.
5866 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5868 * check.c (gfc_check_system_clock): New function.
5869 * intrinsic.c (add_sym_3s): New function.
5870 (add_subroutines): Use it.
5871 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
5873 * iresolve.c (gfc_resolve_system_clock): New function.
5875 2004-05-22 Steven G. Kargl <kargls@comcast.net>
5877 * invoke.texi: Document -Wunderflow and spell check.
5878 * lang.opt: Add Wunderflow.
5879 * gfortran.h (gfc_option_t): Add warn_underflow option.
5880 * options.c (gfc_init_options, set_Wall): Use it.
5881 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
5882 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
5883 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
5884 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
5885 * arith.c (common_logarithm): Fix typo in comment.
5887 2004-05-21 Roger Sayle <roger@eyesopen.com>
5889 * io.c (check_format): As a GNU extension, allow the comma after a
5890 string literal to be optional in a format. Use gfc_notify_std to
5891 issue an error/warning as appropriate.
5893 2004-05-21 Roger Sayle <roger@eyesopen.com>
5895 * io.c (check_format): Use gfc_notify_std to determine whether to
5896 issue an error/warning for omitting the digits from the X format.
5898 2004-05-20 Roger Sayle <roger@eyesopen.com>
5900 * io.c (check_format): Allow the number before the X format to
5901 be optional when not -pedantic.
5903 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
5904 Paul Brook <paul@codesourcery.com>
5906 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
5907 Create decls for __builtin_pow{,f}.
5908 * gfortran.h (PREFIX_LEN): Define.
5909 * trans-decl.c (gfor_fndecl_math_powi): Add.
5910 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5911 (gfc_build_intrinsic_function_decls): Create decls for powi.
5912 * trans-expr.c (powi_table): Add.
5913 (gfc_conv_integer_power): Remove.
5914 (gfc_conv_powi): New function.
5915 (gfc_conv_cst_int_power): New function.
5916 (gfc_conv_power_op): Use new powi routines.
5917 * trans.h (struct gfc_powdecl_list): Add.
5918 (gfor_fndecl_math_powi): Add.
5919 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
5921 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5923 * trans.c, trans-decl.c: Fix comment typos.
5925 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5927 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
5929 2004-05-18 Steve Kargl <kargls@comcast.net>
5931 * arith.c (gfc_int2complex): Fix incorrect range checking.
5933 2004-05-18 Paul Brook <paul@codesourcery.com>
5936 * decl.c (add_init_expr_to_sym): Remove incorrect check.
5937 (default_initializer): Move to expr.c.
5938 (variable_decl): Don't assign default initializer to variables.
5939 * expr.c (gfc_default_initializer): Move to here.
5940 * gfortran.h (gfc_default_initializer): Add prototype.
5941 * resolve.c (resolve_symbol): Check for illegal initializers.
5942 Assign default initializer.
5944 2004-05-17 Steve Kargl <kargls@comcast.net>
5946 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
5948 2004-05-17 Steve Kargl <kargls@comcast.net>
5950 * arith.c (gfc_real2complex): Range checking wrong part of complex
5953 2004-05-16 Paul Brook <paul@codesourcery.com>
5955 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
5957 2004-05-16 Paul Brook <paul@codesourcery.com>
5959 * arith.c (gfc_range_check): Fix logic error.
5961 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
5963 * arith.c: Fix comment typos.
5965 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5968 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
5969 not initialized in a disallowed fashion.
5970 * match.c (gfc_match_common): Likewise.
5971 (var_element): Verify that variable is not in the blank COMMON,
5972 if it is in a common.
5974 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
5976 * Make-lang.in (f95.generated-manpages): Remove.
5977 (f95.srcextra): New.
5978 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
5979 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
5982 (f95.install-info): Remove.
5983 (install-info): New.
5985 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
5987 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
5989 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5991 * primary.c (match_boz_constant): Use gfc_notify_std() for
5992 issuing a warning or an error.
5994 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5997 * primary.c (match_structure_constructor): Rename ...
5998 (gfc_match_structure_constructor): ... to this. Make non-static.
5999 (gfc_match_rvalue): Call renamed function.
6000 * match.h (gfc_match_structure_constructor): Declare.
6001 * match.c (gfc_match_data_constant): Handle structure
6004 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6008 * gfortran.h (gfc_linebuf): New typedef.
6010 (gfc_file): Revamped, use new gfc_linebuf.
6011 (locus): Revamped, use new types.
6012 (gfc_current_file): Remove.
6013 (gfc_current_form, gfc_source_file): New global variables.
6014 * match.c (gfc_match_space, gfc_match_strings): Use
6015 gfc_current_form to find source form.
6016 * module.c (gfc_dump_module): Use gfc_source_file when printing
6018 * error.c (show_locus, show_loci) Use new data structures to print
6020 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
6022 (file_head, current_file, gfc_current_form, line_head, line_tail,
6023 gfc_current_locus1, gfc_source_file): New global variables.
6024 (gfc_scanner_init1): Set new global variables.
6025 (gfc_scanner_done1): Free new data structures.
6026 (gfc_current_locus): Return pointer to gfc_current_locus1.
6027 (gfc_set_locus): Set gfc_current_locus1.
6028 (gfc_at_eof): Set new variables.
6029 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
6030 to new locus structure.
6031 (gfc_check_include): Remove.
6032 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
6033 (gfc_skip_comments): Use gfc_current_form, find locus with
6035 (gfc_next_char): Use gfc_current_form.
6036 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
6037 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
6039 (get_file): New function.
6040 (preprocessor_line, include_line): New functions.
6041 (load_file): Move down, rewrite to match new data structures.
6042 (gfc_new_file): Rewrite to match new data structures.
6043 * parse.c (next_statement): Remove code which is now useless. Use
6044 gfc_source_form and gfc_source_file where appropriate.
6045 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
6046 when determining locus of frontend code.
6047 * trans-io.c (set_error_locus): Same.
6048 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
6049 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
6051 (all): Add missing initializers.
6053 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6055 * Make-lang.in (trans-common.o): Remove redundant dependency.
6056 (data.c): Replace object file name ...
6057 (data.o): ... by the correct one.
6059 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6061 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
6062 for ranges when dumping array references.
6064 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
6066 * decl.c (variable_decl): Always apply default initializer.
6068 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6071 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
6072 handle zero correctly.
6074 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6076 * match.c (gfc_match): Eliminate dead code.
6078 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6080 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
6081 Detect bad continuation line in fixed form sources.
6083 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6086 * iresolve.c (gfc_resolve_nearest): Add new function.
6087 * intrinsic.h: ... declare it here.
6088 * intrinsic.c (add_functions): ... add it as resolving function
6091 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6094 * match.c (gfc_match_do): Allow infinite loops with
6095 label-do-stmt. Do not enforce space after comma.
6097 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6100 * parse.c (parse_interface): Allow empty INTERFACE, remove
6103 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6105 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
6106 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
6107 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
6108 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
6109 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
6110 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
6111 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
6112 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
6113 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
6114 trans-types.h, trans.c, trans.h: Update copyright years and
6116 * data.c: Likewise, also removed two whitespace-only lines.
6117 * gfortranspec.c, lang.opt: Update copyright years.
6119 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6122 * trans-decl.c (generate_local_decl): Don't warn for unused
6123 variables which are in common blocks.
6125 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6127 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
6128 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
6129 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
6131 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
6134 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
6136 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
6138 * gfortran.texi: Use @table @emph instead of @itemize @emph.
6139 Remove "set DEVELOPMENT".
6140 (Compiling GFORTRAN): Remove.
6142 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6144 * array.c (match_subscript, match_array_ref): Add comments
6145 explaining argument 'init'.
6146 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
6147 trans-expr.c, trans.c: Fix some typos in comments.
6148 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
6149 * primary.c (match_digits, match_integer_constant): Add comment
6150 explaining signflag.
6152 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6155 * primary.c: Include system.h and flags.h, needed for pedantic.
6156 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
6159 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6162 * match.c (match_data_constant): Handle case where
6163 gfc_find_symbol sets sym to NULL
6165 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6167 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
6168 dependency on mathbuiltins.def
6170 2004-04-24 Victor Leikehman <lei@il.ibm.com>
6172 * trans-io.c (transfer_expr): Implemented recursive printing
6175 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
6177 * gfortranspec.c: Do not include multilib.h.
6179 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
6181 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
6182 2004 to copyright years.
6183 * trans-expr.c, trans-decl.c: Comment update, we now generate
6184 GENERIC, not SIMPLE. Add 2004 to copyright years.
6186 2004-04-24 Paul Brook <paul@codesourcery.com>
6188 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
6190 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
6193 * arith.c (gfc_arith_divide): Fix complex divide.
6195 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
6197 * gfortranspec.c: Include the target headers.
6199 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
6203 * arith.c (arctangent2): New function.
6204 * arith.h (arctangent2): Add function prototype.
6205 * simplify.c (gfc_simplify_atan2): Use it.
6206 (gfc_simplify_log): Use it.
6208 2004-04-12 Diego Novillo <dnovillo@redhat.com>
6210 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
6211 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
6213 2004-04-11 Bud Davis <bdavis9659@comcast.net>
6216 * trans-io.c (build_dt): Change REC to value.
6218 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
6221 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
6222 the real value when converting mpf to string.
6224 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
6227 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
6230 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
6233 * simplify.c (simplify_min_max): Convert the type of the result.
6235 2004-04-11 Paul Brook <paul@codesourcery.com>
6237 * gfortran.texi: Use full target triplet.
6239 2004-04-11 Paul Brook <paul@codesourcery.com>
6241 * Make-lang.in (GFORTRAN_TEXI): Set it.
6242 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
6243 (fortran/gfortran.info): Ditto.
6244 * gfortran.texi: Major update.
6245 * invoke.texi: New file.
6247 2004-04-10 Paul Brook <paul@codesourcery.com>
6249 * trans-array.c (gfc_trans_allocate_temp_array,
6250 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
6251 * trans-decl.c (gfc_build_dummy_array_decl,
6252 gfc_get_symbol_decl, gfc_build_function_decl,
6253 gfc_create_module_variable): Ditto.
6254 * trans-expr.c (gfc_conv_variable): Ditto.
6255 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
6256 * trans.h (GFC_DECL_STRING): Remove.
6257 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
6258 GFC_DECL_ASSIGN): Renumber flags.
6260 2004-04-05 Paul Brook <paul@codesourcery.com>
6264 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
6266 * gfortran.h (struct gfc_charlen): Add backend_decl.
6267 * trans-array.c (gfc_trans_allocate_temp_array,
6268 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
6269 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
6270 Remove old, broken string handling.
6271 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
6272 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
6273 gfc_trans_deferred_array): Handle character arrays.
6274 * trans-const.c (gfc_conv_const_charlen): New function.
6275 * trans-const.h (gfc_conv_const_charlen): Add prototype.
6276 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
6278 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
6279 (gfc_create_string_length): New function.
6280 (gfc_get_symbol_decl): Create lengths for character variables.
6281 (gfc_get_fake_result_decl): Ditto.
6282 (gfc_build_function_decl): Only set length for assumed length
6283 character arguments.
6284 (gfc_trans_dummy_character): New function.
6285 (gfc_trans_auto_character_variable): Rewrite.
6286 (gfc_trans_deferred_vars): Handle more types of character variable.
6287 (gfc_create_module_variable): String lengths have moved.
6288 (gfc_generate_function_code): Initialize deferred var chain earlier.
6289 * trans-expr.c (gfc_conv_init_string_length): Rename ...
6290 (gfc_trans_init_string_length): ... to this.
6291 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
6292 gfc_conv_function_call): Update to new format for character variables.
6293 (gfc_conv_string_length): Remove.
6294 (gfc_conv_string_parameter): Update assertion.
6295 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
6296 * trans-io.c (set_string): Use new macro names.
6297 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
6298 * trans-types.c (gfc_get_character_type): Use existing length expr.
6299 (gfc_is_nodesc_array): Make public.
6300 (gfc_get_dtype_cst): Rename ...
6301 (gfc_get_dtype): ... to this. Handle unknown size arrays.
6302 (gfc_get_nodesc_array_type): Use new name.
6303 (gfc_sym_type): New character variable code.
6304 (gfc_get_derived_type): Ditto.
6305 (gfc_get_function_type): Evaluate character variable lengths.
6306 * trans-types.h (gfc_strlen_kind): Define.
6307 (gfc_is_nodesc_array): Add prototype.
6308 * trans.h: Update prototypes.
6309 (struct lang_type): Update comments.
6310 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
6311 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
6313 2004-04-04 Paul Brook <paul@codesourcery.com>
6315 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
6316 * options.c (gfc_init.options, gfc_handle_option): Ditto.
6317 * trans-expr.c (gfc_conv_function_call): Ditto.
6318 * trans-types.c (gfc_is_nodesc_array): Ditto
6319 * lang.opt (fg77-calls): Remove.
6321 2004-04-04 Paul Brook <paul@codesourcery.com>
6323 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
6324 (gfc_conv_descriptor_base): Rename ...
6325 (gfc_conv_descriptor_offset): ... to this.
6326 (gfc_trans_allocate_array_storage): Set offset to zero.
6327 (gfc_conv_array_base): Rename ...
6328 (gfc_conv_array_offset): ... to this.
6329 (gfc_conv_array_index_ref): Add offset parameter.
6330 (gfc_conv_array_ref): Include offset.
6331 (gfc_trans_preloop_setup): Use existing offset.
6332 (gfc_trans_allocate_temp_array, gfc_array_allocate,
6333 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
6334 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
6335 gfc_conf_ss_descriptor): Set offset.
6336 * trans-array.h: Rename prototypes.
6337 * trans-const.h (gfc_index_zero_node): Define.
6338 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
6339 * trans-types.c (gfc_get_array_type_bounds): Ditto.
6340 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
6342 2004-03-25 Diego Novillo <dnovillo@redhat.com>
6344 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
6346 2004-03-24 Bud Davis <bdavis9659@comcast.net>
6349 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
6350 before conversion by gmp library call.
6352 2004-03-24 Bud Davis <bdavis9659@comcast.net>
6355 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
6357 2004-02-24 Richard Henderson <rth@redhat.com>
6359 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
6361 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
6363 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
6364 (fortran/gfortran.info): ... to here.
6367 2004-02-16 Richard Henderson <rth@redhat.com>
6369 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
6370 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
6371 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
6372 (gfc_expand_function): Rename from expand_function_body, make static,
6373 don't do anything except invoke tree_rest_of_compilation.
6374 (gfc_be_parse_file): Invoke cgraph.
6375 (gfc_expand_decl): Remove.
6376 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
6377 __builtin_adjust_trampoline.
6378 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
6379 (gfc_finalize): New.
6380 (gfc_generate_function_code): Use it. Lower nested functions.
6381 * trans-expr.c (gfc_conv_function_call): Add static chain operand
6383 * trans.c (gfc_build_function_call): Likewise.
6384 * trans.h (expand_function_body): Remove.
6386 2004-02-15 Victor Leikehman <lei@il.ibm.com>
6389 * trans-decl.c (gfc_build_function_decl) For functions
6390 returning CHARACTER pass an extra length argument,
6391 following g77 calling conventions.
6392 * trans-types.c (gfc_get_function_type) Ditto.
6393 * trans-expr.c (gfc_conv_function_call) Ditto.
6395 2004-02-14 Paul Brook <paul@codesourcery.com>
6397 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
6399 2004-02-12 Paul Brook <paul@nowt.org>
6403 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
6405 * gfortran.texi: Fix typos.
6407 2004-02-07 Bud Davis <bdavis9659@comcast.net>
6410 * intrinsic.c (add_conversions) Use logical conversion instead
6412 * trans-types.c (gfc_get_logical_type) implemented logical*1
6415 2004-01-17 Paul Brook <paul@codesourcery.com>
6417 * lang-specs.h: Remove %<fixed-form.
6419 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
6421 * lang-specs.h: Enable preprocessing of source files
6422 ending in .F, .fpp, .FPP, .F90 and .F95.
6424 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
6427 * lang-specs.h: Enable compilation of files ending
6428 in .f, .for and .FOR.
6430 2004-01-11 Paul Brook <paul@codesourcery.com>
6432 * trans-stmt.c (gfc_trans_if_1): New function.
6433 (gfc_trans_if): Use it.
6435 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
6437 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
6438 (gfc_option_t): Add max_identifier_length.
6439 * lang.opt: Add fmax-identifier-length.
6440 * match.c (parse_name): Use limit.
6441 * options.c (gfc_init_options): Set max_identifier_length.
6442 (gfc_handle_option): Ditto.
6444 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
6446 * intrinsic.c (add_functions): Add resolve function to dcmplx.
6447 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
6448 * iresolve.c (gfc_resolve_dcmplx): New function.
6450 2004-01-10 Paul Brook <paul@codesourcery.com>
6452 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
6453 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
6454 (gfc_return_by_reference): Correct condition.
6455 (gfc_get_function_type): Ditto.
6457 2004-01-10 Paul Brook <paul@codesourcery.com>
6459 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
6462 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
6464 * iresolve.c: Use correct kind.
6466 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
6469 * trans-decl.c (gfc_create_module_variable): Output array valued
6472 2004-01-10 Paul Brook <paul@codesourcery.com>
6474 * resolve.c (resolve_branch): Get error message right way round.
6476 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
6478 * trans-array (gfc_conv_loop_setup): Adjust comment to track
6480 (gfc_array_allocate): Don't count size of element twice.
6482 2004-01-04 Paul Brook <paul@codesourcery.com>
6484 * lang.opt (i8, r8, std=*): Remove RejectNegative.
6486 2004-01-04 Paul Brook <paul@codesourcery.com>
6488 * error.c (gfc_notify_std): New function.
6489 * gfortran.h (gfc_notify_std): Declare.
6490 (GFC_STD_*): Define.
6491 (gfc_option_t): Add warn_std and allow_std.
6492 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
6493 (gfc_intrinsic_func_interface): Use gfc_notify_std.
6494 * check.c (check_rest): Use gfc_notify_std.
6495 * match.c (gfc_match_pause): Ditto.
6496 (gfc_match_assign): Ditto.
6497 (gfc_match_goto): Ditto.
6498 * resolve.c (resolve_branch): Ditto.
6499 * lang.opt: Add std=<foo> and w.
6500 * options.c (gfc_init_options): Set allow_std and warn_std.
6501 (gfc_handle_option): Handle OPT_std_* and OPT_w.
6503 2004-01-01 Paul Brook <paul@codesourcery.com>
6505 * array.c (gfc_append_constructor): Take constructor, not expression.
6506 * data.c (struct gfc_expr_stack): Remove.
6507 (expr_stack): Remove.
6508 (find_con_by_offset): Rename from find_expr_in_con.
6509 (find_con_by_component): Rename from find_component_in_con.
6510 (gfc_get_expr_stack): Remove.
6511 (gfc_assign_data_value): Rewrite.
6512 (gfc_expr_push): Remove.
6513 (gfc_expr_pop): Remove.
6514 (gfc_advance_section): Rename from
6515 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
6516 (gfc_get_section_index): Handle unbounded sections.
6517 * gfortran.h: Update prototypes.
6518 * resolve.c (check_data_variable): Array section maight not be the
6521 2004-01-01 Paul Brook <paul@codesourcery.com>
6524 * resolve.c (resolve_symbol): Allow assumed length function results.
6526 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
6528 * match.c (gfc_match_pause): Fix spelling.
6530 2004-01-01 Steven Bosscher <stevenb@suse.de>
6533 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
6534 reference from the expression.
6536 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
6538 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
6540 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
6541 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
6542 (symbol_attribute):New variable attribute: assign.
6543 * io.c (resolve_tag):Integer variable is allowed.
6544 (match_dt_format): Add ASSIGN statement. Set assign flag.
6545 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
6546 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
6547 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
6548 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
6549 (next_statement): Add ST_LABEL_ASSIGNMENT.
6550 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
6551 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
6552 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
6553 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
6554 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
6555 assign. Put them into the stuct lang_decl.
6556 * trans-io.c (set_string): Add the assign statement.
6557 * trans-stmt.c (gfc_trans_label_assign): New function.
6558 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
6559 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
6560 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
6561 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
6562 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
6563 (GFC_DECL_ASSIGN(node)): New macro to access flag.
6565 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
6568 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
6571 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
6573 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
6574 that arguments to subroutines/functions can't alias themselves, nor global
6577 2003-12-20 Steven Bosscher <stevenb@suse.de>
6579 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
6580 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
6582 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
6584 * primary.c (match_substring): Fix substring bug for start point
6585 or end point is NULL.
6586 * trans-expr.c (gfc_conv_substring): Ditto
6587 * trans-types.c (gfc_sym_type): Get correct type of scalar
6588 character variables.
6589 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
6592 2003-12-10 Richard Henderson <rth@redhat.com>
6594 * options.c (gfc_post_options): Don't ever use rtl inlining.
6596 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
6598 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
6599 * trans-equivalence.c: Remove.
6600 * trans-decl.c (gfc_get_symbol_decl): Update to match.
6601 (gfc_generate_function_code): Ditto.
6602 * trans-array.c (gfc_conv_array_parameter): Ditto.
6603 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
6604 (F95_ADDITIONAL_OBJS): Add stor-layout.o
6605 * trans.h (gfc_trans_equivalence): Remove.
6606 * gfortran.h (struct gfc_equiv): Add used field.
6607 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
6608 equiv_offset fields.
6610 2003-12-05 Richard Henderson <rth@redhat.com>
6612 * trans.c (gfc_build_addr_expr): New.
6613 (gfc_build_indirect_ref, gfc_build_array_ref): New.
6614 * trans.h: Declare them.
6615 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
6616 trans-stmt.c, trans.c (*): Use them.
6618 * f95-lang.c (gfc_post_options): Remove dead prototype.
6619 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
6620 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
6623 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
6625 * io.c (gfc_match_format): Check for missing format label.
6627 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
6630 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
6631 from interfaces in modules.
6633 2003-11-30 Paul Brook <paul@nowt.org>
6635 * trans-array.c (gfc_trans_g77_array): Make non-static.
6636 (gfc_trans_assumed_size): Remove.
6637 (gfc_trans_dummy_array_bias): Explicitly free temporary.
6638 * trans-array.h (gfc_trans_g77_array): Add prototype.
6639 (gfc_trans_assumed_size): Remove.
6640 * trans-decls.c (gfor_fndecl_push_context): Remove.
6641 (gfor_fndecl_pop_context): Remove.
6642 (gfc_build_function)decls): Don't create them.
6643 (gfc_trans_deferred_vars): Update to match. Remove dead code.
6644 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
6646 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
6648 * trans-array.c (gfc_conv_array_parameter): Simplify
6649 array argument passing for array name actual argument.
6650 * trans-expr.c (gfc_conv_function_call): Ditto
6651 * trans-types.c (gfc_is_nodesc_array):Ditto.
6653 2003-11-30 Paul Brook <paul@nowt.org>
6655 * f95-lang.c (gfc_post_options): Move ...
6656 * options.c (gfc_post_options): .. to here. Handle inlining options.
6657 * gfortran.h (gfc_post_options): Add prototype.
6659 2003-11-28 Richard Henderson <rth@redhat.com>
6661 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
6663 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
6665 * trans.h (has_alternate_specifier): New global variable.
6666 * match.c (gfc_match_call): Handle actual arguments associated with
6667 alternate return indicators.
6668 * trans-expr.c (gfc_conv_function_call): Ditto
6669 * trans-stmt.c (gfc_trans_call): Ditto
6670 (gfc_trans_return): Handle return statement with value.
6671 * trans-decl.c (gfc_generate_function_code): Handle functions with
6673 (gfc_get_fake_result_decl): Ditto
6674 * trans-types.c (gfc_get_function_type): Ditto
6675 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
6676 (resolve_formal_arglist): Check asterisk dummy.
6678 2003-11-27 Paul Brook <paul@nowt.org>
6680 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
6681 allocation interface.
6682 (gfc_conv_ array_parameter): Ditto.
6683 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
6684 * trans-array.c: Update prototype.
6685 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
6686 (gfc_trans_auto_character_variable): Use new memory alloc interface.
6687 * trans-expr.c (gfc_conv_string_tmp): Ditto.
6688 (gfc_conv_function_call): Use gfc_conv_string_tmp.
6689 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
6690 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
6691 * trans.h (gfc_ss_info): Remove unused pdata field.
6692 * trans.c (gfc_create_var_np): Change T to V.
6694 2003-11-26 Richard Henderson <rth@redhat.com>
6696 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
6697 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
6698 FRACTION, NEAREST, SET_EXPONENT.
6699 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
6700 Fix GTY marking. Remove unnecessary const's.
6701 (LIBM_FUNCTION): Rename from I_LIB.
6702 (LIBF_FUNCTION): New.
6703 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
6704 conventions. Assume the expr signature is correct. Mark const.
6705 (gfc_conv_intrinsic_exponent): Use library functions.
6706 (gfc_conv_intrinsic_set_exponent): Remove.
6707 (gfc_conv_intrinsic_scale): Remove.
6708 (gfc_conv_intrinsic_nearest): Remove.
6709 (gfc_conv_intrinsic_fraction): Remove.
6710 (gfc_conv_intrinsic_function): Update.
6711 * trans-decl.c (gfor_fndecl_math_exponent4): New.
6712 (gfor_fndecl_math_exponent8): New.
6713 (gfc_build_intrinsic_function_decls): Set them.
6714 * trans.h: Declare them.
6716 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
6718 * trans-common.c (gfc_layout_global_equiv): Locate the error for
6719 underflow COMMON block.
6720 (gfc_trans_one_common): Fix bug for size of COMMON block containing
6721 EQUIVALENCE object. Also fix typo in an error message.
6723 2003-11-25 Diego Novillo <dnovillo@redhat.com>
6725 * Make-lang.in: Add check-gfortran to lang_checks.
6726 (check-f95): Alias for check-gfortran.
6728 2003-11-25 Jason Merrill <jason@redhat.com>
6730 * Make-lang.in (f95.tags): Create TAGS.sub files in each
6731 directory and TAGS files that include them for each front end.
6733 2003-11-24 Paul Brook <paul@nowt.org>
6736 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
6738 2003-11-24 Paul Brook <paul@nowt.org>
6740 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
6742 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
6744 2003-11-24 Paul Brook <paul@nowt.org>
6747 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
6748 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
6750 2003-11-20 Richard Henderson <rth@redhat.com>
6752 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
6753 (gfc_conv_array_base): Likewise.
6754 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
6755 * trans-expr.c (gfc_conv_string_tmp): Likewise.
6756 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
6757 * trans-stmt.c (gfc_trans_character_select): Likewise.
6759 2003-11-13 Paul Brook <paul@nowt.org>
6761 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
6763 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
6765 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
6766 (resolve_equivalence): New function.
6767 (resolve_equivalence_derived): New function.
6769 2003-11-12 Richard Henderson <rth@redhat.com>
6771 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
6772 annotate_all_with_locus.
6774 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
6776 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
6777 * trans-decl.c (gfc_finish_var_decl): Modified.
6779 2003-11-08 Paul Brook <paul@nowt.org>
6782 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
6785 2003-11-06 Paul Brook <paul@nowt.org>
6787 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
6789 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
6791 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
6793 2003-10-27 Anthony Green <green@redhat.com>
6795 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
6796 (f95.stagefeedback): Ditto.
6798 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
6801 * Make-lang.in (f95.stageprofile): Add.
6802 (f95.stagefeedback): Add.
6804 2003-10-23 Richard Henderson <rth@redhat.com>
6806 * f96-lang.c (gfc_gimplify_expr): Remove.
6807 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
6808 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
6810 2003-10-23 Richard Henderson <rth@redhat.com>
6812 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
6814 2003-10-20 Paul Brook <paul@nowt.org>
6816 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
6817 * trans-stmt.c (gfc_trans_do_while): Ditto.
6819 2003-10-17 Paul Brook <paul@nowt.org>
6821 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
6823 2003-10-17 Paul Brook <paul@nowt.org>
6825 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
6827 2003-10-17 Feng Wang <wf_cs@yahoo.com>
6829 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
6830 (gfc_resolve_minloc): Ditto.
6831 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
6832 Return the value after subtracting the lower bound.
6834 2003-10-16 Richard Henderson <rth@redhat.com>
6836 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
6838 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
6840 * lang.c: Remove -M option for now, it's in the way for C.
6842 2003-10-14 Jason Merrill <jason@redhat.com>
6844 * Make-lang.in (f95.tags): New rule.
6846 2003-10-13 Richard Henderson <rth@redhat.com>
6848 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
6850 2003-10-13 Paul Brook <paul@nowt.org>
6852 * trans-decl.c (generate_local_decl): Don't create junk variables.
6854 2003-10-13 Paul Brook <paul@nowt.org>
6856 * resolve.c (resolve_formal_arglist): Use function result decl in
6857 preference to function decl.
6859 2003-10-12 Richard Henderson <rth@redhat.com>
6861 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
6862 TREE_READONLY. Update all callers.
6864 2003-10-12 Feng Wang <wf_cs@yahoo.com>
6866 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
6867 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
6868 (gfc_is_intrinsic_libcall): Add CSHIFT.
6870 2003-10-12 Richard Henderson <rth@redhat.com>
6872 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
6873 (gfc_trans_array_constructor_value): Likewise.
6874 (gfc_conv_array_initializer): Likewise.
6875 * trans-stmt.c (gfc_trans_character_select): Likewise.
6877 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
6879 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
6881 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6883 * check.c (gfc_check_repeat): Check arguments are scalar.
6884 (gfc_check_trim): New function.
6885 * intrinsic.h (gfc_check_trim): Add prototype.
6886 * intrinsic.c (add_functions): Use it.
6887 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
6889 * trans-decl.c: Ditto.
6890 (gfc_build_intrinsic_fucntion_decls): Set them.
6891 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
6892 (gfc_conv_intrinsic_trim): New function.
6893 (gfc_conv_intrinsic_repeat): New function.
6894 (gfc_conv_intrinsic_function): Use them.
6896 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6898 * trans-types.c (gfc_sym_type): Handle result variables.
6900 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
6902 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
6903 gfc_get_character_type.
6905 2003-10-11 Feng Wang <wf_cs@yahoo.com>
6907 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
6909 2003-10-11 Paul Brook <paul@nowt.org>
6911 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
6912 (gfc_resolve_dprod): New function.
6913 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
6914 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
6915 (gfc_resolve_dprod): Declare.
6916 * intrinsic.c (add_functions): Use them.
6917 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
6919 2003-10-06 Richard Henderson <rth@redhat.com>
6921 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
6922 * trans-intrinsic.c (call_builtin_clz): Use it.
6924 2003-10-05 Paul Brook <paul@nowt.org>
6926 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
6927 * trans-decl.c (gfc_generate_function_code): Set
6928 cfun->function_end_locus.
6930 2003-09-24 Jason Merrill <jason@redhat.com>
6932 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
6935 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
6936 Paul Brook <paul@nowt.org>
6938 * Make-lang.in (F95_OBJS): Add fortran/data.o.
6939 * array.c (gfc_inser_constructor): New function.
6940 (gfc_get_constructor): New function.
6941 (gfc_free_constructor): Initialize offset and repeat.
6942 (iterator_stack): Remove.
6943 (expand_info): Add offset, component and repeat fields.
6944 (expand_constructor): Set them.
6945 (expand): Set new fields.
6946 (gfc_copy_constructor): Ditto. Avoid recursion.
6947 * gfortran.h: Add prototypes for new functions.
6948 (gfc_constructor): Add offset, component and repeat.
6949 (iteratio_stack): Move to here.
6950 * resolve.c (check_data_variable): Convert data values into variable
6952 (traverse_data_list): Build implicit loop chain.
6953 (gfc_resolve): Ditto.
6954 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
6955 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
6956 * trans-expr.c (gfc_conv_structure): Handle array initializers.
6957 (gfc_conv_expr): Update to match.
6958 * trans.h (gfc_conv_structure): Declare.
6961 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
6963 * trans.h: Add declarations for gfor_fndecl_si_kind and
6964 gfor_fndecl_sr_kind.
6965 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6966 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
6967 (g95_conv_intrinsic_sr_kind): New function.
6968 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
6971 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
6973 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
6974 instead of _4 and _8 as postfix for libgfortran calls.
6976 2003-09-16 Paul Brook <paul@nowt.org>
6978 * array.c (compare_bounds): New function.
6979 (gfc_compare_array_spec): Use it.
6981 2003-09-14 Paul Brook <paul@nowt.org>
6983 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
6984 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
6986 2003-09-14 Paul Brook <paul@nowt.org>
6988 * check.c (dim_rank_check): Allow assumed bounds if requested.
6989 (gfc_check_lbound): Call it.
6990 (gfc_check_ubound): Ditto.
6991 (gfc_check_size): Change to match.
6992 * simplify.c (gfc_simplify_bound): New function.
6993 (gfc_simplify_lbound): New function.
6994 (gfc_simplify_ubound): New function.
6995 * intrinsic.h: Declare them.
6996 * intrinsic.c (add_functions): Use them.
6998 2003-09-14 Paul Brook <paul@nowt.org>
7000 * io.c (format_lex): Initialize negative_flag.
7001 (check_format): Intialize repeat.
7002 * trans-io.c (gfc_new_nml_name_expr): Declare static.
7003 (gfc_new_var_expr): Ditto.
7005 2003-09-14 Paul Brook <paul@nowt.org>
7007 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
7008 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
7010 2003-09-12 Paul Brook <paul@nowt.org>
7012 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
7014 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
7016 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
7017 for a correct expression.
7019 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
7021 * trans-intrinsic.c (real_compnt_info): New struct.
7022 (prepare_arg_info): New function.
7023 (gfc_conv_intrinsic_set_exponent): New function.
7024 (gfc_conv_intrinsic_scale): New function.
7025 (gfc_conv_intrinsic_nearest): New function.
7026 (gfc_conv_intrinsic_fraction): New function.
7027 (gfc_conv_intrinsic_exponent): New function.
7028 (gfc_conv_intrinsic_spacing): New function.
7029 (gfc_conv_intrinsic_rrspacing): New function.
7030 (gfc_conv_intrinsic_function): Use them.
7032 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
7034 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
7035 build_int_2 changed from (high, low) to (low, high).
7036 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
7037 ioparm_namelist_read_mode, iocall_set_nml_val_int,
7038 iocall_set_nml_val_float, iocall_set_nml_val_char,
7039 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
7040 (gfc_build_io_library_fndecls): Add variable initialization.
7041 (gfc_new_nml_name_expr, get_new_var_expr): New function.
7042 (build_dt): Add namelist support.
7043 * io.c (value): New variable.
7044 (check_format): Support FMT_H now.
7046 2003-09-07 Paul Brook <paul@nowt.org>
7048 * io.c (gfc_resolve_dt): Error if format label is not defined.
7050 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7052 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
7053 about case_switch's break. The other is about building the condition
7054 statement tree, which judges the argument in the range of the
7055 corresponding integer type.
7056 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
7057 for the large values.
7059 2003-09-05 Paul Brook <paul@nowt.org>
7061 * f95-lang.c (expand_function_body): Gimplify the function.
7063 2003-09-04 Jeff Law <law@redhat.com>
7065 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
7068 2003-09-04 Paul Brook <paul@nowt.org>
7070 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
7071 (gfc_expand_stmt): New function.
7072 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
7073 (expand_function_body): Use tree_rest_of_compilation.
7074 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
7076 2003-09-03 Jeff Law <law@redhat.com>
7078 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
7081 2003-08-30 Paul Brook <paul@nowt.org>
7083 * f95-lang.c (builtin_function): Remove #if 0 code.
7084 (gfc_define_builtin): New function.
7085 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
7086 * mathbuiltins.def: New file.
7087 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
7088 (gfc_intrinsic_map): Use mathbuiltins.def.
7089 (gfc_intrinsic_builtin_t): Remove.
7090 (gfc_build_intrinsic_lib_fndecls): Update.
7091 * trans-types.c (gfc_init_types): Remove redundant initilaization of
7092 signed_size_type_node.
7094 2003-08-29 Paul Brook <paul@nowt.org>
7096 * arith.c (gfc_real_kinds): Use correct minimum exponents.
7098 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
7100 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
7101 (gfc_conv_intrinsic_function): Add MODULO.
7103 2003-08-22 Jason Merrill <jason@redhat.com>
7105 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
7107 2003-08-22 Andreas Jaeger <aj@suse.de>
7109 * Make-lang.in (f95.install-common): Add DESTDIR support.
7110 * (f95.install-info): Likewise.
7111 (f95.uninstall): Likewise.
7113 2003-08-19 Diego Novillo <dnovillo@redhat.com>
7115 * trans-types.c (gfc_init_types): Initialize
7116 signed_size_type_node with size_type_node.
7118 2003-08-18 Paul Brook <paul@nowt.org>
7120 * dependency.c (gfc_dependency): New enum.
7121 (check_another_array_ref): Remove.
7122 (gfc_get_array_from_component): Remove.
7124 (get_range): Remove.
7125 (get_no_of_elements): Use mpz_t, not mpf_t.
7126 (transform_sections): New function.
7127 (gfc_check_range_range): Rename ...
7128 (gfc_check_section_vs_section): ... to this. Use new function.
7129 (gfc_is_inside_range): Rewrite to match.
7130 (gfc_check_element_vs_section): Ditto.
7131 (gfc_check_element_vs_element): Ditto.
7133 (gfc_dep_resolver): Ditto. Remove unused parameter.
7134 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
7135 gfc_check_element_vs_element, gfc_is_inside_range,
7136 gfc_get_array_from_component): Remove prototypes for static functions.
7137 (gfc_dep_resolver): Update prototype.
7138 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
7140 2003-08-15 Paul Brook <paul@nowt.org>
7142 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
7143 return values to parent scope.
7144 (gfc_build_dummy_array_decl): Ditto.
7146 2003-08-14 Paul Brook <paul@nowt.org>
7148 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
7149 size of the type, not the pointer.
7150 * resolve.c (resolve_symbol): Give more accurate error message.
7152 2003-08-10 Paul Brook <paul@nowt.org>
7154 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
7156 2003-08-10 Paul Brook <paul@nowt.org>
7158 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
7161 2003-08-10 Chun Huang <compiler@sohu.com>
7163 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
7164 (resolve_symbol): Ditto.
7165 * trans-expr.c (gfc_conv_statement_function): New function.
7166 (gfc_conv_function_expr): Use it.
7168 2003-08-10 Paul Brook <paul@nowt.org>
7170 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
7171 (walk_function_expr): Set section rank.
7172 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
7174 2003-08-10 Paul Brook <paul@nowt.org>
7176 * intrinsic.c (add_sym): Prefix names with correct string.
7177 (add_sym_0s): New function.
7178 (add_subroutines): Register abort.
7180 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
7182 * gfortran.h: Introduce options to control the mangling.
7183 * lang.opt: Likewise.
7184 * options.c (gfc_init_options): Handle the options.
7185 * trans-common.c (gfc_sym_mangled_common_id): New function.
7186 (gfc_build_common_decl): Call it.
7187 * trans-decl.c (gfc_sym_mangled_function_id): New function.
7188 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
7190 2003-08-09 Paul Brook <paul@nowt.org>
7192 * module.c (mio_symbol): Always ouput a namespace for formal args.
7193 (load_needed): Namespace now belong to their proper symbol.
7194 (gfc_dump_module): Change G95=>GFORTRAN.
7196 2003-08-05 Paul Brook <paul@nowt.org>
7198 * options.c: Force -fg77-calls.
7200 2003-08-02 Paul Brook <paul@nowt.org>
7202 * Makelang.in: Rename G95_* to GFORTRAN_*.
7203 * All sources: Rename G95_* to GFC_*.
7205 2003-08-01 Paul Brook <paul@nowt.org>
7207 * fortran/Make-lang.in: Use GMPLIBS.
7208 * fortran/config-lang.in: Set need_gmp.
7209 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
7211 2003-07-27 Andreas Jaeger <aj@suse.de>
7213 * trans-decl.c (gfc_generate_constructors): Convert prototype to
7215 * trans-const.c (gfc_init_constants): Likewise.
7216 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
7218 * gfortranspec.c: Convert to ISO C90.
7219 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
7221 2003-07-26 Paul Brook <paul@nowt.org>
7223 * lang.opt: Add -fdump-parse-tree.
7224 * options.c (gfc_handle_option): Ditto.
7225 * resolve.c (resolve_forall_iterators): Convert to proper type.
7226 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
7228 2003-07-26 Paul Brook <paul@nowt.org>
7230 * Makefile.in: Add build dependencies on files common with rest of gcc.
7232 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
7234 * trans.h: Declare g95_trans_pointer_assignment.
7235 * trans-expr.c (g95_trans_pointer_assignment): New function.
7236 (g95_trans_pointer_assign): Use it.
7237 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
7238 (g95_trans_pointer_assign_need_temp): New function.
7240 2003-07-26 Paul Brook <paul@nowt.org>
7242 * gfortran.texi: Replace references to g95.
7244 2003-07-26 Paul Brook <paul@nowt.org>
7246 Rename g95_* to gfc_*.
7248 2003-07-25 Paul Brook <paul@nowt.org>
7250 * gfortran.h: Rename from g95.h.
7251 * trans-types.c (boolean_type_node, booelan_true_node,
7252 boolean_false_node): Remove.
7253 * trans-types.h: Ditto.
7255 2003-07-25 Chun Huang <compiler@sohu.com>
7257 * parse.c (accept_statement): Implement BLOCK DATA statement.
7258 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
7261 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
7263 * trans-stmt.c (temporary_list): Define.
7264 (g95_trans_assign_need_temp): New function.
7265 (g95_trans_forall_1): Modified for WHERE.
7266 (g95_trans_where_assign): Modified.
7267 (g95_trans_where_2): Modified.
7268 (g95_evaluate_where_mask): Modified.
7269 (g95_trans_where): Modified.
7270 (g95_get_temp_expr): Removed.
7271 (g95_add_to_where_stmt_list): Removed.
7272 (compute_overall_iter_number): Modified for WHERE.
7273 * trans.h: Remove where_stmt_list.
7275 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7277 * lang.opt: Correct description of options -J and -M.
7279 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
7281 * lang.opt: Move help text to here.
7282 * lang-options.h: Remove.
7284 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7285 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
7286 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
7289 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
7290 Paul Brook <paul@nowt.org>
7292 * check.c (check_rest): Use global pedantic flag.
7293 * io.c (data_desc): Ditto.
7294 * error.c (g95_warning, g95_warning_now): Use global flag.
7295 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
7296 (expand_function_body): Update to new prototypes.
7297 (g95_init): Use new option names.
7298 * g95.h (g95_option_t): Standardize names.
7299 (g95_init_options, g95_handle_option): Update prototypes.
7300 * interface.c: Use new option names.
7307 * simplify.c: Ditto.
7309 * trans-array.c: Ditto.
7310 * trans-expr.c: Ditto.
7311 * trans-types.c: Ditto.
7312 * trans-decl.c: Ditto.
7313 (g95_build_library_function_decl): Remove obsolete VPARAMS.
7315 * options.c (g95_display_help): Remove.
7316 (g95_init_options): Convert to new scheme.
7318 (g95module_option): Ditto, rename from g95_parse_arg.
7319 (g95_handle_module_path_options): New function.
7320 * trans-equivalence.c: Fix error message.
7321 * lang.opt: Corrections.
7323 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
7325 * lang.opt: New file.
7327 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7329 * decl.c (match_attr_spec): Set colon_seen.
7331 2003-07-14 Paul Brook <paul@nowt.org>
7333 * trans-array.c: Update comment.
7334 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
7335 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
7336 minmaxloc,minmaxval): Ditto.
7337 * trans-io.c (g95_trans_transfer): Ditto.
7338 * trans-stmt.c: Remove unneeded prototypes.
7339 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
7340 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
7341 (compute_inner_temp_size): Remove bits of dead code. Add comments.
7342 Don't share loopinfo.
7343 (compute_overall_iter_number): Declare as static.
7344 (allocate_temp_for_forall_nest): Ditto.
7345 (g95_trans_forall_1): Don't pass shared loopinfo.
7346 * trans.c (g95_start_block): Expand comment.
7348 2003-07-12 Paul Brook <paul@nowt.org>
7350 * arith.c (g95_index_integer_kind): Remove unused initializer.
7351 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
7352 index by size of element.
7353 (generate_loop_for_rhs_to_temp): Ditto.
7354 (allocate_temp_for_forall_nest): Use element size, not index size.
7356 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7358 * arith.c (g95_index_integer_kind): Add a TODO.
7359 * simplify.c (g95_simplify_nearest): Add a TODO.
7361 2003-07-09 Chun Huang <compiler@sohu.com>
7363 * trans.h: Add declarations for gfor_fndecl_string_scan and
7364 gfor_fndecl_string_verify.
7365 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
7366 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
7367 (g95_conv_intrinsic_verify): New function.
7368 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
7369 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
7370 of parameter 'BACK=.TRUE.'
7372 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
7374 * trans-stmt.c (iter_info, forall_info): Define.
7375 (g95_trans_forall_block): Remove.
7376 (g95_trans_forall_loop): Use forall info blocks.
7377 (g95_trans_nested_forall_loop): New function.
7378 (g95_do_allocate): Handle things other than logical masks.
7379 (generate_loop_for_temp_to_lhs): New function.
7380 (generate_loop_for_rsh_to_temp): New function.
7381 (compute_inner_temp_size): New function.
7382 (compute_overall_iter_number): New function.
7383 (allocate_temp_for_forall_nest): New function.
7384 (g95_trans_forall): Move body ...
7385 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
7387 2003-07-02 Paul Brook <paul@nowt.org>
7389 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
7390 in correct scope. Change callers to match.
7391 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
7392 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
7394 2003-07-02 Paul Brook <paul@nowt.org>
7396 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
7397 expression shape for all expressions.
7398 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
7400 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7402 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
7403 g95_parse_arg), intrinsic.c (g95_convert_type): support of
7405 * intrinsic.c, g95.h: Add g95_convert_type_warn,
7406 * resolve.c (g95_resolve_index): Call it.
7408 2003-07-02 Paul Brook <paul@nowt.org>
7410 * iresolve.c (g95_resolve_reshape): Set expression shape.
7411 (g95_resolve_shape): Ditto.
7412 * simplify.c (g95_simplify_shape): Move common code outside condition.
7413 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
7415 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7417 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
7420 2003-06-29 Paul Brook <paul@nowt.org>
7422 * array.c (g95_simplify_iterator_var): Don't bother with return value.
7423 * expr.c (find_array_element, find_component_ref): New functions.
7424 (remove_subobject_ref): New function.
7425 (simplify_const_ref): Use them. Rename from simplify_component_ref.
7426 (simplify_ref_chain): New function.
7427 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
7428 (g95_specification_expr): Simplify the expression.
7429 * resolve.c (resolve_operator): Check simplifications return code.
7430 (g95_resolve_expr): Ditto.
7432 2003-06-26 Paul Brook <paul@nowt.org>
7434 * expr.c (simplify_component_ref): New function.
7435 (g95_simplify_expr): Use it.
7436 * resolve.c (resolve_structure_cons): Handle references.
7438 2003-06-25 Paul Brook <paul@nowt.org>
7440 * trans-io.c (build_dt): Handle internal units.
7442 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
7444 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
7445 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
7446 Use g95_array_index_type instead of integer_type_node.
7447 (g95_build_common_decl, g95_set_common_master_type): Use
7448 g95_character1_type_node instead of char_type_node.
7449 * trans-equivalence.c (g95_layout_local_equiv): As above.
7451 2003-06-24 Steven G. Kargl <kargls@attbi.com>
7453 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
7454 remove last remains of -fquiet.
7456 2003-06-22 Paul Brook <paul@nowt.org>
7458 * resolve.c (resolve_operator): Don't fail if we can't simplify.
7459 (g95_resolve_expr): Ditto.
7460 (resolce_code): Mark as static.
7461 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
7462 gimplifer doesn't (yet).
7464 2003-06-20 Paul Brook <paul@nowt.org>
7466 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
7467 * match.c (g95_match_if): Add ST_PAUSE.
7468 (g95_match_stopcode): New function.
7469 (g95_match_pause, g95_match_stop): Use it.
7470 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
7471 (decode_stmt, next_statement, parse_executable): Ditto.
7472 * resolve.c (resolve_code): Ditto.
7473 * st.c (g95_free_statement): Ditto.
7474 * trans-stmt.c (g95_trans_pause): New function.
7475 * trans-stmt.h: Declare it.
7476 * trans.c (g95_trans_code): Use it.
7477 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
7479 (g95_build_builtin_function_decls): Initialize them.
7481 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
7483 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7485 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
7486 match_filepos): Fix error handling.
7488 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7490 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
7491 Add assertions on arguments.
7492 * resolve.c (expression_shape): Remove useless &.
7493 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
7494 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
7495 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
7496 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
7497 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
7498 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
7499 (g95_simplify_not, g95_simplify_scale): Add assertions.
7501 2003-06-15 Paul Brook <paul@nowt.org>
7503 Clean up stuff to work with the ssa optimizers.
7504 * convert.c (convert): Handle BOOLEAN_TYPEs.
7505 * f95-lang.c (g95_truthvalue_conversion): Implement.
7506 * trans-array.c (g95_trans_array_constructor_value): Group multiple
7508 * trans.h (g95_truthvalue_conversion): Declare.
7509 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
7510 * trans-stmt.c (g95_trans_character_select): Don't create array
7511 assignments. Mark labels as indirect jump targets.
7512 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
7513 (g95_get_dtype_cst): Handle LOGICAL types.
7515 2003-06-14 Paul Brook <paul@nowt.org>
7517 * f95-lang.c (g95_gimplify_expr): New function.
7518 * trans-array.c (g95_trans_array_constructor_value): Don't create
7520 (g95_conv_expr_descriptor): Rename simple->gimple.
7521 * trans-expr.c (conv_expr_op): Use proper logical operators.
7522 * trans-intrinsic.c (build_fixbound_expr): New function.
7523 (build_fix_expr): Ditto.
7524 (g95_conv_intinsic_aint): Use them. Use builtin functions.
7525 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
7527 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7529 * array.c (g95_compare_array_spec): Remove unreachable code.
7530 * expr.c (g95_copy_expr): Likewise.
7531 * intrinsic.c (g95_convert_type): Likewise.
7532 * misc.c (g95_code2string): Likewise.
7533 * simplify.c (g95_simplify_ishft, g95_simplify_real,
7534 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
7535 * trans-stmt.c (g95_trans_select): Likewise.
7536 * primary.c (extend_ref): Add an assertion.
7537 * simplify.c (g95_convert_constant): Add const.
7538 * intrinsic.h: Remove g95_check_x_ni.
7539 * f95-lang.c (g95_finish): Call g95_release_include_path.
7541 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7543 * resolve.c (resolve_contained_functions): Fix typo introduced on
7546 2003-06-09 Paul Brook <paul@nowt.org>
7548 * g95.h: Include system.h not hwint.h.
7549 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
7550 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
7552 2003-06-09 Paul Brook <paul@nowt.org>
7554 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
7555 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
7556 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
7557 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
7558 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
7560 * trans.h (g95_trans_equivalence, g95_trans_common,
7561 g95_add_decl_to_function): Declare.
7562 * trans-common.c, trans-equivalence.c: New files.
7564 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
7566 * intrinsic.c (g95_intrinsic_extension): Remove.
7567 (add_functions): Substitute g95_check_x for g95_check_x_ni
7569 (g95_init_expr_extensions): New function.
7570 (g95_intrinsic_func_interface): Use it.
7571 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
7572 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
7573 g95_check_precision, g95_check_present, g95_check_radix,
7574 g95_check_range, g95_check_selected_real_kind): Do not set
7575 g95_intrinsic_extension.
7576 (g95_check_x_ni): Remove now duplicate of g95_check_x.
7578 * expr.c (check_inquiry): Add FIXME, fixup some code style.
7580 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7582 * g95.h (ref_type): Name this type explicitly.
7583 * module.c (MIO_NAME): Add specialisations of mio_name.
7584 (mio_symbol_attribute, mio_typespec, mio_array_ref,
7585 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
7586 (ab_attribute): Name this type explicitly.
7587 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
7589 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
7591 * trans-intrinsic.c (g95_conv_allocated): New function.
7592 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
7594 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7596 * f95-lang.c: Don't include g95-support.h
7597 (g95_mark_addressable): Add prototype.
7598 (g95_init_decl_processing): Remove C front end hack.
7599 * f95-tree.c: Remove file.
7600 * support.c: Remove file.
7601 * g95-support.h: Remove file.
7602 * trans-types.c (g95_init_types): Set up boolean
7603 type related tree nodes.
7604 * Make-lang.in: Remove rules for dead files and
7605 dependencies on them.
7607 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
7609 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
7610 C front end dependency. Also, convert.c does not depend on
7611 g95-support.h anymore.
7612 * convert.c: Don't include c-common.h and g95-support.h
7613 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
7614 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
7615 stmts_are_full_exprs_p, current_stmt_tree,
7616 current_scope_stmt_stack): Remove.
7617 * g95-support.h (unsigned_conversion_warning): Kill proto.
7618 (boolean_type_node, boolean_true_node, boolean_false_node):
7619 Don't define here. Instead, make then true tree nodes in
7621 * support.c (c_global_trees): Die, C front end, die!!!
7622 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
7623 uintmax_type_node, string_type_node and const_string_type_node.
7624 (decl_constant_value, overflow_warning): Make static functions.
7625 They are in death row too, though.
7626 (default_conversion, c_expand_asm_operands): Remove.
7627 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
7628 trans.c: Don't include c-common.h.
7629 * trans-types.c (boolean_type_node, boolean_true_node,
7630 boolean_false_node): Make them real tree nodes.
7631 * trans-types.h (intmax_type_node, string_type_node,
7632 const_string_type_node): Hack to work around C dependencies
7633 in builtin-types.def.
7635 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7637 * decl.c (decl_types): Add some iterators-like sentinels.
7638 * decl.c (match_attr_spec): Use them.
7639 Use "decl_types" instead of "int".
7640 Add cast in call to g95_match_strings.
7641 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
7643 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
7644 (g95_interface_info): Use "g95_intrinsic_op".
7645 * dump-parse-tree.c (g95_show_namespace): Use them.
7646 * interface.c (g95_check_interfaces): Use them.
7647 * module.c (read_module, write_module): Use them.
7648 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
7649 Use "g95_intrinsic_op".
7650 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
7651 Add a default case in switch statement.
7652 * intrinsic.h (g95_generic_isym_id): Moved to...
7653 * g95.h (g95_generic_isym_id): here.
7654 (g95_intrinsic_sym): Use "g95_generic_isym_id".
7655 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
7656 * trans-intrinsic.c (g95_intrinsic_map_t,
7657 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
7658 * match.c (g95_match_intrinsic_op): Add cast in call to
7661 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
7663 * support.c (skip_evaluation, warn_conversion, lvalue_p,
7664 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
7665 constant_fits_type_p, convert_and_check,
7666 unsigned_conversion_warning): Remove these ugly remnants
7667 we inherited from the C front end.
7668 (function_types_compatible): Remove '#if 0'-edcode.
7669 (build_modify_expr): Likewise.
7670 (convert_for_assignment): Don't use the deceased functions.
7671 The parameter fundecl is now unused.
7672 (decl_constant_value): Always just return decl. In fact
7673 this function is not used at present, but it might be in
7674 the future, when we start using the tree inliner.
7675 (overflow_warning, default_conversion, c_expand_asm_operands):
7676 Abort when these are called, they are part of the C type
7677 checking implementation and therefore poison to Fortran.
7679 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
7681 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
7682 c-pretty-print.o and c-dump.o. Add a comment on why we
7683 depend on c-semantics.c.
7684 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
7685 Don't use the C front end tree dumper hook to dump the
7686 language specific tree representation -- we don't have
7687 one. So instead, inherit the default langhook.
7689 2003-06-02 Paul Brook <paul@nowt.org>
7691 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
7693 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7695 * check.c (g95_check_associated): Use proper types. Remove
7696 extraneous argument in call to g95_error().
7698 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7700 * resolve.c (resolve_operator): Make logical operands convert to the
7701 type with higher kind.
7703 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7705 * check.c (g95_check_associated): Make sure both pointer and target has
7706 the same type and rank. Null pointer or array section with vector
7707 subscript as target are not allowed.
7708 * trans.h: Declare gfor_fndecl_associated.
7709 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
7710 gfor_fndecl_associated.
7711 * trans-intrinsic.c (g95_conv_associated): New function.
7712 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
7714 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
7716 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
7717 according to POINTER itself rather than TARGET.
7718 (g95_conv_expr_descriptor): Make lbound start at 1.
7719 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
7721 2003-06-01 Paul Brook <paul@nowt.org>
7723 * expr.c (g95_type_convert_binary): Make it match the standard.
7724 * g95.texi: Remove dead link.
7726 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
7728 * g95.texi: Cleanup somewhat in preparation for inclusion
7731 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7732 Canqun Yang <canqun@yahoo.com.cn>
7734 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
7736 (g95_find_forall_index): Return proper value.
7737 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
7738 compare the return value from g95_find_forall_index.
7740 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7741 * g95.h, io.c (g95_st_label): Remove "length".
7742 (g95_symtree): Remove "link".
7743 (g95_case): Remove "code".
7744 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
7745 g95_convert_real): Make an argument pointer to const.
7746 * decl.c (colon_seen): Add a TODO.
7747 * interface.c (g95_compare_types): Fix typo.
7748 * interface.c (compare_interfaces): Preserve value of "p".
7749 * intrinsic.c (sort_actual): Remove "i".
7750 * match.c (g95_match_assign): Proper type in call to g95_match().
7751 * parse.c (next_free): Avoid duplicate call due to macro.
7752 * parse.c (check_statement_label): wrong type in call to g95_error.
7753 * primary.c (match_real_constant): Add a TODO.
7754 * resolve.c (resolve_select): Remove useless conditional.
7755 * simplify.c (g95_simplify_repeat): Proper assignment to
7756 "value.character.string".
7757 * simplify.c (g95_simplify_reshape): Wrong variable in call to
7760 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
7762 * trans-stmt.c: Remove unnecessary include file defaults.h.
7764 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
7766 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
7768 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
7769 actual variables used as FORALL indexes.
7771 2003-05-15 Paul Brook <paul@nowt.org>
7773 * trans-array.c (g95_trans_static_array_pointer): Use
7775 (g95_trans_deferred_array): Initialize static array pointers.
7776 * trans-expr.c (g95_conv_function_call): Use formal arglist to
7777 correctly pass POINTER and absent CHARACTER arguments.
7779 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
7781 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
7782 (g95_resolve_forall_body): Resolve FORALL body.
7783 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
7784 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
7785 (g95_find_forall_index): Check whether the FORALL index appears in
7786 the expression or not.
7787 (resolve_code): Modified.
7789 2003-05-14 Paul Brook <paul@nowt.org>
7791 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
7793 2003-05-13 Paul Brook <paul@nowt.org>
7795 * trans-types.c (g95_max_array_element_size): Now a tree node.
7796 (g95_init_types): Work out max size properly.
7797 (g95_get_dtype_cst): Modify to match.
7799 2003-05-11 Paul Brook <paul@nowt.org>
7801 * trans-io.c (add_case): Create a label decl for case labels.
7803 2003-05-11 Paul Brook <paul@nowt.org>
7805 * arith.c (g95_integer_index_kind): New variable.
7806 * f95-lang.c (g95_init): Move frontend initialization here ...
7807 (g95_post_options): ... from here.
7808 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
7809 * intrinsic.c (add_functions): Use index kinds.
7810 * iresolve.c: Convert to index_kind where needed.
7811 * resolve.c (g95_resolve_index): Make public, use index_kind.
7812 (resolve_array_ref): Adjust to match.
7813 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
7814 * trans-stmt.c: Ditto.
7815 * trans-types.c: Ditto.
7816 * trans-types.h (g95_array_index_kind): Remove declaration.
7817 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
7819 2003-05-07 Paul Brook <paul@nowt.org>
7821 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
7822 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
7825 2003-05-07 Paul Brook <paul@nowt.org>
7827 * trans-array.c (trans_static_array_pointer,
7828 g95_trans_array_constructor_value, g95_conv_array_initializer,
7829 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
7830 (g95_add_loop_ss_code): Convert subscripts to the correct type.
7831 * trans-stmt.c (g95_trans_character_select): Ditto.
7832 * trans-types.c (g95_init_types): Ditto.
7834 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
7836 * f95-lang.c (expand_function_body): Use input_line, not lineno.
7837 * trans-decl.c (g95_generate_function_code,
7838 g95_generate_constructors): Likewise.
7839 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
7840 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
7843 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7844 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
7845 with components point to the DERIVED type itself, and two DERIVED
7846 type with components point to each other.
7847 * trans-expr.c (g95_conv_componet_ref): Modified
7849 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
7850 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
7852 (g95_trans_pointer_assign): Implement Nullify.
7854 2003-05-01 Paul Brook <paul@nowt.org>
7856 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
7857 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
7859 2003-05-01 Paul Brook <paul@nowr.org>
7861 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
7862 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
7865 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
7867 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
7870 2003-04-28 Paul Brook <paul@nowt.org>
7872 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
7873 as their kind suggests.
7874 (g95_resolve_reshape): Ditto.
7876 2003-04-28 Chun Huang <compiler@sohu.com>
7878 * trans-expr.c (g95_conv_substring_expr): New function.
7879 (g95_conv_expr): Use it.
7881 2003-04-28 Paul Brook <paul@nowt.org>
7883 * iresolve.c (g95_resolve_transpose): Make it match the
7885 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
7887 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7889 * trans-types.c (g95_add_field_to_struct): New function to
7890 add a field to a UNION_TYPE or RECORD_TYPE.
7891 * trans-types.h (g95_add_field_to_struct): Prototype.
7892 (g95_get_derived_type): Use g95_add_field_to_struct to add
7894 * trans-io.c (g95_add_field): Remove.
7895 (ADD_FIELD): Use new g95_add_field_to_struct function.
7896 (ADD_STRING): Likewise.
7897 * trans-stmt.c (g95_trans_select): Likewise.
7898 (g95_add_field): Remove duplicated function.
7900 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
7902 Port implementation for CHARACTER SELECT from Andy's tree.
7903 * trans-stmt.c (g95_trans_character_select): Implement character
7904 select. (g95_add_field): New function.
7905 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
7906 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
7907 * g95.h (struct g95_case): Add field 'int n'.
7908 * trans.h: Declare 'gfor_fndecl_select_string'.
7910 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
7912 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
7913 (g95_insert_bbd): Die on duplicates.
7914 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
7916 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
7918 * g95.texi: Require GMP 4.0 -- like we actually
7919 do. Explain the testsuite and what-goes-where.
7920 Don't use undefined texinfo symbol. Break very
7921 long line. Remove finished item from the list
7924 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
7926 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
7929 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7931 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
7932 (g95_trans_forall_body): New function.
7934 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
7936 * resolve.c (resove_where): New function.
7937 (resolve_where_shape): New function.
7938 (resolve_code): Add call to 'resolve_where'
7939 * trans-stmt.c (g95_trans_where): Modified.
7940 (g95_trans_where_2): New function.
7941 (g95_trans_where_assign): New function.
7942 (g95_evaluate_where_mask): New function.
7943 (g95_add_to_stmt_list): New function.
7944 (g95_get_temp_expr): New function.
7945 * trans.h (where_stmt_list): New structure.
7947 2003-04-10 Paul Brook <paul@nowt.org>
7949 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
7950 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
7952 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
7954 Update after mainline -> tree-ssa-branch merge.
7955 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
7957 (g95_init): Update for new lang_hooks definition.
7958 (g95_post_options): New langhook.
7959 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
7960 * scanner.c (g95_new_file): Comment update.
7962 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
7964 * g95.h, lang-options.h: Add -Wimplicit-interface.
7965 * options.c (g95_init_options, g95_parse_arg): Set it.
7966 * interface.c (check_intents): Warn about call with implicit
7968 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
7971 2003-04-05 Paul Brook <paul@nowt.org>
7973 * iresolve.c (g95_resolve_spread): Don't resole based on type.
7974 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
7976 2003-03-29 Paul Brook <paul@nowt.org>
7978 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
7979 (g95_resolve_unpack): Ditto.
7980 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
7981 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
7982 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
7984 2003-03-25 Paul Brook <paul@nowt.org>
7986 * arith.c (g95_unary_user, g95_user): Remove dead functions.
7988 * array.c (g95_free_array_ref): Ditto.
7990 * symbol.c (g95_use_derived_tree): Ditto.
7991 * intrinsic.c (add_functions): Use simplification for SCALE.
7992 * primary.c (g95_match_rvalue): Test sym, not symtree.
7994 2003-03-25 Paul Brook <paul@nowt.org>
7996 * trans-decl.c (build_function_decl): Add parameter before it gets
7997 turned into a constant.
7998 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
7999 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
8000 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
8002 2003-03-22 Paul Brook <paul@nowt.org>
8004 * trans-array.c (g95_conv_array_initializer): Allow scalar
8006 * trans-decl.c (g95_finish_var_decl): Result variables are not
8008 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
8009 (g95_conv_intrinsic_function): Use it.
8010 * trans-types.h (g95_type_spec): Remove dead declaration.
8012 2003-03-21 Paul Brook <paul@nowt.org>
8014 * trans-decl.c (g95_build_function_decl): Mark string parameters.
8016 2003-03-20 Paul Brook <paul@nowt.org>
8018 * trans-decl.c (g95_build_function_decl): Put character length
8019 parameters at the end of the function declaration.
8020 * trans-expr.c (g95_conv_function_call): Ditto.
8021 * trans-types.c (g95_get_function_type): Ditto.
8023 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8025 * resolve.c (resolve_formal_arglist): Don't impose intent for
8026 procedure arguments of pure functions.
8027 (resolve_select): Remove redundant assignment.
8029 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8031 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
8033 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
8034 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
8036 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
8038 * symbol.c (g95_add_type): Fix typo in comment.
8041 2003-03-16 Paul Brook <paul@nowt.org>
8043 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
8044 * expr.c (g95_build_call): Remove.
8045 * f95-lang.c (puchdecl_top_level): New function.
8046 * g95.h (g95_code): Store resolved symbol, not just the name.
8047 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
8048 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
8049 (g95_get_intrinsic_sub_symbol): New function.
8050 * iresolve.c (g95_resolve_cpu_time): Use it.
8051 (g95_resolve_random_number): Ditto.
8052 * resolve.c: Set code->resolved_sym instead of code->sub_name.
8053 * trans-decl.c (g95_get_extern_function_decl): Give external decls
8054 the correct DECL_CONTEXT. Add global symbold to the global scope.
8055 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
8058 2003-03-16 Paul Brook <paul@nowt.org>
8060 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
8061 * options.c (g95_parse_arg): Ditto.
8062 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
8063 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
8064 for the procedure, not the parameter.
8065 * trans-array.c (g95_trans_g77_array): New function.
8066 (g95_trans_assumed_size): Use it.
8067 (g95_trans_dummy_array_bias): Ditto.
8068 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
8069 (g95_conv_expr_descriptor): ... to here. Update callers.
8070 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
8071 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
8072 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
8073 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
8074 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
8075 (g95_sym_type): Ditto.
8077 2003-03-15 Paul Brook <paul@nowt.org>
8079 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
8081 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
8083 2003-03-14 Paul Brook <paul@nowt.org>
8085 * trans-array.c (g95_array_is_packed): Remove.
8086 (g95_conv_array_base): Correctly handle all descriptorless cases.
8087 (g95_conv_array_stride): Use descriptorless strides.
8088 (g95_trans_dummy_array_bias): Don't always repack the array.
8089 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
8091 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
8092 dummy and non-dummy arrays...
8093 (g95_sym_type, g95_get_derived_type): ... like these.
8094 (g95_get_array_type_bounds): Allow discontiguous arrays.
8096 2003-03-12 Paul Brook <paul@nowt.org>
8098 * array.c (g95_resolve_array_spec): Fix comment.
8099 * g95.h (symbol_attributes): New flag always_explicit.
8100 * resolve.c (resolve_formal_arglist): Set it always_explicit.
8101 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
8102 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
8103 (g95_trans_array_bounds): Allow assumed shape arrays.
8104 (g95_trans_repack_array): Remove.
8105 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
8106 * trans-decl.c (g95_build_qualified_array): Only ignore absent
8107 bounds for assumed size arrays.
8108 (g95_build_dummy_array_decl): Use descriptorless arrays.
8109 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
8110 (g95_trans_pointer_assign): Fix typo.
8111 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
8113 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
8114 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
8115 Also modify callers.
8116 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
8118 2003-03-08 Paul Brook <paul@nowt.org>
8120 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
8121 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
8122 * resolve.c (compare_spec_to_ref): Allow full array sections.
8124 2003-03-08 Paul Brook <paul@nowt.org>
8126 * expr.c (g95_simplify_expr): Also simplify array index and
8127 substring expressions.
8128 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
8129 * trans-array.c (g95_trans_array_bounds): New function.
8130 (g95_trans_auto_array_allocation): Use it.
8131 (g95_trans_assumed_size): Rewrite.
8132 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
8133 (gfor_fndecl_repack): Remove.
8134 (g95_build_qualified_array): Handle absent upper bounds.
8135 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
8136 (g95_get_symbol_decl): Update.
8137 (g95_build_intrinsic_function_decls): Initialize new decls.
8138 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
8139 (gfor_fndecl_repack): Remove.
8140 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
8141 * trans-types.c: (g95_build_array_type): Merge duplicated code..
8142 (g95_get_nodesc_array_type): Handle absent bounds.
8143 * trans-types.h (g95_get_nodesc_array_type): Declare.
8145 2003-03-04 Paul Brook <paul@nowt.org>
8147 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
8150 2003-03-02 Paul Brook <paul@nowt.org>
8152 * options.c (g95_init_options): Drfault to 1.
8153 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
8154 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
8155 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
8156 Handle non-constant size automatic arrays.
8157 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
8158 generic bound functions.
8159 (g95_trans_auto_array_allocation): Don't create a descriptor.
8160 (g95_trans_assumed_size): New function (broken).
8161 (g95_trans_dummy_array_bias): Remove unused var.
8162 * trans-array.h (g95_trans_assumed_size): Declare.
8163 * trans-decl.c (create_index_var): New fuction.
8164 (g95_build_qualified_array): New function.
8165 (g95_get_symbol_decl): Use it.
8166 (g95_trans_deferred_vars): Handle assumed shape seperately.
8167 * trans-types.c (get_element_type): Handle heap allocated arrays.
8168 (g95_is_nodesc_array): Include non-const size arrays.
8169 (g95_get_nodesc_array_type): Ditto.
8171 2003-02-23 Paul Brook <paul@nowt.org>
8173 * trans-array.c (g95_array_init_size): Should use stride, not size of
8176 2003-02-18 Paul Brook <paul@nowt.org>
8178 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
8179 after intrinsic function check.
8181 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8183 * io.c (match_io): Fix missing return value and remove useless
8185 * match.c (g95_match): Remove useless assignment.
8186 * module.c (parse_string): Remove useless post increment.
8187 * simplify.c (g95_simplify_verify): Remove useless assignment.
8189 2003-02-15 Paul Brook <paul@nowt.org>
8191 * expr.c (restricted_intrinsic): Handle bad values gracefully.
8192 * g95.h (symbol_attribute): Add referenced member.
8193 (g95_symbol): Add dummy_order member.
8194 (g95_set_sym_referenced): Declare.
8195 * match.c (g95_match_assignment, g95_match_call): Use it
8196 * primary.c (match_actual_arg, g95_match_rvalue,
8197 g95_match_variable): Ditto.
8198 * symbol.c (next_dummy_order): New variable.
8199 (g95_set_sym_referenced): New function.
8200 (check_done): New function.
8201 (g95_add_*): Use it.
8202 * trans-decl.c: Make formatting conform to GCC standards.
8203 (g95_defer_symbol_init): Add dummy variables in the right order.
8204 (g95_get_symbol_decl): Only accept referenced variables.
8205 (g95_create_module_variable): Module variables are always required.
8206 (generatr_local_decls): New function.
8207 (generate_local_vars): New function.
8208 (g95_generate_function_code): Use it.
8210 2003-02-13 Paul Brook <paul@nowt.org>
8212 * trans-decl.c (g95_conv_struct_cons): Remove.
8213 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
8214 * trans-expr.c (g95_conv_structure): New function.
8215 (g95_conv_expr): Use it.
8217 2003-02-09 Paul Brook <paul@nowt.org>
8219 * trans-array.c (g95_array_init_size): Don't evaluate the linit
8220 expressions multiple times.
8221 (g95_trans_auto_arry_allocation): Use pointer not tmp.
8223 2003-02-08 Paul Brook <paul@nowt.org>
8225 * module.c (mio_symtree_ref): Declare as static.
8226 (mio_expr): Remove dead code.
8227 (read_module): Set the symtree link for fixups.
8228 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
8229 (build_round_expr): ... to this.
8230 (g95_conv_intrinsic_aint): New function.
8231 (g95_conv_intrinsic_function): Use it.
8233 2003-02-08 Paul Brook <paul@nowt.org>
8235 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
8236 offset after modificaton, not the increment expression.
8237 * dependency.c: Kill excess whitespace.
8239 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
8241 * dependency.h: Remove some function declarations.
8242 * dependency.c (get_no_of_elements): Change this function not to
8244 * other: Add comments for all modified functions.
8246 2003-02-06 Paul Brook <paul@nowt.org>
8248 * g95spec.c (lang_specific_functions): Fix initializer warning.
8249 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
8250 for structure type names.
8251 * trans-decl.c (g95_cons_structure_cons): New function.
8252 (g95_get_symbol_decl): Use it.
8253 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
8256 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8258 * resolve.c (compare_cases): Add const to casts.
8260 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8262 * g95.h (g95_check_f): Change a1 to f1m.
8263 * intrinsic.c (add_sym_1m, check_specific,
8264 g95_intrinsic_func_interface): Use it.
8266 * module.c (init_pi_tree): Remove useless cast.
8267 (fp2): Fix argument type.
8269 * parse.c (parse_select_block): Add comment.
8271 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
8273 * lang-options.h: Fix warning involving C90 concatenated
8276 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8277 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8279 * io.c (format_asterisk): Complete initializer to kill warning.
8280 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
8281 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
8282 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
8283 new defines to complete initializers. Kills all warnings.
8285 * Make-lang.in: Comment cleanup.
8287 2003-02-05 Paul Brook <paul@nowt.org>
8289 * array.c (g95_free_constructor): Handle NULL expressions.
8290 * resolve.c (resolve_structure_cons): Ditto.
8291 * decl.c (g95_match_null): New Function.
8292 (variable_decl): Use it.
8293 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
8294 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
8295 * trans-types.c (g95_set_decl_attributes): Remove empty function.
8297 2003-02-05 Paul Brook <paul@nowt.org>
8299 * trans.h (build1_v): New macro.
8300 (build_v): Remove pointless and incorrect prototype.
8301 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
8302 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
8304 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
8306 * Make-lang.in (F95_OBJS): Remove one more dead file.
8308 2003-02-01 Paul Brook <paul@nowt.org>
8310 * lang-specs.h: Don't pass -ffixed-form to the linker.
8311 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
8313 2003-02-01 Paul Brook <paul@nowt.org>
8315 * Make-lang.in (F95_OBJS): Remove dead files.
8316 * trans-array.c (g95_array_init_size): Do the right thing when
8318 * trans-decl.c (g95_generate_function_code): Initialize deffered
8319 symbol list before translating contained subroutines.
8320 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
8321 scalar invariant values here...
8322 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
8323 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
8325 2003-01-29 Paul Brook <paul@nowt.org>
8327 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
8328 (g95_walk_elemental_function_args): Reverse chains before adding.
8329 (g95_reverse_ss): Move about a bit.
8330 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
8333 2003-01-28 Paul Brook <paul@nowt.org>
8335 * intrinsic.c (resolve_intrinsic): Use correct union member.
8336 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
8338 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
8339 use associated variables.
8340 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
8341 * trans-expr.c (g95_conv_expr_present): ... to here.
8342 * trans.h: Declare it.
8343 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
8345 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
8347 * array.c (expand_iterator): Suppress useless assignment.
8348 * decl.c (match_char_spec): Ditto.
8349 * io.c (match_io_iterator): Ditto.
8350 * primary.c (match_real_constant): Ditto.
8351 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
8352 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
8353 * matchexp.c (match_add_operand, match_level_5): Likewise.
8354 * module.c (parse_atom, find_enum): Likewise.
8355 * resolve.c: move #include <string.h>
8356 (resolve_select): Fix serious typo.
8358 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
8360 * Make-lang.in: Don't build with broken tree-ssa-pre.
8362 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
8364 * resolve.c (resolve_index): Add a TODO.
8365 * symbol.c: Remove useless "#include <ctype.h>".
8367 2003-01-27 Paul Brook <paul@nowt.org>
8369 * check.c (check_rest): Allow different type kinds as an extension.
8370 * g95.h (g95_resolve_f): Add f1m.
8371 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
8372 * intrinsic.h: Chenge prototypes for MIN and MAX.
8373 * iresolve.c (g95_resolve_minmax): New function.
8374 (g95_resolve_min, g95_resolve_max): Use it.
8375 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
8377 (g95_conv_intrinsic_present): Fix logic.
8379 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
8381 * g95.h (g95_case): Don't be a tree, be a double linked list.
8382 * match.c (match_case_selector): Remove redundant semantics check.
8383 Clean up a few goto's to make it a tiny little bit faster.
8384 * resolve.c (case_tree): Die.
8385 (compare_cases): Accept and compare unbounded cases too.
8386 (check_case_overlap): Don't build a tree. Instead, merge-sort the
8387 whole list of g95_cases passed from resolve_select.
8388 (sane_logical_select): Die.
8389 (check_case_expr): Return FAILURE if a CASE label is of the wrong
8391 (resolve_select): Fixup case expression for computed GOTOs, put it
8392 in expr, not expr2, for easier handing in the parse tree dumper and
8393 the code generator. Rewrite the rest of the function: Kill
8394 unreachable case labels and unreachable case blocks.
8395 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
8396 an EXEC_SELECT, not case2 anymore.
8397 * trans-const.c (g95_conv_constant_to_tree): New function.
8398 (g95_conv_constant): Use it.
8399 * trans-const.h: Declare prototype for the new function.
8400 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
8401 g95_trans_character_select): New static functions.
8402 (g95_trans_select): Rewrite.
8404 2003-01-26 Paul Brook <paul@nowt.org>
8406 * intrinsic.c (add_fnctions): Properly add dreal.
8407 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
8408 (g95_conv_intrinsic_function): Use it.
8409 * trans-io.c (build_dt): Abort on internal files (unimplemented).
8411 2003-01-26 Paul Brook <paul@nowt.org>
8413 Widespread changes to the handling of symbols in expressions. These
8414 are now linked via g95_symtree nodes.
8415 * parse.c (g95_fixup_sibling symbols): New function.
8416 (parse_contained): Use it.
8417 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
8418 contained procedure that has bee correctly fixed up.
8419 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
8421 2003-01-24 Paul Brook <paul@nowt.org>
8423 * trans-array.c (g95_walk_expr): Function result attributes are in
8425 * trans-expr.c (g95_conv_function_call,
8426 g95_trans_arrayfunc_assign): Ditto.
8427 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
8429 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
8431 * expr.c (check_restricted): Fix error message.
8432 * symbol.c (free_st_labels): Plug memleak.
8434 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
8436 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
8437 reduce_binary_aa, reduce_binary, eval_intrinsic,
8438 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
8439 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
8440 for typesafe intrinsics helper functions.
8441 (g95_intrinsic_sym): Use them.
8442 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
8443 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
8444 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
8445 check_specific, g95_intrinsic_func_interface,
8446 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
8448 * trans-decl.c (g95_get_extern_function_decl): Likewise.
8449 * Make-lang.in: Don't disable warnings for strict prototypes
8450 any longer, everything is typesafe now.
8452 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
8454 * bbt.c (duplicate_node): Make static.
8455 * module.c (module_name): Make static.
8456 * scanner.c (include_dirs): Make static.
8458 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8460 Hard coded _gfor_'s should not show up anymore.
8461 * g95.h (PREFIX): New macro.
8462 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
8464 (g95_resolve_random_number): Likewise.
8465 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
8466 * trans-io.c: Remove 'prefix' macro. Replace all uses with
8467 the new PREFIX macro from g95.h.
8469 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8471 The troubles of forking... Andy implemented this just now too.
8472 Let's stick to that and keep the trees close.
8473 * g95.h (g95_st_label): 'format' member is now a g95_expr.
8474 * io.c: Revert previous changes.
8475 (g95_match_format): Match the format string as a character
8477 * match.h (g95_statement_label): Declare external.
8478 * parse.c: Revert previous changes.
8479 * symbol.c (g95_free_st_label): Free a g95_expr instead
8481 * trans-io.c: Revert previous changes.
8482 (build_dt): Use set_string to set the format string.
8484 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8486 * io.c (format_string): Make non-static.
8487 (g95_match_format): Remember the format string.
8488 (terminate_io): Add I/O termination for empty I/O lists.
8489 * match.h: Declare external format_string.
8490 * parse.c (check_statement_label): Attack the format string
8491 to a format label for FORMAT statements.
8492 * trans-io.c (g95_add_field): Define prefix macro. Replace
8493 all uses of PREFIX define with a use of this macro.
8494 (build_dt): Implement formatted I/O for format labels.
8496 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
8498 * lang-options.h: Kill "-std=F".
8499 * options.c: Remove unimplemented "-std=F". Modify
8501 * misc.c (g95_terminal_width): New function.
8502 * error.c (g95_error_init_1): Use g95_terminal_width.
8503 * g95.h: Add prototype for g95_terminal_width, remove
8506 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
8508 * Make-lang.in: Fix typo.
8510 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8512 * g95.h (struct g95_case): Remove unused cruft, new member
8513 'where' to keep track of the locus of the default case.
8514 * match.c (g95_match_case): Add locus to the current case.
8515 (match_case_selector): Likewise.
8516 * parse.c (parse_select_block): Move semantics check for
8517 multiple DEFAULT cases out of here to...
8518 * resolve.c (check_case_overlap): ...here. Return sooner
8520 (check_case_expr): Take two g95_cases now, use to sure the
8521 expression kinds are the same.
8522 (resolve_select): Cleanup.
8524 2003-01-18 Paul Brook <paul@nowt.org>
8526 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
8527 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
8529 (g95_get_extern_function_decl): Put decls in the correct context.
8531 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
8533 * trans-io.c: Port changes from Andy to set ERR flag.
8535 2003-01-17 Paul Brook <paul@nowt.org>
8537 * trans-array.c: Add various comments.
8538 (g95_ss_terminator): Declare as const.
8539 (g95_walk_expr): Remove first parameter and update all callers.
8540 (g95_walk_op_expr): Initialize scalar SS properly.
8541 * trans-array.h (g95_walk_expr): Update prototype.
8542 * trans-expr.c: Update for new g95_walk_expr.
8543 * trans-intrinsic.c: Ditto.
8544 * trans-io.c: Ditto.
8545 * trans.h: Various comments for SS chains.
8547 2003-01-17 Paul Brook <paul@nowt.org>
8549 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
8551 * intrinsic.c (add_functions): Use them.
8552 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
8553 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
8555 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8557 Fallout of a small merge conflict:
8558 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
8560 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8562 * initrinsic.c: New add_sym_* functions for strong typing.
8563 (add_conv): Make prototype strict.
8564 * dump-parse-tree.c, dependency.c: Include config.h
8565 * resolve.c, trans-io.c: Fix typos.
8567 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8569 * dump-parse-tree.c (g95_show_code_node): Show the
8570 condition for a computed GOTO that was transformed
8571 to a SELECT CASE construct.
8572 * resolve.c (check_case_overlap): Revert previous switch
8573 to treaps, it was too slow and didn't catch all trouble.
8574 (resolve_symbol): Be more flexible about module procedures.
8575 * symbol.c (check_conflict): Point to relevant section in
8576 the standard for dubious conflict. Allow procedure
8577 dummy arguments to be optional again.
8578 * trans-io (add_field): Rename to g95_add_field. Change
8580 * trans-stmt (trans_select): Handle unbounded cases for
8581 integer SELECT CASE constructs. Fix/add more comment.
8583 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
8585 * g95.h: Uses GCC's function attribute macros.
8586 * error.c, module.c, parse.c, g95.h: More function attributes.
8588 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8590 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
8591 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
8594 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
8596 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
8598 * trans.c (g95_trans_code): Use annotate_all_with_file_line
8599 instead of nowdead wrap_all_with_wfl.
8601 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8603 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
8604 before generating code, so we can still see it even if the code
8605 generation phase dies.
8607 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8609 * decl.c (build_sym): Split out initialization expression parts...
8610 (add_init_expr_to_sym): ...to here.
8611 (variable_decl): Add the symbol following an attribute list to the
8612 symbol tree before parsing the optional initialization expression
8613 if the symbol is not of a derived type.
8614 * primary.c (g95_match_rvalue): Don't assume a symbol always has
8615 a value if it is a PARAMETER.
8617 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8619 * misc.c: Don't #include <mcheck.h>
8620 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
8621 ever was a glibc bug, then either this was never reported to
8622 glibc people, or it has been fixed for so long that there's
8623 no information you can find about it, anywhere.
8625 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
8628 * module.c (attr_bits, bt_types, array_spec_types):
8629 Switch 'const' and 'static'.
8630 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
8632 GNU'ify source code:
8633 * trans-io.c: Numerous fixes, one fixed warning and a few
8634 TODO markers so that we don't forget about them.
8636 2003-01-13 Paul Brook <paul@nowt.org>
8638 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
8639 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
8641 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
8642 * match.c (g95_match_stop): Fix dumb == -> != error.
8644 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8646 * dump-parse-tree.c (show_indent): Add line breaks. This
8647 whole dumping process needs cleanups.
8648 * f95-lang.c (g95_mark_addressable): Fix prototype to match
8649 the langhook. Fix 'return's accordingly.
8650 * g95-support.h: Adjust prototype.
8651 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
8652 * lang-options.h: Add '-fsyntax-only'.
8653 * options.c (g95_init_options): Init 'no_backend'.
8654 (g95_parse_arg): Deal with '-fsyntax-only'.
8655 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
8658 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8660 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
8661 arguments. Also make sure that if a symbol is marked INTRINSIC,
8662 an intrinsic with the symbol's name actually exists.
8663 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
8664 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
8665 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
8667 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
8669 * resolve.c (resolve_contained_functions): Fix condition, don't
8670 throw internal_error if a child namespace has no name. Apparently
8671 this can be the case?
8673 2003-01-11 Paul Brook <paul@nowt.org>
8675 Port changes from Andy's tree:
8676 * g95.h (g95_code): Add stop_code.
8677 * match.c (g95_match_stop): Detter syntax checking.
8678 * resolve.c (resolve_generic_f0): Return match type.
8679 (resolve_generic_f): Remove dead/duplicated code.
8680 (resolve_specific_f): Ditto.
8681 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
8682 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
8683 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
8685 2003-01-11 Paul Brook <paul@nowt.org>
8687 * trans-array.c: Various documentation/comment changes.
8688 * trans-stmt.c: Ditto.
8691 2003-01-10 Paul Brook <paul@nowt.org>
8693 * options.c/h: Add -fdump-parse-tree as alias of -v.
8695 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8697 * dump-parse-tree.c (g95_show_namespace): Fixed another
8698 typo. Sorry, it's Friday...
8700 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8703 * trans-array.c, trans-array.h, trans.c, trans-const.c,
8704 trans-const.h, trans-decl.c, trans-expr.c, trans.h
8705 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
8706 trans-types.c: Fix bogus copyright years, add 2003.
8707 * trans-types.h: Give copyright header.
8709 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8711 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
8712 * expr.c, options.c, scanner.c: Add some more 'const' markers.
8713 * intrinsic.c: Some constant strings moved to read-only memory.
8714 * io.c (format_asterisk): Move to...
8717 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8719 * dump-parse-tree.c (g95_show_namespace): Dump implicit
8720 types for ranges instead of per-letter. Indent the
8721 'CONTAINS' just like everything else.
8722 * resolve.c (resolve_contained_functions): Clarify comment.
8723 Explain non-obvious conditional expression. Improve
8724 diagnostics if tyoe cannot be resolved.
8725 Port semi-fix from Andy's tree:
8726 (was_declared): Move up before first use.
8727 (generic_sym, specific_sym): New functions. Code moved
8728 out if procedure_kind.
8729 (procedure_kind): Simplify using new functions.
8730 (resolve_generic_f): Make sure the functions we find in
8731 a parent namespace is generic.
8732 (resolve_specific_f): Ditto for specific functions.
8734 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8736 * trans-stmt.c, trans.c: Fix some code style issues. Add
8737 some more comment (but still not enough!).
8739 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
8741 * symbol.c (flavors, procedures, intents, acces_types,
8742 access_types, ifsrc_types): Make const.
8743 * misc.c (g95_string2code): Make 'm' param 'const'.
8744 * module.c (find_enum, write_atom, mio_name): Make
8746 (attr_bits, bt_types, array_spec_types, array_ref_types,
8747 ref_types, expr_types): Make const.
8748 * g95.h: Adjust external decls.
8750 2003-01-09 Paul Brook <paul@nowt.org>
8752 * Testsuite: Add a load of new cases.
8754 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8756 * Make-file.in: Add dependency on back end header files;
8757 a parallel build should work now.
8758 * f95-lang-c (lang_identifier): Remove bogus comment.
8759 (g95_be_parse_file): Fix prototype.
8760 (g95_init): Make static.
8761 (g95_finish): Make static.
8762 * error.c (g95_syntax_error): Kill. Make define in...
8763 * g95.h (g95_syntax_error): Define.
8764 (g95.options): Make 'source' member 'const'.
8765 * interface.c (g95_match_interface): Explain
8766 hard-to-read condition.
8767 (g95_match_end_interface): Ditto.
8768 * trans_const.c (g95_build_string_const): Make 's' parameter
8770 * trans_const.h: Adjust protoype accordingly.
8771 * trans-decl.c: Include tree-dump.h
8772 (g95_generate_function_code): Build fixes for recent changes
8773 in the tree-ssa branch.
8775 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8777 * format.c: Kill, move code from here...
8779 * Make-lang.in: Adjust.
8782 * BUGS: Mention where to submit bugs. Move old content...
8783 * TODO: ...to here. New file.
8785 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
8786 Fix most warnings, and suppress the ones we can't fix for now.
8787 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
8788 these warnings just clutter the screen and there's not much
8789 we can do about them for now anyway.
8790 * check.c, iresolve.c: Mark unused function parameters.
8791 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
8792 they should be resolved before they get here.
8793 * error.c: Remove unused FILE *status_out.
8794 * f95-lang.c (g95_init): Remove bogus cast.
8795 * Many files: Make things 'const' where required.
8796 * g95.h: Fix prototypes for all modified functions above.
8797 (g95_options): Remove 'object' member.
8799 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8801 * Make-file.in: Cleanup bogus targets. Add more comment.
8802 * lang-options.h: New option '-w'.
8803 * g95.h: add no_options field to struct g95_options.
8804 * options.c (g95_init_options): Default no_warnings to off.
8805 (g95_parse_arg): Recognise the '-w' switch and its alias,
8807 * error.c (g95_warning, g95_warning_now): Don't emit warning if
8808 no_warning option is set.
8809 * iresolve.c (g95_resolve_shape): Fix warning.
8811 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8813 * primary.c (g95_next_string_char): Rename next_string_char, and
8814 make static. Adjust callers accordingly.
8815 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
8816 callers accordingly.
8817 * g95.h: Split out all g95_match* functions to...
8818 * match.h: ...here. New file.
8819 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
8820 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
8822 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
8824 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
8825 g95_merge_new_implicit): New functions.
8826 (g95_match_implicit_none, g95_match_implicit): Move from here...
8827 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
8828 Modify to use the new functions in symbol.c.
8829 * g95.h: Add and move prototypes.
8831 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8833 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
8834 node compare function.
8835 (g95_insert_bbt): Likewise.
8836 (g95_insert_bbt_with_overlap): Likewise.
8837 (g95_delete_bbt): Likewise.
8838 (delete_treap): Likewise. Also fix a potential bug when calling it.
8839 * module.c (compare_pointers): Change proto to compare_fn.
8840 (compare_integers): Likewise.
8841 (compare_true_names): Likewise.
8842 (find_true_name): Adjust call to compare_true_names to match proto.
8843 (require_atom, write_atom, mio_name): Fix 'const' warnings.
8844 (init_pi_tree): Make compare a compare_fn instead of (int *).
8845 * resolve.c (compare_cases): Change proto to compare_fn.
8846 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
8847 it static, and rename to compare_symtree.
8848 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
8850 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
8851 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
8853 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8854 * Make-lang.in: Fix spaces/tabs issues from previous patch.
8855 * patch.options: Blow away Paul's checkin mistake :-)
8856 * io.c (terminate_io): Fix memory leak (Arnaud).
8858 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
8860 * Make-lang.in: Teach about building DVI, info manual.
8861 * g95.texi: New file.
8863 2003-01-02 Paul Brook <paul@nowt.org>
8865 * trans-array.c (g95_reverse_ss): Make static and don't use.
8866 (g95_conv_ss_descriptor): Don't use g95_loopinfo
8867 (g95_conv_array_parameters): Modify for pointer assignments.
8868 (g95_walk_subexpr): New function.
8869 (g95_walk_expr*): Use it.
8870 * trans-array.h (g95_reverse_ss): Remove prototype.
8871 * trans-expr.c (g95_trans_pointer_assign): Implement.
8872 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
8873 * trans-intrinsic.c: Sync with scalarizer changes.
8874 * trans-io.c: Ditto.
8876 2002-12-29 Paul Brook <paul@nowt.org>
8878 * trans-array.c: Document calling convention for arrays.
8880 2002-12-19 Paul Brook <paul@nowt.org>
8882 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
8883 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
8884 optional parameters for some intrinsics.
8885 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
8886 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
8887 optional parameters.
8888 * trans.h (g95_se): Add ignore_optional flag.
8890 2002-12-15 Paul Brook <paul@nowt.org>
8892 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
8893 * trans-decl.c (g95_generate_function_code): Use TDI_original.
8895 2002-12-14 Paul Brook <paul@nowt.org>
8897 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
8899 2002-12-12 Paul Brook <paul@nowt.org>
8901 * trans-array.c (g95_trans_array_constructor_subarray): Fully
8902 initialize the scalarizer.
8903 (various): Update to new format of g95_expr->value.constructor.
8905 2002-12-08 Paul Brook <paul@nowt.org>
8907 * trans-array.c (g95_put_offset_into_var): New function.
8908 (g95_trans_array_constructor_subarray): New function.
8909 (g95_trans_array_constructor_value): Use it.
8910 (g95_array_cons_size): Don't abort() on array components.
8912 2002-12-08 Paul Brook <paul@nowt.org>
8914 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
8915 * support.c: Update #includes.
8916 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
8917 * trans-array.c: Update #includes.
8919 * trans-const.c: Ditto.
8920 * trans-io.c: Ditto.
8921 * trans-types.c: Ditto.
8922 (g95_init_types): Set size_type_node.
8923 * trans-decl.c: Update #includes.
8924 (gfor_fndecl_adjust{l,r}): Declare and initialize.
8925 * trans-stmt.c: Update #includes.
8926 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
8927 (g95_trans_select): Fix check for unbounded ranges.
8928 * trans-expr.c: Update #includes.
8929 (g95_conv_string_tmp): New function.
8930 (g95_conv_concat_op): Use it.
8931 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
8932 * Trans-intrisic.c: Update #includes.
8933 (g95_conv_intrinsic_strcmp): New function.
8934 (g95_conv_intrinsic_adjust): Ditto.
8935 (g95_conv_intrinsic_function: Use them.
8937 2002-11-30 Paul Brook <paul@nowt.org>
8939 * trans-array.c (g95_walk_function_expr): Handle non-array return by
8941 * trans-dec.c (g95_build_function_decl): Handle character return
8943 (g95_get_fake_result_decl): Ditto.
8944 (g95_trans_deferred_vars): Ditto.
8945 * trans-expr.c (g95_conv_function_call): Ditto.
8946 (g95_trans_arrayfunc_assign) Limit to array valued functions.
8947 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
8948 (g95_conv_intrinsic_function): Use it.
8949 * trans-types.c (g95_sym_type): Handle functions returning strings.
8950 (g95_return_by_reference): Ditto.
8951 (g95_get_function_type): Ditto.
8953 2002-11-18 Paul Brook <paul@nowt.org>
8955 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
8956 requires a temporary.
8957 (g95_trans_select): Handle computed gotos.
8958 * trans-types.c (g95_build_array_type): Warn about non-functional
8959 assumed shape arrays.
8960 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
8962 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
8963 (g95_conv_intrinsic_int): New function.
8964 (g95_conv_intrinsic_mod): New function.
8965 (g95_conv_intrinsic_ichar): New function.
8966 (g95_conv_intrinsic_function): Use them.
8967 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
8969 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
8971 * trans-types.c (g95_build_array_type): Assumed
8972 sized arrays can have rank > 1.
8973 * trans.c (g95_trans_code): Remove erroneous
8974 warning about CONTINUE.
8975 * trans-expr.c (g95_conv_variable): Remove
8978 2002-11-15 Paul Brook <paul@nowt.org>
8980 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
8982 2002-10-31 Paul Brook <paul@nowt.org>
8984 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
8985 * trans-expr.c (g95_conv_component_ref): Handle character string
8987 (g95_conv_string_parameter): Ditto.
8988 * trans-types.c (g95_get_derived_type): Add length decl to caracter
8991 2002-10-10 Paul Brook <paul@nowt.org>
8993 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
8994 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
8996 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
8997 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
8998 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
8999 * trans-types.c (pvoid_type_node): Declare and initialize.
9000 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
9001 (g95_array_allocate): Fix when base==data.
9002 (g95_conv_array_parameter): Correctly handle reduced rank sections.
9003 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
9005 2002-10-09 Paul Brook <paul@nowt.org>
9007 * (g95_conv_expr_reference): Handle character strings correctly.
9009 2002-10-07 Paul Brook <paul@nowt.org>
9011 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
9013 * trans-array.c (g95_build_array_initializer): Remove.
9014 (g95_conv_array_initializer): New Function.
9015 (g95_trans_auto_arry_allocation): Cleanup.
9016 (g95_trans_init_character_array): Remove.
9017 * g95spec.c: Link in libgforbegin.
9018 * trans.c (g95_generate_code): Rename main function to MAIN__.
9019 (g95_create_var): New function.
9020 (g95_create_var_np): New function.
9021 (g95_evaluate_now): New function.
9022 (g95_start_block): New function.
9023 (g95_finish_block): New function.
9024 (g95_add_expr_to_block): New function.
9025 (g95_add_block_to_block): New function.
9026 * trans-expr.c (g95_conv_componen_ref): New function.
9027 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
9028 (F95_OBJS): Add dependency.o.
9029 * f95-lang.c (g95_is_simple_stmt): Remove.
9030 * f95-tree.c (mark_not_simple): New function.
9031 (unshare_all_trees): New function.
9032 (create_tmp_var, create_tmp_alias_var): Remove.
9033 * support.c (declare_tmp_vars, tree_last_decl): Remove.
9034 * trans*: Convert to new IR using GENERIC trees. Don't bother about
9035 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
9037 2002-10-01 Paul Brook <paul@nowt.org>
9039 * trans-array.c: Add support for descriptorless arrays.
9040 (g95_conv_array_data): New function.
9041 (g95_conv_array_base): New function.
9042 * trans-array.h: Declare these here.
9043 * trans-decl.c(g95_create_mopdule_variable): Perform variable
9044 initialization and creation here.
9045 (g95_create_module_vars): Instead of here.
9046 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
9047 * trans-intrinsic.c: Ditto.
9048 * trans-types.c (g95_is_nodesc_array): New function.
9049 (g95_get_nodesc_array_type): New function.
9050 (g95_sym_type, g95_get_derived_type): Use them.
9051 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
9053 2002-09-28 Paul Brook <paul@nowt.org>
9055 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
9056 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
9059 2002-09-24 Paul Brook <paul@nowt.org>
9061 * f95-lang.c (listify): Remove declaration.
9062 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
9064 * f95-tree.c (get_name): New function.
9065 * trans.c (module_namespace): Remove.
9066 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
9067 * trans-types.c: Ditto.
9069 2002-09-19 Paul Brook <paul@nowt.org>
9071 * trans-array.c (g95_get_array_cons_size): New Function.
9072 (g95_con_ss_startstride): Handle Array constructors.
9073 (g95_conv_loop_setup): Ditto.
9074 (g95_conv_array_parameter): Ditto.
9075 * tras-decl.c (g95_finish_var_decl): Make initializes variables
9078 2002-09-19 Paul Brook <paul@nowt.org>
9080 * trans.c (g95_simple_fold_tmp): Detect variables inside
9082 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
9084 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
9086 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
9088 2002-09-14 Paul Brook <paul@nowt.org>
9090 * trans.c (g95_create_module_variable): Move to trans-decl.c.
9091 * trans-const.c (g95_conv_string_init): New Function.
9092 * trans-const.h: Declare it.
9093 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
9094 variables. Don't bail on intrinsic symbols.
9095 (get_extern_function_decl): Handle specific intrinsic functions.
9096 * trans-types.c (g95_sym_type): Dummy functions don't return
9098 * trans-array.c (g95_build_array_initializer): New Function.
9099 (g95_trans_auto_array_allocation): Build initializer for static decls.
9100 Don't use mpz_addmul, it's GMP4 only.
9102 2002-09-12 Paul Brook <paul@nowt.org>
9104 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
9105 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
9106 assembler names for module procedures.
9108 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
9110 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
9113 2002-09-10 Paul Brook <paul@nowt.org>
9115 * trans-array.c: Change format of G95_SS_TEMP strictures.
9116 (g95_check_fncall_dependancy): New function.
9117 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
9119 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
9121 (g95_build_function_decl): Don't assume result arrays are packed.
9122 (g95_trans-deferred-vars): Handle array result variables.
9123 (g95_generate_fuction_code): Clear saved_function_decls.
9124 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
9126 (g95_trans_arrayfunc_assign): New function.
9127 (g95_trans_assignment): Use it.
9128 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
9129 (g95_se): Add direct_byref.
9130 * trans-types.c: Use sym->result rather than sym where appropriate.
9131 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
9132 Update other functions to use this.
9133 (g95_is_intrinsic_libcall): New function.
9134 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
9135 (g95_walk_intrinsic_function): Ditto.
9137 2002-09-08 Paul Brook <paul@nowt.org>
9139 * trans-types.c: Change rank field to dtype field in array descriptor.
9140 * trans-array.c: Implement filling of dtype array descriptor field.
9141 * trans-intrinsic.c: Fix broken LEN intrinsic.
9143 2002-09-07 Paul Brook <paul@nowt.org>
9145 * trans-intrinsic.c: Remove outdated todo intrinsic list.
9146 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
9147 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
9149 2002-09-06 Paul Brook <paul@nowt.org>
9151 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
9152 (gt-f95-trans-types.h): Add dependancy information.
9153 * config-lang.in (gtfiles): Add trans-types.c
9154 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
9155 back to top-level code.
9156 * trans-array.c, trans-types.c: Change format of array descriptor.
9157 (g95_conv_descriptor_dimension): New function.
9158 * trans-types.h (g95_conv_descriptor_rank): define.
9159 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
9162 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
9164 * trans-array.c, trans-types.c: Add rank information to descriptor.
9166 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
9168 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
9170 2002-09-04 Paul Brook <paul@nowt.org>
9172 * f95-lang.c (g95_create_decls): New function.
9173 (g95_init): Move initialization of external decls to above, and call
9174 from g95_be_parse_file.
9175 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
9176 * trans-types.c (g95_init_types): Always name integer and char types.
9177 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
9179 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
9181 * Make-lang.in: Add options.c to F95_PARSER_OBJS
9183 2002-09-02 Paul Brook <paul@nowt.org>
9185 * g95_generate_code: Clear the attr for __fortran_main.
9186 * trans-types.c (g95_finish_type): New function.
9187 * g95_init_io_state_type: Use g95_finish_type.
9188 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
9190 2002-09-01 Paul Brook <paul@nowt.org>
9192 * README.backend: Warn about the dangers of extra config.h files.
9193 Remove obsolete libgfor stuff.
9194 * config-lang.in: Add target-libgfor dependancy.
9195 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
9197 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
9199 * g95_conv_mpz_to_tree: Free storage pointed to by q,
9202 2002-08-30 Paul Brook <paul@nowt.org>
9204 * trans-intrinsic.c (g95_conv_intrinsic_function,
9205 g95_walk_intrinsic_function): Added ANY and ALL.
9206 (g95_conv_intrinsic_anyall): New function.
9207 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in