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