]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
arith.c, [...]: Fix comment formatting.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
f7b529fa
KH
12004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2
3 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
4 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
5 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
6 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
7 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
8
c1df75d1
TS
92004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
10
11 PR fortran/18023
12 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
13
882f2b8e
KH
142004-11-06 Kazu Hirata <kazu@cs.umass.edu>
15
16 * gfortranspec.c: Replace GNU CC with GCC.
17
20a209b5
TS
182004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
19
20 * gfortranspec.c (lang_specific_driver): Change year to 2004.
21
ca0e9281
TS
222004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
23
24 PR fortran/18111
25 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
26 hidden parameters.
27
adf3ed3f
TS
282004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
29
30 PR fortran/15164
31 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
32 module procedures as if they were module variables.
33
36f4d144
TS
342004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
35
36 PR fortran/17535
37 PR fortran/17583
38 PR fortran/17713
39 * module.c (write_symbol1): Set module_name for dummy arguments.
40
9e660c49
PB
412004-11-02 Paul Brook <paul@codesourcery.com>
42
43 * intrinsic.c (check_intrinsic_standard): Include error locus.
44 Remove VLA.
45 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
46 locus to check_intrinsic_standard.
47
b7892582
JB
482004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
49
50 PR fortran/17590
51 * gfortran.h: Change GFC_STD_* flags to more appropriate
52 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
53 gfc_option_t): Add field for warning about use of nonstandard
54 intrinsics.
55 * intrinsic.c (add_sym): Add parameter for standard version, check
56 this against current standard.
57 (add_sym_0): Pass standard parameter to add_sym.
58 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
59 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
60 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
61 (make_generic): Add parameter for standard, check this
62 against currently selected standard.
63 (add_functions, add_subroutines): Add parameter to tell which
64 standard an intrinsic belongs to.
65 (check_intrinsic_standard): New function.
66 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
67 (gfc_intrinsic_sub_interface): Ditto.
68 * lang.opt: Add Wnonstd-intrinsics option.
69 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
70 init new warning.
71 (set_Wall): Add warning about nonstd intrinsics.
72 (gfc_handle_option): Change to use new GFC_STD_* flags,
73 handle new warning.
74 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
75
f88cf205
AP
762004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
77
78 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
79
b7398e72
TS
802004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
81
82 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
83
bf737879
TS
842004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
85
86 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
87 comment typo.
88
7a003d8e
CY
892004-10-30 Canqun Yang <canqun@nudt.edu.cn>
90
91 * check.c (gfc_check_rand): Allow missing optional argument.
92 (gfc_check_irand): Ditto.
93 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
94
be3a985e
SRL
952004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
96
97 PR fortran/13490, PR fortran/17912
98 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
99 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
7a003d8e 100 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
be3a985e
SRL
101 warning when compiling with pedantic.
102 * gcc/fortran/arith.c: Set minimum integer values to reflect
103 realities of two's complement signed integers. Added
104 pedantic minimum.
105
974ede64
AP
1062004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
107
108 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
109 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
110 link it in.
111
19e4c59d
TS
1122004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
113
114 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
115 typo.
116 (gfc_generate_function_code): Fix formatting issue.
117
711f8369
TS
1182004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
119
120 * module.c: Fix formatting issues.
121
5c76089a
TS
1222004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
123
124 * module.c (mio_interface_rest): Set where member of interface
125 while loading.
126
2d0b4bcd
AP
1272004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
128
129 PR fortran/17901
130 * options.c (gfc_handle_option): Add break after handing the
131 J/M option.
132
26810721
TS
1332004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
134
135 * arith.c: Fix formatting issues.
136
edbfca8f
TS
1372004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
138
139 PR fortran/17676
140 * resolve.c (resolve_operator): Use correct operator name in message.
141
5d874166
TS
1422004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
143
144 * primary.c (match_boz_constant): Allow kind parameter suffixes.
145 Move standard warning further to the front.
146
54c2d931
KH
1472004-10-07 Kazu Hirata <kazu@cs.umass.edu>
148
149 * trans-stmt.c: Fix a comment typo.
150
2b58638b
PB
1512004-10-07 Paul Brook <paul@codesourcery.com>
152
153 PR fortran/17678
154 * trans-array.c (gfc_trans_deferred_array): Leave use associated
155 variables alone.
156
5d24a977
TS
1572004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
158
159 PR fortran/17568
160 * simplify.c (twos_complement): New function.
161 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
162
c45abcaf
TS
163 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
164
fbdad37d
PB
1652004-10-06 Paul Brook <paul@codesourcery.com>
166
167 * trans-stmt.c (gfc_trans_simple_do): New function.
168 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
169 loop. Update comments.
170
58c5b409
TS
1712004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
172
173 PR fortran/17283
174 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
175 is scalar.
176
ee569894
TS
177 PR fortran/17631
178 * intrinsic.c (add_sym_5): Remove.
179 (add_subroutines): Add resolution function for MVBITS.
180 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
181 MVBITS
182 * iresolve.c (gfc_resolve_mvbits): New function.
183 (gfc_resolve_random_number): Remove empty line at end of function.
184
73a014b5
TS
185 * trans-const.c (gfc_build_cstring_const): New function.
186 (gfc_init_cst): Use new function.
187 * trans-const.h (gfc_build_cstring_const): Add prototype.
188 * trans-io.c (set_string, set_error_locus): Use new function.
189 * trans-stmt.c (gfc_trans_goto): Use new function.
190
191 PR fortran/17708
192 * parse.c (accept_statement): Don't treat END DO like END IF and
193 END SELECT.
194 (parse_do_block): Generate possible END DO label inside END DO
195 block.
196
5b1374e9
TS
197 PR fortran/17776
198 * check.c (gfc_check_system_sub): New function.
199 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
200 * intrinsic.c (add_functions): Add 'system'.
201 (add_subroutines): Add 'system'.
202 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
203 Move prototypes to other suborutines.
204 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
205 Add prototype.
206 (gfc_resolve_system_clock): Fix formatting of prototype.
207 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
208 functions.
209 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
210 GFC_ISYM_SYSTEM.
211
d7d528c8
ES
2122004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
213
214 * scanner.c (preprocessor_line): Accept preprocessor lines without
215 file names. Check file names for closing quotes. Handle escaped
216 quotes in file names.
217
ca2940c3
TS
2182004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
219 Paul Brook <paul@codesourcery.com>
220
221 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
222 Use gfc_get_expr_charlen.
223 * trans-expr.c (gfc_get_expr_charlen): New function.
224 * trans.h (gfc_get_expr_charlen): Add prototype.
225
b805ea17
KH
2262004-10-04 Kazu Hirata <kazu@cs.umass.edu>
227
228 * trans-intrinsic.c: Fix a comment typo.
229
03ddaf35
TS
2302004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
231
232 * simplify.c (range_check): Remove blank line at beginning of function.
233 (gfc_simplify_dint): Same at end of function.
234 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
235 (gfc_simplify_bound): Fix indentation.
236 (gfc_simplify_log10): Simplify calculation.
237 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
238 of function.
239 (gfc_simplify_nearest): Same at end of function.
240 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
241 function.
242 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
243 gfc_simplify_spacing): Simplify calulations.
244
046dcd57
FW
2452004-10-03 Feng Wang <fengwang@nudt.edu.cn>
246
247 * trans-intrinsic.c: Fix comments on spacing and rrspacing
248 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
249
0f0377f6
JH
2502004-10-01 Jan Hubicka <jh@suse.cz>
251
252 * f95-lang.c (gfc_expand_function): Update call of
253 tree_rest_of_compilation.
254 * trans-decl.c (gfc_generate_constructors): Likewise.
255
68629d16
TS
2562004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
257
258 * trans-intrinsic.c: Comment fixes.
259
75d17889
TS
2602004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
261
262 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
263
206fb0a7
TS
2642004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
265
266 * trans-types.c (gfc_return_by_reference): Remove superfluous
267 assertion.
268
c0c07d7b
TS
269 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
270 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
271
272 PR fortran/17615
273 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
274 function to determine return type.
275
8f235343
JH
2762004-09-20 Jan Hubicka <jh@suse.cz>
277
278 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
279 tree.
280 (gfc_generate_function_code): Likewise.
281
da89fba8
TS
2822004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
283
284 PR fortran/15957
285 * simplify.c (gfc_simplify_reshape): Set shape of return value
286 correctly.
287
6615c446
JO
2882004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
289 Zack Weinberg <zack@codesourcery.com>
290
291 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
292 enumeration constants.
293
4cdf7223
PB
2942004-09-17 Paul Brook <paul@codesourcery.com>
295
296 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
297 (gfc_linebuf_header_size): Define.
298 * scanner.c (load_file): Use it.
299
1f2959f0
KH
3002004-09-16 Kazu Hirata <kazu@cs.umass.edu>
301
302 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
303 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
304 resolve.c, scanner.c, trans-array.c, trans-array.h,
305 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
306 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
307 trans.h: Fix comment typos. Follow spelling conventions.
308
d2ccf6aa
VL
3092004-09-16 Victor Leikehman <lei@il.ibm.com>
310
311 PR/15364
312 * trans-io.c (transfer_array_component): New function.
313 (transfer_expr): For array fields, call transfer_array_component.
314
de787a96
KH
3152004-09-16 Kazu Hirata <kazu@cs.umass.edu>
316
317 * gfortran.texi: Fix a typo.
318
f13ab1ee
AL
3192004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
320
321 * parse.c (eof_buf): Rename eof to eof_buf.
322 (unexpected_eof): Same.
323 (gfc_parse_file): Same.
324
0110c1ec
SK
3252004-09-15 Steven G. Kargl <kargls@comcast.net>
326
327 * check.c (gfc_check_getcwd_sub): New function.
328 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
329 * intrinsic.c (add_functions): Add function definition;
330 Use symbol.
331 * intrinsic.c (add_subroutines): Add subroutine definitions.
332 * intrinsic.h: Add prototypes.
333 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
334 New functions.
335 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
336
4672f86a
TS
3372004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
338
339 PR fortran/16485
340 * module.c (write_symbol): Don't fill in module name here.
341 (write_symbol0): Fill in here instead.
342
13795658
KH
3432004-09-14 Kazu Hirata <kazu@cs.umass.edu>
344
345 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
346 trans-array.c, trans-common.c, trans-expr.c,
347 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
348 comment typos. Follow spelling conventions.
349
4d28e183
PB
3502004-09-09 Paul Brook <paul@codesourcery.com>
351
352 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
353
6e45f57b
PB
3542004-09-08 Paul Brook <paul@codesourcery.com>
355
356 * array.c: Don't include assert.h.
357 * data.c: Don't include assert.h. Replace assert and abort with
358 gcc_assert and gcc_unreachable.
359 * dependency.c: Ditto.
360 * f95-lang.c: Ditto.
361 * iresolve.c: Ditto.
362 * resolve.c: Ditto.
363 * simplify.c: Ditto.
364 * symbol.c: Ditto.
365 * trans-array.c: Ditto.
366 * trans-common.c: Ditto.
367 * trans-const.c: Ditto.
368 * trans-decl.c: Ditto.
369 * trans-expr.c: Ditto.
370 * trans-intrinsic.c: Ditto.
371 * trans-io.c: Ditto.
372 * trans-stmt.c: Ditto.
373 * trans-types.c: Ditto.
374 * trans.c: Ditto.
375
c8cc8542
PB
3762004-09-07 Per Bothner <per@bothner.com>
377 Paul Brook <paul@codesourcery.com>
378
379 * error.c (show_locus): Handle mapped locations.
380 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
381 * gfortran.h: Include input.h.
382 (struct gfc_linebuf): Use source_location.
383 * scanner.c (get_file): Initialize linemap.
384 (preprocessor_line): Pass extra argument to get_file.
385 (load_file): Ditto. Setup linemap.
386 (gfc_new_file): Handle mapped locations.
387 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
388 Set decl source locations.
389 (gfc_trans_common): Set blank common block location.
390 * trans-decl.c (gfc_set_decl_location): New function.
391 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
392 (trans_function_start): Move call to gfc_set_backend_locus..
393 (build_function_decl): ... to here.
394 (build_entry_thunks): Set and restore the backend locus.
395 (gfc_generate_constructors): Remove excess arguments to
396 init_function_start.
397 (gfc_generate_block_data): Add comments. Set the decl locus.
398 * trans-io.c (set_error_locus): Handle mapped locations.
399 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
400 (gfc_trans_code): Use SET_EXPR_LOCATION.
401 (gfc_generate_code): Override the location of the new symbol.
402 * trans.h (gfc_set_decl_location): Add prototype.
403
4c97f95a
PB
4042004-08-31 Paul Brook <paul@codesourcery.com>
405
406 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
407
c3d0559d
TS
4082004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
409
410 PR fortran/15327
411 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
412 strings.
413
0e6928d8
TS
4142004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
415
416 PR fortran/16400
417 PR fortran/16404
418 (port from g95)
419 * resolve.c (resolve_transfer): New function.
420 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
421
149a42dd
TS
4222004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
423
424 PR fortran/16579
425 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
426 unsigned char.
427
c4dd5a8d
TS
4282004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
429
430 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
431
cf73cdac
TS
4322004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
433
434 PR fortran/17244
435 * trans-types.c (gfc_return_by_reference): Remove TODO error,
436 add comment pointing out possible issue WRT compatibility with g77.
437
d7177ab2
TS
4382004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
439
440 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
441 all occurences of 'gfc_strlen_type_node' by
442 'gfc_charlen_type_node'.
443 * trans-types.h: Same. Also update comment accordingly.
444
d1d61a00
TS
4452004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
446
447 * primary.c: Update copyright boilerplate to say GCC.
f36327db 448 * f95-lang.c: Change initial comment to say gfortran.
d1d61a00 449
da17f559
PB
4502004-08-31 Paul Brook <paul@codesourcery.com>
451
452 * trans-types.h: Add comments.
453 (intmax_type_node, string_type_node, const_string_type_node): Remove.
454
e2cad04b
RH
4552004-08-30 Richard Henderson <rth@redhat.com>
456
457 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
458 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
459 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
460 c_long, c_long_long.
461 (gfc_logical_info): Add c_bool.
462 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
463 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
464 rather than gfc_int[48]_type_node for allocate choice.
465 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
466 local copies of some kind type nodes.
467 (gfc_build_builtin_function_decls): Likewise.
468 * trans-expr.c (gfc_conv_power_op): Likewise.
469 * trans-intrinsic.c (gfc_conv_intrinsic_index,
470 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
471 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
472 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
473 gfc_trans_character_select, gfc_trans_allocate): Likewise.
474 * trans-io.c (gfc_pint4_type_node): Move into ...
475 (gfc_build_io_library_fndecls): ... here. Cache local copies of
476 some kind type nodes.
477 * trans-types.c (gfc_type_nodes): Remove.
478 (gfc_character1_type_node, gfc_strlen_type_node): New.
479 (gfc_integer_types, gfc_logical_types): New.
480 (gfc_real_types, gfc_complex_types): New.
481 (gfc_init_kinds): Fill in real mode_precision.
482 (gfc_build_int_type, gfc_build_real_type): New.
483 (gfc_build_complex_type, gfc_build_logical_type): New.
484 (c_size_t_size): New.
485 (gfc_init_types): Loop over kinds.
486 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
487 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
488 (gfc_get_character_type_len): Likewise.
489 (gfc_type_for_size): Loop over kinds; use a reduced set of
490 unsigned type nodes.
491 (gfc_type_for_mode): Loop over kinds.
492 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
493 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
494 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
495 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
496 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
497 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
498 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
499 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
500 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
501 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
502 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
503 gfc_complex8_type_node, gfc_complex16_type_node,
504 gfc_logical1_type_node, gfc_logical2_type_node,
505 gfc_logical4_type_node, gfc_logical8_type_node,
506 gfc_logical16_type_node, gfc_strlen_kind): Remove.
507 (gfc_character1_type_node): Turn in to a variable.
508 (gfc_strlen_type_node): Likewise.
509
0de4325e
TS
5102004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
511
512 * gfortran.h (gfc_namespace): Add new field is_block_data.
513 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
514 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
515 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
516 * trans.h (gfc_generate_block_data): Add prototype.
517 * trans-decl.c (gfc_generate_block_data): New function.
518
04204c2f
RH
5192004-08-29 Richard Henderson <rth@redhat.com>
520
521 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
522 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
523 than two HOST_WIDE_INT.
524
294fbfc8
TS
5252004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
526
527 PR fortran/13910
528 * decl.c (free_variable, free_value, gfc_free_data, var_list,
529 var_element, top_var_list, match_data_constant, top_val_list,
530 gfc_match_data): Move here from match.c.
531 (match_old_style_init): New function.
532 (variable_decl): Match old-style initialization.
533 * expr.c (gfc_get_variable_expr): New function.
534 * gfortran.h (gfc_get_variable_expr): Add prototype.
535 * gfortran.texi: Start documentation for supported extensions.
536 * match.c: Remove the functions moved to decl.c.
537 * match.h (gfc_match_data): Move prototype to under decl.c.
538 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
539 comments.
540
e8525382
SK
5412004-08-29 Steven G. Kargl <kargls@comcast.net>
542 Paul Brook <paul@codesourcery.com>
543
544 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
545 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
546 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
547 (build_builtin_fntypes): New function.
548 (gfc_init_builtin_functions): Use it.
549 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
550 and GFC_ISYM_ERF{,C}.
551 (gfc_c_int_kind): Declare.
552 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
553 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
554 gfc_resolve_g77_math1): Add prototypes.
555 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
556 * mathbuiltins.def: Add comment. Change third argument. Use
557 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
558 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
559 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
560 * trans-types.c (gfc_c_int_kind): Declare.
561 (gfc_init_kinds): Set it.
562
4c0c6b9f
SK
5632004-08-29 Steven G. Kargl <kargls@comcast.net>
564 Paul Brook <paul@codesourcery.com>
565
566 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
567 (gfc_check_f, gfc_simplify_f): Add f0.
568 * intrinsic.c (do_check): Call f0. Flatten.
569 (add_sym_0): Fix prototype. Set f0.
570 (add_functions): Add getgid, getgid and getuid.
571 (resolve_intrinsic): Remove obsolete comment.
572 (do_simplify): Call f0.
573 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
574 gfc_resolve_getuid): Add prototypes.
575 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
576 gfc_resolve_getuid): New functions.
577 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
578 GFC_ISYM_GET?ID.
579
1f05db63
TS
5802004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
581
582 * error.c (gfc_error_init_1): Remove blank line in front of
583 function body. Add missing blank.
584 (gfc_buffer_error, error_char, error_string): Remove blank line in
585 front of function body.
586 (show_locus): Add comma in comment.
587 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
588 gfc_push_error, gfc_pop_error): Remove blank line in front of
589 function body.
590 (gfc_get_errors): Typo fix in comment in front of function. Remove
591 blank line in front of function body.
592
9d64df18
TS
5932004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
594
595 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
596 variable declaration of same name.
597 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
598 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
599 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
600 Replace all calls to gfc_default_*_kind with variable accesses.
601 * trans-types.c: Same as above.
602 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
603 static qualifier. Replace all occurences.
604 (gfc_default_*_kind): Remove functions.
605
5e8e542f
RH
6062004-08-26 Richard Henderson <rth@redhat.com>
607
6615c446
JO
608 * arith.c: Include system.h, not real system headers.
609 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
610 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
611 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
612 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
613 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
614 gfc_index_integer_kind, gfc_default_integer_kind,
615 gfc_default_real_kind,gfc_default_double_kind,
616 gfc_default_character_kind, gfc_default_logical_kind,
617 gfc_default_complex_kind, validate_integer, validate_real,
618 validate_logical, validate_character,
619 gfc_validate_kind): Move to trans-types.c.
620 (gfc_set_model_kind): Use gfc_validate_kind.
621 (gfc_set_model): Just copy the current precision to default.
622 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
623 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
624 * gfortran.h: Update file commentary.
625 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
626 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
627 gfc_default_double_kind_1, gfc_default_character_kind_1,
628 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
629 (gfc_init_kinds): New.
630 (gfc_init_types): Don't set gfc_index_integer_kind here.
631 * trans-types.h (gfc_init_kinds): Declare.
5e8e542f
RH
632 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
633
a1bab9ea
TS
6342004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
635
636 * check.c (gfc_check_atan2): New function.
637 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
638 * intrinsic.h (gfc_check_atan2): Add prototype.
639
e7a2d5fb
RH
6402004-08-25 Richard Henderson <rth@redhat.com>
641
642 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
643 false and we don't validate the kind.
644 (gfc_check_integer_range, gfc_check_real_range): Update to match.
645 * check.c (kind_check): Likewise.
646 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
647 (match_char_spec, match_logical_spec): Likewise.
648 * gfortran.h (gfc_validate_kind): Likewise.
649 * options.c (gfc_handle_option): Likewise.
650 * primary.c (match_integer_constant, match_real_constant,
651 match_string_constant, match_logical_constant,
652 match_const_complex_part): Likewise.
653 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
654 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
655 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
656 gfc_simplify_maxexponent, gfc_simplify_minexponent,
657 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
658 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
659 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
660 gfc_simplify_tiny): Likewise.
661 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
662 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
663 prepare_arg_info): Likewise.
664
6d1c50cc
TS
6652004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
666
667 * expr.c (gfc_check_assign): Add comment. Add new warning.
668 * trans-expr.c (gfc_conv_function_call): Correctly dereference
669 result of pointer valued function when not in pointer assignment.
670
75101feb
PB
6712004-08-25 Paul Brook <paul@codesourcery.com>
672
673 * config-lang.in: Remove dead commented line.
674 * module.c: Replace g95 with gfortran in comment.
675
9ca2b0db
PB
6762004-08-25 Paul Brook <paul@codesourcery.com>
677
678 PR fortran/17190
679 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
680
40f20186
PB
6812004-08-25 Paul Brook <paul@codesourcery.com>
682
683 PR fortran/17144
684 * trans-array.c (gfc_trans_allocate_temp_array): Remove
685 string_length argument.
686 (gfc_trans_array_ctor_element): New function.
687 (gfc_trans_array_constructor_subarray): Use it.
688 (gfc_trans_array_constructor_value): Ditto. Handle constant
689 character arrays.
690 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
691 (gfc_trans_array_constructor): Use them.
692 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
693 (gfc_conv_ss_descriptor): Remember section string length.
694 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
695 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
696 (gfc_conv_expr_descriptor): Ditto.
697 (gfc_conv_loop_setup): Ditto. Spelling fixes.
698 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
699 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
700 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
701 (gfc_conv_variable): Set string_length from section.
702 (gfc_conv_function_call): Remove extra argument.
703 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
704 * trans-types.c (gfc_get_character_type_len): New function.
705 (gfc_get_character_type): Use it.
706 (gfc_get_dtype): Return zero for internal types.
707 * trans-types.h (gfc_get_character_type_len): Add prototype.
708 * trans.h (struct gfc_ss): Move string_length out of union.
709
923ab88c
TS
7102004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
711
712 * trans.h (build2_v, build3_v): New macros.
713 (build_v): Remove.
714 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
715 build.
716 * trans-array.c (gfc_conv_descriptor_data,
717 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
6615c446 718 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
923ab88c
TS
719 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
720 gfc_trans_allocate_temp_array,
721 gfc_trans_array_constructor_subarray,
722 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
723 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
724 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
725 gfc_conv_array_ref, gfc_trans_preloop_setup,
726 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
727 gfc_conv_loop_setup, gfc_array_init_size,
728 gfc_conv_array_initializer, gfc_trans_array_bounds,
729 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
730 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
731 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
732 of build and build_v as appropriate.
733 * trans-common.c (create_common): Same.
734 * trans-decl.c (gfc_trans_auto_character_variable,
735 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
736 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
737 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
738 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
739 gfc_conv_expr_op, gfc_conv_function_call,
740 gfc_trans_structure_assign): Same.
741 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
742 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
743 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
744 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
745 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
746 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
747 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
748 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
749 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
750 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
751 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
752 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
753 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
754 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
755 gfc_conv_intrinsic_iargc): Same.
756 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
757 set_flag, add_case, io_result, transfer_namelist_element,
758 transfer_expr): Same.
759 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
760 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
761 gfc_trans_integer_select, gfc_trans_logical_select,
762 gfc_trans_character_select, gfc_trans_forall_loop,
763 gfc_trans_nested_forall_loop, gfc_do_allocate,
764 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
765 compute_inner_temp_size, compute_overall_iter_number,
766 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
767 gfc_trans_forall_1, gfc_evaluate_where_mask,
768 gfc_trans_where_assign, gfc_trans_allocate): Same.
769 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
770 * trans.c (gfc_add_modify_expr, gfc_finish_block,
771 gfc_build_array_ref, gfc_build_function_call,
772 gfc_trans_runtime_check): Same.
773
0cc4be67
TS
7742004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
775
6615c446 776 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
0cc4be67
TS
777 build_int_cst to build_int_cst_wide in accordance to Nathan's
778 previous patch.
779
7d60be94
NS
7802004-08-25 Nathan Sidwell <nathan@codesourcery.com>
781
782 * trans-array.c (gfc_trans_array_constructor_value): Adjust
783 build_int_cst calls.
784 * trans-const.c (gfc_build_string_const, gfc_init_constants,
785 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
786 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
787 gfc_trans_entry_master_switch): Likewise.
788 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
789 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
790 * trans-io.c (add_case, set_error_locus,
791 transfer_namelist_element, transfer_expr): Likewise.
792 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
793 gfc_trans_stop, gfc_trans_character_select): Likewise.
794 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
795 * trans.c (gfc_trans_runtime_check): Likewise.
796
45ede75e
TS
7972004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
798
6615c446 799 * trans-decl.c, trans-types.c: Add and remove blank lines as
45ede75e
TS
800 required.
801
0c8eb998
RH
8022004-08-24 Richard Henderson <rth@redhat.com>
803
804 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
805
de37af8c
TS
8062004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
807
6615c446 808 * resolve.c (merge_argument_lists): Revert unintentionally
de37af8c 809 committed change.
6615c446 810
7be7d41b
TS
8112004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
812
813 * trans-decl.c (build_function_decl): Fix spelling in comment.
814 (build_entry_thunks): Remove code with no function.
815 (gfc_build_intrinsic_function_decls): Remove empty line.
816
817 * resolve.c (resolve_entries): Fix a bunch of comment typos.
818
8c1d6d62
NS
8192004-08-24 Nathan Sidwell <nathan@codesourcery.com>
820
7d60be94 821 * f95-lang.c (gfc_init_decl_processing): Adjust
8c1d6d62
NS
822 build_common_tree_nodes call.
823
436529ea
TS
8242004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
825
826 * trans-types.c: Spelling and formatting fixes.
827
5f0ae953
RH
8282004-08-23 Richard Henderson <rth@redhat.com>
829
830 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
831 of going through an intermediate string. Fix 32/64 int/long bug.
832
f676971a
EC
8332004-08-23 Eric Christopher <echristo@redhat.com>
834
835 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
836 usage. Use build_vector_type_for_mode for vector types.
837
b8502435
RH
8382004-08-22 Richard Henderson <rth@redhat.com>
839
840 PR 13465
6615c446
JO
841 * data.c (find_con_by_offset): Search ordered list; handle
842 elements with repeat counts.
843 (gfc_assign_data_value_range): New.
844 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
845 (gfc_assign_data_value_range): Declare.
846 * match.c (top_val_list): Extract repeat count into a temporary.
847 * resolve.c (values): Make left unsigned.
848 (next_data_value): Don't decrement left.
849 (check_data_variable): Use gfc_assign_data_value_range.
b8502435 850
f8d0aee5
TS
8512004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
852
853 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
854
617097a3
TS
8552004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
856
857 * check.c (gfc_check_reduction): Rename to ...
f676971a 858 (check_reduction): ... this. Make static. Don't check type of
617097a3
TS
859 first argument.
860 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
861 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
862 SUM to use new check functions.
863 (check_specific): Change logic to call new functions.
864 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
865 Add prototypes.
866 (gfc_check_reduction): Remove prototype.
867
841b0c1f
PB
8682004-08-20 Paul Brook <paul@codesourcery.com>
869 Canqun Yang <canqun@nudt.edu.cn>
870
871 PR fortran/17077
872 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
873 for automatic arrays.
874 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
875
c874ae73 8762004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841b0c1f 877 (Port from g95)
c874ae73 878
841b0c1f 879 PR fortran/17074
c874ae73
TS
880 * match.c (match_simple_forall, match_simple_where): Forward-declare.
881 (gfc_match_if): Order statement list alphabetically, add WHERE and
841b0c1f 882 FORALL, remove double PAUSE.
c874ae73 883 (gfc_match_simple_where, match_forall_header,
841b0c1f 884 gfc_match_simple_forall): New functions.
c874ae73 885 (gfc_match_forall): Use match_forall_header.
f676971a 886
bbef13dc
PB
8872004-08-19 Paul Brook <paul@codesourcery.com>
888
889 PR fortran/17091
890 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
891 * symbol.c (gfc_clear_attr): Use memset.
892
ec53454b
PB
8932004-08-19 Paul Brook <paul@codesourcery.com>
894
895 PR fortran/14976
f676971a 896 PR fortran/16228
ec53454b
PB
897 * data.c (assign_substring_data_value): Remove.
898 (create_character_intializer): New function.
899 (gfc_assign_data_value): Track the typespec for the current
900 subobject. Use create_character_intializer.
901
292e0d3a
ES
9022004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
903
904 PR fortran/16946
905 * check.c (gfc_check_reduction): New function.
906 (gfc_check_minval_maxval): Removed.
907 (gfc_check_product): Removed.
908 (gfc_check_sum): Removed.
909 * intrinsic.h: Add/remove declarations for these.
910 * gfortran.h: Add field f3red to union gfc_check_f.
911 * intrinsic.c (add_sym_3red): New function.
912 (add_functions): Register maxval, minval, product, and sum intrinsics
913 through add_sym_3red.
914 (check_specific): Handle f3red union field.
915 * iresolve.c: Whitespace change.
916
1619aa6f
PB
9172004-08-18 Paul Brook <paul@codesourcery.com>
918
919 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
920
3bc268e6
VL
9212004-08-18 Victor Leikehman <lei@il.ibm.com>
922
923 PR fortran/13278
924 * trans-io.c (transfer_namelist_element): New. Recursively handle
925 derived-type variables. Pass string lengths.
926 (build_dt): Code moved to build_namelist, with some
927 changes and additions.
928 (gfc_build_io_library_fndecls): Declare the fifth
929 argument in st_set_nml_var_char -- string_length.
930
3d79abbd
PB
9312004-08-17 Paul Brook <paul@codesourcery.com>
932 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
933
934 PR fortran/13082
935 * decl.c (get_proc_name): Update mystery comment.
936 (gfc_match_entry): Check for errors earlier. Add entry point to list.
937 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
938 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
939 (struct gfc_entry_list): Define.
940 (gfc_get_entry_list): Define.
941 (struct gfc_namespace): Add refs and entries.
942 (enum gfc_exec_op): Add EXEC_ENTRY.
943 (struct gfc_code): Add ext.entry.
944 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
945 (mio_symbol_attribute): Don't save/reture addr->entry.
946 (mio_namespace_ref): Refcount namespaces.
947 * parse.c (accept_statement): Handle ST_ENTRY.
948 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
949 (parse_contained): Fixup sibling references to entry points
950 after parsing the procedure body.
951 * resolve.c (resolve_contained_fntype): New function.
952 (merge_argument_lists, resolve_entries): New functions.
953 (resolve_contained_functions): Use them.
954 (resolve_code): Handle EXEC_ENTRY.
955 (gfc_resolve): Call resolve_entries.
956 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
957 * symbol.c (gfc_get_namespace): Refcount namespaces.
958 (gfc_free_namespace): Ditto.
959 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
960 optional when multiple entry points are present.
961 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
962 (gfc_get_extern_function_decl): Add assertion. Fix coment.
963 (create_function_arglist, trans_function_start, build_entry_thunks):
964 New functions.
965 (gfc_build_function_decl): Rename ...
966 (build_function_decl): ... to this.
967 (gfc_create_function_decl): New function.
968 (gfc_generate_contained_functions): Use it.
969 (gfc_trans_entry_master_switch): New function.
970 (gfc_generate_function_code): Use new functions.
971 * trans-stmt.c (gfc_trans_entry): New function.
972 * trans-stmt.h (gfc_trans_entry): Add prototype.
973 * trans-types.c (gfc_get_function_type): Add entry point argument.
974 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
975 (gfc_generate_module_code): Call gfc_create_function_decl.
976 * trans.h (gfc_build_function_decl): Remove.
977 (gfc_create_function_decl): Add prototype.
978
ead6d15f
AP
9792004-08-15 Andrew Pinski <apinski@apple.com>
980
981 PR fortran/17030
982 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
983 for cabs{,f} and copysign{,f}.
f676971a
EC
984 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
985 (gfor_fndecl_math_cabs): Delete.
986 (gfor_fndecl_math_sign4): Delete.
987 (gfor_fndecl_math_sign8): Delete.
ead6d15f
AP
988 (gfc_build_intrinsic_function_decls): Remove the
989 initializing of cabs{,f} and copysign{,f} functions.
990 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
991 instead of the functions definitions.
992 (gfc_conv_intrinsic_sign): Likewise.
f676971a
EC
993 * trans.h (gfor_fndecl_math_cabsf): Delete.
994 (gfor_fndecl_math_cabs): Delete.
995 (gfor_fndecl_math_sign4): Delete.
996 (gfor_fndecl_math_sign8): Delete.
ead6d15f 997
4a90aeeb
NS
9982004-08-15 Nathan Sidwell <nathan@codesourcery.com>
999
1000 * trans-array.c (gfc_trans_array_constructor_value): Use
f676971a 1001 build_int_cst.
4a90aeeb
NS
1002 * trans-const.c (gfc_build_string_const,
1003 gfc_init_constants, gfc_conv_mpz_to_tree,
f676971a 1004 gfc_conv_constant_to_tree): Likewise.
4a90aeeb
NS
1005 * trans-decl.c (gfc_get_symbol_decl): Likewise.
1006 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1007 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1008 * trans-io.c (add_case, set_error_locus, build_dt,
1009 transfer_expr): Likewise.
1010 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1011 gfc_trans_stop, gfc_trans_character_select): Likewise.
1012 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1013 * trans.c (gfc_trans_runtime_check): Likewise.
1014
1d754240
PB
10152004-08-14 Paul Brook <paul@codesourcery.com>
1016
1017 * trans-decl.c (gfc_build_function_decl): Remove dead code.
1018
3ef059b4
PB
10192004-08-14 Paul Brook <paul@codesourcery.com>
1020
1021 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1022
4f613946
TS
10232004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1024
1025 * gfortran.h: Add comments.
1026 * parse.c (parse_contained): Fix comment typo.
1027 * resolve.c (was_declared): Ditto.
1028 * symbol.c: Ditto.
1029
3ec0f302
PB
10302004-08-11 Paul Brook <paul@codeourcery.com>
1031
1032 PR fortran/16917
1033 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1034
1a186ec5
RH
10352004-08-10 Richard Henderson <rth@redhat.com>
1036
1037 * f95-lang.c (gfc_init_builtin_functions): Remove
1038 __builtin_stack_alloc, add __builtin_alloca.
1039 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1040 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1041
2bf26ede
PB
10422004-08-10 Paul Brook <paul@codesourcery.com>
1043
1044 * trans-io.c (transfer_expr): Handle pointters.
1045
e9cfef64
PB
10462004-08-10 Paul Brook <paul@codesourcery.com>
1047
1048 PR fortran/16919
1049 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1050 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1051 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1052 Handle GFC_SS_COMPONENT.
1053 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
1054 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1055 Use ss->shape.
1056 (gfc_conv_array_initializer): Call specific initializer routines.
1057 * trans-expr.c (gfc_trans_structure_assign): New function.
1058 (gfc_trans_subarray_assign): New function.
1059 (gfc_trans_subcomponent_assign): New fucntion
1060 (gfc_conv_structure): Use them.
1061 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1062 (gfc_ss): Add shape.
1063
94538bd1
VL
10642004-08-08 Victor Leikehman <lei@il.ibm.com>
1065
1066 * simplify.c (gfc_simplify_shape): Bugfix.
1067 * expr.c (gfc_copy_shape_excluding): New function.
1068 * gfortran.h (gfc_get_shape): Bugfix.
1069 (gfc_copy_shape_excluding): Added declaration.
1070 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1071 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1072 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1073 time resolution of shape.
1074
aa6fc635
JB
10752004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
1076
1077 * intrinsic.c (add_subroutines): Add getenv and
1078 get_environment_variable. (add_sym_5s): New function.
1079 * intrinsic.h (gfc_resolve_get_environment_variable): Add
1080 prototype.
1081 * iresolve.c (gfc_resolve_get_environment_variable): New
1082 function.
1083
c7d78bbe
FW
10842004-08-06 Feng Wang <fengwang@nudt.edu.cn>
1085
1086 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
1087 __builtin_pow[f] arguments.
1088
f8e566e5
SK
10892004-08-06 Steven G. Kargl <kargls@comcast.net>
1090
1091 * arith.c: Add #define for model numbers. Remove global GMP variables.
1092 (natural_logarithm,common_logarithm,exponential,sine,
1093 cosine,arctangent,hypercos,hypersine ): Remove.
1094 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
1095 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
1096 gfc_check_real_range, gfc_constant_result, gfc_range_check,
1097 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
1098 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
1099 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
1100 gfc_convert_complex,gfc_int2real,gfc_int2complex,
1101 gfc_real2int,gfc_real2real,gfc_real2complex,
1102 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
1103 to MPFR, use new functions.
1104 * arith.h: Remove extern global variables.
1105 (natural_logarithm,common_logarithm,exponential, sine, cosine,
1106 arctangent,hypercos,hypersine): Remove prototypes.
1107 (arctangent2): Update prototype from GMP to MPFR.
1108 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
1109 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
1110 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
1111 * gfortran.h (GFC_REAL_BITS): Remove.
1112 (arith): Add ARITH_NAN.
1113 Include mpfr.h. Define GFC_RND_MODE.
1114 Rename GCC_GFORTRAN_H GFC_GFC_H.
1115 (gfc_expr): Convert GMP to MPFR.
1116 * module.c: Add arith.h, correct type in comment.
1117 (mio_gmp_real): Convert GMP to MPFR.
1118 (mio_expr): Use gfc_set_model_kind().
1119 * primary.c: Update copyright date with 2004.
1120 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
1121 * simplify.c: Remove global GMP variables
1122 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
1123 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
1124 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
1125 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
1126 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
1127 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
1128 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
1129 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
1130 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
1131 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
1132 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
1133 gfc_simplify_rrspacing,gfc_simplify_scale,
1134 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
1135 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
1136 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
1137 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
1138 Use new functions.
1139 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
1140 gfc_conv_mpf_to_tree. Convert it to use MPFR
1141 (gfc_conv_constant_to_tree): Use it.
1142 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
1143 * trans-intrinsic.c: Add arith.h, remove gmp.h
1144 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
1145
fc90a8f2
PB
11462004-08-06 Victor Leikehman <lei@il.ibm.com>
1147 Paul Brook <paul@codesourcery.com>
1148
1149 * trans-array.c (gfc_trans_allocate_array_storage,
1150 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1151 gfc_conv_loop_setup): For functions, if the shape of the result
1152 is not known in compile-time, generate an empty array descriptor for
1153 the result and let the callee to allocate the memory.
1154 (gfc_trans_dummy_array_bias): Do nothing for pointers.
1155 (gfc_conv_expr_descriptor): Use function return values directly.
1156 * trans-expr.c (gfc_conv_function_call): Always add byref call
1157 insn to pre chain.
1158 (gfc_trans_pointer_assignment): Add comments.
1159 (gfc_trans_arrayfunc_assign): Don't chain on expression.
1160
fc2d8429
RS
11612004-08-01 Roger Sayle <roger@eyesopen.com>
1162
1163 * options.c (gfc_init_options): Don't warn about the use GNU
1164 extensions by default.
1165 (gfc_post_options): Warn about GNU extensions with -pedantic.
1166 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1167
0534fa56
RH
11682004-07-30 Richard Henderson <rth@redhat.com>
1169
1170 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1171 for TREE_CONSTANTs.
1172
b785f485
RH
11732004-07-25 Richard Henderson <rth@redhat.com>
1174
1175 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1176 and DECL_IGNORED_P on RESULT_DECL.
1177 (gfc_generate_constructors): Likewise.
1178
f56c5d5d
TS
11792004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1180
1181 PR fortran/16465
1182 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1183 options.
1184 (ffixed-line-length-80, ffixed-line-length-132): Remove.
1185 * options.c (gfc_handle_options): Deal with changed options.
1186 * scanner.c (load_line): Change second arg to 'char **',
1187 allocate if pointing to NULL. Keep track of buffer's length.
1188 Adapt buffer size to overlong lines. Pad lines to full length
1189 in fixed form.
1190 (load_file): Adapt to new interface of load_line.
1191
6e34d3a3
JM
11922004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1193
1194 * trans.h (builtin_function): Declare.
1195
c9583ed2
TS
11962004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1197
1198 PR fortran/16404
1199 (parts ported from g95)
1200 * parse.h (gfc_state_data): New field do_variable.
1201 (gfc_check_do_variable): Add prototype.
1202 * parse.c (push_state): Initialize field 'do_variable'.
1203 (gfc_check_do_variable): New function.
1204 (parse_do_block): Remember do iterator variable.
1205 (parse_file): Initialize field 'do_variable'.
1206 * match.c (gfc_match_assignment, gfc_match_do,
1207 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1208 Add previously missing checks.
1209 (gfc_match_return): Reformat error message.
1210 * io.c (match_out_tag): New function.
1211 (match_open_element, match_close_element,
1212 match_file_element, match_dt_element): Call match_out_tag
1213 instead of match_vtag where appropriate.
1214 (match_io_iterator, match_io_element): Add missing check.
1215 (match_io): Reformat error message.
1216 (match_inquire_element): Call match_out_tag where appropriate.
1217
b38b6477
TS
1218 * parse.c (gfc_check_do_variable): Fix error locus.
1219
d157d978
TS
12202004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1221
1222 PR fortran/15129
1223 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1224 for every assumed length character dummy argument.
1225
c5a41953
TS
1226 PR fortran/15140
1227 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
0c0df4b3
TS
1228
1229 PR fortran/13792
1230 * simplify.c (gfc_simplify_bound): Copy the bound expression.
1231
20c9dc8a
TS
12322004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1233
769d99d9 1234 PR fortran/15324
20c9dc8a
TS
1235 * trans-array.c gfc_trans_g77_array,
1236 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1237 for assumed length characters.
1238 (gfc_conv_expr_descriptor): Set se->string_length if dealing
1239 with a character expression.
1240 (gfc_cvonv_array_parameter): Pass string length when passing
1241 character array according to g77 conventions.
1242
597073ac
PB
12432004-07-12 Paul Brook <paul@codesourcery.com>
1244
1245 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1246 * trans-array.c (gfc_trans_auto_array_allocation): Remove
1247 initialization code.
1248 * trans-common.c (create_common): Use gfc_conv_initializer.
1249 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1250 * trans-expr.c (gfc_conv_initializer): New function.
1251 (gfc_conv_structure): Use it.
1252 * trans.h (gfc_conv_initializer): Add prototype.
1253
682e69e1
PB
12542004-07-11 Paul Brook <paul@codesourcery.com>
1255
1256 PR fortran/15986
1257 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1258 variables.
1259 (parse_contained): Mark contained symbols as referenced.
1260
87bdc5f8
TS
12612004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1262
953e6630 1263 PR fortran/16455
87bdc5f8
TS
1264 * module.c (gfc_dump_module, gfc_use_module): Print locus
1265 when opening of module file fails.
1266
cdde7b65
TS
1267 PR fortran/16404
1268 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
e08b5a75
TS
1269
1270 PR fortran/16404
1271 * match.c (gfc_match_program): A program name is obligatory.
1272 (gfc_match_return): RETURN in main program is an extension.
1273 (gfc_match_block_data): A space is required before a block data
1274 name.
88199e7c
TS
1275
1276 PR fortran/16433
1277 * primary.c (match_boz_constant): Call gfc_notify_std only if
1278 we actually have a non-standard boz-literal-constant.
1279
f23c5627
TS
1280 PR fortran/15754
1281 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1282 warning if assigning NULL().
1283
9dcf6e73
JM
12842004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1285
1286 * f95-lang.c (set_block): Remove.
1287 (gfc_clear_binding_stack): New.
1288 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1289 (struct binding_level): Remove block_created_by_back_end.
1290 (clear_binding_level): Likewise.
1291 (poplevel): Don't handle block_created_by_back_end.
1292
9cbf8b41
TS
12932004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1294
1295 * trans-decl.c (gfc_create_module_variable): Nothing to do if
1296 symbol is in common, because we ...
1297 (gfc_generate_module_vars): Call gfc_trans_common.
1298
331c72f3
PB
12992004-07-10 Paul Brook <paul@codesourcery.com>
1300
1301 * trans-array.c (gfc_build_null_descriptor): New function.
1302 (gfc_trans_static_array_pointer): Use it.
1303 * trans-array.h (gfc_build_null_descriptor): Add prototype.
1304 * trans-expr.c (gfc_conv_structure): Handle array pointers.
1305
53814b8f 13062004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 1307
53814b8f
TS
1308 PR fortran/16336
1309 * decl.c (gfc_match_save): Use-associated common block
1310 doesn't collide.
1311 * gfortran.h (gfc_common_head): Add new field 'name'.
1312 Fix typo in comment after #endif.
1313 * match.c (gfc_get_common): Add new argument from_common,
1314 mangle name if flag is set, fill in new field in structure
1315 gfc_common_head.
1316 (match_common): Set new arg in call to gfc_get_common,
1317 use-associated common block doesn't collide.
1318 * match.h (gfc_get_common): Adapt prototype.
1319 * module.c (load_commons): Set new arg in call to
1320 gfc_get_common.
1321 * symbol.c (free_common_tree): New function.
1322 (gfc_free_namespace): Call new function.
1323 * trans-common.c (several functions): Remove argument
1324 'name', use name from gfc_common_head instead.
1325
7d76d73a
TS
13262004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1327
1328 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1329 and RHS match. Return early if the RHS is NULL().
1330
794ba78b
TS
1331 PR fortran/16336
1332 * match.c (match_common): Fix error reporting for used common.
1333
104b260c
TS
1334 PR fortran/15969
1335 * trans-expr.c (gfc_conv_structure): Handle initialization
1336 of scalar pointer components.
1337
24727d92
TS
1338 * parse.c (decode_statement): Fix matching of BLOCK DATA.
1339
77dc4103
TS
1340 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1341 by fix for PR 15481.
f676971a 1342
a8a6b603
TS
13432004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1344
1345 * trans-common.c: Fix whitespace issues, make variable names
1346 more readable.
1347 (create_common): Additionally, make loop logic more obvious.
1348
13492004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
ad6e2a18
TS
1350 Paul Brook <paul@codesourcery.com>
1351
1352 PR fortran/13415
1353 * trans-common.c (calculate_length): Remove ...
1354 (get_segment_info): Merge into here. Save field type.
1355 (build_field): Use saved type.
1356 (create_common, new_condition, new_segment, finish_equivalences):
1357 Use new get_segment_info.
1358 * trans-types.c: Update comment.
1359
8598a113 13602004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 1361
8598a113
TS
1362 PR fortran/14077
1363 * moduele.c (mio_symbol): Don't I/O initial values unless
1364 symbol is a parameter.
1365
4077d207 13662004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 1367
4077d207
TS
1368 PR fortran/13201
1369 * resolve.c (resolve_symbol): Verify that the shape of a
1370 parameter array is not only explicit, but also constant.
1371 * array.c (gfc_is_compile_time_shape): New function.
1372 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1373
51281118
TS
13742004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1375
1376 PR fortran/15481
1377 PR fortran/13372
1378 PR fortran/13575
1379 PR fortran/15978
1380 * module.c (write_symbol, write_symtree): Remove workaround.
1381 * primary.c (match_actual_arglist): Enhance comment.
1382 (gfc_match_rvalue): Handle function call with first argument
1383 a keyword argument correctly.
1384 * resolve.c (resolve_symbol): Change call to
1385 gfc_set_default_type to issue error if no implicit type
1386 can be found.
1387 * trans-decl.c (gfc_create_module_variable): Remove workaround.
f676971a 1388
60c9a35b
PB
13892004-07-08 Paul Brook <paul@codesourcery.com>
1390
1391 * intrinsic.c (add_sym_4s): New function.
1392 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1393
b41b2534
JB
13942004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
1395 Paul Brook <paul@codesourcery.com>
1396
1397 PR fortran/15280
1398 PR fortran/15665
1399 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1400 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1401 * intrinsic.c (add_functions): Identify iargc. Add
1402 command_argument_count.
1403 (add_subroutines): Resolve getarg. Add get_command and
1404 get_command_argument.
1405 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1406 gfc_resolve_get_command_argument): Add prototypes.
1407 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1408 gfc_resolve_get_command_argument): New functions.
1409 * trans-decl.c (gfor_fndecl_iargc): New variable.
1410 (gfc_build_intrinsic_function_decls): Set it.
1411 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1412 (gfc_conv_intrinsic_function): Use it.
1413 * trans.h (gfor_fndecl_iargc): Declare.
1414
e62be46e
MK
14152004-07-04 Matthias Klose <doko@debian.org>
1416
1417 * Make-lang.in: Generate and install gfortran man page.
1418 * invoke.texi: Remove extra '@c man end'.
1419
8fff4fc1
RH
14202004-07-04 Richard Henderson <rth@redhat.com>
1421
1422 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1423
1107b970
PB
14242004-07-04 Paul Brook <paul@codesourcery.com>
1425
1426 * decl.c (gfc_match_implicit_range): Don't use typespec.
1427 (gfc_match_implicit): Handle character selectors.
1428 * gfortran.h (gfc_set_implicit): Remove prototype.
1429 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1430 * parse.c (accept_statement): Don't call gfc_set_implicit.
1431 * symbol.c (new_ts): Remove.
1432 (gfc_set_implicit_none): Use same loop bounds as other functions.
1433 (gfc_set_implicit): Remove.
1434 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1435 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1436
4025c040
RH
14372004-06-30 Richard Henderson <rth@redhat.com>
1438
276b3fab
RH
1439 * match.c (var_element): Remove unused variable.
1440
4025c040
RH
1441 * trans-decl.c (gfc_generate_function_code): Don't set
1442 x_whole_function_mode_p.
1443 (gfc_generate_constructors): Likewise.
1444
6a0bec2c
RH
14452004-06-30 Richard Henderson <rth@redhat.com>
1446
1447 * trans-decl.c (gfc_generate_function_code): Don't set
1448 immediate_size_expand.
1449 (gfc_generate_constructors): Likewise.
1450
e5ddaa24
TS
14512004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1452
1453 PR fortran/16161
1454 * decl.c (gfc_match_type_spec): Rename second argument to
1455 'implicit_flag', reverse meaning. Don't match_char_spec if
1456 'implicit_flag' is set. Rename to ...
1457 (match_type_spec): ... this.
1458 (gfc_match_implicit_none, match_implicit_range): Move here
1459 from match.c.
1460 (gfc_match_implicit): Move here from match.c, try to
1461 match_char_len if match_implicit_range doesn't succeed for
1462 CHARACTER implicits. Call renamed fucntion match_type_spec.
1463 (gfc_match_data_decl, match_prefix): Call renamed function
1464 match_type_spec.
1465 * match.c (gfc_match_implicit_none, match_implicit_range,
1466 gfc_match_implicit): Move to decl.c.
1467 * match.h (gfc_match_implicit_none, gfc_match_implicit):
1468 Move protoypes to section 'decl.c'.
1469 (gfc_match_type_spec): Remove prototype.
1470
ef558756
TS
14712004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1472
f676971a 1473 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
ef558756
TS
1474 copyright years.
1475
7ab92584
SB
14762004-06-29 Steven Bosscher <stevenb@suse.de>
1477
1478 Make sure types in assignments are compatible. Mostly mechanical.
1479 * trans-const.h (gfc_index_one_node): New define.
1480 * trans-array.c (gfc_trans_allocate_array_storage,
1481 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1482 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1483 gfc_conv_array_ubound, gfc_conv_array_ref,
1484 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1485 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1486 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1487 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1488 types in assignments, conversions and conditionals for expressions.
1489 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1490 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1491 gfc_conv_function_call, gfc_trans_pointer_assignment,
1492 gfc_trans_scalar_assign): Likewise.
1493 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1494 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1495 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1496 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1497 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1498 gfc_conv_allocated, gfc_conv_associated,
1499 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1500 * trans-io.c (set_string): Likewise.
1501 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1502 gfc_do_allocate, generate_loop_for_temp_to_lhs,
1503 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1504 compute_overall_iter_number, gfc_trans_assign_need_temp,
1505 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1506 gfc_evaluate_where_mask, gfc_trans_where_assign,
1507 gfc_trans_where_2): Likewise.
1508 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1509 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1510
1511 * trans.c (gfc_add_modify_expr): Add sanity check that types
1512 for the lhs and rhs are the same for scalar assignments.
1513
fbc9b453
TS
15142004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1515
1516 * dump-parse-tree.c (show_common): New function.
1517 (gfc_show_namespace): Show commons.
1518
9056bd70
TS
15192004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1520 Andrew Vaught <andyv@firstinter.net>
1521
1522 PR fortran/13249
1523 PR fortran/15481
ef558756 1524 * decl.c (gfc_match_save): Adapt to new common structures,
9056bd70
TS
1525 don't allow saving USE-associated common.
1526 * dump-parse-tree (gfc_show_attr): (saved_)common are not
1527 symbol attributes any longer.
1528 (gfc_show_symbol): Don't show old-style commons any longer.
1529 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
1530 interface.
1531 * gfortran.h (symbol_attribute): Remove common and saved_common
1532 attributes.
1533 (gfc_symbol): Remove common_head element.
1534 (gfc_common_head): New struct.
1535 (gfc_get_common_head): New macro.
1536 (gfc_symtree): Add field 'common' to union.
1537 (gfc_namespace): Add field 'common_root'; change type of field
1538 'blank_common' to blank_common.
1539 (gfc_add_data): New prototype.
1540 (gfc_traverse_symtree): Expect a symtree as first argument
1541 instead of namespace.
1542 * match.c (gfc_get_common): New function.
1543 (match_common_name): Change to take char * as argument, adapt,
1544 fix bug with empty name.
1545 (gfc_match_common): Adapt to new data structures. Disallow
1546 redeclaration of USE-associated COMMON-block. Fix bug with
1547 empty common.
1548 (var_element): Adapt to new common structures.
1549 * match.h (gfc_get_common): Declare.
1550 * module.c: Add 2004 to copyright years, add commons to module
1551 file layout description.
1552 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
1553 for removed attributes.
1554 (mio_symbol): Adapt to new way of storing common relations.
1555 (load_commons): New function.
1556 (read_module): Skip common list on first pass, load_commons at
1557 second.
1558 (write_commons): New function.
1559 (write_module): Call write_commons().
1560 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
1561 functions related to removed attributes.
1562 (gfc_add_data): New function.
1563 (gfc_clear_attr): Don't set removed attributes.
1564 (gfc_copy_attr): Don't copy removed attributes.
1565 (traverse_symtree): Remove.
f676971a 1566 (gfc_traverse_symtree): Don't traverse symbol
9056bd70
TS
1567 tree of the passed namespace, but require a symtree to be passed
1568 instead. Unify with traverse_symtree.
1569 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
1570 interface.
1571 (save_symbol): Remove setting of removed attribute.
1572 * trans-common.c (gfc_sym_mangled_common_id): Change to
1573 take 'char *' argument instead of 'gfc_symbol'.
1574 (build_common_decl, new_segment, translate_common): Adapt to new
1575 data structures, add new
1576 argument name.
1577 (create_common): Adapt to new data structures, add new
1578 argument name. Fix typo in intialization of derived types.
1579 (finish_equivalences): Add second argument in call to
1580 create_common.
1581 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
1582 (gfc_trans_common): Adapt to new data structures.
f676971a 1583 * trans-decl.c (gfc_create_module_variables): Remove test for
e23667c6 1584 removed attribute.
9056bd70 1585
50d78f96
TS
15862004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1587
1588 * io.c: Add 2004 to copyright years.
1589
c9543002
TS
15902004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1591 Andrew Vaught <andyv@firstinter.net>
1592
1593 * gfortran.h (gfc_gsymbol): New typedef.
1594 (gfc_gsym_root): New variable.
1595 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
1596 * parse.c (global_used): New function.
1597 (parse_block_data): Check for double empty BLOCK DATA,
1598 use global symbol table.
1599 (parse_module): Use global symbol table.
1600 (add_global_procedure, add_global_program): New functions.
1601 (gfc_parse_file): Use global symbol table.
1602 * symbol.c (gfc_gsym_root): New variable.
1603 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
1604 functions.
1605
78f2fb08
TS
16062004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1607
1608 * module.c (mio_gmp_real): Correct writing of negative numbers.
1609
16102004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
e063a048
TS
1611
1612 PR fortran/15963
1613 * expr.c (check_intrinsic_op): Allow comparison of characters.
1614 Make logic easier.
1615
ddc9ce91
TS
16162004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1617 Andrew Vaught <andyv@firstinter.net>
1618
1619 * decl.c (contained_procedure): New function.
1620 (match_end): Verify correctness of END STATEMENT in
1621 all cases.
1622
16232004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1624 Andrew Vaught <andyv@firstinter.net>
0ff0dfbf
TS
1625
1626 PR fortran/15190
1627 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
1628 (decode_statement): Enforce required space in free-form.
1629
ddc9ce91 16302004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44de5aeb
RK
1631
1632 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
1633 * trans-array.c (gfc_conv_descriptor_data): Add operand
1634 for COMPONENT_REF.
1635 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
1636 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
1637 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
1638 * trans-common.c (create_common): Likewise.
1639 * trans-expr.c (gfc_conv_component_ref): Likewise.
1640 * trans-io.c (set_parameter_value): Likewise.
1641 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
1642 (transfer_expr): Likewise.
1643 * trans-decl.c (gfc_trans_auto_character_variable):
1644 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
ddc9ce91 1645 (gfc_gimplify_function): New function.
44de5aeb
RK
1646 (gfc_generate_function-code): Properly handle nested functions.
1647 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
1648
8750f9cd
JB
16492004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
1650
1651 PR fortran/15750
1652 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
1653 (gfc_resolve_inquire): Resolve the iolength tag. Return
1654 SUCCESS at end of function if no failure has occured.
1655 * resolve.c (resolve_code): Resolve if iolength is encountered.
1656 * trans-io.c: (ioparm_iolength, iocall_iolength,
1657 iocall_iolength_done): New variables.
1658 (last_dt): Add IOLENGTH.
1659 (gfc_build_io_library_fndecls ): Set iolength related variables.
1660 (gfc_trans_iolength): Implement.
1661 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
1662
fa841200
TS
16632004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
1664
1665 PR fortran/15511
1666 * scanner.c (load_line): Don't truncate preprocessor lines.
1667 Reformat error message.
1668 (preprocessor_line): Issue warning in case of malformed
f676971a 1669 preprocessor line.
fa841200 1670
f5e440e1
TS
16712004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1672
1673 * resolve.c (resolve_symbol): Add comment in function body.
1674 (check_data_variable): Change type of mark to ar_type, adapt code
1675 accordingly.
1676
da4f9e3b
TS
16772004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1678
1679 * array.c (gfc_insert_constructor): Avoid redundant call to
1680 mpz_comp. Add 2004 to copyright years.
f676971a 1681
b40410b9
JM
16822004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1683
1684 * trans.h (stmtblock_t): Change has_scope to unsigned int.
1685
160874e4
SK
16862004-06-20 Steven G. Kargl <kargls@comcast.net>
1687
1688 * arith.c (gfc_range_check): correct complex underflow.
1689
6ef42154
TS
16902004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1691
1692 PR fortran/15962
1693 * match.c (match_case_selector): Call gfc_match_init_expr
1694 instead of gfc_match_expr.
1695 * resolve.c (validate_case_label_expr): No need to check for
1696 constant, since it wouldn't have been matched with the fix to
1697 match.c.
1698
f51d8522 16992004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
7031baf4
TS
1700
1701 PR fortran/15211
1702 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
f676971a 1703 of strings.
7031baf4 1704
ce738b86
TS
17052004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1706
1707 PR fortran/15510
1708 * trans-deecl.c (generate_local_decl): Do not issue warning for
1709 unused variables if they're use associated.
1710
17112004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
6615c446 1712 Andrew Vaught <andyv@firstinter.net>
f3207b37
TS
1713
1714 PR fortran/14928
1715 * gfortran.h (gfc_check_f): Add new field f3ml.
1716 * check.c (gfc_check_minloc_maxloc): Take argument list instead
1717 of individual arguments, reorder if necessary.
1718 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1719 * intrinsic.c (add_sym_3ml): New function.
1720 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
f676971a 1721 (check_specific): Catch special case MINLOC, MAXLOC.
f3207b37 1722
6956a6f3
PB
17232004-06-14 Paul Brook <paul@codesourcery.com>
1724
1725 * intrinsic.c (add_sym_2s): Use correct function types.
1726
fd528377
TS
17272004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1728
b3b65c9a 1729 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
fd528377
TS
1730 * data.c (gfc_get_section_index): Remove dependency on trans.h.
1731
2bd74949
SK
17322004-06-12 Steven G. Kargl <kargls@comcast.net>
1733
1734 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1735 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1736 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1737 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1738 * trans-intrinsic.c: Use symbols.
1739 * intrinsic.c (add_sym_2s): New function.
1740 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1741 * intrinsic.h: Function prototypes.
f676971a 1742 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2bd74949
SK
1743 gfc_resolve_srand): New functions.
1744
c52eae8d
TS
17452004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1746
1747 PR fortran/14957
1748 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1749 contained procedure.
f676971a 1750
662ef0f5
TS
17512004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1752
1753 PR fortran/12841
1754 * interface.c (compare_parameter, compare_actual_formal): Don't
1755 check types and array shapes for NULL()
1756 * trans-expr.c (conv_function_call): No double indirection for
f676971a 1757 NULL()
662ef0f5 1758
293155b0
TM
17592004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
1760
1761 * trans-expr.c (gfc_conv_cst_int_power): Compute
1762 x**(-n) by converting it to (1/x)**n instead of
1763 1/x**n.
1764
62f1d470
TS
17652004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1766
1767 PR fortran/13372
1768 * module.c (write_symbol, write_symtree): Don't write symbols
1769 wrongly added to namespace.
1770 * trans-decl.c (gfc_create_module_variable): Don't create a
1771 backend decl for a symbol incorrectly added to namespace.
1772
a4ac5dd3
TS
17732004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1774
1775 PR fortran/13201
1776 * resolve.c (resolve_symbol): Verify that parameter array has an
1777 explicit shape. Fix typos and coding style issues in surrounding
1778 lines.
1779
17802004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
e0f2a7c6
TS
1781
1782 PR fortran/15478
1783 * gfortran.texi: The documentation doesn't contain infomration on
1784 how to report bugs, and shouldn't, so remove the line which
1785 says it does.
1786
f9fed73b
TS
17872004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1788
f676971a 1789 * intrinsic.c (sort_actual): Keep track of type of missing
f9fed73b
TS
1790 arguments. (Missing from previous commit.)
1791
1600fe22
TS
17922004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1793
1794 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1795 * interface.c (compare_actual_formal): Keep type of omitted
1796 optional arguments.
1797 * trans-expr.c (gfc_conv_function_call): Add string length
1798 argument for omitted string argument.
1799
18002004-06-03 Paul Brook <paul@codesourcery.com>
7c87eac6
PB
1801
1802 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
1803 lists instead of compound expr chains.
1804 (gfc_trans_code): Annotate statement lists.
1805
13413760
TS
18062004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1807
1808 * trans-array.c: Fix spelling in comments.
1809
2fa54841
TS
18102004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1811
1812 PR fortran/15557
1813 * data.c (assign_substring_data_value): New function.
1814 (gfc_assign_data_value): Call the new function if we're dealing
1815 with a substring LHS.
1816
ea0ece09
TS
18172004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1818
1819 PR fortran/15477
1820 * gfortran.h (GFC_VERSION): Remove.
1821 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1822 where used.
1823
c3e8c6b8
TS
18242004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1825
1826 * trans-types.c: Fix spelling & layout in comments.
1827
94716287
TS
18282004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1829
1830 PR fortran/14067
1831 * trans-const.c (gfc_conv_string_init): Allow variable string
1832 length lower than initialization string length.
1833
7b5b57b7
PB
18342004-05-30 Paul Brook <paul@codesourcery.com>
1835
1836 PR fortran/15620
1837 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1838 * trans-expr.c (gfc_trans_string_copy): New function.
1839 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
1840 character lengths.
1841 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1842 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1843 * trans.h (struct gfc_saved_var): Define.
1844 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1845
5f251c26
SK
18462004-05-30 Steven G. Kargl <kargls@comcast.net>
1847
1848 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1849
e73c80ae
SK
18502004-05-29 Steven G. Kargl <kargls@comcast.net>
1851
1852 * simplify.c (gfc_simplify_log): Remove useless line of code.
1853
353c3b7e
PB
18542004-05-29 Paul Brook <paul@codesourcery.com>
1855
1856 * trans-common.c (find_equivalence): Find multiple rules.
1857
63645982
TS
18582004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1859
1860 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1861 (gfc_current_locus): Declare new global variable.
1862 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1863 (gfc_current_locus1): Rename ...
1864 (gfc_current_locus): ... to this.
1865 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1866 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1867 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1868 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1869 and gfc_current_locus(), respectively.
1870 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1871 match_array_cons_element, gfc_match_array_constructor):
1872 Read/modify gfc_current_locus instead of calling gfc_set_locus()
1873 and gfc_current_locus().
1874 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1875 match_attr_spec, gfc_match_function_decl, gfc_match_end,
1876 attr_decl1, gfc_match_save): Likewise.
1877 * error.c (error_print, gfc_internal_error): Likewise.
1878 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1879 * interface.c (gfc_add_interface): Likewise.
1880 * io.c (gfc_match_format, match_dt_format, match_dt_element,
1881 match_io_iterator, match_io): Likewise.
1882 * match.c (gfc_match_space, gfc_match_eos,
1883 gfc_match_small_literal_int, gfc_match_st_label,
1884 gfc_match_strings, gfc_match_name, gfc_match_iterator,
1885 gfc_match_char, gfc_match, gfc_match_assignment,
1886 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1887 gfc_match_nullify, gfc_match_call, match_implicit_range,
1888 gfc_match_implicit, gfc_match_data, match_case_selector,
1889 gfc_match_case, match_forall_iterator): Likewise.
1890 * matchexp.c (gfc_match_defined_op_name, next_operator,
1891 match_level_1, match_mult_operand, match_ext_mult_operand,
1892 match_add_operand, match_ext_add_operand, match_level_2,
1893 match_level_3, match_level_4, match_and_operand, match_or_operand,
1894 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1895 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1896 * parse.c (match_word, decode_statement, next_free, next_fixed,
1897 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1898 Likewise.
1899 * primary.c (match_digits, match_integer_constant,
1900 match_boz_constant, match_real_constant, match_substring,
1901 next_string_char, match_charkind_name, match_string_constant,
1902 match_logical_constant, match_const_complex_part,
1903 match_complex_constant, match_actual_arg, match_keyword_arg,
1904 gfc_match_actual_arglist, gfc_match_structure_constructor,
1905 gfc_match_rvalue, gfc_match_variable): Likewise.
1906 * st.c (gfc_get_code): Likewise.
1907 * symbol.c (check_conflict, check_used, check_done,
1908 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1909 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1910 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1911
4eeaf81e
RS
19122004-05-26 Roger Sayle <roger@eyesopen.com>
1913
1914 * io.c (format_asterisk): Silence compiler warnings by correcting
1915 the number of elements of a "locus" initializer.
1916
a2f29587
RS
19172004-05-25 Roger Sayle <roger@eyesopen.com>
1918
1919 PR fortran/13912
1920 * matchexp.c: Allow unary operators after arithmetic operators
1921 as a GNU extension.
1922 (match_ext_mult_operand, match_ext_add_operand): New functions.
1923 (match_mult_operand): Tweak to call match_ext_mult_operand.
1924 (match_add_operand): Tweak to call match_ext_mult_operand.
1925 (match_level_2): Rearrange to call match_ext_add_operand.
1926
45aae8f2
PB
19272004-05-25 Paul Brook <paul@codesourcery.com>
1928
1929 * expr.c (check_inquiry): Remove bogus tests.
1930
40e929f3
PB
19312004-05-23 Paul Brook <paul@codesourcery.com>
1932
1933 PR fortran/13773
1934 * expr.c (restricted_args): Remove redundant checks/argument.
1935 (external_spec_function): Update to match.
1936 (restricted_intrinsic): Rewrite.
1937
5291e69a
PB
19382004-05-23 Paul Brook <paul@codesourcery.com>
1939 Victor Leikehman <lei@haifasphere.co.il>
1940
1941 * gfortran.h (struct gfc_symbol): Add equiv_built.
1942 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1943 messages.
1944 (current_length): Remove.
1945 (add_segments): New function.
1946 (build_equiv_decl): Create initialized common blocks.
1947 (build_common_decl): Always add decl to bindings.
1948 (create_common): Create initializers.
1949 (find_segment_info): Reformat to match coding conventions.
1950 (new_condition): Use add_segments.
1951 (add_condition, find_equivalence, add_equivalences): Move iteration
1952 inside functions. Only process each segment once.
1953 (new_segment, finish_equivalences, translate_common): Simplify.
1954
95d3f567
SK
19552004-05-23 Steven G. Kargl <kargls@comcast.net>
1956
1957 * check.c (gfc_check_random_seed): Issue for too many arguments.
1958
c1c52409
PB
19592004-05-22 Steven G. Kargl <kargls@comcast.net>
1960
1961 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1962
19632004-05-22 Paul Brook <paul@codesourcery.com>
1854117e
PB
1964
1965 * dump-parse-tree.c (gfc_show_equiv): New function.
1966 (gfc_show_namespace): Use it.
1967
b6720768
VL
19682004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1969
1970 PR fortran/13249
1971 * symbol.c (gfc_add_common): Disable checks to work around other more
1972 fundamental inadequacies.
1973
8c1d6d62 1974