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