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