]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/24643 (Unclassifiable statement on implicitly typed character substring)
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
c040ffff
TS
12005-11-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2
3 PR fortran/24643
4 * primary.c (match_varspec): Check for implicitly typed CHARACTER
5 variables before matching substrings.
6
378e9577
SK
72005-11-09 Steven G. Kargl <kargls@comcast.net>
8
9 * trans-intrinsic.c: Typo in comment.
10
a01db3bf
EE
112005-11-09 Erik Edelmann <eedelman@gcc.gnu.org>
12
13 PR fortran/22607
14 * trans-decl.c(build_function_decl): Don't set
15 DECL_IS_PURE (fndecl) = 1 for return-by-reference
16 functions.
17
30c05595
TS
182005-11-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
19
20 * dump-parse-tree.c: Fix comment typo, add a few blank lines.
21
7accf123
SK
222005-11-07 Steven G. Kargl <kargls@comcast.net>
23
30c05595
TS
24 * error.c: Use flag_fatal_error.
25 * invoke.texi: Remove -Werror from list of options.
7accf123 26
4075a94e
PT
272005-11-06 Paul Thomas <pault@gcc.gnu.org>
28
29 PR fortran/24534
30 * resolve.c (resolve_symbol): Exclude case of PRIVATE declared
31 within derived type from error associated with PRIVATE type
32 components within derived type.
33
34 PR fortran/20838
35 PR fortran/20840
36 * gfortran.h: Add prototype for gfc_has_vector_index.
37 * io.c (gfc_resolve_dt): Error if internal unit has a vector index.
38 * expr.c (gfc_has_vector_index): New function to check if any of
39 the array references of an expression have vector inidices.
40 (gfc_check_pointer_assign): Error if internal unit has a vector index.
41
42 PR fortran/17737
43 * data.c (gfc_assign_data_value): Remove gcc_assert that caused the ICE
44 and replace by a standard dependent warning/error if overwriting an
45 existing initialization.
46 * decl.c (gfc_data_variable): Remove old error for already initialized
47 variable and the unused error check for common block variables. Add
48 error for hots associated variable and standard dependent error for
49 common block variables, outside of blockdata.
50 * symbol.c (check_conflict): Add constraints for DATA statement.
51
e5ef4b3b
JB
522005-11-06 Janne Blomqvist <jb@gcc.gnu.org>
53
54 PR fortran/24174
55 PR fortran/24305
56 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add kind
57 argument to transfer_array.
58 (transfer_array_desc): Add kind argument.
59
35059811
FXC
602005-11-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
61
62 * intrinsic.c (add_functions): Add ctime and fdate intrinsics.
63 (add_subroutines): Likewise.
64 * intrinsic.h: Prototypes for gfc_check_ctime,
65 gfc_check_ctime_sub, gfc_check_fdate_sub, gfc_resolve_ctime,
66 gfc_resolve_fdate, gfc_resolve_ctime_sub, gfc_resolve_fdate_sub.
67 * gfortran.h: Add GFC_ISYM_CTIME and GFC_ISYM_FDATE.
68 * iresolve.c (gfc_resolve_ctime, gfc_resolve_fdate,
69 gfc_resolve_ctime_sub, gfc_resolve_fdate_sub): New functions.
70 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
71 gfor_fndecl_fdate and gfor_fndecl_ctime.
72 * check.c (gfc_check_ctime, gfc_check_ctime_sub,
73 gfc_check_fdate_sub): New functions.
74 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
75 gfc_conv_intrinsic_fdate): New functions.
76 (gfc_conv_intrinsic_function): Add cases for GFC_ISYM_CTIME
77 and GFC_ISYM_FDATE.
78 * intrinsic.texi: Documentation for the new CTIME and FDATE
79 intrinsics.
80 * trans.h: Declarations for gfor_fndecl_ctime and gfor_fndecl_fdate.
81
831d7813
KH
822005-11-05 Kazu Hirata <kazu@codesourcery.com>
83
84 * decl.c, trans-decl.c: Fix comment typos.
85 * gfortran.texi: Fix a typo.
86
25fc05eb
FXC
872005-11-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
88
89 * intrinsic.c (add_functions): Add function version of TTYNAM.
90 * intrinsic.h: Add prototypes for gfc_check_ttynam and
91 gfc_resolve_ttynam.
92 * gfortran.h: Add case for GFC_ISYM_TTYNAM.
93 * iresolve.c (gfc_resolve_ttynam): New function.
94 * trans-decl.c (gfc_build_intrinsic_function_decls): Add a tree
95 for function call to library ttynam.
96 * check.c (gfc_check_ttynam): New function.
97 * trans-intrinsic.c (gfc_conv_intrinsic_ttynam): New function.
98 (): Call gfc_conv_intrinsic_ttynam.
99 * trans.h: Add prototype for gfor_fndecl_ttynam.
100
33de49ea
SK
1012005-11-04 Steven G. Kargl <kargls@comcast.net>
102
103 PR fortran/24636
104 * match.c (gfc_match_stopcode): Set stop_code = -1.
105
a67ec6ab
FXC
1062005-11-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
107
108 PR fortran/18452
109 * lang-specs.h: Pass -lang-fortran to the preprocessor.
110
eca18fb4
AP
1112005-11-02 Andrew Pinski <pinskia@physics.uc.edu>
112
113 PR fortran/18157
114 * trans-array.c (gfc_conv_resolve_dependencies): Use the correct
115 type for the temporary array.
116 * trans-expr.c (gfc_trans_assignment): Pass lss
117 instead of lss_section
118 to gfc_conv_resolve_dependencies to get the
119 correct type.
120
c96cfa49
TS
1212005-11-02 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
122
123 * decl.c (gfc_match_entry): Function entries don't need an argument
124 list if there's no RESULT clause.
125
0be8cb80
TS
1262005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
127
128 PR fortran/24008
129 * decl.c (gfc_match_entry): Function entries need an argument list.
130
6a869706
EE
1312005-11-01 Erik Edelmann <eedelman@gcc.gnu.org>
132
133 PR 24245
134 * trans.c (gfc_generate_code): Move code to create a main
135 program symbol from here ...
136 * parse.c (main_program_symbol): ... to this new
137 function, setting the locus from gfc_current_locus
138 instead of ns->code->loc.
139 (gfc_parse_file): Call main_program_symbol for main programs.
140
92119f26
TS
1412005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
142
143 PR fortran/24404
144 * resolve.c (resolve_symbol): Output symbol names in more error
145 messages, clarify error message.
146
2e71c2a0
TS
1472005-11-01 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
148
149 * dump-parse-tree.c (show_symtree): Revert change unintentionally
150 committed in r106246.
151
53096259
PT
1522005-11-01 Paul Thomas <pault@gcc.gnu.org>
153
154 PR fortran/21565
155 * symbol.c (check_conflict): An object cannot be in a namelist and in
156 block data.
157
158 PR fortran/18737
159 * resolve.c (resolve_symbol): Set the error flag to
160 gfc_set_default_type, in the case of an external symbol, so that
161 an error message is emitted if IMPLICIT NONE is set.
162
163 PR fortran/14994
164 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SECNDS to enum.
165 * check.c (gfc_check_secnds): New function.
166 * intrinsic.c (add_functions): Add call to secnds.
167 * iresolve.c (gfc_resolve_secnds): New function.
168 * trans-intrinsic (gfc_conv_intrinsic_function): Add call to
169 secnds via case GFC_ISYM_SECNDS.
170 * intrinsic.texi: Add documentation for secnds.
171
def6f170
AS
1722005-10-31 Andreas Schwab <schwab@suse.de>
173
174 * Make-lang.in (GFORTRAN_TARGET_INSTALL_NAME): Define.
175 (GFORTRAN_CROSS_NAME): Remove.
176 (fortran.install-common): Correctly install a cross compiler.
177 (fortran.uninstall): Use GFORTRAN_TARGET_INSTALL_NAME instead of
178 GFORTRAN_CROSS_NAME.
179
13679135
EE
1802005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
181
182 * gfortran.texi: Update contributors.
183
d48734ef
EE
1842005-10-30 Erik Edelmann <eedelman@gcc.gnu.org>
185
186 PR fortran/18883
187 * trans-decl.c (gfc_finish_var_decl): Add decl to the
188 current function, rather than the parent. Make
189 assertion accept fake result variables.
190 * trans-expr.c (gfc_conv_variable): If the character
191 length of an ENTRY isn't set, get the length from
192 the master function instead.
193
ed146156
TK
1942005-10-30 Thomas Koenig <Thomas.Koenig@online.de>
195
196 * gfortran.texi: Remove reservations about I/O usability. Document
197 that array intrinsics mostly work.
198
a63dad5b
TS
1992005-10-30 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
200
201 * gfortran.texi: Move license stuff to back. Add information
202 on ENUM and ENUMERATOR.
203 * invoke.texi: Document -fshort-enums.
204
25d8f0a2
TS
2052005-10-30 Gaurav Gautam <gauravga@noida.hcltech.com>
206 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
207
208 * arith.c (gfc_enum_initializer): New function.
209 (gfc_check_integer_range): Made extern.
210 * decl.c (enumerator_history): New typedef.
211 (last_initializer, enum_history, max_enum): New variables.
212 (create_enum_history, gfc_free_enum_history): New functions.
213 (add_init_expr_to_sym): Call create_enum_history if parsing ENUM.
214 (variable_decl): Modified to parse enumerator definition.
215 (match_attr_spec): Add PARAMETER attribute to ENUMERATORs.
216 (gfc_match_data_decl): Issues error, if match_type_spec do not
217 return desired return values.
218 (set_enum_kind, gfc_match_enum, gfc_match_enumerator_def): New
219 functions.
220 (gfc_match_end): Deal with END ENUM.
221 * gfortran.h (gfc_statement): ST_ENUM, ST_ENUMERATOR, ST_END_ENUM
222 added.
223 (symbol_attribute): Bit field for enumerator added.
224 (gfc_options): Add fshort_enums.
225 (gfc_enum_initializer, gfc_check_integer_range): Add prototypes.
226 * options.c: Include target.h
227 (gfc_init_options): Initialize fshort_enums.
228 (gfc_handle_option): Deal with fshort_enums.
229 * parse.c (decode_statement): Match ENUM and ENUMERATOR statement.
230 (gfc_ascii_statement): Deal with the enumerator statements.
231 (parse_enum): New function to parse enum construct.
232 (parse_spec): Added case ST_ENUM.
233 * parse.h (gfc_compile_state): COMP_ENUM added.
234 (gfc_match_enum, gfc_match_enumerator_def, gfc_free_enum_history):
235 Prototype added.
236 * symbol.c (gfc_copy_attr): Copy enumeration attribute.
237 * lang.opt (fshort-enums): Option added.
238
0d519038
FXC
2392005-10-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
240
241 * check.c (gfc_check_malloc, gfc_check_free): New functions.
242 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_MALLOC.
243 * intrinsic.c (add_functions): Add symbols for MALLOC function.
244 (add_subroutines): Add symbol for FREE subroutine.
245 * intrinsic.h: Prototypes for gfc_check_malloc, gfc_check_free,
246 gfc_resolve_malloc and gfc_resolve_free.
247 * intrinsic.texi: Add doc for FREE and MALLOC intrinsics.
248 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): New
249 functions.
250 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case for
251 GFC_ISYM_MALLOC.
252
cf6ae955
SB
2532005-10-30 Steven Bosscher <stevenb@suse.de>
254
255 * gfortran.texi: Update contributors.
256
55898b2c
SB
2572005-10-29 Steven Bosscher <stevenb@suse.de>
258
259 * interface.c: Fix previous checkin (an incomplete patch
260 was commited for me).
261
318a2182
JM
2622005-10-29 Joseph S. Myers <joseph@codesourcery.com>
263
264 * intrinsic.texi: Remove empty @cindex line.
265
185d7d97
FXC
2662005-10-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
267
268 * check.c (gfc_check_alarm_sub, gfc_check_signal,
269 gfc_check_signal_sub): New functions.
270 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIGNAL.
271 * intrinsic.c (add_functions): Add signal intrinsic.
272 (add_subroutines): Add signal and alarm intrinsics.
273 * intrinsic.texi: Document the new intrinsics.
274 * iresolve.c (gfc_resolve_signal, gfc_resolve_alarm_sub,
275 gfc_resolve_signal_sub): New functions.
276 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add case
277 for GFC_ISYM_SIGNAL.
278 * intrinsic.h: Add prototypes for gfc_check_alarm_sub,
279 gfc_check_signal, gfc_check_signal_sub, gfc_resolve_signal,
280 gfc_resolve_alarm_sub, gfc_resolve_signal_sub.
281
9b46f94f
SK
2822005-10-28 Steven Bosscher <stevenb@suse.de>
283
284 PR fortran/24545
285 * interface.c (gfc_match_end_interface): Fix typo in
286 INTERFACE_USER_OP case.
287
4f8725d4
FXC
2882005-10-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
289
290 PR fortran/15586
291 * resolve.c (resolve_symbol): Remove the use of whynot, so that
292 error messages are not built from pieces.
293
976e21f6
PT
2942005-10-26 Paul Thomas <pault@gcc.gnu.org>
295
296 PR fortran/24158
297 * decl.c (gfc_match_data_decl): Correct broken bit of code
298 that prevents undefined derived types from being used as
299 components of another derived type.
300 * resolve.c (resolve_symbol): Add backstop error when derived
301 type variables arrive here with a type that has no components.
302
b122dc6a
JJ
3032005-10-25 Jakub Jelinek <jakub@redhat.com>
304
305 * trans.h (gfc_conv_cray_pointee): Remove.
306 * trans-expr.c (gfc_conv_variable): Revert 2005-10-24 change.
307 * trans-array.c (gfc_conv_array_parameter): Likewise.
308 * trans-decl.c (gfc_conv_cray_pointee): Remove.
309 (gfc_finish_cray_pointee): New function.
310 (gfc_finish_var_decl): Use it. Don't return early for Cray
311 pointees.
312 (gfc_create_module_variable): Revert 2005-10-24 change.
313 * decl.c (cray_pointer_decl): Update comment.
314 * gfortran.texi: Don't mention Cray pointees aren't visible in the
315 debugger.
316
317 * symbol.c (check_conflict): Add conflict between cray_pointee
318 and in_common resp. in_equivalence.
319 * resolve.c (resolve_equivalence): Revert 2005-10-24 change.
320
321 * module.c (ab_attribute): Add AB_CRAY_POINTER and AB_CRAY_POINTEE.
322 (attr_bits): Likewise.
323 (mio_symbol_attribute): Save and restore cray_pointe{r,e} attributes.
324 (mio_symbol): For cray_pointee write/read cp_pointer reference.
325
910450c1
FW
3262005-10-25 Feng Wang <fengwang@nudt.edu.cn>
327
328 PR fortran/22290
329 * trans-decl.c (gfc_add_assign_aux_vars): New function. Add two
330 auxiliary variables.
331 (gfc_get_symbol_decl): Use it when a variable, including dummy
332 argument, is assigned a label.
333 (gfc_trans_assign_aux_var): New function. Set initial value of
334 the auxiliary variable explicitly.
335 (gfc_trans_deferred_vars): Use it.
336 * trans-stmt.c (gfc_conv_label_variable): Handle dummy argument.
337
83d890b9
AL
3382005-10-24 Asher Langton <langton2@llnl.gov>
339
340 PR fortran/17031
341 PR fortran/22282
b122dc6a
JJ
342 * check.c (gfc_check_loc): New function.
343 * decl.c (variable_decl): New variables cp_as and sym. Added a
83d890b9
AL
344 check for variables that have already been declared as Cray
345 Pointers, so we can get the necessary attributes without adding
346 a new symbol.
347 (attr_decl1): Added code to catch pointee symbols and "fix"
348 their array specs.
349 (cray_pointer_decl): New method.
350 (gfc_match_pointer): Added Cray pointer parsing code.
351 (gfc_mod_pointee_as): New method.
b122dc6a 352 * expr.c (gfc_check_assign): Added a check to catch vector-type
83d890b9
AL
353 assignments to pointees with an unspecified final dimension.
354 * gfortran.h: (GFC_ISYM_LOC): New.
355 (symbol_attribute): Added cray_pointer and cray_pointee bits.
356 (gfc_array_spec): Added cray_pointee and cp_was_assumed bools.
357 (gfc_symbol): Added gfc_symbol *cp_pointer.
358 (gfc_option): Added flag_cray_pointer.
359 (gfc_add_cray_pointee): Declare.
360 (gfc_add_cray_pointer ): Declare.
361 (gfc_mod_pointee_as): Declare.
362 * intrinsic.c (add_functions): Add code for loc() intrinsic.
363 * intrinsic.h (gfc_check_loc): Declare.
364 (gfc_resolve_loc): Declare.
365 * iresolve.c (gfc_resolve_loc): New.
366 * lang.opt: Added fcray-pointer flag.
b122dc6a 367 * options.c (gfc_init_options): Initialized.
83d890b9
AL
368 gfc_match_option.flag_cray_pointer.
369 (gfc_handle_option): Deal with -fcray-pointer.
370 * parse.c:(resolve_equivalence): Added code prohibiting Cray
371 pointees in equivalence statements.
372 * resolve.c (resolve_array_ref): Added code to prevent bounds
373 checking for Cray Pointee arrays.
374 (resolve_equivalence): Prohibited pointees in equivalence
375 statements.
b122dc6a 376 * symbol.c (check_conflict): Added Cray pointer/pointee
83d890b9 377 attribute checking.
b122dc6a
JJ
378 (gfc_add_cray_pointer): New.
379 (gfc_add_cray_pointee): New.
380 (gfc_copy_attr): New code for Cray pointers and pointees.
83d890b9
AL
381 * trans-array.c (gfc_trans_auto_array_allocation): Added code to
382 prevent space from being allocated for pointees.
b122dc6a 383 (gfc_conv_array_parameter): Added code to catch pointees and
83d890b9 384 correctly set their base address.
b122dc6a 385 * trans-decl.c (gfc_finish_var_decl): Added code to prevent
83d890b9
AL
386 pointee declarations from making it to the back end.
387 (gfc_create_module_variable): Same.
b122dc6a 388 * trans-expr.c (gfc_conv_variable): Added code to detect and
83d890b9
AL
389 translate pointees.
390 (gfc_conv_cray_pointee): New.
391 * trans-intrinsic.c (gfc_conv_intrinsic_loc): New.
b122dc6a 392 (gfc_conv_intrinsic_function): Added entry point for loc
83d890b9
AL
393 translation.
394 * trans.h (gfc_conv_cray_pointee): Declare.
395
396 * gfortran.texi: Added section on Cray pointers, removed Cray
b122dc6a 397 pointers from list of proposed extensions.
83d890b9 398 * intrinsic.texi: Added documentation for loc intrinsic.
b122dc6a 399 * invoke.texi: Documented -fcray-pointer flag.
83d890b9 400
09e87839
AL
4012005-10-24 Asher Langton <langton2@llnl.gov>
402
403 * decl.c (gfc_match_save): Changed duplicate SAVE errors to
404 warnings in the absence of strict standard conformance
405 * symbol.c (gfc_add_save): Same.
406
4c93c95a
FXC
4072005-10-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
408
409 PR fortran/15586
410 * arith.c (gfc_arith_error): Change message to include locus.
411 (check_result, eval_intrinsic, gfc_int2int, gfc_real2real,
412 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Use
413 the new gfc_arith_error.
414 (arith_error): Rewrite full error messages instead of building
415 them from pieces.
416 * check.c (must_be): Removed.
417 (type_check, numeric_check, int_or_real_check, real_or_complex_check,
418 kind_check, double_check, logical_array_check, array_check,
419 scalar_check, same_type_check, rank_check, kind_value_check,
420 variable_check, gfc_check_allocated, gfc_check_associated,
421 gfc_check_cmplx, gfc_check_dcmplx, gfc_check_dot_product,
422 gfc_check_index, gfc_check_kind, gfc_check_matmul, gfc_check_null,
423 gfc_check_pack, gfc_check_precision, gfc_check_present,
424 gfc_check_spread): Rewrite full error messages instead of
425 building them from pieces.
426 * decl.c (gfc_match_entry): Rewrite full error messages instead
427 of building them from pieces.
428 * parse.c (gfc_state_name): Remove.
429 * parse.h: Remove prototype for gfc_state_name.
430
78bd27f6
AP
4312005-10-23 Andrew Pinski <pinskia@physics.uc.edu>
432
433 PR fortran/23635
434 * check.c (gfc_check_ichar_iachar): Move the code around so
435 that the check on the length is after check for
436 references.
b122dc6a 437
5f700e6d
AL
4382005-10-23 Asher Langton <langton2@llnl.gov>
439
440 * decl.c (match_type_spec): Add a BYTE type as an extension.
441
2853e512
PT
4422005-10-23 Paul Thomas <pault@gcc.gnu.org>
443
444 PR fortran/18022
445 * trans-expr.c (gfc_trans_arrayfunc_assign): Return NULL
446 if there is a component ref during an array ref to force
447 use of temporary in assignment.
448
449 PR fortran/24311
450 PR fortran/24384
451 * fortran/iresolve.c (check_charlen_present): New function to
452 add a charlen to the typespec, in the case of constant
453 expressions.
454 (gfc_resolve_merge, gfc_resolve_spread): Call.the above.
455 (gfc_resolve_spread): Make calls to library functions that
456 handle the case of the spread intrinsic with a scalar source.
457
6019a1a4
EE
4582005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
459
460 PR fortran/24426
461 * decl.c (variable_decl): Don't assign default initializers to
462 pointers.
463
bf9d2177
JJ
4642005-10-21 Jakub Jelinek <jakub@redhat.com>
465
466 * interface.c (compare_actual_formal): Issue error when attempting
467 to pass an assumed-size array as assumed-shape array argument.
468
68577e56
EE
4692005-10-20 Erik Edelmann <erik.edelmann@iki.fi>
470
471 PR fortran/21625
472 * resolve.c (expr_to_initialize): New function.
b122dc6a 473 (resolve_allocate_expr): Take current statement as new
68577e56
EE
474 argument. Add default initializers to variables of
475 derived types, if they need it.
476 (resolve_code): Provide current statement as argument to
477 resolve_allocate_expr().
478
78c57259
PT
4792005-10-19 Paul Thomas <pault@gcc.gnu.org>
480
481 PR fortran/24440
482 * resolve.c (resolve_symbol): Correct error in check for
483 assumed size array with default initializer by testing
484 for arrayspec before dereferencing it.
485
4213f93b
PT
4862005-10-17 Paul Thomas <pault@gcc.gnu.org>
487
488 PR fortran/23446
489 * gfortran.h: Primitive for gfc_is_formal_arg.
490 * resolve.c(gfc_is_formal_arg): New function to signal across
491 several function calls that formal argument lists are being
492 processed.
493 (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
494 *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
495 symbol is part of an formal argument declaration.
496
497 PR fortran/21459
498 * decl.c (add_init_expr_to_sym): Make a new character
499 length for each variable, when the expression is NULL
500 and link to cl_list.
501
502 PR fortran/20866
503 * match.c (recursive_stmt_fcn): New function that tests if
504 a statement function resurses through itself or other other
505 statement functions.
506 (gfc_match_st_function): Call recursive_stmt_fcn to check
507 if this is recursive and to raise error if so.
508
509 PR fortran/20849
510 PR fortran/20853
511 * resolve.c (resolve_symbol): Errors for assumed size arrays
512 with default initializer and for external objects with an
513 initializer.
514
515 PR fortran/20837
516 * decl.c (match_attr_spec): Prevent PUBLIC from being used
517 outside a module.
518
c2b27658
EE
5192005-10-16 Erik Edelmann <erik.edelmann@iki.fi>
520
521 PR 22273
522 * expr.c (check_inquiry): Add "len" to inquiry_function.
523
21dac32c
JJ
5242005-10-14 Jakub Jelinek <jakub@redhat.com>
525
526 * primary.c (match_boz_constant): Add missing break after gfc_error.
527
bce71376
PT
5282005-10-12 Paul Thomas <pault@gcc.gnu.org>
529
530 PR fortran/24092
531 * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
532 declaration for derived types, building if necessary. Return the
533 derived type if the fields have been built by this process. Otherwise,
534 continue as before but using the already obtained backend_decls for the
535 derived type components. Change the gcc_assert to act on the field.
536
949d5b72
PT
5372005-10-12 Paul Thomas <pault@gcc.gnu.org>
538
539 PR fortran/18082
540 * decl.c (variable_decl): Make a new copy of the character
541 length for each variable, when the expression is not a
542 constant.
543
944b8b35
FXC
5442005-10-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
545
546 * gfortran.h: Add bitmasks for different FPE traps. Add fpe
547 member to options_t.
548 * invoke.texi: Document the new -ffpe-trap option.
549 * lang.opt: Add -ffpe-trap option.
550 * options.c (gfc_init_options): Initialize the FPE option.
551 (gfc_handle_fpe_trap_option): New function to parse the argument
552 of the -ffpe-trap option.
553 (gfc_handle_option): Add case for -ffpe-trap.
554 * trans-decl.c: Declare a tree for the set_fpe library function.
555 (gfc_build_builtin_function_decls): Build this tree.
556 (gfc_generate_function_code): Generate a call to set_fpe at
557 the beginning of the main program.
558 * trans.h: New tree for the set_fpe library function.
559
96b95725
PT
5602005-10-12 Paul Thomas <pault@gcc.gnu.org>
561
562 PR fortran/20847
563 PR fortran/20856
564 * symbol.c (check_conflict): Prevent common variables and
565 function results from having the SAVE attribute,as required
566 by the standard.
567
0f9d970d
PT
5682005-10-12 Paul Thomas <pault@gcc.gnu.org>
569
570 PR fortran/24207
571 * resolve.c (resolve_symbol): Exclude use and host associated
572 symbols from the test for private objects in a public namelist.
573
81871c2a
JJ
5742005-10-12 Jakub Jelinek <jakub@redhat.com>
575
576 * trans-common.c (build_field): Fix comment typo.
577 (create_common): Set backend_decl of COMMON or EQUIVALENCEd
578 variables to a VAR_DECL with the COMPONENT_REF in
579 DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
580 * f95-lang.c (gfc_expand_function): Emit debug info for
581 EQUIVALENCEd variables if the equiv union is going to be output.
582
5832005-10-11 Steven G. Kargl <kargls@comcast.net>
5dd17af5
SK
584
585 PR fortran/20786
81871c2a 586 * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
5dd17af5
SK
587 of the argument.
588
24cc1193
JJ
5892005-10-11 Jakub Jelinek <jakub@redhat.com>
590
591 * f95-lang.c (gfc_init_decl_processing): Initialize
592 void_list_node.
593
3b138408
EE
5942005-10-07 Erik Edelmann <erik.edelmann@iki.fi>
595
944b8b35 596 PR 18568
3b138408
EE
597 * resolve.c (find_array_spec): Search through the list of
598 components in the symbol of the type instead of the symbol of the
599 variable.
600
c82cdb5d
RG
6012005-10-05 Richard Guenther <rguenther@suse.de>
602
603 PR fortran/24176
604 * parse.c (gfc_parse_file): Exit early for empty files.
605
216ac520
SE
6062005-10-03 Steve Ellcey <sje@cup.hp.com>
607
608 * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
609 and long double floating point types through to Fortran compiler.
610
644cb69f
FXC
6112005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
612
613 PR fortran/20120
614 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
615 double builtin function.
616 (gfc_init_builtin_functions): Add mfunc_longdouble,
617 mfunc_clongdouble and func_clongdouble_longdouble trees. Build
618 them for round, trunc, cabs, copysign and pow functions.
619 * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
620 case for kind 10 and 16.
621 * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
622 exponent10 and exponent16.
623 (gfc_build_intrinsic_function_decls): Build nodes for int16,
624 real10, real16, complex10 and complex16 types. Build all possible
625 combinations for function _gfortran_pow_?n_?n. Build function
626 calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
627 * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
628 real(10) and real(16).
629 * trans-intrinsic.c: Add suppport for long double builtin
630 functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
631 macros.
632 (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
633 real(16) kinds.
634 (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
635 and real16_decl in library functions.
636 (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
637 kinds 10 and 16.
638 (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
639 kinds.
640 (gfc_conv_intrinsic_sign): Likewise.
641 (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
642 * trans-types.c (gfc_get_int_type, gfc_get_real_type,
643 gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
644 the case of kinds not available.
645 * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
646 exponent10 and exponent16.
647
e8ec07e1
PT
6482005-10-01 Paul Thomas <pault@gcc.gnu.org>
649
650 PR fortran/16404
651 PR fortran/20835
652 PR fortran/20890
653 PR fortran/20899
654 PR fortran/20900
655 PR fortran/20901
656 PR fortran/20902
657 * gfortran.h: Prototype for gfc_add_in_equivalence.
658 * match.c (gfc_match_equivalence): Make a structure component
659 an explicit,rather than a syntax, error in an equivalence
660 group. Call gfc_add_in_equivalence to add the constraints
661 imposed in check_conflict.
662 * resolve.c (resolve_symbol): Add constraints: No public
663 structures with private-type components and no public
664 procedures with private-type dummy arguments.
665 (resolve_equivalence_derived): Add constraint that prevents
666 a structure equivalence member from having a default
667 initializer.
668 (sequence_type): New static function to determine whether an
669 object is default numeric, default character, non-default
670 or mixed sequence. Add corresponding enum typespec.
671 (resolve_equivalence): Add constraints to equivalence groups
672 or their members: No more than one initialized member and
673 that different types are not equivalenced for std=f95. All
674 the simple constraints have been moved to check_conflict.
675 * symbol.c (check_conflict): Simple equivalence constraints
676 added, including those removed from resolve_symbol.
677 (gfc_add_in_equivalence): New function to interface calls
678 match_equivalence to check_conflict.
679
57f0d086
JJ
6802005-09-27 Jakub Jelinek <jakub@redhat.com>
681
682 PR fortran/18518
683 * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
684 If it is true, set TREE_STATIC on the decl.
685 (create_common): If any symbol in equivalence has SAVE attribute,
686 pass true as last argument to build_equiv_decl.
687
18623fae
JB
6882005-09-24 Janne Blomqvist <jblomqvi@cc.hut.fi>
689
690 * trans-io.c (gfc_build_io_library_fndecls): Add entry
f6602816
DE
691 iocall_x_array for transfer_array.
692 (transfer_array_desc): New function.
693 (gfc_trans_transfer): Add code to call transfer_array_desc.
18623fae 694
d05d9ac7
JJ
6952005-09-26 Jakub Jelinek <jakub@redhat.com>
696
697 PR fortran/23677
698 * symbol.c (gfc_is_var_automatic): Return true if character length
699 is non-constant rather than constant.
700 * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
701 here.
702 * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
703 to 0 for -fno-automatic.
704
acff2da9
PT
7052005-09-23 Paul Thomas <pault@gcc.gnu.org>
706
707 PR fortran/16861
708 * module.c (mio_component_ref): Return if the symbol is NULL
709 and wait for another iteration during module reads.
710 (mio_symtree_ref): Suppress the writing of contained symbols,
711 when a symbol is available in the main namespace.
712 (read_module): Restrict scope of special treatment of contained
713 symbols to variables only and suppress redundant call to
714 find_true_name.
715
312ae8f4
SK
7162005-09-22 Steven G. Kargl <kargls@comcast.net>
717
718 PR fortran/24005
719 * interface.c (check_interface1): Fix NULL dereference.
720
8451584a
EE
7212005-09-22 Erik Edelmann <erik.edelmann@iki.fi>
722
723 PR fortran/23843
724 * resolve.c (derived_inaccessible): New function.
725 (resolve_transfer): Use it to check for private
726 components.
727
6970fcc8
SK
7282005-09-22 Steven G. Kargl <kargls@comcast.net>
729
730 PR fortran/23516
731 * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
732 intrinsics.
733 * intrinsic.h: Prototypes for gfc_simplify_realpart and
734 gfc_resolve_realpart.
735 * intrinsic.texi: Document intrinsic procedures.
736 * simplify.c (gfc_simplify_realpart): New function.
737 * irseolve.c (gfc_resolve_realpart): New function.
738
4c46bf2e
EE
7392005-09-21 Erik Edelmann <erik.edelmann@iki.fi>
740
741 PR fortran/19929
b122dc6a
JJ
742 * trans-stmt.c (gfc_trans_deallocate): Check if the
743 object to be deallocated is an array by looking at
4c46bf2e
EE
744 expr->rank instead of expr->symtree->n.sym->attr.dimension.
745
7fd4d312
TS
7462005-09-20 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
747
748 PR fortran/23420
749 * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
750 (match_io): Fix usage of gfc_find_symbol.
751
7a4ef45b
JJ
7522005-09-20 Jakub Jelinek <jakub@redhat.com>
753
754 PR fortran/23663
755 * primary.c (match_actual_arg): Handle ENTRY the same way
756 as FUNCTION.
757
2c05c0da
FXC
7582005-09-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
759
760 * Make-lang.in: Make check-fortran alias for check-gfortran.
761
1ed09f02
AJ
7622005-09-18 Andreas Jaeger <aj@suse.de>
763
764 * module.c (read_module): Add missed line from last patch.
765
630b7086
EE
7662005-09-18 Erik Edelmann <erik.edelmann@iki.fi>
767
768 PR fortran/15975
769 * resolve.c (resolve_symbol): Don't assign default
770 initializer to pointers.
771
6cda231e
PT
7722005-09-18 Paul Thomas <pault@gcc.gnu.org>
773
774 PR fortran/16861
775 * module.c (read_module): Give symbols from module procedures
776 different true_name entries to those from the module proper.
777
31043f6c
FXC
7782005-09-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
779
780 PR fortran/15586
781 * arith.c (gfc_arith_error): Add translation support for error
782 messages.
783 * array.c (gfc_match_array_ref): Likewise.
784 (gfc_match_array_spec): Likewise.
785 * check.c (must_be): Add msgid convention to third argument.
786 (same_type_check): Add translation support for error message.
787 (rank_check): Likewise.
788 (kind_value_check): Likewise.
789 (gfc_check_associated): Correct typo.
790 (gfc_check_reshape): Add translation support for error message.
791 (gfc_check_spread): Likewise.
792 * error.c (error_printf): Add nocmsgid convention to argument.
793 (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
794 (gfc_error, gfc_error_now): Likewise.
795 (gfc_status): Add cmsgid convention to argument.
796 * expr.c (gfc_extract_int): Add translation support for error
797 messages.
798 (gfc_check_conformance): Add msgid convention to argument.
799 (gfc_check_pointer_assign): Correct tabbing.
800 * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
801 * gfortranspec.c: Include intl.h header.
802 (lang_specific_driver): Add translation support for --version.
803 * io.c (check_format): Add translation support for error message.
804 (format_item_1): Likewise.
805 (data_desc): Likewise.
806 * matchexp.c: Likewise.
807 * misc.c (gfc_article): Remove function.
808 * module.c (bad_module): Use msgid convention. Add translation support
809 for error messages.
810 (require_atom): Add translation support for error messages.
811 * parse.c (gfc_ascii_statement): Likewise.
812 (gfc_state_name): Likewise.
813 * primary.c (match_boz_constant): Reorganise error messages for
814 translations.
815 * resolve.c (resolve_entries): Likewise.
816 (resolve_operator): Add translation support for error messages.
817 (gfc_resolve_expr): Use msgid convention. Reorganise error messages
818 for translations.
819 (resolve_symbol): Add translation support for error messages.
820 * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
821 * trans-const.c (gfc_build_string_const): Use msgid convention.
822
07af06f6
PB
8232005-09-16 Paul Brook <paul@codesourcery.com>
824
825 PR fortran/23906
826 * dependency.c (transform_sections): Divide by correct value.
827 Elaborate comment.
828
109b0ac2
PT
8292005-09-14 Paul Thomas <pault@gcc.gnu.org>
830
831 PR fortran/21875 Internal Unit Array I/O, NIST
832 * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
833 array descriptor to IOPARM structure.
834 * fortran/trans-io.c (set_internal_unit): New function to generate code
835 to store the character (array) and the character length for an internal
836 unit.
837 * fortran/trans-io (build_dt): Use the new function set_internal_unit.
b122dc6a 838
0df3cf7f
PT
8392005-09-14 Paul Thomas <pault@gcc.gnu.org>
840
841 PR fortran/19358
842 * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
843 which uses dim[i].upper for lbound, rather than dim[i].lower.
844
c4abe010
EE
8452005-09-13 Erik Edelmann <erik.edelmann@iki.fi>
846
847 PR fortran/17740
848 * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
849 of attr.elemental for specific function instead of generic name.
850
4fd9a813
RS
8512005-09-13 Richard Sandiford <richard@codesourcery.com>
852
853 PR fortran/18899
854 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
855 of argse. Remove now-redundant want_pointer assignment.
856 * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
857 a pointer, keep the original bounds of a full array reference.
858
7823229b
RS
8592005-09-13 Richard Sandiford <richard@codesourcery.com>
860
861 PR target/19269
862 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
863 (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
864 (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
865 for character-based operations.
866 (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
867 (gfc_resolve_unpack): Copy the whole typespec from the vector.
868 * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
869 case, get the string length from the scalarization state.
870
7f26dfa3
FXC
8712005-09-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
872
873 * Make-lang.in: Change targets prefixes from f95 to fortran.
874 * config-lang.in: Change language name to "fortran".
875 * lang.opt: Change language name to "fortran".
876 * options.c: Change CL_F95 to CL_Fortran.
877
e27edcd4
TK
8782005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
879
880 gfortran.texi: Document IOSTAT= specifier.
881
8822005-09-09 Thomas Koenig <Thomas.Koenig@online.de>
883
884 * gfortran.h: Add iomsg to gfc_open, gfc_close, gfc_filepos,
885 gfc_inquire and gfc_dt.
886 * dump-parse-tree.c (gfc_show_code_node): Add iomsg
887 for open, close, file positioning, inquire and namelist.
888 * io.c (io_tag): Add tag_iomsg.
889 (resolve_tag): Add standards warning for iomsg.
890 (match_open_element): Add iomsg.
891 (gfc_free_open): Add iomsg.
892 (gfc_resolve_open): Add iomsg.
893 (gfc_free_close): Add iomsg.
894 (match_close_element): Add iomsg.
895 (gfc_resolve_close): Add iomsg.
896 (gfc_free_filepos): Add iomsg.
897 (match_file_element): Add iomsg.
898 (gfc_resolve_filepos): Add iostat and iomsg.
899 (match-dt_element): Add iomsg.
900 (gfc_free_dt): Add iomsg.
901 (gfc_resolve_dt): Add iomsg.
902 (gfc_free_inquire): Add iomsg.
903 (match_inquire_element): Add iomsg.
904 (gfc_resolve_inquire): Add iomsg.
905 * trans_io.c: Add ioparm_iomsg and ioparm_iomsg_len.
906 (gfc_build_io_library_fndecls): Add iomsg as last field.
907 (gfc_trans_open): Add iomsg.
908 (gfc_trans_close): Add iomsg.
909 (build_fileos): Call set_string for iomsg.
910 (gfc_trans_inquire): Add iomsg.
911 (build_dt): Add iomsg.
912
a174b2f8
RS
9132005-09-09 Richard Sandiford <richard@codesourcery.com>
914
915 * match.h (gfc_match_equiv_variable): Declare.
916
7a70c12d
RS
9172005-09-09 Richard Sandiford <richard@codesourcery.com>
918
919 PR fortran/19239
920 * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
921 * dependency.h (gfc_ref_needs_temporary_p): Declare.
922 * dependency.c (gfc_ref_needs_temporary_p): New function.
923 (gfc_check_fncall_dependency): Use it instead of inlined check.
924 By so doing, take advantage of the fact that character substrings
925 within an array reference also need a temporary.
926 * trans.h (GFC_SS_VECTOR): Adjust comment.
927 * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
928 (gfc_set_vector_loop_bounds): New function.
929 (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
930 a GFC_SS_SECTION. Deal with the GFC_SS_VECTOR case by evaluating
931 the vector expression and caching its descriptor for use within
932 the loop.
933 (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
934 (gfc_conv_array_index_offset): Handle scalar, vector and range
935 dimensions as separate cases of a switch statement. In the vector
936 case, use the loop variable to calculate a vector index and use the
937 referenced element as the dimension's index. Perform bounds checking
938 on this final index.
939 (gfc_conv_section_upper_bound): Return null for vector indexes.
940 (gfc_conv_section_startstride): Give vector indexes a start value
941 of 0 and a stride of 1.
942 (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
943 (gfc_conv_expr_descriptor): Expand comments. Generalize the
944 handling of the !want_pointer && !direct_byref case. Use
945 gfc_ref_needs_temporary_p to decide whether the variable case
946 needs a temporary.
947 (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
948 GFC_SS_VECTOR index.
949 * trans-expr.c: Include dependency.h.
950 (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
951
62ab4a54
RS
9522005-09-09 Richard Sandiford <richard@codesourcery.com>
953
954 PR fortran/21104
955 * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
956 from trans-expr.c.
957 (gfc_init_interface_mapping, gfc_free_interface_mapping)
958 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
959 (gfc_apply_interface_mapping): Declare.
960 * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
961 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
962 * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
963 (gfc_trans_allocate_array_storage): Replace loop argument with
964 separate pre and post blocks.
965 (gfc_trans_allocate_temp_array): Add pre and post block arguments.
966 Update call to gfc_trans_allocate_array_storage.
967 (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
968 interface to gfc_trans_allocate_temp_array.
969 * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
970 Moved to trans.h.
971 (gfc_init_interface_mapping, gfc_free_interface_mapping)
972 (gfc_add_interface_mapping, gfc_finish_interface_mapping)
973 (gfc_apply_interface_mapping): Make extern.
974 (gfc_conv_function_call): Build an interface mapping for array
975 return values too. Call gfc_set_loop_bounds_from_array_spec.
976 Adjust call to gfc_trans_allocate_temp_array so that code is
977 added to SE rather than LOOP.
978
ec25720b
RS
9792005-09-09 Richard Sandiford <richard@codesourcery.com>
980
981 PR fortran/12840
982 * trans.h (gfor_fndecl_internal_realloc): Declare.
983 (gfor_fndecl_internal_realloc64): Declare.
984 * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
985 (gfor_fndecl_internal_realloc64): New variable.
986 (gfc_build_builtin_function_decls): Initialize them.
987 * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
988 * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
989 to say whether the array can grow later. Don't allocate the array
990 on the stack if so. Don't call malloc for zero-sized arrays.
991 (gfc_trans_allocate_temp_array): Add a similar argument here.
992 Pass it along to gfc_trans_allocate_array_storage.
993 (gfc_get_iteration_count, gfc_grow_array): New functions.
994 (gfc_iterator_has_dynamic_bounds): New function.
995 (gfc_get_array_constructor_element_size): New function.
996 (gfc_get_array_constructor_size): New function.
997 (gfc_trans_array_ctor_element): Replace pointer argument with
998 a descriptor tree.
999 (gfc_trans_array_constructor_subarray): Likewise. Take an extra
1000 argument to say whether the variable-sized part of the constructor
1001 must be allocated using realloc. Grow the array when this
1002 argument is true.
1003 (gfc_trans_array_constructor_value): Likewise.
1004 (gfc_get_array_cons_size): Delete.
1005 (gfc_trans_array_constructor): If the loop bound has not been set,
1006 split the allocation into a static part and a dynamic part. Set
1007 loop->to to the bounds for static part before allocating the
1008 temporary. Adjust call to gfc_trans_array_constructor_value.
1009 (gfc_conv_loop_setup): Allow any constructor to determine the
1010 loop bounds. Check whether the constructor has a dynamic size
1011 and prefer to use something else if so. Expect the loop bound
1012 to be set later. Adjust call to gfc_trans_allocate_temp_array.
1013 * trans-expr.c (gfc_conv_function_call): Adjust another call here.
1014
30aabb86
PT
10152005-09-09 Paul Thomas <pault@gcc.gnu.org>
1016
1017 PR fortran/18878
1018 * module.c (find_use_name_n): Based on original
1019 find_use_name. Either counts number of use names for a
1020 given real name or returns use name n.
1021 (find_use_name, number_use_names): Interfaces to the
1022 function find_use_name_n.
1023 (read_module): Add the logic and calls to these functions,
1024 so that mutiple reuses of the same real name are loaded.
1025
10262005-09-09 Paul Thomas <pault@gcc.gnu.org>
1027
1028 PR fortran/22304
1029 PR fortran/23270
1030 PR fortran/18870
1031 PR fortran/16511
1032 PR fortran/17917
1033 * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
1034 common.c so that it is accessible to module.c. Add common_head
1035 field to gfc_symbol structure. Add field for the equivalence
1036 name AND new attr field, in_equivalence.
1037 * match.c (gfc_match_common, gfc_match_equivalence): In loops
1038 that flag common block equivalences, emit an error if the
1039 common blocks are different, using sym->common_head as the
1040 common block identifier. Ensure that symbols that are equivalence
1041 associated with a common block are marked as being in_common.
1042 * module.c (write_blank_common): New.
1043 (write_common): Use unmangled common block name.
1044 (load_equiv): New function ported from g95.
1045 (read_module): Call load_equiv.
1046 (write_equiv): New function ported from g95. Correct
1047 string referencing for gfc functions. Give module
1048 equivalences a unique name.
1049 (write_module): Call write_equiv and write_blank_common.
1050 * primary.c (match_variable) Old gfc_match_variable, made
1051 static and third argument provided to indicate if parent
1052 namespace to be visited or not.
1053 (gfc_match_variable) New. Interface to match_variable.
1054 (gfc_match_equiv_variable) New. Interface to match_variable.
1055 * trans-common.c (finish_equivalences): Provide the call
1056 to create_common with a gfc_common_header so that
1057 module equivalences are made external, rather than local.
1058 (find_equivalences): Ensure that all members in common block
1059 equivalences are marked as used. This prevents the subsequent
1060 call to this function from making local unions.
1061 * trans-decl.c (gfc_generate_function_code): Move the call to
1062 gfc_generate_contained_functions to after the call to
1063 gfc_trans_common so the use-associated, contained common
1064 blocks produce the correct references.
1065 (gfc_create_module_variable): Return for equivalenced symbols
1066 with existing backend declaration.
1067
6d2ae472
TS
10682005-09-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1069
1070 PR fortran/23765
1071 * match.c (gfc_match_common): Remove unnecessary / wrong special
1072 cases for end-of-statement.
1073
e014df90
JB
10742005-09-08 Janne Blomqvist <jblomqvi@cc.hut.fi>
1075
1076 * gfortran.texi: Add section about implemented F2003 features.
1077
0348d6fd
RS
10782005-09-08 Richard Sandiford <richard@codesourcery.com>
1079
1080 PR fortran/15326
1081 * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
1082 the GFC_SS_FUNCTION case too.
1083 * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
1084 to function pointers as well as function decls.
1085 (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
1086 (gfc_init_interface_mapping, gfc_free_interface_mapping)
1087 (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
1088 (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
1089 (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
1090 (gfc_apply_interface_mapping_to_ref)
1091 (gfc_apply_interface_mapping_to_expr)
1092 (gfc_apply_interface_mapping): New functions.
1093 (gfc_conv_function_call): Evaluate the arguments before working
1094 out where the result should go. Make the null pointer case provide
1095 the string length in parmse.string_length. Cope with non-constant
1096 string lengths, using the above functions to evaluate such lengths.
1097 Use a temporary typespec; don't assign to sym->cl->backend_decl.
1098 Don't assign to se->string_length when returning a cached array
1099 descriptor.
1100
068e7338
RS
11012005-09-08 Richard Sandiford <richard@codesourcery.com>
1102
1103 PR fortran/19928
1104 * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
1105 after handling scalarized references. Make "indexse" inherit from
1106 "se" when handling AR_ELEMENTs.
1107 (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
1108 substring or scalar reference that follows an array section.
1109 * trans-expr.c (gfc_conv_variable): When called from within a
1110 scalarization loop, start out with "ref" pointing to the scalarized
1111 part of the reference. Don't call gfc_advance_se_ss_chain here.
1112
8aeca7fd
RS
11132005-09-07 Richard Sandiford <richard@codesourcery.com>
1114
1115 PR fortran/23373
1116 * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
1117 descriptor if the rhs is not a null pointer or variable.
1118
2a0abeaf
TK
11192005-09-07 Thomas Koenig <Thomas.Koenig@online.de>
1120
1121 PR fortran/20848
1122 * symbol.c(check_conflict): Add conflict for parameter/save,
1123
d1d26ecf
RS
11242005-09-06 Richard Sandiford <richard@codesourcery.com>
1125
1126 PR fortran/19269
1127 * simplify.c (gfc_simplify_transpose): Set the result's typespec from
1128 the source, not the first element of the return value.
1129
08e1fe9e
TS
11302005-09-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1131
1132 PR fortran/23661
1133 * io.c (match_io): Correctly backup if PRINT followed by
1134 symbol which is not a namelist. Force blank between PRINT
1135 and namelist in free form.
1136
ee5426a4
FXC
11372005-08-31 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1138
1139 PR fortran/20592
1140 * gfortran.h (gfc_option_t): Add flag_automatic.
1141 * invoke.texi: Document the -fno-automatic option.
1142 * lang.opt: Add a -fautomatic option.
1143 * options.c (gfc_init_options): Default for -fautomatic is on.
1144 (gfc_handle_option): Add handling of -fautomatic option.
1145 * resolve.c (gfc_resolve): When -fno-automatic is used, mark
1146 needed variables as SAVE.
1147
4f8ea09e
TS
11482005-08-27 Erik Edelmann <erik.edelmann@iki.fi>
1149
1150 * trans-array.c (gfc_trans_deferred_array): Fix comments.
1151
11522005-08-27 Erik Schnetter <schnetter@aei.mpg.de>
1153
1154 * primary.c (match_charkind_name): Fix typo in comment leading to
1155 function.
1156
9e35b386
EE
11572005-08-25 Erik Edelmann <eedelman@acclab.helsinki.fi>
1158
1159 PR fortran/20363
1160 * symbol.c (find_special): Remove.
1161 (build_sym, add_init_expr, attr_decl1): Remove calls to
1162 find_special in favor of calls to gfc_get_symbol.
1163
fe58e076
TK
11642005-08-24 Thomas Koenig <Thomas.Koenig@online.de>
1165
1166 PR fortran/17758
1167 * gfortran.h (symbol_attribute): Add noreturn to the structure.
1168 (gfc_intrinsic_sym): Add noreturn to the structure.
1169 * intrinsic.c (make_noreturn): New function.
1170 (add_subroutines): Mark subroutines abort and exit as noreturn.
1171 (gfc_intrinsic_sub_interface): Copy noreturn attribute from
1172 isym to the resolved symbol.
1173 * trans-decl.c (gfc_get_extern_function_decl): Set function
1174 as VOLATILE (== noreturn) if the noreturn attribute is set.
1175
46fa431d
SK
11762005-08-21 Steven G. Kargl <kargls@comcast.net>
1177
1178 * decl.c: Typo in comment.
1179
beb6ae88
SK
11802005-08-21 Steven G. Kargl <kargls@comcast.net>
1181
1182 * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
1183
e0bcf78c
TS
11842005-08-21 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1185
1186 * gfortran.h (gfc_option_t): Remove source field. Add
1187 flag_d_lines field.
1188 (gfc_new_file): Remove arguments in prototype.
1189 (gfc_source_file): Make 'const char *'.
1190 * f95-lang.c (gfc_init): Use gfc_source_file instead of
1191 gfc_option.source. Call gfc_new_file without arguments.
1192 * invoke.texi: Document new options '-fd-lines-as-code' and
1193 '-fd-lines-as-comment'.
1194 * lang.opt: Add new options. Alphabetize.
1195 * options.c (gfc_init_options): Initialize gfc_source_file instead
1196 of gfc_option.source. Initialize gfc_option.flag_d_lines.
1197 (form_from_filename): Move here from scanner.c. Make
1198 'filename' argument 'const'.
1199 (gfc_post_options): Set gfc_source_file. Determine source form.
1200 Warn if 'd-lines*' are used in free form.
1201 * scanner.c (gfc_source_file): Constify.
1202 (skip_fixed_comments): Deal with d-lines.
1203 (get_file): Constify argument 'name'.
1204 (load_file): Constify argument 'filename'.
1205 (form_from_filename): Moved to options.c.
1206 (gfc_new_file): Remove arguments. Don't initialize
1207 gfc_source_file, don't determine source form.
1208 * trans-const.c (gfc_init_constants): Use gfc_source_file instead
1209 of gfc_option.source.
1210
200cfbe7
SK
12112005-08-19 Steven G. Kargl <kargls@comcast.net>
1212
1213 PR fortran/23065
1214 * gfortran.h: Remove PATH_MAX definition.
1215 * module.c (write_module, gfc_dump_module): Use alloca to allocate
1216 buffers.
156afe13 1217 * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
200cfbe7 1218
20fe2233
FW
12192004-08-16 Huang Chun <chunhuang73@hotmail.com>
1220
1221 * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
1222 expand.
1223
2b22401b
TS
12242005-08-14 Asher Langton <langton2@llnl.gov>
1225
200cfbe7 1226 * parse.c (match): Enclose macro in do...while(0) and braces.
2b22401b
TS
1227
12282005-08-14 Paul Thomas <pault@gcc.gnu.org>
21d7d31f
PT
1229
1230 PR fortran/21432.
1231 * gfortran.texi: Document PRINT namelist.
1232
2b22401b 12332005-08-14 Paul Thomas <pault@gcc.gnu.org>
7af8f00c
PT
1234
1235 PR fortran/21432.
1236 * io.c (match_io): Add code to implement PRINT namelist.
1237
442c1644
CY
12382005-08-14 Canqun Yang <canqun@nudt.edu.cn>
1239
1240 * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
1241 labels.
1242
f2dd440f 12432005-08-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
8b67b708
FXC
1244 Steven Bosscher <stevenb@suse.de>
1245
1246 PR libfortran/20006
1247 * gfortran.h: Add is_main_program member to symbol_attribute.
1248 * trans-decl: Add a gfor_fndecl_set_std tree.
1249 (gfc_build_builtin_function_decls): Create it.
1250 (gfc_generate_function_code): Add this call at the beginning of
1251 the main program.
1252 * trans.c (gfc_generate_code): Move main_program and attr.
1253 * trans.h: Add declaration for gfor_fndecl_set_std.
1254
bf302220
TK
12552005-08-10 Thomas Koenig <Thomas.Koenig@online.de>
1256
1257 PR libfortran/22143
1258 gfortran.h: Declare new function gfc_resolve_dim_arg.
1259 resolve.c: New function gfc_resolve_dim_arg.
1260 iresolve.c (gfc_resolve_all): Use gfc_resolve_dim_arg.
1261 (gfc_resolve_any): Likewise.
1262 (gfc_resolve_count): Likewise.
1263 (gfc_resolve_cshift): Likewise. If the kind of shift is less
1264 gfc_default_integer_kind, convert it to default integer type.
1265 (gfc_resolve_eoshift): Likewise.
1266 (gfc_resolve_maxloc): Use gfc_resolve_dim_arg.
1267 (gfc_resolve_maxval): Likewise.
1268 (gfc_resolve_minloc): Likewise.
1269 (gfc_resolve_minval): Likewise.
1270 (gfc_resolve_product): Likewise.
1271 (gfc_resolve_spread): Likewise.
1272 (gfc_resolve_sum): Likewise.
1273
ae8b8789
FXC
12742005-08-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1275
1276 * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
1277 functions for new intrinsics TTYNAM and ISATTY.
1278 * intrinsic.c (add_functions, add_subroutines): Add new
1279 intrinsics.
1280 * intrinsic.h: Add prototypes for new check and resolve
1281 functions.
1282 * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
1283 resolve functions for intrinsics TTYNAM and ISATTY.
1284 * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
1285 * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
1286
1e39a151
JJ
12872005-08-09 Jakub Jelinek <jakub@redhat.com>
1288
1289 * scanner.c (preprocessor_line): Don't write beyond the end of flag
1290 buffer.
1291
81871c2a 12922005-08-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
6403ec5f 1293
b122dc6a 1294 PR fortran/22390
6403ec5f
JB
1295 * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
1296 * gfortran.h: Add enums for FLUSH.
1297 * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
1298 comment appropriately. (gfc_match_flush): New function.
1299 * match.c (gfc_match_if): Add match for flush.
1300 * match.h: Add prototype.
1301 * parse.c (decode_statement): Add flush to 'f' case.
1302 (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
1303 * resolve.c (resolve_code): Add flush case.
1304 * st.c (gfc_free_statement): Add flush case.
1305 * trans-io.c: Add prototype for flush.
1306 (gfc_build_io_library_fndecls): Build fndecl for flush.
1307 (gfc_trans_flush): New function.
1308 * trans-stmt.h: Add prototype.
1309 * trans.c (gfc_trans_code): Add case for flush.
1310
9da37525
FXC
13112005-08-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1312
1313 * primary.c (match_hollerith_constant): Fix typo.
1314
49de9e73
KH
13152005-08-06 Kazu Hirata <kazu@codesourcery.com>
1316
1317 * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
1318 invoke.texi, resolve.c, trans-array.c, trans-array.h,
1319 trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
1320 comment/doc typos. Follow spelling conventions.
1321
a8006d09
JJ
13222005-08-06 Jakub Jelinek <jakub@redhat.com>
1323
1324 PR fortran/18833
1325 PR fortran/20850
1326 * primary.c (match_varspec): If equiv_flag, don't look at sym's
1327 attributes, call gfc_match_array_ref up to twice and don't do any
1328 substring or component processing.
1329 * resolve.c (resolve_equivalence): Transform REF_ARRAY into
1330 REF_SUBSTRING or nothing if needed. Check that substrings
1331 don't have zero length.
1332
eed61baa
TK
13332005-08-05 Thomas Koenig <Thomas.Koenig@online.de>
1334
1335 * trans-expr.c (gfc_build_builtin_function_decls): Mark
1336 stop_numeric and stop_string as non-returning.
1337
a4f5cd44
PB
13382005-08-04 Paul Brook <paul@codesourcery.com>
1339
1340 * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
1341 (gfc_conv_expr_lhs): Fix assertion.
1342 (gfc_conv_expr_val): Merge post block. Set se.expr to new value.
1343
c2fee3de
DE
13442005-08-02 David Edelsohn <edelsohn@gnu.org>
1345
1346 PR fortran/22491
1347 * expr.c (simplify_parameter_variable): Do not copy the subobject
1348 references if the expression value is a constant.
1349
1350 * expr.c (gfc_simplify_expr): Evaluate constant substrings.
1351
ee2242a2
JD
13522005-07-31 Jerry DeLisle <jvdelisle@verizon.net>
1353
5e9d0900
FXC
1354 * intrinsic.texi: Add documentation for exponent, floor, and fnum and
1355 fix description of ceiling in index.
ee2242a2 1356
16275f18
SB
13572005-07-31 Steven Bosscher <stevenb@suse.de>
1358
1359 * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
1360 malloc functions the 'malloc' attribute. Give runtime_error the
1361 'noreturn' attribute.
1362
75d2cf69
SB
13632005-07-31 Steven Bosscher <stevenb@suse.de>
1364
1365 * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
1366 of the assigned goto variable.
1367
7e6de2a5
SB
13682005-07-29 Steven Bosscher <stevenb@suse.de>
1369
1370 * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
1371
b8039bde
AP
13722005-07-28 Andrew Pinski <pinskia@physics.uc.edu>
1373
1374 * fortran/f95-lang.c (language_function): Remove
1375 named_labels, shadowed_labels, returns_value, returns_abnormally,
1376 warn_about_return_type, and extern_inline fields.
1377 (named_labels): Remove variable.
1378 (gfc_init_decl_processing): Remove setting of named_labels.
1379
6a28f513
VR
13802005-07-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1381
1382 PR fortran/22503
1383 * resolve.c (resolve_operator): Improve diagnostic for comparison
1384 of logicals with invalid operator.
1385
31f74acc
JJ
13862005-07-25 Jakub Jelinek <jakub@redhat.com>
1387
1388 PR fortran/20063
1389 * data.c (gfc_assign_data_value_range): Call
1390 create_character_initializer if last_ts is a character type.
1391
32cafd73
MH
13922005-07-22 Manfred Hollstein <mh@suse.com>
1393
1394 * match.c (gfc_match_symbol): Fix uninitialised warnings.
1395 * matchexp.c (gfc_match_expr): Likewise.
1396
4038c495
GB
13972005-07-20 Giovanni Bajo <giovannibajo@libero.it>
1398
1399 Make CONSTRUCTOR use VEC to store initializers.
1400 * trans-array.c (gfc_build_null_descriptor,
1401 gfc_trans_array_constructor_value, gfc_conv_array_initializer):
1402 Update to cope with VEC in CONSTRUCTOR_ELTS.
1403 * trans-common.c (create_common): Likewise.
1404 * trans-expr.c (gfc_conv_structure): Likewise.
1405 * trans-stmt.c (gfc_trans_character_select): Use
1406 build_constructor_from_list instead of build_constructor.
1407
2b22401b 14082005-07-19 Paul Thomas <pault@gcc.gnu.org>
24d36d28
PT
1409
1410 PR fortran/16940
1411 * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
1412 is matched against interfaces in parent namespaces. If there
1413 the symtree is set to point to the interface.
1414
7e2eba4b
DE
14152005-07-16 David Edelsohn <edelsohn@gnu.org>
1416
1417 PR fortran/21730
1418 * decl.c (do_parm): Adjust character initializer to character length
1419 of symbol before assigning.
1420
e8f35d4d
SE
14212005-07-14 Steve Ellcey <sje@cup.hp.com>
1422
1423 * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
1424
94b00ee4
JJ
14252005-07-14 Jakub Jelinek <jakub@redhat.com>
1426
d71b89ca
JJ
1427 * gfortran.h (MAX_ERROR_MESSAGE): Remove.
1428 (gfc_error_buf): Add allocated and index fields. Change message
1429 field from array to a pointer.
1430 * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
1431 (cur_error_buffer): New variable.
1432 (error_char): Use cur_error_buffer->{message,index} instead of
1433 {warning,error}_{buffer.message,ptr}. Reallocate message buffer
1434 if too small.
1435 (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
1436 cur_error_buffer and its index rather than {warning,error}_ptr
1437 and use_warning_buffer.
1438 (gfc_warning_check, gfc_error_check): Don't print anything if
1439 message is NULL.
1440 (gfc_push_error): Allocate saved message with xstrdup.
1441 (gfc_pop_error): Free saved message with gfc_free.
1442 (gfc_free_error): New function.
1443 * primary.c (match_complex_constant): Call gfc_free_error if
1444 gfc_pop_error will not be called.
1445 * match.c (gfc_match_st_function): Likewise.
1446
94b00ee4
JJ
1447 PR fortran/22417
1448 * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
1449 file. Fix file left but not entered warning.
1450
4a90ae54
FW
14512005-07-14 Feng Wang <fengwang@nudt.edu.cn>
1452 Steven G. Kargl <kargls@comcast.net>
1453
1454 * array.c (resolve_character_array_constructor): Allocate gfc_charlen
1455 for the array and attach to namespace list for automatic deallocation.
1456
d1f3352f
AS
14572005-07-13 Andreas Schwab <schwab@suse.de>
1458
1459 * Make-lang.in (fortran/dependency.o): Depend on
1460 $(GFORTRAN_TRANS_DEPS).
1461
fcf3be37
JJ
14622005-07-11 Jakub Jelinek <jakub@redhat.com>
1463
1464 * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1465 the outermost loop.
1466 (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1467 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1468 Don't clear maskindexes here.
1469
820cc88f 14702005-07-08 Daniel Berlin <dberlin@dberlin.org>
b122dc6a 1471
820cc88f
DB
1472 * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1473 is removed.
1474
0921bc44
JJ
14752005-07-08 Jakub Jelinek <jakub@redhat.com>
1476
1477 * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1478 as FUNCTION.
1479
4c3a6ca1
JJ
14802005-07-07 Jakub Jelinek <jakub@redhat.com>
1481
d1e3d6ae
JJ
1482 * scanner.c (load_line): Add pbuflen argument, don't make
1483 buflen static. If maxlen == 0 or preprocessor_flag,
1484 don't truncate at buflen, but at maxlen. In xrealloc add
1485 1 byte at the end for the terminating '\0'. Don't fill
1486 with spaces up to buflen, but gfc_option.fixed_line_length.
1487 (load_file): Adjust load_line caller. Add line_len variable.
1488
4c3a6ca1
JJ
1489 * scanner.c (preprocessor_line): Only set current_file->line when errors
1490 have not been encountered. Warn and don't crash if a file leave
1491 preprocessor line has no corresponding entering line. Formatting.
1492
24bce1fd
SB
14932005-07-07 Steven Bosscher <stevenb@suse.de>
1494
1495 * primary.c (match_hollerith_constant): Use int, not unsigned int,
1496 for the hollerith length. Fix indentation.
1497
378f73af
FW
14982005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1499
1500 PR fortran/16531
1501 PR fortran/15966
1502 PR fortran/18781
1503 * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1504 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1505 New functions.
1506 (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1507 * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1508 gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1509 Add prototypes.
1510 * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1511 (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1512 (gfc_check_assign): Enable conversion from Hollerith to other.
1513 * gfortran.h (bt): Add BT_HOLLERITH.
1514 (gfc_expr): Add from_H flag.
1515 * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1516 (add_conversions): Add conversions from Hollerith constant to other.
1517 (do_simplify): Don't simplify if Hollerith constant arguments exist.
1518 * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1519 * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1520 (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1521 * primary.c (match_hollerith_constant): New function.
1522 (gfc_match_literal_constant): Add match Hollerith before Integer.
1523 * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1524 to other.
1525 * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1526 convert Hollerith constant to tree.
1527 * trans-io.c (gfc_convert_array_to_string): Get array's address and
1528 length to set string expr.
1529 (set_string): Deal with array assigned Hollerith constant and character
1530 array.
1531 * gfortran.texi: Document Hollerith constants as extention support.
1532
9f9d4c5f
FW
15332005-07-07 Feng Wang <fengwang@nudt.edu.cn>
1534
1535 PR fortran/22327
1536 * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1537
3c2d01f1
JJ
15382005-07-07 Jakub Jelinek <jakub@redhat.com>
1539
1540 * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1541 even in FUNCTIONs.
1542
5189dd41
KH
15432005-07-03 Kazu Hirata <kazu@codesourcery.com>
1544
9bce667c 1545 * gfortran.texi, intrinsic.texi: Fix typos.
5189dd41
KH
1546 * symbol.c: Fix a comment typo.
1547
0ce0154c
KG
15482005-07-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1549
1550 * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1551 * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1552 (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1553 gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1554 ATTRIBUTE_GCC_GFC.
1555
365ff3b9
FXC
15562005-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1557
1558 PR fortran/20842
1559 * io.c (match_dt_element): Do not allow END tag in PRINT or
1560 WRITE statement.
1561
c85ce869
JM
15622005-07-02 Joseph S. Myers <joseph@codesourcery.com>
1563
1564 * lang.opt: Remove "." from end of help texts.
1565
f60d6481
JD
15662005-07-01 Jerry DeLisle <jvdelisle@verizon.net>
1567
365ff3b9
FXC
1568 * gfortran.texi: Fix typos and grammar.
1569 * invoke.texi: Fix typos and grammar.
1570 * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1571 exit. Fixed alignment of text for dtime syntax. Fixed a few line
1572 lengths.
f60d6481 1573
7a1df4e2
JJ
15742005-06-25 Jakub Jelinek <jakub@redhat.com>
1575
1576 * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1577 type than boolean_type_node.
1578
ab57747b
KC
15792005-06-25 Kelley Cook <kcook@gcc.gnu.org>
1580
1581 * all files: Update FSF address in copyright headers.
1582
81871c2a 15832005-06-24 Jerry DeLisle <jvdelisle@verizon.net>
1e399e23
JD
1584
1585 PR fortran/21915
ce5d6962
JD
1586 * gfortran.h: Add symbols for new intrinsic functions.
1587 * intrinsic.c: Add new functions acosh, asinh, and atanh.
1588 * intrinsic.h: Add prototypes for the new functions.
1589 * iresolve.c (gfc_resolve_acosh): New function.
1590 (gfc_resolve_asinh): New function.
1591 (gfc_resolve_atanh): New function.
1592 * mathbuiltins.def: Add defines.
1593 * simplify.c (gfc_simplify_acosh): New function.
1594 (gfc_simplify_asinh): New function.
1595 (gfc_simplify_atanh): New function.
1e399e23 1596
a3504e64
FW
15972005-06-24 Feng Wang <fengwang@nudt.edu.cn>
1598
1599 * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1600
16012005-06-22 Paul Brook <paul@codesourcery.com>
bd83e614
PB
1602
1603 PR fortran/21034
1604 * symbol.c (gfc_is_var_automatic): New function.
1605 (save_symbol): Use it.
1606
15f9ce29
TS
16072005-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1608 Paul Thomas <pault@gcc.gnu.org>
1609
1610 PR fortran/22010
1611 Port from g95.
1612 * module.c (mio_namelist): New function. Correct to set
1613 namelist_tail and to give error on renaming namelist by use
1614 association.
1615 (mio_symbol): Call mio_namelist.
1616
131c66cd
FXC
16172005-06-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1618
1619 * gfortran.h: Add flag_backslash compile-time option.
1620 * lang.opt: Add support for -fbackslash option.
1621 * options.c: Likewise.
1622 * primary.c: Implement behavior for -fno-backslash.
1623 * invoke.texi: Add doc for -fbackslash option.
1624 * gfortran.texi: Remove mention of -fno-backslash as a
1625 possible extension.
1626
16272005-06-20 Steven G. Kargl <kargls@comcast.net>
cb1d4dce
SK
1628 (port from g95)
1629
1630 PR fortran/21257
1631 * match.c (gfc_match_label): Detect duplicate labels.
1632
1633
16342005-06-20 Erik Edelmann <erik.edelmann@iki.fi>
b376133b
EE
1635
1636 * intrinsic.c (check_intrinsic_standard): Fix spelling error
1637 in a warning message.
1638
b7263e8f 16392005-06-18 Erik Edelman <eedelman@acclab.helsinki.fi>
81871c2a 1640 Steven G. Kargl <kargls@comast.net>
b7263e8f
EE
1641
1642 PR fortran/19926
1643 * primary.c (gfc_match_rvalue): expr_type can be EXPR_CONSTANT
1644 for an array; check that sym->as is NULL.
1645
1646
14ceeb32
SK
16472005-06-18 Steven G. Kargl <kargls@comcast.net>
1648
1649 * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1650 functions whose simplification routine return FAILURE.
1651
7bfb5ccc
GK
16522005-06-13 Geoffrey Keating <geoffk@apple.com>
1653
1654 * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1655 (rule for installing f95.1 manpage): Does depend on installdirs.
1656
a8e12e4d
TS
16572005-06-13 Jakub Jelinek <jakub@redhat.com>
1658
1659 PR fortran/22038
1660 * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1661 in the innermost loop.
1662
60df4c1c
JJ
1663 * trans-expr.c (gfc_conv_function_call): Return int instead of
1664 void. Use a local variable for has_alternate_specifier and
1665 return it. Avoid modification of function type's return value
1666 in place, since it may be shared.
1667 * trans.h (has_alternate_specifier): Remove.
1668 (gfc_conv_function_call): Change return type.
1669 * trans-stmt.c (has_alternate_specifier): Remove.
1670 (gfc_trans_call): Add a local has_alternate_specifier variable,
1671 set it from gfc_conv_function_call return value.
1672
4c73896d
RH
16732005-06-12 Richard Henderson <rth@redhat.com>
1674
1675 * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1676 gfc_conv_descriptor_data. Cast the result to the DATAPTR type.
1677 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1678 (gfc_trans_allocate_array_storage): Use them.
1679 (gfc_array_allocate, gfc_array_deallocate): Likewise.
1680 (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1681 (gfc_trans_deferred_array): Likewise.
1682 * trans-expr.c (gfc_conv_function_call): Likewise.
1683 (gfc_trans_subcomponent_assign): Likewise.
1684 (gfc_trans_pointer_assignment): Likewise.
1685 * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1686 * trans-types.c (gfc_array_descriptor_base): New.
1687 (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1688 (gfc_get_array_descriptor_base): Break out from ...
1689 (gfc_get_array_type_bounds): ... here. Create type variants.
1690 * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1691 (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1692
a8e12e4d 16932005-06-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
b49a3de7
TS
1694
1695 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1696 calling conventions. Look at sym instead of sym->result.
1697 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1698 Remove condition which is always false with workaround removed.
1699 (gfc_return_by_reference): Always look at sym, never at sym->result.
1700
364667a1 17012005-06-11 Steven G. Kargl <kargls@comcast.net>
b122dc6a 1702
364667a1
SK
1703 PR fortran/17792
1704 PR fortran/21375
1705 * trans-array.c (gfc_array_deallocate): pstat is new argument
1706 (gfc_array_allocate): update gfc_array_deallocate() call.
1707 (gfc_trans_deferred_array): ditto.
1708 * trans-array.h: update gfc_array_deallocate() prototype.
1709 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1710 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1711
81871c2a 17122005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
3435a71e
JD
1713
1714 * intrinsic.texi: Add documentation for dcmplx, digits,
1715 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1716
b4cbcd1a
TS
17172005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1718
86403f0f
TS
1719 PR fortran/21912
1720 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1721 Generate correct exit condition in case of negative steps in
1722 implied-do loops.
1723
b4cbcd1a
TS
1724 * invoke.texi: Fix description of flags required for compatibility
1725 with g77.
1726
8e400578
TS
17272005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1728 Erik Schnetter <schnetter@aei.mpg.de>
1729
2d6ea0b4 1730 PR fortran/19195
8e400578 1731 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
b122dc6a 1732 remove FIXME comment.
8e400578 1733
29405f94
TS
17342005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1735
1736 * match.c (match_forall_iterator): Don't immediately give error if '='
1737 is not followed by an expression.
1738
17392005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
ab21e272
TS
1740 Erik Edelmann <erik.edelmann@iki.fi>
1741
1742 * array.c (gfc_match_array_constructor): Disallow empty array
1743 constructor.
1744
81871c2a 17452005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
323d0f0b
JD
1746
1747 * fortran/intrinsic.texi: Add documentation for
1748 command_argument_count, conjg, dconjg, count,
1749 cpu_time, cshift, date_and_time, dble, dfloat.
1750
c3a29423
RS
17512005-06-01 Roger Sayle <roger@eyesopen.com>
1752
1753 * intrinsic.c (add_conv): No longer take a "simplify" argument as
1754 its always gfc_convert_constant, instead take a "standard" argument.
1755 (add_conversions): Change all existing calls of add_conv to pass
1756 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
1757 extensions support integer-logical and logical-integer conversions.
1758 (gfc_convert_type_warn): Warn about use the use of these conversions
1759 as a extension when appropriate, i.e. with -pedantic.
1760 * simplify.c (gfc_convert_constant): Add support for integer to
1761 logical and logical to integer conversions, using gfc_int2log and
1762 gfc_log2int.
1763 * arith.c (gfc_log2int, gfc_int2log): New functions.
1764 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1765 * gfortran.texi: Document this new GNU extension.
1766
f7f7ac5a
PT
17672005-06-01 Paul Thomas <pault@gcc.gnu.org>
1768
1769 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1770 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1771 Correct comments and replace convert of integer_one_node with
1772 build_int_cst.
1773
cf4d246b
JJ
17742005-06-01 Jakub Jelinek <jakub@redhat.com>
1775
1776 PR fortran/21729
1777 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1778 to avoid giving error multiple times.
1779 (resolve_entries): Don't error about BT_UNKNOWN here.
1780 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1781 (resolve_fntype): New function.
1782 (gfc_resolve): Call resolve_fntype.
1783
bf3ddf8a
FW
17842005-06-01 Feng Wang <fengwang@nudt.edu.cn>
1785
1786 PR fortran/20883
1787 * fortran/io.c (resolve_tag): Fix error message.
1788
4c714dd4
KG
17892005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1790
1791 * fortran/trans-decl.c: Don't include errors.h.
1792 * fortran/Make-lang.in: Updates dependencies.
1793
2b052ce2
PT
17942005-05-31 Paul Thomas <pault@gcc.gnu.org>
1795
1796 PR fortran/18109
1797 PR fortran/18283
1798 PR fortran/19107
1799 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1800 string length from the expression typespec character length value
1801 and set temp_ss->stringlength and backend_decl. Obtain the
1802 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1803 Dereference the expression to obtain the character.
1804 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1805 dereference of scalar character pointer structure components.
1806 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1807 string length for the structure component from the component
1808 expression.
1809
c0309c74
RS
18102005-05-30 Roger Sayle <roger@eyesopen.com>
1811
1812 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
1813 * options.c (gfc_init_options): By default, allow legacy extensions
1814 but warn about them.
1815 (gfc_post_options): Make -pedantic warn about legacy extensions
1816 even with -std=legacy.
1817 (gfc_handle_option): Make -std=gnu follow the default behaviour
1818 of warning about legacy extensions, but allowing them. Make the
1819 new -std=legacy accept everything and warn about nothing.
1820 * lang.opt (std=legacy): New F95 command line option.
1821 * invoke.texi: Document both -std=f2003 and -std=legacy.
1822 * gfortran.texi: Explain the two types of extensions and document
1823 how they are affected by the various -std= command line options.
1824
ec09945c
KH
18252005-05-30 Kazu Hirata <kazu@cs.umass.edu>
1826
1827 * trans-expr.c: Remove trailing ^M.
1828
897f1a8b
KH
1829 * trans-expr.c: Fix comment typos.
1830
5b1a826c
PT
18312005-05-29 Paul Thomas <pault@gcc.gnu.org>
1832
1833 PR fortran/16939
1834 PR fortran/17192
1835 PR fortran/17193
1836 PR fortran/17202
1837 PR fortran/18689
1838 PR fortran/18890
1839 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1840 length to temp_ss for character pointer array assignments.
1841 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1842 dereferencing of characters and character pointers.
1843 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1844 length as return argument for various kinds of handling of return.
1845 Return a char[]* temporary for character pointer functions and
1846 dereference the temporary upon return.
1847
c74a1edd 18482005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
4c73896d 1849 Steven G. Kargl <kargls@comcast.net>
b122dc6a 1850
44998b65
JB
1851 fortran/PR20846
1852 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1853
c9330b03
FXC
18542005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1855
1856 PR libfortran/20006
1857 * io.c (format_item_1): Add check and extension warning for
1858 $ edit descriptor.
1859
cd66d1a1
SK
18602005-05-28 Steven G. Kargl <kargls@comcast.net>
1861
1862 * arith.c (gfc_arith_init_1): Fix off by one problem;
1863 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1864
eaef357b 18652005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
4c73896d 1866 Steven G. Kargl <kargls@comcast.net>
eaef357b
JD
1867
1868 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1869 and CMPLX
1870
4c1dd580
SK
18712005-05-27 Steven G. Kargl <kargls@comcast.net>
1872
1873 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1874 like types in comparsion.
1875
aa9c57ec
KH
18762005-05-26 Kazu Hirata <kazu@cs.umass.edu>
1877
1878 * data.c, parse.c, trans-array.c, trans-decl.c,
1879 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1880 trans.h: Fix comment typos. Follow spelling conventions.
1881
ec8a1940
RS
18822005-05-22 Roger Sayle <roger@eyesopen.com>
1883
1884 * gfortran.texi: Document some more GNU extensions.
1885
e88763d1
FXC
18862005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1887
1888 * error.c (gfc_warning): Fix typo in comment.
1889
8f4dc7af
TK
18902005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
1891
1892 PR libfortran/21127
b122dc6a 1893 * fortran/iresolve.c (gfc_resolve_reshape): Add
8f4dc7af
TK
1894 gfc_type_letter (BT_COMPLEX) for complex to
1895 to resolved function name.
1896
81871c2a 18972005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
acc75ae3
EE
1898
1899 * array.c (gfc_match_array_constructor): Support [ ... ]
1900 style array constructors.
1901
e743d142
TS
19022005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1903
1904 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1905 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1906 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1907 to correct enum type.
1908 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
1909 function. Add default case to switch, deal with FIX_TRUNC_EXPR
1910 instead of FIX_FLOOR_EXPR.
1911
1e7d0a64
FW
19122005-05-18 Feng Wang <fengwang@nudt.edu.cn>
1913
1914 PR fortran/20954
1915 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1916 build character length.
1917
b4838d29
ZD
19182005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
1919
1920 * trans-types.c (gfc_array_range_type): New variable.
1921 (gfc_init_types): Initialize gfc_array_range_type.
1922 (gfc_get_array_type_bounds): Use gfc_array_range_type.
1923
8de1f441
JJ
19242005-05-17 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR fortran/15080
1927 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1928 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1929 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1930 just that as index.
1931 (generate_loop_for_rhs_to_temp): Likewise.
1932 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1933 It non-NULL, add it to body.
1934 (allocate_temp_for_forall_nest_1): New function, split from
1935 allocate_temp_for_forall_nest.
1936 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1937 propagate it down to compute_overall_iter_number. Use
1938 allocate_temp_for_forall_nest_1.
1939 (gfc_trans_assign_need_temp): Remove COUNT2. Call
1940 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
1941 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1942 and generate_loop_for_temp_to_lhs.
1943 (gfc_trans_pointer_assign_need_temp): Adjust calls to
1944 allocate_temp_for_forall_nest.
1945 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1946 stmtblock_t. Call compute_overall_iter_number just once, then
1947 allocate_temp_for_forall_nest_1 twice with the same size.
1948 Initialize mask indexes if nested_forall_info != NULL.
1949 (gfc_trans_where_2): Initialize mask indexes before calling
1950 gfc_trans_nested_forall_loop.
1951
81871c2a
JJ
19522005-05-15 Feng Wang <fengwang@nudt.edu.cn>
1953 Jerry DeLisle <jvdelisle@verizon.net>
b078dfbf
FW
1954
1955 PR fortran/17432
b122dc6a 1956 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
b078dfbf
FW
1957 resolve ICE on assign of format label.
1958 * trans-io.c (set_string): add fold-convert to properly
1959 handle assigned format label in write.
b122dc6a 1960
cafa34aa
PB
19612005-05-13 Paul Brook <paul@codesourcery.com>
1962
1963 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1964
4588b604
TS
19652005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1966
1967 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1968
b160dd28
TS
19692005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1970
1971 PR fortran/21260
1972 * io.c (check_format): Look for literal characters inside
1973 hollerith constant.
1974
09e7f686
TS
19752005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1976
1977 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1978 attribute from result symbol to function symbol.
3da7937d
TS
1979 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1980 instead of sym->result->attr.dimension.
09e7f686 1981
973ff4c0
TS
19822005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1983
1984 PR fortran/20178
1985 * gfortran.h (gfc_option): Add flag_f2c.
1986 * invoke.texi: Document '-ff2c' command line option. Adapt
1987 documentation for '-fno-second-underscore' and '-fno-underscoring'.
1988 * lang.opt (ff2c): New entry.
1989 * options.c (gfc-init_options): Set default calling convention
1990 to -fno-f2c. Mark -fsecond-underscore unset.
1991 (gfc_post_options): Set -fsecond-underscore if not explicitly set
b122dc6a 1992 by user.
973ff4c0
TS
1993 (handle_options): Set gfc_option.flag_f2c according to requested
1994 calling convention.
1995 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1996 intrinsics where necessary.
1997 (gfc_trans_deferred_vars): Change todo error to assertion.
1998 * trans-expr.c (gfc_conv_variable): Dereference access
1999 to hidden result argument.
2000 (gfc_conv_function_call): Add hidden result argument to argument
2001 list if f2c calling conventions requested. Slightly restructure
2002 tests. Convert result of default REAL function to requested type
2003 if f2c calling conventions are used. Dereference COMPLEX result
2004 if f2c cc are used.
2005 * trans-types.c (gfc_sym_type): Return double for default REAL
2006 function if f2c cc are used.
2007 (gfc_return_by_reference): Slightly restructure logic. Return
2008 COMPLEX by reference depending on calling conventions.
2009 (gfc_get_function_type): Correctly make hidden result argument a
2010 pass-by-reference argument for COMPLEX. Remove old code which does
2011 this for derived types.
2012
7f42f27f
TS
20132005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2014
2015 * match.c (gfc_match_return): Only require space after keyword when
2016 it is obligatory. Only give stdwarn to after matching is successful.
2017 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
2018
357877ed
KH
20192005-05-08 Kazu Hirata <kazu@cs.umass.edu>
2020
2021 * intrinsic.texi: Fix typos.
2022
a6334742
SK
20232005-05-07 Steven G. Kargl <kargls@comcast.net>
2024
2025 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
2026 description to include information about scalar arguments.
2027
aa990c83
KH
20282005-05-03 Kazu Hirata <kazu@cs.umass.edu>
2029
2030 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
2031 match.h, trans-array.h: Update copyright.
2032
22e8617b
TT
20332005-04-29 Tom Tromey <tromey@redhat.com>
2034
2035 * f95-lang.c (poplevel): Updated for change to build_block.
2036
d198b59a
JJ
20372005-04-29 Jakub Jelinek <jakub@redhat.com>
2038
2039 PR fortran/13082
2040 PR fortran/18824
2041 * trans-expr.c (gfc_conv_variable): Handle return values in functions
2042 with alternate entry points.
2043 * resolve.c (resolve_entries): Remove unnecessary string termination
2044 after snprintf. Set result of entry master.
2045 If all entries have the same type, set entry master's type
2046 to that common type, otherwise set mixed_entry_master attribute.
2047 * trans-types.c (gfc_get_mixed_entry_union): New function.
2048 (gfc_get_function_type): Use it for mixed_entry_master functions.
2049 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
2050 * decl.c (gfc_match_entry): Set entry->result properly for
2051 function ENTRY.
2052 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
2053 __entry argument.
2054 (build_entry_thunks): Handle return values in entry thunks.
2055 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
2056 shared between multiple contexts.
2057 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
2058 current_function_decl instead of sym->backend_decl. Skip over
2059 entry master's entry id argument. For mixed_entry_master entries or
2060 their results, return a COMPONENT_REF of the fake result.
2061 (gfc_trans_deferred_vars): Don't warn about missing return value if
2062 at least one entry point uses RESULT.
2063 (gfc_generate_function_code): For entry master returning
2064 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
2065 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
2066 values optional just because they are in entry master.
2067
4c1f4f52
FXC
20682005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2069
2070 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
2071 Tobias forgot this in previous commit.
b122dc6a 2072
1a7bfcc3
PB
20732005-04-29 Paul Brook <paul@codesourcery.com>
2074
2075 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
2076 comment.
2077
438e1428
TS
20782005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2079
2080 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
2081 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
2082 IMPLICIT NONE, set seen_implicit_none.
2083 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
2084
973a384d
TS
20852005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2086
2087 * gfortran.h (gfc_gsymbol): Make name a const char *.
2088 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
2089 gfc_get_string.
2090
781e1004
FXC
20912005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2092
2093 PR fortran/20865
2094 * resolve.c (resolve_actual_arglist): Issue an error if a statement
2095 functions is used as actual argument.
2096
90aeadcb
FXC
20972005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2098
2099 PR fortran/21177
2100 * interface.c (compare_parameter): Ignore type for EXPR_NULL
2101 only if type is BT_UNKNOWN.
2102
860c8f3b
PB
21032005-04-25 Paul Brook <paul@codesourcery.com>
2104 Steven G. Kargl <kargls@comcast.net>
2105
2106 PR fortran/20879
2107 * check.c (gfc_check_ichar_iachar): New function.
2108 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
2109 * intrinsic.c (add_functions): Use it.
2110 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
2111 character expression lengths.
2112
eb83e811
TS
21132005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2114
2115 PR fortran/20059
2116 * trans-common.c (translate_common): Cast offset and
2117 common_segment->offset to type int for warning message.
2118
d4ee4d25
DD
21192005-04-23 DJ Delorie <dj@redhat.com>
2120
2121 * trans-decl.c: Adjust warning() callers.
2122
855a145c
TS
21232005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2124
2125 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
beceb652 2126 intermediate representation. Fix typo in comment.
855a145c 2127
c41993e8
SK
21282005-04-21 Steven G. Kargl <kargls@comcast.net>
2129
2130 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
2131 simplify logic; Add a gcc_assert.
2132
6c08eb63
SK
21332005-04-19 Steven G. Kargl <kargls@comcast.net>
2134
2135 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
2136
3010be13 21372005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
4c73896d 2138 Steven G. Kargl <kargls@comcast.net>
3010be13
AD
2139
2140 * invoke.texi: Update -Waliasing description
2141
009e94d4
FXC
21422005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2143
2144 PR fortran/16861
2145 * resolve.c (resolve_variable): If e->symtree is not set, this
2146 ought to be a FAILURE, and not a segfault.
2147
81871c2a 21482005-04-17 Paul Thomas <pault@gcc.gnu.org>
29dc5138
PT
2149
2150 PR fortran/17472
2151 PR fortran/18209
2152 PR fortran/18396
2153 PR fortran/19467
2154 PR fortran/19657
8a731165
TS
2155 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
2156 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
2157 declarations of old namelist functions.
29dc5138 2158 (build_dt): Simplified call to transfer_namelist_element.
b122dc6a 2159 (nml_get_addr_expr): Generates address expression for start of
8a731165 2160 object data. New function.
b122dc6a 2161 (nml_full_name): Qualified name for derived type components. New
8a731165 2162 function.
b122dc6a 2163 (transfer_namelist_element): Modified for calls to new functions
8a731165 2164 and improved derived type handling.
29dc5138 2165
a34938be
RG
21662005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
2167
2168 * scanner.c (gfc_next_char_literal): Reset truncation flag
2169 for lines ending in a comment for both fixed and free form.
2170 (load_line): Do not set truncated flag if only truncating
2171 the EOL marker.
2172
ba1defa5
RG
21732005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
2174
2175 PR fortran/14569
2176 * gfortran.h (gfc_linebuf): Add truncated field.
2177 * parse.c (next_statement): Handle warning for truncated
2178 lines.
2179 * scanner.c (load_line): Return if line was truncated.
2180 No longer warn for truncated lines. Remove unused parameters.
2181 (load_file): Store load_line return value to linebuf.
2182 (gfc_error_recovery): Do not advance line at the end.
2183
2d0aa65f
SK
21842005-04-14 Steven G. Kargl <kargls@comcast.net>
2185
2186 * gfortran.h (gfc_real_info): Add subnormal struct member.
2187 * arith.c (gfc_arith_init_1): Set it.
2188 (gfc_check_real_range): Use it.
2189 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
2190
c33063e8
KH
21912005-04-12 Kazu Hirata <kazu@cs.umass.edu>
2192
2193 * simplify.c: Fix a comment typo.
2194
0b026622
RS
21952005-04-11 Richard Sandiford <rsandifo@redhat.com>
2196
2197 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2198
9f32d037
TS
21992005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2200
2201 * simplify.c (gfc_simplify_nearest): Overhaul.
2202
6892757c
KH
22032005-04-10 Kazu Hirata <kazu@cs.umass.edu>
2204
2205 * interface.c: Fix a comment typo.
2206
51c3f0f6
FXC
22072005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2208
2209 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
2210 Fortran 95.
2211
8e1fa5d6
SK
22122005-04-09 Steven G. Kargl <kargls@comcast.net>
2213
2214 * simplify.c (gfc_simplify_anint): Use mpfr_round()
2215 (gfc_simplify_dnint): ditto.
2216 (gfc_simplify_nint): ditto.
2217
53d8a8ac
AP
22182005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
2219
2220 PR fortran/13257
2221 * io.c (check_format): Allow an optional comma
2222 between descriptors.
2223
835d64ab
FXC
22242005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2225
2226 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
2227 comment according to GNU coding style.
907d22fd
FXC
2228 (gfc_match_if): Remove gfc_ prefix in call to
2229 match_arithmetic_if.
835d64ab 2230
f55e72ce
DN
22312005-04-08 Diego Novillo <dnovillo@redhat.com>
2232
2233 * match.c (gfc_match_arithmetic_if): Declare static.
2234
43e1c5f7
FXC
22352005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2236
2237 PR fortran/17229
2238 * match.c (gfc_match_arithmetic_if): New function to match an
2239 arithmetic IF statement.
2240 (gfc_match_if): Use gfc_match_arithmetic_if to match an
2241 arithmetic IF statement embedded in a simple IF statement.
2242
01ae8930
SK
22432005-04-07 Steven G. Kargl <kargls@comcast.net>
2244
2245 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
2246
53ae8e14
SK
22472005-04-06 Steven G. Kargl <kargls@comcast.net>
2248
b122dc6a 2249 * invoke.texi: Remove documentation of -std=f90
53ae8e14 2250
ccccdb8d
TS
22512005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2252
2253 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
2254 non-pointer assignment.
2255
bd024745
FW
22562005-04-05 Feng Wang <fengwang@nudt.edu.cn>
2257
2258 PR fortran/15959
2259 PR fortran/20713
2260
2261 * array.c (resolve_character_array_constructor): New function. Set
2262 constant character array's character length.
2263 (gfc_resolve_array_constructor): Use it.
2264 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
2265 length.
2266 (gfc_set_constant_character_len): New function. Set constant character
2267 expression according the given length.
2268 * match.h (gfc_set_constant_character_len): Add prototype.
2269
c6db4d01
FXC
22702005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2271
2272 * intrinsic.texi: BES?? functions are not in the f95 standard.
2273
a5d58aeb
FXC
22742005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2275
2276 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
2277
f7cdcbf1
FXC
22782005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2279
2280 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
2281 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
2282
6230d276
SK
22832005-04-02 Steven G. Kargl <kargls@comcast.net>
2284
2285 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
2286
69de3b83
KH
22872005-04-01 Kazu Hirata <kazu@cs.umass.edu>
2288
2289 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
2290 trans.h: Fix comment typos.
2291
3ae9eb27
SK
22922005-03-29 Steven G. Kargl <kargls@comcast.net>
2293
2294 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
2295 flag_default_integer, flag_default_real
2296 * invoke.texi: Update documentation
b122dc6a 2297 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
3ae9eb27
SK
2298 fdefault-integer-8, and fdefault-real-8 definitions.
2299 * options.c (gfc_init_options): Set option defaults
2300 (gfc_handle_option): Handle command line options.
2301 * trans-types.c (gfc_init_kinds): Use options.
2302
8bb46326
DN
23032005-03-29 Keith Besaw <kbesaw@us.ibm.com>
2304
2305 * f95-lang.c (builtin_function): Process the attrs parameter
2306 and apply the "const" attribute to the builtin if found.
2307
6b32f9fc
SK
23082005-03-27 Steven G. Kargl <kargls@comcast.net>
2309
2310 * intrinsic.texi: Document AIMAG, AINT, ALL
2311
4c54501b
SK
23122005-03-26 Steven G. Kargl <kargls@comcast.net>
2313
2314 * arith.c (check_result): Fix illogical logic.
2315
a3122424
CY
23162005-03-26 Canqun Yang <canqun@nudt.edu.cn>
2317
2318 * trans-common.c (create_common): Build RECORD_NODE for common blocks
2319 contain no equivalence objects.
2320 (add_equivalences): New argument saw_equiv.
2321 (trans_common): New local variable saw_equiv.
2322 (finish_equivalences): Add a local variable dummy, Always pass true
2323 for the 3rd parameter to create_common.
2324
7b4047a0
SK
23252005-03-25 Steven G. Kargl <kargls@comcast.net>
2326
2327 * intrinsic.texi: Fix "make dvi"
2328
23292005-03-24 Steven G. Kargl <kargls@comcast.net>
8db2ba40
SK
2330
2331 * intrinsic.texi: New file.
2332 * gfortran.texi: Include it; white space change; fix typo.
2333
d101034c
JM
23342005-03-23 Joseph S. Myers <joseph@codesourcery.com>
2335
2336 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2337
10c7a96f
SB
23382005-03-23 Steven Bosscher <stevenb@suse.de>
2339
2340 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
2341 * trans-array.c (gfc_trans_allocate_array_storage,
2342 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
2343 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
2344 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
2345 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
2346 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
2347 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2348 gfc_conv_expr_descriptor): Likewise.
2349 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
2350 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2351 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
2352 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
2353 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2354 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
2355 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
2356 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
2357 gfc_conv_intrinsic_merge, prepare_arg_info,
2358 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
2359 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
2360 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
2361 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
2362 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2363 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
2364 Likewise.
2365 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
2366 * trans.c (gfc_add_modify_expr): Likewise.
2367
f77b6ca3
FXC
23682005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2369
2370 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
2371 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
2372 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
2373 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
2374 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
2375 gfc_check_perror): new functions to check newly implemented
2376 g77 intrinsics.
2377 * gfortran.h: adding symbols for new intrinsics.
2378 * intrinsic.c (add_functions): adding new intrinsics.
2379 (add_subroutines): adding new intrinsics.
2380 * intrinsic.h: prototype for all checking and resolving
2381 functions.
2382 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
2383 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
2384 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
2385 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
2386 gfc_resolve_kill_sub, gfc_resolve_link_sub,
2387 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
2388 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
2389 gfc_resolve_perror): new functions to resolve intrinsics.
2390 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
2391 for new symbols.
2392
e76d0ec6 23932005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
9439ae41
TS
2394
2395 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
2396 in which the variable is declared.
2397
2398 PR fortran/18525
2399 * resolve.c (was_declared): Also check for dummy attribute.
2400
e76d0ec6 24012005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
0de27aac
TS
2402
2403 * gfortran.h (arith): Remove ARITH_0TO0.
2404 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
2405 (gfc_arith_power): Remove special casing of zero to integral
2406 power zero.
2407
ffee7efd
KG
24082005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2409
2410 * Make-lang.in (fortran-warn): Remove -Wno-error.
2411 (expr.o-warn, resolve.o-warn, simplify.o-warn,
2412 trans-common.o-warn): Specify -Wno-error.
2413
df7df328
TS
24142005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2415
2416 * trans-array.c (gfc_trans_static_array_pointer,
2417 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
2418 comment and formatting typos.
2419
d3ec5cb6
FXC
24202005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2421
2422 * invoke.texi: Fix typos.
2423
a1286ef5
ZW
24242005-03-15 Zack Weinberg <zack@codesourcery.com>
2425
2426 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
2427
223c8158
FW
24282005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2429
2430 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
2431 to zero on label_tree.
2432
ce2df7c6
FW
24332005-03-15 Feng Wang <fengwang@nudt.edu.cn>
2434
2435 PR fortran/18827
2436 * io.c (resolve_tag): Add checking on assigned label.
2437 (match_dt_format): Does not set symbol assign attribute.
2438 * match.c (gfc_match_goto):Does not set symbol assign attribute.
2439 * resolve.c (resolve_code): Add checking on assigned label.
2440 * trans-common.c (build_field): Deals with common variable assigned
2441 a label.
2442 * trans-stmt.c (gfc_conv_label_variable): New function.
2443 (gfc_trans_label_assign): Use it.
2444 (gfc_trans_goto): Ditto.
2445 * trans-io.c (set_string): Ditto.
2446 * trans.h (gfc_conv_label_variable): Add prototype.
2447
2bb02bf0
TS
24482005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2449
2450 PR fortran/20467
2451 * symbol.c (check_conflict): A dummy argument can't be a statement
2452 function.
2453
f1b19062
ZD
24542005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
2455
2456 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2457 the argument of the shift to the unsigned type.
2458
ee943062
TS
24592005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2460
2461 PR fortran/16907
2462 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2463
8f9c06ca
TS
24642005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2465
2466 PR fortran/20323
2467 * resolve.c (gfc_resolve): Check if character lengths are
2468 specification expressions.
2469
bae88af6
TS
24702005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2471
2472 PR fortran/20361
2473 * trans-array.c (gfc_stack_space_left): Remove unused variable.
2474 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2475 code.
2476 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2477 Remove declaration / prototype.
2478 * trans-common.c (build_equiv_decl): Give union a name. Check if
2479 it can be put on the stack.
2480 * trans-decl.c (gfc_stack_space_left): Move function here.
2481 (gfc_build_qualified_array): Fix comment typo.
2482 * trans.h (gfc_put_var_on_stack): Add prototype.
2483
5f42ddb0
KG
24842005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2485
2486 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2487 * decl.c, trans.c: Don't use C++ style comments.
2488 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2489 ifsrc): Give names to enums and use ENUM_BITFIELD.
2490 (gfc_access): Remove trailing comma.
2491
87ebdf2f
SK
24922005-03-05 Steven G. Kargl <kargls@comcast.net>
2493
2494 PR 19936
2495 * primary.c (match_complex_constant): Mangled complex constant may
2496 be an implied do-loop. Give implied do-loop matcher a chance.
2497
a1286ef5 24982005-03-05 Steven G. Kargl <kargls@comcast.net>
2c5ed587
SK
2499
2500 PR fortran/19754
2501 * resolve.c (compare_shapes): New function.
2502 (resolve_operator): Use it.
2503
19db01bb
TS
25042005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2505
2506 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2507 type for COMPLEX constants.
2508
3852e8b8
TS
25092005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2510
2511 PR fortran/19673
2512 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2513 argument from a pointer function also if it has a result clause.
2514
25152005-03-04 Steven G. Kargl <kargls@comcast.net>
37e860a2
SK
2516
2517 * expr.c (gfc_copy_shape_excluding): Change && to ||.
2518
4b9b6210
TS
25192005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2520
2521 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2522 clarify comment.
2523
2a4a7830
TS
25242005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2525 (port from g95)
2526
2527 PR fortran/19479
2528 * simplify.c (gfc_simplify_bound): Rename to ...
2529 (simplify_bound): ... this and overhaul.
2530
d436d3de
SK
25312005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
2532
2533 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2534 (gfc_conv_intrinsic_function): update function calls
2535
f4e7375a
SK
25362005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
2537
2538 PR fortran/20058
2539 * trans-types.c (gfc_max_integer_kind): Declare
2540 (gfc_init_kinds): Initialize it.
2541 * gfortran.h (gfc_max_integer_kind): extern it.
2542 * primary.c (match_boz_constant): Use it; remove gfortran extension
2543 of kind suffixes on BOZ literal constants
2544
2545
5a95dfde
SK
25462005-02-27 Steven G. Kargl <kargls@comcast.net>
2547
2548 * arith.c (gfc_check_real_range): Remove multiple returns
2549 (check_result): New function.
2550 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2551 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2552
2553
2054fc29
VR
25542005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2555
2556 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2557
9c6a7ecc
TS
2558
25592005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
2560
2561 Unrevert previously reverted patch. Adding this fix:
2562 * module.c (find_true_name): Deal with NULL module.
2563
f5e9e99c
TS
25642005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2565
2566 Revert yesterday's patch:
2567 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2568
2569 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2570 ... argument. Copy string instead of pointing to it.
2571
0366dfe9
TS
25722005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2573
2574 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2575 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2576 gfc_get_namespace.
2577 * module.c (mio_namespace_ref, load_needed): Likewise.
2578 * parse.c (parse_interface, parse_contained): Likewise. Here the
2579 correct second argument matters.
2580 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2581 parent's implicit types if this is set.
2582 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2583 * trans-common.c (build_common_decl): Likewise.
2584
d1303acd
TS
2585 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2586 formatting.
2587 * symbol.c (gfc_set_default_type): Issue error only once, by setting
2588 and checking 'untyped' attribute.
2589
58b03ab2
TS
2590 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2591 fields into new struct 'op' inside the 'value' union.
2592 * arith.c (eval_intrinsic): Adapt all users.
2593 * dependency.c (gfc_check_dependency): Likewise.
2594 * dump-parse-tree.c (gfc_show_expr): Likewise.
2595 * expr.c (gfc_get_expr): Don't clear removed fields.
2596 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2597 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2598 check_intrinsic_op): Adapt to new field names.
2599 * interface.c (gfc_extend_expr): Likewise. Also explicitly
2600 nullify 'esym' and 'isym' fields of new function call.
2601 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2602 Adapt to renamed structure fields.
2603 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2604 * module.c (mio_expr): Likewise.
2605 * resolve.c (resolve_operator): Likewise.
2606 (gfc_find_forall_index): Likewise. Only look through operands
2607 if dealing with EXPR_OP
2608 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2609 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2610 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2611
f5e9e99c 2612 [ Reverted ]
e9444bd5
TS
2613 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2614 'name' a 'const char *'.
2615 (gfc_symbol): Likewise, also for 'module'.
2616 (gfc_symtree): Make 'name' a 'const char *'.
2617 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2618 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2619 'char *' argument.
2620 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2621 initialize 'SYM->module'.
2622 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2623 pointer instead of empty string.
2624 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2625 * interface.c (gfc_compare_types): Adapt check to account for possible
2626 NULL pointer.
2627 (compare_actual_formal): Check for NULL pointer instead of empty
2628 string.
2629 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
a1286ef5 2630 Add 'const' qualifier.
e9444bd5
TS
2631 (conv_name): Return a heap allocated string.
2632 (find_conv): Add 'const' qualifier to 'target'.
2633 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2634 (make_generic): Check for NULL pointer instead of empty string.
2635 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2636 (add_conv): No need to strcpy result from 'conv_name'.
2637 (sort_actual): Check for NULL pointer instead of empty string.
2638 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2639 Adapt prototype.
2640 * module.c (compare_true_names): Compare pointers instead of strings
2641 for 'module' member.
2642 (find_true_name): Initialize string fields with gfc_get_string.
2643 (mio_pool_string): New function.
2644 (mio_internal_string): Adapt comment.
2645 (mio_component_ref, mio_component, mio_actual_arg): Use
2646 'mio_pool_string' instead of 'mio_internal_string'.
2647 (mio_symbol_interface): Add 'const' qualifier to string arguments.
2648 Add level of indirection. Use 'mio_pool_string' instead of
2649 'mio_internal_string'.
2650 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2651 (write_common, write_symbol): Use 'mio_pool_string' instead of
2652 'mio_internal_string'.
2653 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2654 instead of empty string.
2655 (write_operator, write_generic): Pass correct type variable to
2656 'mio_symbol_interface'.
2657 (write_symtree): Use 'mio_pool_string' instead of
2658 'mio_internal_string'.
2659 * primary.c (match_keyword_arg): Adapt check to possible
2660 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
2661 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2662 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2663 'strcpy'.
2664 (ambiguous_symbol): Check for NULL pointer instead of empty string.
2665 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2666 arguments.
2667 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2668 pointer instead of empty string.
2669 * trans-decl.c (gfc_sym_mangled_identifier,
2670 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2671 gfc_get_symbol_decl): Likewise.
2672 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2673 argument. Copy string instead of pointing to it.
2674
f439764f
KH
26752005-02-23 Kazu Hirata <kazu@cs.umass.edu>
2676
2677 * intrinsic.h, st.c: Update copyright.
2678
eebc3ee0
SK
26792005-02-20 Steven G. Kargl <kargls@comcast.net>
2680
2681 * symbol.c: Typos in comments.
2682
687fcae7
SK
26832005-02-20 Steven G. Kargl <kargls@comcast.net>
2684
2685 * expr.c (gfc_type_convert_binary): Typo in comment.
2686
145cf79b 26872005-02-19 Steven G. Kargl <kargls@comcast.net>
a1286ef5 2688
145cf79b
SK
2689 * check.c (gfc_check_selected_int_kind): New function.
2690 * intrinsic.h: Prototype it.
2691 * intrinsic.c (add_function): Use it.
2692 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2693 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2694
c60d77d4 26952005-02-19 Steven G. Kargl <kargls@comcast.net>
a1286ef5 2696
c60d77d4
SK
2697 * check.c (gfc_check_int): improve checking of optional kind
2698 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2699
332e7efe 27002005-02-19 Steven G. Kargl <kargls@comcast.net>
a1286ef5 2701
332e7efe
SK
2702 * check.c (gfc_check_achar): New function
2703 * intrinsic.h: Prototype it.
2704 * intrinsic.c (add_function): Use it.
2705
1ac26262
TS
27062005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2707
2708 * trans-stmt.c (generate_loop_for_temp_to_lhs,
2709 generate_loop_for_rhs_to_temp): Remove if whose condition is
2710 always true.
2711
1e6283cb
TS
27122005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2713
2714 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2715 (gfc_use_derived): ... this function.
2716
c6a912da
RH
27172005-02-09 Richard Henderson <rth@redhat.com>
2718
2719 * f95-lang.c (gfc_init_builtin_functions): Call
2720 build_common_builtin_nodes; do not define any functions handled
2721 by it.
2722
eac33acc
TS
27232005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2724
2725 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2726 EXPR_SUBSTRING.
2727 (gfc_is_constant_expr): Check 'ref' to determine if substring
2728 reference is constant.
2729 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2730 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2731 and 'op2'.
2732 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2733
231b2fcc
TS
27342005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2735
2736 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2737 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2738 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2739 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2740 gfc_add_procedure): Add argument.
2741 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2742 gfc_match_null, match_type_spec, match_attr_spec,
2743 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2744 Update callers to match.
b122dc6a 2745 (gfc_match_entry): Likewise, fix comment typo.
231b2fcc
TS
2746 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2747 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2748 gfc_match_derived_decl): Update callers.
2749 * interface.c (gfc_match_interface): Likewise.
2750 * match.c (gfc_match_label, gfc_add_flavor,
2751 gfc_match_call, gfc_match_common, gfc_match_block_data,
2752 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2753 Likewise.
2754 * parse.c (parse_derived, parse_interface, parse_contained),
2755 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2756 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2757 * symbol.c (check_conflict, check_used): Add new 'name' argument,
2758 use when printing error message.
2759 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2760 gfc_add_generic, gfc_add_in_common, gfc_add_data,
2761 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2762 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2763 gfc_add_procedure): Add new 'name' argument. Pass along to
2764 check_conflict and check_used.
2765 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2766 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2767 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2768 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2769 argument in calls to any of the modified functions.
2770
706bb773
JM
27712005-02-06 Joseph S. Myers <joseph@codesourcery.com>
2772
2773 * gfortran.texi: Don't give last update date.
2774
61e067cc
RH
27752006-01-30 Richard Henderson <rth@redhat.com>
2776
2777 * options.c (gfc_init_options): Zero flag_errno_math.
2778
985aff9c
PB
27792005-01-29 Paul Brook <paul@codesourcery.com>
2780
2781 PR fortran/18565
2782 * check.c (real_or_complex_check): New function.
2783 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2784 * intrinsic.c (add_functions): Use new check functions.
2785 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2786 Add prototypes.
2787
f240b896
SK
27882005-01-29 Steven G. Kargl <kargls@comcast.net>
2789
2790 PR fortran/19589
2791 * expr.c (gfc_check_assign): Check for conformance of logical operands
2792
c006df4e
SB
27932004-01-27 Steven Bosscher <stevenb@suse.de>
2794
2795 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2796 TREE_USED for all labels.
2797 (gfc_trans_entry_master_switch): Use it instead of building a
2798 label by hand.
2799 * trans-io.c (add_case): Likewise.
2800 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2801
69029c61
PB
28022004-01-23 Paul Brook <paul@codesourcery.com>
2803 Steven G. Kargl <kargls@comcast.net>
2804
2805 PR fortran/17941
2806 * arith.c (gfc_convert_real): Remove sign handling.
2807 * primary.c (match_digits): Allow whitespace after initial sign.
2808 (match_real_const): Handle signs here. Allow whitespace after
2809 initial sign. Remove dead code.
2810 (match_const_complex_part): Remove.
2811 (match_complex_part): Use match_{real,integer}_const.
2812 (match_complex_constant): Cross-promote integer types.
2813
58757957
JM
28142005-01-23 James A. Morrison <phython@gcc.gnu.org>
2815
2816 PR fortran/19294
2817 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2818 transpose_c8 for complex types.
2819
e7dc5b4f
KH
28202005-01-23 Kazu Hirata <kazu@cs.umass.edu>
2821
2822 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2823 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2824 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2825 Follow spelling conventions.
2826
dae24534
BD
28272005-01-22 Bud Davis <bdavis9659@comcast.net>
2828
2829 PR fortran/19313
2830 * trans-io.c (gfc_trans_inquire): Added code to support
2831 pad.
2832
19060788
SK
28332005-01-22 Steven G. Kargl <kargls@comcast.net>
2834
a1286ef5 2835 * intrinsic.c (make_alias): Add standard argument.
19060788
SK
2836 (add_functions): Update make_alias calls.
2837
1438a8c9
PB
28382005-01-22 Paul Brook <paul@codesourcery.com>
2839
2840 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2841
af30f793
PB
28422005-01-22 Paul Brook <paul@codesourcery.com>
2843
2844 * gfortran.h (gfc_check_access): Add prototype.
2845 * match.c (gfc_match_namelist): Remove TODO.
2846 * module.c (check_access): Rename ...
2847 (gfc_check_access): ... to this. Boolify. Update callers.
2848 * resolve.c (resolve_symbol): Check for private objects in public
2849 namelists.
2850
0dd973dd
PB
28512005-01-22 Paul Brook <paul@codesourcery.com>
2852
2853 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2854 does not have an explicit type.
2855 (gfc_match_variable): Resolve implicit derived types in all cases.
2856 Resolve contained function types from their own namespace, not the
2857 parent.
2858 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2859 checking. Resolve from the contained namespace, not the parent.
2860
6ba692b4
TS
28612005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2862
2863 PR fortran/19543
2864 * trans-const.c (gfc_conv_constant_to_tree): Give logical
2865 constants the correct type.
2866
b8d5e926
TS
2867 PR fortran/19194
2868 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2869 length parameters.
2870 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2871 pointer fields.
2872
ec378180
KH
28732005-01-18 Kazu Hirata <kazu@cs.umass.edu>
2874
2875 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2876 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2877 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2878 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2879 trans-io.c, trans-stmt.c, trans.c: Update copyright.
2880
33d4098d
SB
28812005-01-17 Ira Rosen <irar@il.ibm.com>
2882
2883 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2884
dfbb4318
TS
28852005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2886
2887 PR fortran/19182
2888 * error.c (error_char): Line-buffer errors / warnings.
2889
de46b505
TS
28902005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2891
2892 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2893 unsigned issue. Use build_int_cst instead of converting
2894 integer_zero_node. Remove unnecessary conversion.
2895
b122dc6a 2896 * trans-types.c (gfc_get_character_type_len): Use
5e3b8727
TS
2897 gfc_charlen_type_node as basic type for the range field.
2898
e805a599
TS
2899 * trans-intrinsic.c (build_fixbound_expr,
2900 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2901 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2902 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2903 of converting 'integer_zero_node' or 'integer_one_node'
2904 respectively.
2905 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2906 evade re-building.
2907 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2908 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2909 'build_int_cst' instead of converting 'integer_zero_node' or
2910 'integer_one_node' respectively.
0da87370
TS
2911
2912 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2913 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2914 'gfc'-prefix from local variable, remove dead code, use correct
2915 type when inserting argument.
2916
ef1b6bcd
TS
2917 * trans-intrinsic.c, trans-types.c: Update copyright years.
2918
5352b89f
SK
29192005-01-16 Steven G. Kargl <kargls@comcast.net>
2920
2921 PR 19168
2922 * resolve.c (check_case_overlap): Typo in comment.
2923 (validate_case_label_expr): Fix up kinds of case values
2924 (resolve_select): Properly handle kind mismatches.
2925
36c028f6
PB
29262004-01-16 Paul Brook <paul@codesourcery.com>
2927
2928 PR fortran/17675
2929 * trans-common.c (translate_common): Remove duplicate function call.
2930 (finish_equivalences): Preserve alignment when biasing offsets.
2931
da8309c6
TS
29322005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
2933
2934 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2935 ASCII-like character encoding.
2936
c224550f
SK
29372005-01-14 Steven G. Kargl <kargls@comcast.net>
2938
2939 * resolve.c (compare_case): Cleanup.
2940
6e06dac5
SK
29412005-01-14 Steven G. Kargl <kargls@comcast.net>
2942
2943 * resolve.c (compare_case): Give arguments correct type.
2944
43a5ef69
KH
29452005-01-13 Kazu Hirata <kazu@cs.umass.edu>
2946
2947 * iresolve.c, trans-common.c, trans-types.c: Fix comment
2948 typos.
2949
832ef1ce
PB
29502005-01-09 Paul Brook <paul@codesourcery.com>
2951
2952 PR fortran/17675
2953 * trans-common.c (current_common, current_offset): Remove.
2954 (create_common): Add head argument.
2955 (align_segment): New function.
2956 (apply_segment_offset): New function.
2957 (translate_common): Merge code from new_segment. Handle alignment.
2958 (new_segment): Remove.
2959 (finish_equivalences): Ensure proper alignment.
2960
92574caf
TS
29612005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2962
2963 * trans-const.c: Don't include unused math.h.
2964
b36cd00b
TS
2965 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2966 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2967 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2968 trailing whitespace.
2969 (prepare_arg_info): Fix formatting, indenting and remove trailing
2970 whitespace.
2971 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
27dfc9c4
TS
2972 trailing whitespace.
2973
2974 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2975 gfc_constant_result, gfc_range_check, gfc_arith_power,
2976 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2977 gfc_real2complex, gfc_complex2int, gfc_complex2real,
2978 gfc_complex2complex): Fix whitespace issues.
e6edaeb2 2979 * check.c (must_be, type_check, numeric_check, int_or_real_check,
27dfc9c4
TS
2980 logical_array_check, array_check, scalar_check, nonoptional_check,
2981 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2982 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2983 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2984 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2985 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2986 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2987 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2988 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2989 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2990 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2991 gfc_check_lbound, gfc_check_logical, min_max_args,
2992 gfc_check_min_max_integer, gfc_check_min_max_real,
2993 gfc_check_min_max_double, gfc_check_matmul,
2994 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2995 gfc_check_pack, gfc_check_precision, gfc_check_radix,
2996 gfc_check_range, gfc_check_real, gfc_check_repeat,
2997 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2998 gfc_check_set_exponent): Fix formatting issues.
2999 (gfc_check_size, gfc_check_sign): Alphabetize function order,
3000 remove whitespace-only line.
3001 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
3002 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
3003 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
3004 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
3005 gfc_check_random_number, gfc_check_random_seed,
3006 gfc_check_second_sub, gfc_check_system_clock,
3007 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
3008 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
3009 gfc_check_unlink_sub): Fix formatting issues.
a1286ef5 3010
779fae71
TS
30112005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3012
3013 * gfortran.h: Remove outdated comment. Don't include stdio.h
3014 explicitly.
3015
12d3e34b
TS
30162005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3017
3018 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
3019 output of 'gfortran --version'.
3020
d22e4895
SK
30212005-01-03 Steven G. Kargl <kargls@comcast.net>
3022
3023 * arith.c: Add system.h; remove string.h
3024 * decl.c: Ditto
3025 * matchexp.c: Ditto
3026 * parse.c: Ditto
3027 * resolve.c: Ditto
3028 * st.c: Ditto
3029 * check.c: Remove stdlib.h and stdarg.h
3030 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
3031 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
3032 * f95-lang.c: Add system.h; remove stdio.h
3033 * interface.c: Add system.h; remove stdlib.h and string.h
3034 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
3035 * io.c: Remove string.h
3036 * simplify.c: Ditto
3037 * match.c: Remove stdarg.h and string.h
3038 * misc.c: Update copyright; add system.h; remove stdlib.h,
3039 string.h, and sys/stat.h
3040 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
3041 unistd.h, and time.h
3042 * option.c: Remove string.h and stdlib.h
3043 * primary.c: Ditto
3044 * scanner.c: Update copyright; add system.h; remove stdlib.h,
3045 stdio.h, string.h, and strings.h
3046 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
3047 * trans-array.c: Remove stdio.h and gmp.h
3048 * trans-const.c: Ditto
3049 * trans-expr.c: Ditto
3050 * trans-io.c: Ditto
3051 * trans-stmt.c: Ditto
3052 * trans.c: Ditto
3053 * trans-intrinsic.c: Remove stdio.h and string.h
3054
410d1a45
SK
30552004-12-29 Steven G. Kargl <kargls@comcast.net>
3056
3057 * gfortran.h (gfc_case): fix typo in comment.
3058
a1286ef5 30592004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
56746a07
TS
3060
3061 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
3062 logical shift. Call fold. Remove 0-bit shift shortcut.
3063 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
3064 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
3065 result if width(arg 1) < 4 bytes. Call fold.
3066
e98a8b5b
TS
3067 PR fortran/19032
3068 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
3069 in front of function to match the standard. Correct handling
3070 of MODULO.
3071
30722004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
3073
3074 * trans-expr.c (gfc_conv_cst_int_power): Only check for
3075 flag_unsafe_math_optimizations if we have a float type.
3076
f300468a
SK
30772004-12-23 Steven G. Kargl <kargls@comcast.net>
3078
3079 * gfortran.texi: Fix typo.
3080
4fdb5c71
TS
30812004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3082
3083 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
3084 comment typo.
3085
172b8799
TS
30862004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3087
3088 PR fortran/18993
3089 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
3090 (gfc_match_nullify): Make sure that ')' is in front of the end of
3091 statement.
3092
e2435498
TS
3093 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
3094 function.
3095
6b25a558
RH
30962004-12-14 Richard Henderson <rth@redhat.com>
3097
3098 * gfortran.h (gfc_expr.function.name): Make const.
3099 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3100 (gfc_get_string): Update prototype.
3101 * iresolve.c: Include tree.h.
3102 (string_node, HASH_SIZE, string_head, hash): Remove.
3103 (gfc_get_string): Use vsnprintf, get_identifier.
3104 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
3105 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
3106 (gfc_done_1): Don't call gfc_iresolve_done_1.
3107 * module.c (mio_allocated_string): Take and return const char *,
3108 instead of modifying char**.
3109 (mio_expr): Update to match.
3110 * resolve.c (pure_function): Constify name argument.
3111 (resolve_function): Constify name.
3112 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
3113
7f68c75f
RH
31142004-12-12 Richard Henderson <rth@redhat.com>
3115
3116 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3117 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
3118 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
3119 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
3120 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
3121 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
3122 gfc_resolve_unpack: Use PREFIX.
3123
23acf4d4
TS
31242004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3125
3126 PR fortran/18869
3127 * match.c (gfc_match_common): Skip whitespace.
3128
c3d003d2
SK
31292004-12-12 Steven G. Kargl <kargls@comcast.net>
3130
3131 PR fortran/16581
3132 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
3133 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
3134 integer kind check; Issue error for -std=f95 when needed.
3135 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
3136 GFC_STD_F95.
3137 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
3138 Promote arguments to same kind.
3139
8d5cfa27
SK
31402004-12-12 Steven G. Kargl <kargls@comcast.net>
3141 Paul Brook <paul@codesourcery.com>
3142
3143 PR fortran/16222
3144 * resolve.c (gfc_resolve_iterator_expr): New function.
3145 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
3146 start, end and stride to correct type.
3147 (resolve_code): Pass extra argument.
3148 * array.c (resolve_array_list): Pass extra argument.
3149 * gfortran.h (gfc_resolve): Add prototype.
3150 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
3151 Handle real type iterators.
3152
6ee42e01 31532004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
49e4d580
TS
3154
3155 PR fortran/17175
3156 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
3157 same kind as C's 'int'.
6ee42e01 3158 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
49e4d580 3159
323c74da
RH
31602004-12-08 Richard Henderson <rth@redhat.com>
3161
3162 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
3163 to the output expression.
3164 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
3165 warning conversion.
3166 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
3167 to index kind.
3168
40f2165e
TS
31692004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3170
baa8edda 3171 PR fortran/18826
40f2165e
TS
3172 * resolve.c (resolve_code): Impose correct restrictions on
3173 assigned variable.
3174
59ce85b5
TS
3175 * decl.c (gfc_match_end): Use locus of END when eos is an error.
3176
df65f093
SK
31772004-12-02 Steven G. Kargl <kargls@comcast.net>
3178 Paul Brook <paul@codesourcery.com>
3179
3180 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
3181 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
3182 (gfc_check_stat, gfc_check_stat_sub): New functions.
3183 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
3184 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
3185 fstat, and stat to intrinsics symbol tables.
3186 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
3187 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
3188 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
3189 (gfc_resolve_stat, gfc_resolve_flush): New functions.
3190 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
3191 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
3192
1270d633
SK
31932004-12-02 Steven G. Kargl <kargls@comcast.net>
3194
3195 * intrinsic.c: Fix and add comments, fix function declarations
3196 (OPTIONAL,REQUIRED): New symbols
3197 (add_functions,add_subroutines): Use symbols
3198 (gmp.h): Remove unused include
3199
597cdf4f
JM
32002004-11-25 Joseph S. Myers <joseph@codesourcery.com>
3201
3202 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
3203 in diagnostics.
3204
39afeb1a
SB
32052004-11-24 Steven Bosscher <stevenb@suse.de>
3206
3207 * options.c (gfc_post_options): Don't clear flag_inline_functions.
3208
d8fe26b2
SK
32092004-11-20 Steven G. Kargl <kargls@comcast.net>
3210
3211 * check.c (gfc_check_getcwd_sub): Fix seg fault.
3212
3213 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
3214 gfc_check_unlink,gfc_check_unlink_sub): New functions
3215 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
3216 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
3217 exit to intrinsics symbol tables.
3218 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
3219 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
3220 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
3221 gfc_resolve_unlink_sub): Add and sort prototypes.
3222 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
3223 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
3224 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
3225
40b026d8
PB
32262004-11-16 Paul Brook <paul@codesourcery.com>
3227
3228 PR fortran/13010
3229 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
3230 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
3231 * trans-types.c (gfc_get_dtype): Accept array type rather than element
3232 type.
3233 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
3234 (gfc_get_array_type_bounds): Ditto.
3235 (gfc_get_derived_type): Recurse into derived type pointers.
3236 * trans-types.h (gfc_get_dtype): Add prototype.
3237 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
3238
c4759ce3
PB
32392004-11-15 Paul Brook <paul@codesourcery.com>
3240
3241 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
3242
96654664
PB
32432004-11-10 Paul Brook <paul@codesourcery.com>
3244
3245 PR fortran/18375
3246 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
3247 * trans-io.c (transfer_array_component): Ditto.
3248
851739ea
PB
32492004-11-10 Paul Brook <paul@codesourcery.com>
3250
3251 * invoke.texi: Fix typo.
3252
f7b529fa
KH
32532004-11-08 Kazu Hirata <kazu@cs.umass.edu>
3254
3255 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
3256 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
3257 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
3258 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
3259 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
3260
c1df75d1
TS
32612004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3262
3263 PR fortran/18023
3264 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
3265
882f2b8e
KH
32662004-11-06 Kazu Hirata <kazu@cs.umass.edu>
3267
3268 * gfortranspec.c: Replace GNU CC with GCC.
3269
20a209b5
TS
32702004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3271
3272 * gfortranspec.c (lang_specific_driver): Change year to 2004.
3273
ca0e9281
TS
32742004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3275
3276 PR fortran/18111
3277 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
3278 hidden parameters.
3279
adf3ed3f
TS
32802004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3281
3282 PR fortran/15164
3283 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
3284 module procedures as if they were module variables.
3285
36f4d144
TS
32862004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3287
3288 PR fortran/17535
3289 PR fortran/17583
3290 PR fortran/17713
3291 * module.c (write_symbol1): Set module_name for dummy arguments.
3292
9e660c49
PB
32932004-11-02 Paul Brook <paul@codesourcery.com>
3294
3295 * intrinsic.c (check_intrinsic_standard): Include error locus.
3296 Remove VLA.
3297 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
3298 locus to check_intrinsic_standard.
3299
b7892582
JB
33002004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
3301
3302 PR fortran/17590
3303 * gfortran.h: Change GFC_STD_* flags to more appropriate
3304 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
3305 gfc_option_t): Add field for warning about use of nonstandard
3306 intrinsics.
3307 * intrinsic.c (add_sym): Add parameter for standard version, check
3308 this against current standard.
3309 (add_sym_0): Pass standard parameter to add_sym.
3310 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
3311 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
3312 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
3313 (make_generic): Add parameter for standard, check this
3314 against currently selected standard.
3315 (add_functions, add_subroutines): Add parameter to tell which
3316 standard an intrinsic belongs to.
3317 (check_intrinsic_standard): New function.
3318 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
3319 (gfc_intrinsic_sub_interface): Ditto.
3320 * lang.opt: Add Wnonstd-intrinsics option.
3321 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
3322 init new warning.
3323 (set_Wall): Add warning about nonstd intrinsics.
3324 (gfc_handle_option): Change to use new GFC_STD_* flags,
3325 handle new warning.
3326 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
3327
f88cf205
AP
33282004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
3329
3330 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
3331
b7398e72
TS
33322004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3333
3334 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
3335
bf737879
TS
33362004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3337
3338 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
3339 comment typo.
3340
7a003d8e
CY
33412004-10-30 Canqun Yang <canqun@nudt.edu.cn>
3342
a1286ef5 3343 * check.c (gfc_check_rand): Allow missing optional argument.
7a003d8e
CY
3344 (gfc_check_irand): Ditto.
3345 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
3346
be3a985e
SRL
33472004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
3348
3349 PR fortran/13490, PR fortran/17912
3350 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
3351 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
7a003d8e 3352 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
be3a985e
SRL
3353 warning when compiling with pedantic.
3354 * gcc/fortran/arith.c: Set minimum integer values to reflect
3355 realities of two's complement signed integers. Added
3356 pedantic minimum.
3357
974ede64
AP
33582004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
3359
3360 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
3361 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
3362 link it in.
3363
19e4c59d
TS
33642004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3365
3366 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
3367 typo.
3368 (gfc_generate_function_code): Fix formatting issue.
3369
711f8369
TS
33702004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3371
3372 * module.c: Fix formatting issues.
3373
5c76089a
TS
33742004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3375
3376 * module.c (mio_interface_rest): Set where member of interface
3377 while loading.
3378
2d0b4bcd
AP
33792004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
3380
3381 PR fortran/17901
3382 * options.c (gfc_handle_option): Add break after handing the
3383 J/M option.
3384
26810721
TS
33852004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
3386
3387 * arith.c: Fix formatting issues.
a1286ef5 3388
edbfca8f
TS
33892004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3390
3391 PR fortran/17676
3392 * resolve.c (resolve_operator): Use correct operator name in message.
3393
5d874166
TS
33942004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3395
3396 * primary.c (match_boz_constant): Allow kind parameter suffixes.
3397 Move standard warning further to the front.
3398
54c2d931
KH
33992004-10-07 Kazu Hirata <kazu@cs.umass.edu>
3400
3401 * trans-stmt.c: Fix a comment typo.
3402
2b58638b
PB
34032004-10-07 Paul Brook <paul@codesourcery.com>
3404
3405 PR fortran/17678
3406 * trans-array.c (gfc_trans_deferred_array): Leave use associated
3407 variables alone.
3408
5d24a977
TS
34092004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3410
3411 PR fortran/17568
3412 * simplify.c (twos_complement): New function.
3413 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
3414
c45abcaf
TS
3415 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
3416
fbdad37d
PB
34172004-10-06 Paul Brook <paul@codesourcery.com>
3418
3419 * trans-stmt.c (gfc_trans_simple_do): New function.
3420 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
3421 loop. Update comments.
3422
58c5b409
TS
34232004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3424
3425 PR fortran/17283
3426 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
3427 is scalar.
3428
ee569894
TS
3429 PR fortran/17631
3430 * intrinsic.c (add_sym_5): Remove.
3431 (add_subroutines): Add resolution function for MVBITS.
3432 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
3433 MVBITS
3434 * iresolve.c (gfc_resolve_mvbits): New function.
3435 (gfc_resolve_random_number): Remove empty line at end of function.
3436
73a014b5
TS
3437 * trans-const.c (gfc_build_cstring_const): New function.
3438 (gfc_init_cst): Use new function.
3439 * trans-const.h (gfc_build_cstring_const): Add prototype.
3440 * trans-io.c (set_string, set_error_locus): Use new function.
3441 * trans-stmt.c (gfc_trans_goto): Use new function.
a1286ef5 3442
73a014b5
TS
3443 PR fortran/17708
3444 * parse.c (accept_statement): Don't treat END DO like END IF and
3445 END SELECT.
3446 (parse_do_block): Generate possible END DO label inside END DO
3447 block.
3448
5b1374e9
TS
3449 PR fortran/17776
3450 * check.c (gfc_check_system_sub): New function.
3451 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
3452 * intrinsic.c (add_functions): Add 'system'.
3453 (add_subroutines): Add 'system'.
3454 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
3455 Move prototypes to other suborutines.
3456 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3457 Add prototype.
3458 (gfc_resolve_system_clock): Fix formatting of prototype.
3459 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3460 functions.
3461 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3462 GFC_ISYM_SYSTEM.
3463
d7d528c8
ES
34642004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
3465
3466 * scanner.c (preprocessor_line): Accept preprocessor lines without
3467 file names. Check file names for closing quotes. Handle escaped
3468 quotes in file names.
3469
ca2940c3
TS
34702004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3471 Paul Brook <paul@codesourcery.com>
3472
3473 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3474 Use gfc_get_expr_charlen.
3475 * trans-expr.c (gfc_get_expr_charlen): New function.
3476 * trans.h (gfc_get_expr_charlen): Add prototype.
3477
b805ea17
KH
34782004-10-04 Kazu Hirata <kazu@cs.umass.edu>
3479
3480 * trans-intrinsic.c: Fix a comment typo.
3481
03ddaf35
TS
34822004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3483
3484 * simplify.c (range_check): Remove blank line at beginning of function.
3485 (gfc_simplify_dint): Same at end of function.
3486 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3487 (gfc_simplify_bound): Fix indentation.
3488 (gfc_simplify_log10): Simplify calculation.
3489 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3490 of function.
3491 (gfc_simplify_nearest): Same at end of function.
3492 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3493 function.
3494 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3495 gfc_simplify_spacing): Simplify calulations.
3496
046dcd57
FW
34972004-10-03 Feng Wang <fengwang@nudt.edu.cn>
3498
3499 * trans-intrinsic.c: Fix comments on spacing and rrspacing
3500 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3501
0f0377f6
JH
35022004-10-01 Jan Hubicka <jh@suse.cz>
3503
3504 * f95-lang.c (gfc_expand_function): Update call of
3505 tree_rest_of_compilation.
3506 * trans-decl.c (gfc_generate_constructors): Likewise.
3507
68629d16
TS
35082004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3509
3510 * trans-intrinsic.c: Comment fixes.
3511
75d17889
TS
35122004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3513
3514 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3515
206fb0a7
TS
35162004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3517
3518 * trans-types.c (gfc_return_by_reference): Remove superfluous
3519 assertion.
3520
c0c07d7b
TS
3521 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3522 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3523
3524 PR fortran/17615
3525 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3526 function to determine return type.
a1286ef5 3527
8f235343
JH
35282004-09-20 Jan Hubicka <jh@suse.cz>
3529
3530 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3531 tree.
3532 (gfc_generate_function_code): Likewise.
3533
da89fba8
TS
35342004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3535
3536 PR fortran/15957
3537 * simplify.c (gfc_simplify_reshape): Set shape of return value
3538 correctly.
3539
6615c446
JO
35402004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3541 Zack Weinberg <zack@codesourcery.com>
3542
3543 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3544 enumeration constants.
3545
4cdf7223
PB
35462004-09-17 Paul Brook <paul@codesourcery.com>
3547
3548 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3549 (gfc_linebuf_header_size): Define.
3550 * scanner.c (load_file): Use it.
3551
1f2959f0
KH
35522004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3553
3554 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3555 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3556 resolve.c, scanner.c, trans-array.c, trans-array.h,
3557 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3558 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3559 trans.h: Fix comment typos. Follow spelling conventions.
3560
d2ccf6aa
VL
35612004-09-16 Victor Leikehman <lei@il.ibm.com>
3562
3563 PR/15364
3564 * trans-io.c (transfer_array_component): New function.
3565 (transfer_expr): For array fields, call transfer_array_component.
3566
de787a96
KH
35672004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3568
3569 * gfortran.texi: Fix a typo.
3570
81871c2a 35712004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
f13ab1ee
AL
3572
3573 * parse.c (eof_buf): Rename eof to eof_buf.
3574 (unexpected_eof): Same.
3575 (gfc_parse_file): Same.
3576
0110c1ec
SK
35772004-09-15 Steven G. Kargl <kargls@comcast.net>
3578
3579 * check.c (gfc_check_getcwd_sub): New function.
3580 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3581 * intrinsic.c (add_functions): Add function definition;
3582 Use symbol.
3583 * intrinsic.c (add_subroutines): Add subroutine definitions.
3584 * intrinsic.h: Add prototypes.
3585 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3586 New functions.
3587 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3588
4672f86a
TS
35892004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3590
3591 PR fortran/16485
3592 * module.c (write_symbol): Don't fill in module name here.
3593 (write_symbol0): Fill in here instead.
3594
13795658
KH
35952004-09-14 Kazu Hirata <kazu@cs.umass.edu>
3596
3597 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3598 trans-array.c, trans-common.c, trans-expr.c,
3599 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3600 comment typos. Follow spelling conventions.
3601
4d28e183
PB
36022004-09-09 Paul Brook <paul@codesourcery.com>
3603
3604 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3605
6e45f57b
PB
36062004-09-08 Paul Brook <paul@codesourcery.com>
3607
3608 * array.c: Don't include assert.h.
3609 * data.c: Don't include assert.h. Replace assert and abort with
3610 gcc_assert and gcc_unreachable.
3611 * dependency.c: Ditto.
3612 * f95-lang.c: Ditto.
3613 * iresolve.c: Ditto.
3614 * resolve.c: Ditto.
3615 * simplify.c: Ditto.
3616 * symbol.c: Ditto.
3617 * trans-array.c: Ditto.
3618 * trans-common.c: Ditto.
3619 * trans-const.c: Ditto.
3620 * trans-decl.c: Ditto.
3621 * trans-expr.c: Ditto.
3622 * trans-intrinsic.c: Ditto.
3623 * trans-io.c: Ditto.
3624 * trans-stmt.c: Ditto.
3625 * trans-types.c: Ditto.
3626 * trans.c: Ditto.
3627
c8cc8542
PB
36282004-09-07 Per Bothner <per@bothner.com>
3629 Paul Brook <paul@codesourcery.com>
3630
3631 * error.c (show_locus): Handle mapped locations.
3632 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3633 * gfortran.h: Include input.h.
3634 (struct gfc_linebuf): Use source_location.
3635 * scanner.c (get_file): Initialize linemap.
3636 (preprocessor_line): Pass extra argument to get_file.
3637 (load_file): Ditto. Setup linemap.
3638 (gfc_new_file): Handle mapped locations.
3639 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3640 Set decl source locations.
3641 (gfc_trans_common): Set blank common block location.
3642 * trans-decl.c (gfc_set_decl_location): New function.
3643 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3644 (trans_function_start): Move call to gfc_set_backend_locus..
3645 (build_function_decl): ... to here.
3646 (build_entry_thunks): Set and restore the backend locus.
3647 (gfc_generate_constructors): Remove excess arguments to
3648 init_function_start.
3649 (gfc_generate_block_data): Add comments. Set the decl locus.
3650 * trans-io.c (set_error_locus): Handle mapped locations.
3651 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3652 (gfc_trans_code): Use SET_EXPR_LOCATION.
3653 (gfc_generate_code): Override the location of the new symbol.
3654 * trans.h (gfc_set_decl_location): Add prototype.
3655
4c97f95a
PB
36562004-08-31 Paul Brook <paul@codesourcery.com>
3657
3658 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3659
c3d0559d
TS
36602004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3661
3662 PR fortran/15327
3663 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3664 strings.
3665
0e6928d8
TS
36662004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3667
3668 PR fortran/16400
3669 PR fortran/16404
3670 (port from g95)
3671 * resolve.c (resolve_transfer): New function.
3672 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3673
149a42dd
TS
36742004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3675
3676 PR fortran/16579
3677 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3678 unsigned char.
3679
c4dd5a8d
TS
36802004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3681
3682 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3683
cf73cdac
TS
36842004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3685
3686 PR fortran/17244
3687 * trans-types.c (gfc_return_by_reference): Remove TODO error,
3688 add comment pointing out possible issue WRT compatibility with g77.
3689
d7177ab2
TS
36902004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3691
3692 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3693 all occurences of 'gfc_strlen_type_node' by
3694 'gfc_charlen_type_node'.
3695 * trans-types.h: Same. Also update comment accordingly.
3696
d1d61a00
TS
36972004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3698
3699 * primary.c: Update copyright boilerplate to say GCC.
f36327db 3700 * f95-lang.c: Change initial comment to say gfortran.
d1d61a00 3701
da17f559
PB
37022004-08-31 Paul Brook <paul@codesourcery.com>
3703
3704 * trans-types.h: Add comments.
3705 (intmax_type_node, string_type_node, const_string_type_node): Remove.
3706
e2cad04b
RH
37072004-08-30 Richard Henderson <rth@redhat.com>
3708
3709 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3710 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3711 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3712 c_long, c_long_long.
3713 (gfc_logical_info): Add c_bool.
3714 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3715 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3716 rather than gfc_int[48]_type_node for allocate choice.
3717 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3718 local copies of some kind type nodes.
3719 (gfc_build_builtin_function_decls): Likewise.
3720 * trans-expr.c (gfc_conv_power_op): Likewise.
3721 * trans-intrinsic.c (gfc_conv_intrinsic_index,
3722 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3723 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3724 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3725 gfc_trans_character_select, gfc_trans_allocate): Likewise.
3726 * trans-io.c (gfc_pint4_type_node): Move into ...
3727 (gfc_build_io_library_fndecls): ... here. Cache local copies of
3728 some kind type nodes.
3729 * trans-types.c (gfc_type_nodes): Remove.
3730 (gfc_character1_type_node, gfc_strlen_type_node): New.
3731 (gfc_integer_types, gfc_logical_types): New.
3732 (gfc_real_types, gfc_complex_types): New.
3733 (gfc_init_kinds): Fill in real mode_precision.
3734 (gfc_build_int_type, gfc_build_real_type): New.
3735 (gfc_build_complex_type, gfc_build_logical_type): New.
3736 (c_size_t_size): New.
3737 (gfc_init_types): Loop over kinds.
3738 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3739 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3740 (gfc_get_character_type_len): Likewise.
3741 (gfc_type_for_size): Loop over kinds; use a reduced set of
3742 unsigned type nodes.
3743 (gfc_type_for_mode): Loop over kinds.
3744 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3745 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3746 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3747 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3748 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3749 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3750 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3751 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3752 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3753 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3754 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3755 gfc_complex8_type_node, gfc_complex16_type_node,
3756 gfc_logical1_type_node, gfc_logical2_type_node,
3757 gfc_logical4_type_node, gfc_logical8_type_node,
3758 gfc_logical16_type_node, gfc_strlen_kind): Remove.
3759 (gfc_character1_type_node): Turn in to a variable.
3760 (gfc_strlen_type_node): Likewise.
3761
0de4325e
TS
37622004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3763
3764 * gfortran.h (gfc_namespace): Add new field is_block_data.
3765 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3766 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3767 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3768 * trans.h (gfc_generate_block_data): Add prototype.
3769 * trans-decl.c (gfc_generate_block_data): New function.
3770
04204c2f
RH
37712004-08-29 Richard Henderson <rth@redhat.com>
3772
3773 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3774 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3775 than two HOST_WIDE_INT.
3776
294fbfc8
TS
37772004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3778
3779 PR fortran/13910
3780 * decl.c (free_variable, free_value, gfc_free_data, var_list,
3781 var_element, top_var_list, match_data_constant, top_val_list,
3782 gfc_match_data): Move here from match.c.
3783 (match_old_style_init): New function.
3784 (variable_decl): Match old-style initialization.
3785 * expr.c (gfc_get_variable_expr): New function.
3786 * gfortran.h (gfc_get_variable_expr): Add prototype.
3787 * gfortran.texi: Start documentation for supported extensions.
3788 * match.c: Remove the functions moved to decl.c.
3789 * match.h (gfc_match_data): Move prototype to under decl.c.
3790 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3791 comments.
3792
e8525382
SK
37932004-08-29 Steven G. Kargl <kargls@comcast.net>
3794 Paul Brook <paul@codesourcery.com>
3795
3796 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3797 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3798 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3799 (build_builtin_fntypes): New function.
3800 (gfc_init_builtin_functions): Use it.
3801 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3802 and GFC_ISYM_ERF{,C}.
3803 (gfc_c_int_kind): Declare.
3804 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3805 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3806 gfc_resolve_g77_math1): Add prototypes.
3807 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3808 * mathbuiltins.def: Add comment. Change third argument. Use
3809 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
3810 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3811 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3812 * trans-types.c (gfc_c_int_kind): Declare.
3813 (gfc_init_kinds): Set it.
3814
4c0c6b9f
SK
38152004-08-29 Steven G. Kargl <kargls@comcast.net>
3816 Paul Brook <paul@codesourcery.com>
3817
3818 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3819 (gfc_check_f, gfc_simplify_f): Add f0.
3820 * intrinsic.c (do_check): Call f0. Flatten.
3821 (add_sym_0): Fix prototype. Set f0.
3822 (add_functions): Add getgid, getgid and getuid.
3823 (resolve_intrinsic): Remove obsolete comment.
3824 (do_simplify): Call f0.
3825 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3826 gfc_resolve_getuid): Add prototypes.
3827 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3828 gfc_resolve_getuid): New functions.
3829 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3830 GFC_ISYM_GET?ID.
3831
1f05db63
TS
38322004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3833
3834 * error.c (gfc_error_init_1): Remove blank line in front of
3835 function body. Add missing blank.
3836 (gfc_buffer_error, error_char, error_string): Remove blank line in
3837 front of function body.
3838 (show_locus): Add comma in comment.
3839 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3840 gfc_push_error, gfc_pop_error): Remove blank line in front of
3841 function body.
3842 (gfc_get_errors): Typo fix in comment in front of function. Remove
3843 blank line in front of function body.
3844
9d64df18
TS
38452004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3846
3847 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3848 variable declaration of same name.
3849 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3850 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3851 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3852 Replace all calls to gfc_default_*_kind with variable accesses.
3853 * trans-types.c: Same as above.
3854 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3855 static qualifier. Replace all occurences.
3856 (gfc_default_*_kind): Remove functions.
3857
5e8e542f
RH
38582004-08-26 Richard Henderson <rth@redhat.com>
3859
6615c446
JO
3860 * arith.c: Include system.h, not real system headers.
3861 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3862 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3863 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3864 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3865 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3866 gfc_index_integer_kind, gfc_default_integer_kind,
3867 gfc_default_real_kind,gfc_default_double_kind,
3868 gfc_default_character_kind, gfc_default_logical_kind,
3869 gfc_default_complex_kind, validate_integer, validate_real,
3870 validate_logical, validate_character,
3871 gfc_validate_kind): Move to trans-types.c.
3872 (gfc_set_model_kind): Use gfc_validate_kind.
3873 (gfc_set_model): Just copy the current precision to default.
3874 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3875 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3876 * gfortran.h: Update file commentary.
3877 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3878 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3879 gfc_default_double_kind_1, gfc_default_character_kind_1,
3880 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3881 (gfc_init_kinds): New.
3882 (gfc_init_types): Don't set gfc_index_integer_kind here.
3883 * trans-types.h (gfc_init_kinds): Declare.
5e8e542f
RH
3884 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3885
a1bab9ea
TS
38862004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3887
3888 * check.c (gfc_check_atan2): New function.
3889 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3890 * intrinsic.h (gfc_check_atan2): Add prototype.
3891
e7a2d5fb
RH
38922004-08-25 Richard Henderson <rth@redhat.com>
3893
3894 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3895 false and we don't validate the kind.
3896 (gfc_check_integer_range, gfc_check_real_range): Update to match.
3897 * check.c (kind_check): Likewise.
3898 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3899 (match_char_spec, match_logical_spec): Likewise.
3900 * gfortran.h (gfc_validate_kind): Likewise.
3901 * options.c (gfc_handle_option): Likewise.
3902 * primary.c (match_integer_constant, match_real_constant,
3903 match_string_constant, match_logical_constant,
3904 match_const_complex_part): Likewise.
3905 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3906 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3907 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3908 gfc_simplify_maxexponent, gfc_simplify_minexponent,
3909 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3910 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3911 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3912 gfc_simplify_tiny): Likewise.
3913 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3914 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3915 prepare_arg_info): Likewise.
3916
6d1c50cc
TS
39172004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3918
3919 * expr.c (gfc_check_assign): Add comment. Add new warning.
3920 * trans-expr.c (gfc_conv_function_call): Correctly dereference
3921 result of pointer valued function when not in pointer assignment.
3922
75101feb
PB
39232004-08-25 Paul Brook <paul@codesourcery.com>
3924
3925 * config-lang.in: Remove dead commented line.
3926 * module.c: Replace g95 with gfortran in comment.
3927
9ca2b0db
PB
39282004-08-25 Paul Brook <paul@codesourcery.com>
3929
3930 PR fortran/17190
3931 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3932
40f20186
PB
39332004-08-25 Paul Brook <paul@codesourcery.com>
3934
3935 PR fortran/17144
3936 * trans-array.c (gfc_trans_allocate_temp_array): Remove
3937 string_length argument.
3938 (gfc_trans_array_ctor_element): New function.
3939 (gfc_trans_array_constructor_subarray): Use it.
3940 (gfc_trans_array_constructor_value): Ditto. Handle constant
3941 character arrays.
3942 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3943 (gfc_trans_array_constructor): Use them.
3944 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3945 (gfc_conv_ss_descriptor): Remember section string length.
3946 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
3947 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3948 (gfc_conv_expr_descriptor): Ditto.
3949 (gfc_conv_loop_setup): Ditto. Spelling fixes.
3950 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3951 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
3952 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3953 (gfc_conv_variable): Set string_length from section.
3954 (gfc_conv_function_call): Remove extra argument.
3955 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3956 * trans-types.c (gfc_get_character_type_len): New function.
3957 (gfc_get_character_type): Use it.
3958 (gfc_get_dtype): Return zero for internal types.
3959 * trans-types.h (gfc_get_character_type_len): Add prototype.
3960 * trans.h (struct gfc_ss): Move string_length out of union.
3961
923ab88c
TS
39622004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3963
3964 * trans.h (build2_v, build3_v): New macros.
3965 (build_v): Remove.
3966 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3967 build.
3968 * trans-array.c (gfc_conv_descriptor_data,
3969 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
6615c446 3970 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
923ab88c
TS
3971 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3972 gfc_trans_allocate_temp_array,
3973 gfc_trans_array_constructor_subarray,
3974 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3975 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3976 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3977 gfc_conv_array_ref, gfc_trans_preloop_setup,
3978 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3979 gfc_conv_loop_setup, gfc_array_init_size,
3980 gfc_conv_array_initializer, gfc_trans_array_bounds,
3981 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3982 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3983 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3984 of build and build_v as appropriate.
3985 * trans-common.c (create_common): Same.
3986 * trans-decl.c (gfc_trans_auto_character_variable,
3987 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3988 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3989 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3990 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3991 gfc_conv_expr_op, gfc_conv_function_call,
3992 gfc_trans_structure_assign): Same.
3993 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3994 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3995 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3996 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3997 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3998 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3999 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
4000 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
4001 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
4002 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
4003 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
4004 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
4005 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
4006 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
4007 gfc_conv_intrinsic_iargc): Same.
4008 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
4009 set_flag, add_case, io_result, transfer_namelist_element,
4010 transfer_expr): Same.
4011 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
4012 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
4013 gfc_trans_integer_select, gfc_trans_logical_select,
4014 gfc_trans_character_select, gfc_trans_forall_loop,
4015 gfc_trans_nested_forall_loop, gfc_do_allocate,
4016 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4017 compute_inner_temp_size, compute_overall_iter_number,
4018 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
4019 gfc_trans_forall_1, gfc_evaluate_where_mask,
4020 gfc_trans_where_assign, gfc_trans_allocate): Same.
4021 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
4022 * trans.c (gfc_add_modify_expr, gfc_finish_block,
4023 gfc_build_array_ref, gfc_build_function_call,
4024 gfc_trans_runtime_check): Same.
4025
0cc4be67
TS
40262004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4027
6615c446 4028 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
0cc4be67
TS
4029 build_int_cst to build_int_cst_wide in accordance to Nathan's
4030 previous patch.
4031
7d60be94
NS
40322004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4033
4034 * trans-array.c (gfc_trans_array_constructor_value): Adjust
4035 build_int_cst calls.
4036 * trans-const.c (gfc_build_string_const, gfc_init_constants,
4037 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
4038 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
4039 gfc_trans_entry_master_switch): Likewise.
4040 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4041 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4042 * trans-io.c (add_case, set_error_locus,
4043 transfer_namelist_element, transfer_expr): Likewise.
4044 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4045 gfc_trans_stop, gfc_trans_character_select): Likewise.
4046 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4047 * trans.c (gfc_trans_runtime_check): Likewise.
4048
45ede75e
TS
40492004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4050
6615c446 4051 * trans-decl.c, trans-types.c: Add and remove blank lines as
45ede75e
TS
4052 required.
4053
0c8eb998
RH
40542004-08-24 Richard Henderson <rth@redhat.com>
4055
4056 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
4057
de37af8c
TS
40582004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4059
6615c446 4060 * resolve.c (merge_argument_lists): Revert unintentionally
de37af8c 4061 committed change.
6615c446 4062
7be7d41b
TS
40632004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4064
4065 * trans-decl.c (build_function_decl): Fix spelling in comment.
4066 (build_entry_thunks): Remove code with no function.
4067 (gfc_build_intrinsic_function_decls): Remove empty line.
4068
4069 * resolve.c (resolve_entries): Fix a bunch of comment typos.
4070
8c1d6d62
NS
40712004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4072
7d60be94 4073 * f95-lang.c (gfc_init_decl_processing): Adjust
8c1d6d62
NS
4074 build_common_tree_nodes call.
4075
436529ea
TS
40762004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4077
4078 * trans-types.c: Spelling and formatting fixes.
4079
5f0ae953
RH
40802004-08-23 Richard Henderson <rth@redhat.com>
4081
4082 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
4083 of going through an intermediate string. Fix 32/64 int/long bug.
4084
f676971a
EC
40852004-08-23 Eric Christopher <echristo@redhat.com>
4086
4087 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
4088 usage. Use build_vector_type_for_mode for vector types.
4089
b8502435
RH
40902004-08-22 Richard Henderson <rth@redhat.com>
4091
4092 PR 13465
6615c446
JO
4093 * data.c (find_con_by_offset): Search ordered list; handle
4094 elements with repeat counts.
4095 (gfc_assign_data_value_range): New.
4096 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
4097 (gfc_assign_data_value_range): Declare.
4098 * match.c (top_val_list): Extract repeat count into a temporary.
4099 * resolve.c (values): Make left unsigned.
4100 (next_data_value): Don't decrement left.
4101 (check_data_variable): Use gfc_assign_data_value_range.
b8502435 4102
f8d0aee5
TS
41032004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4104
4105 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
4106
617097a3
TS
41072004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4108
4109 * check.c (gfc_check_reduction): Rename to ...
f676971a 4110 (check_reduction): ... this. Make static. Don't check type of
617097a3
TS
4111 first argument.
4112 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
4113 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
4114 SUM to use new check functions.
4115 (check_specific): Change logic to call new functions.
4116 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
4117 Add prototypes.
4118 (gfc_check_reduction): Remove prototype.
4119
841b0c1f
PB
41202004-08-20 Paul Brook <paul@codesourcery.com>
4121 Canqun Yang <canqun@nudt.edu.cn>
4122
4123 PR fortran/17077
4124 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
4125 for automatic arrays.
4126 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
4127
c874ae73 41282004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841b0c1f 4129 (Port from g95)
c874ae73 4130
841b0c1f 4131 PR fortran/17074
c874ae73
TS
4132 * match.c (match_simple_forall, match_simple_where): Forward-declare.
4133 (gfc_match_if): Order statement list alphabetically, add WHERE and
841b0c1f 4134 FORALL, remove double PAUSE.
c874ae73 4135 (gfc_match_simple_where, match_forall_header,
841b0c1f 4136 gfc_match_simple_forall): New functions.
c874ae73 4137 (gfc_match_forall): Use match_forall_header.
f676971a 4138
bbef13dc
PB
41392004-08-19 Paul Brook <paul@codesourcery.com>
4140
4141 PR fortran/17091
4142 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
4143 * symbol.c (gfc_clear_attr): Use memset.
4144
ec53454b
PB
41452004-08-19 Paul Brook <paul@codesourcery.com>
4146
4147 PR fortran/14976
f676971a 4148 PR fortran/16228
ec53454b
PB
4149 * data.c (assign_substring_data_value): Remove.
4150 (create_character_intializer): New function.
4151 (gfc_assign_data_value): Track the typespec for the current
4152 subobject. Use create_character_intializer.
4153
292e0d3a
ES
41542004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
4155
4156 PR fortran/16946
4157 * check.c (gfc_check_reduction): New function.
4158 (gfc_check_minval_maxval): Removed.
4159 (gfc_check_product): Removed.
4160 (gfc_check_sum): Removed.
4161 * intrinsic.h: Add/remove declarations for these.
4162 * gfortran.h: Add field f3red to union gfc_check_f.
4163 * intrinsic.c (add_sym_3red): New function.
4164 (add_functions): Register maxval, minval, product, and sum intrinsics
4165 through add_sym_3red.
4166 (check_specific): Handle f3red union field.
4167 * iresolve.c: Whitespace change.
4168
1619aa6f
PB
41692004-08-18 Paul Brook <paul@codesourcery.com>
4170
4171 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
4172
3bc268e6
VL
41732004-08-18 Victor Leikehman <lei@il.ibm.com>
4174
4175 PR fortran/13278
4176 * trans-io.c (transfer_namelist_element): New. Recursively handle
4177 derived-type variables. Pass string lengths.
4178 (build_dt): Code moved to build_namelist, with some
4179 changes and additions.
4180 (gfc_build_io_library_fndecls): Declare the fifth
4181 argument in st_set_nml_var_char -- string_length.
4182
3d79abbd
PB
41832004-08-17 Paul Brook <paul@codesourcery.com>
4184 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4185
4186 PR fortran/13082
4187 * decl.c (get_proc_name): Update mystery comment.
4188 (gfc_match_entry): Check for errors earlier. Add entry point to list.
4189 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
4190 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
4191 (struct gfc_entry_list): Define.
4192 (gfc_get_entry_list): Define.
4193 (struct gfc_namespace): Add refs and entries.
4194 (enum gfc_exec_op): Add EXEC_ENTRY.
4195 (struct gfc_code): Add ext.entry.
4196 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
4197 (mio_symbol_attribute): Don't save/reture addr->entry.
4198 (mio_namespace_ref): Refcount namespaces.
4199 * parse.c (accept_statement): Handle ST_ENTRY.
4200 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
4201 (parse_contained): Fixup sibling references to entry points
4202 after parsing the procedure body.
4203 * resolve.c (resolve_contained_fntype): New function.
4204 (merge_argument_lists, resolve_entries): New functions.
4205 (resolve_contained_functions): Use them.
4206 (resolve_code): Handle EXEC_ENTRY.
4207 (gfc_resolve): Call resolve_entries.
4208 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
4209 * symbol.c (gfc_get_namespace): Refcount namespaces.
4210 (gfc_free_namespace): Ditto.
4211 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
4212 optional when multiple entry points are present.
4213 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
4214 (gfc_get_extern_function_decl): Add assertion. Fix coment.
4215 (create_function_arglist, trans_function_start, build_entry_thunks):
4216 New functions.
4217 (gfc_build_function_decl): Rename ...
4218 (build_function_decl): ... to this.
4219 (gfc_create_function_decl): New function.
4220 (gfc_generate_contained_functions): Use it.
4221 (gfc_trans_entry_master_switch): New function.
4222 (gfc_generate_function_code): Use new functions.
4223 * trans-stmt.c (gfc_trans_entry): New function.
4224 * trans-stmt.h (gfc_trans_entry): Add prototype.
4225 * trans-types.c (gfc_get_function_type): Add entry point argument.
4226 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
4227 (gfc_generate_module_code): Call gfc_create_function_decl.
4228 * trans.h (gfc_build_function_decl): Remove.
4229 (gfc_create_function_decl): Add prototype.
4230
ead6d15f
AP
42312004-08-15 Andrew Pinski <apinski@apple.com>
4232
4233 PR fortran/17030
4234 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
4235 for cabs{,f} and copysign{,f}.
f676971a
EC
4236 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
4237 (gfor_fndecl_math_cabs): Delete.
4238 (gfor_fndecl_math_sign4): Delete.
4239 (gfor_fndecl_math_sign8): Delete.
ead6d15f
AP
4240 (gfc_build_intrinsic_function_decls): Remove the
4241 initializing of cabs{,f} and copysign{,f} functions.
4242 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
4243 instead of the functions definitions.
4244 (gfc_conv_intrinsic_sign): Likewise.
f676971a
EC
4245 * trans.h (gfor_fndecl_math_cabsf): Delete.
4246 (gfor_fndecl_math_cabs): Delete.
4247 (gfor_fndecl_math_sign4): Delete.
4248 (gfor_fndecl_math_sign8): Delete.
ead6d15f 4249
4a90aeeb
NS
42502004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4251
4252 * trans-array.c (gfc_trans_array_constructor_value): Use
f676971a 4253 build_int_cst.
4a90aeeb
NS
4254 * trans-const.c (gfc_build_string_const,
4255 gfc_init_constants, gfc_conv_mpz_to_tree,
f676971a 4256 gfc_conv_constant_to_tree): Likewise.
4a90aeeb
NS
4257 * trans-decl.c (gfc_get_symbol_decl): Likewise.
4258 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
4259 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
4260 * trans-io.c (add_case, set_error_locus, build_dt,
4261 transfer_expr): Likewise.
4262 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
4263 gfc_trans_stop, gfc_trans_character_select): Likewise.
4264 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
4265 * trans.c (gfc_trans_runtime_check): Likewise.
4266
1d754240
PB
42672004-08-14 Paul Brook <paul@codesourcery.com>
4268
4269 * trans-decl.c (gfc_build_function_decl): Remove dead code.
4270
3ef059b4
PB
42712004-08-14 Paul Brook <paul@codesourcery.com>
4272
4273 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
4274
4f613946
TS
42752004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4276
4277 * gfortran.h: Add comments.
4278 * parse.c (parse_contained): Fix comment typo.
4279 * resolve.c (was_declared): Ditto.
4280 * symbol.c: Ditto.
4281
3ec0f302
PB
42822004-08-11 Paul Brook <paul@codeourcery.com>
4283
4284 PR fortran/16917
4285 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
4286
1a186ec5
RH
42872004-08-10 Richard Henderson <rth@redhat.com>
4288
4289 * f95-lang.c (gfc_init_builtin_functions): Remove
4290 __builtin_stack_alloc, add __builtin_alloca.
4291 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
4292 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4293
2bf26ede
PB
42942004-08-10 Paul Brook <paul@codesourcery.com>
4295
4296 * trans-io.c (transfer_expr): Handle pointters.
4297
e9cfef64
PB
42982004-08-10 Paul Brook <paul@codesourcery.com>
4299
4300 PR fortran/16919
4301 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
4302 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
4303 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
4304 Handle GFC_SS_COMPONENT.
4305 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
4306 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
4307 Use ss->shape.
4308 (gfc_conv_array_initializer): Call specific initializer routines.
4309 * trans-expr.c (gfc_trans_structure_assign): New function.
4310 (gfc_trans_subarray_assign): New function.
4311 (gfc_trans_subcomponent_assign): New fucntion
4312 (gfc_conv_structure): Use them.
4313 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
4314 (gfc_ss): Add shape.
4315
94538bd1
VL
43162004-08-08 Victor Leikehman <lei@il.ibm.com>
4317
4318 * simplify.c (gfc_simplify_shape): Bugfix.
4319 * expr.c (gfc_copy_shape_excluding): New function.
4320 * gfortran.h (gfc_get_shape): Bugfix.
4321 (gfc_copy_shape_excluding): Added declaration.
4322 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
4323 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
4324 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
4325 time resolution of shape.
4326
aa6fc635
JB
43272004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
4328
4329 * intrinsic.c (add_subroutines): Add getenv and
4330 get_environment_variable. (add_sym_5s): New function.
4331 * intrinsic.h (gfc_resolve_get_environment_variable): Add
4332 prototype.
4333 * iresolve.c (gfc_resolve_get_environment_variable): New
4334 function.
4335
c7d78bbe
FW
43362004-08-06 Feng Wang <fengwang@nudt.edu.cn>
4337
4338 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
4339 __builtin_pow[f] arguments.
4340
f8e566e5
SK
43412004-08-06 Steven G. Kargl <kargls@comcast.net>
4342
4343 * arith.c: Add #define for model numbers. Remove global GMP variables.
4344 (natural_logarithm,common_logarithm,exponential,sine,
4345 cosine,arctangent,hypercos,hypersine ): Remove.
4346 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
4347 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
4348 gfc_check_real_range, gfc_constant_result, gfc_range_check,
4349 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
4350 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
4351 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
4352 gfc_convert_complex,gfc_int2real,gfc_int2complex,
4353 gfc_real2int,gfc_real2real,gfc_real2complex,
4354 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
4355 to MPFR, use new functions.
4356 * arith.h: Remove extern global variables.
4357 (natural_logarithm,common_logarithm,exponential, sine, cosine,
4358 arctangent,hypercos,hypersine): Remove prototypes.
4359 (arctangent2): Update prototype from GMP to MPFR.
4360 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
4361 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
4362 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
4363 * gfortran.h (GFC_REAL_BITS): Remove.
4364 (arith): Add ARITH_NAN.
4365 Include mpfr.h. Define GFC_RND_MODE.
4366 Rename GCC_GFORTRAN_H GFC_GFC_H.
4367 (gfc_expr): Convert GMP to MPFR.
4368 * module.c: Add arith.h, correct type in comment.
4369 (mio_gmp_real): Convert GMP to MPFR.
4370 (mio_expr): Use gfc_set_model_kind().
4371 * primary.c: Update copyright date with 2004.
4372 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
4373 * simplify.c: Remove global GMP variables
4374 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
4375 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
4376 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
4377 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
4378 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
4379 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
4380 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
4381 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
4382 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
4383 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
4384 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
4385 gfc_simplify_rrspacing,gfc_simplify_scale,
4386 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
4387 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
4388 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
4389 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
4390 Use new functions.
4391 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
4392 gfc_conv_mpf_to_tree. Convert it to use MPFR
4393 (gfc_conv_constant_to_tree): Use it.
4394 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
4395 * trans-intrinsic.c: Add arith.h, remove gmp.h
4396 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
4397
fc90a8f2
PB
43982004-08-06 Victor Leikehman <lei@il.ibm.com>
4399 Paul Brook <paul@codesourcery.com>
4400
4401 * trans-array.c (gfc_trans_allocate_array_storage,
4402 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
4403 gfc_conv_loop_setup): For functions, if the shape of the result
4404 is not known in compile-time, generate an empty array descriptor for
4405 the result and let the callee to allocate the memory.
4406 (gfc_trans_dummy_array_bias): Do nothing for pointers.
4407 (gfc_conv_expr_descriptor): Use function return values directly.
4408 * trans-expr.c (gfc_conv_function_call): Always add byref call
4409 insn to pre chain.
4410 (gfc_trans_pointer_assignment): Add comments.
4411 (gfc_trans_arrayfunc_assign): Don't chain on expression.
4412
fc2d8429
RS
44132004-08-01 Roger Sayle <roger@eyesopen.com>
4414
4415 * options.c (gfc_init_options): Don't warn about the use GNU
4416 extensions by default.
4417 (gfc_post_options): Warn about GNU extensions with -pedantic.
4418 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
4419
0534fa56
RH
44202004-07-30 Richard Henderson <rth@redhat.com>
4421
4422 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
4423 for TREE_CONSTANTs.
4424
b785f485
RH
44252004-07-25 Richard Henderson <rth@redhat.com>
4426
4427 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
4428 and DECL_IGNORED_P on RESULT_DECL.
4429 (gfc_generate_constructors): Likewise.
4430
f56c5d5d
TS
44312004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4432
4433 PR fortran/16465
4434 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
4435 options.
4436 (ffixed-line-length-80, ffixed-line-length-132): Remove.
4437 * options.c (gfc_handle_options): Deal with changed options.
4438 * scanner.c (load_line): Change second arg to 'char **',
4439 allocate if pointing to NULL. Keep track of buffer's length.
4440 Adapt buffer size to overlong lines. Pad lines to full length
4441 in fixed form.
4442 (load_file): Adapt to new interface of load_line.
4443
6e34d3a3
JM
44442004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
4445
4446 * trans.h (builtin_function): Declare.
4447
c9583ed2
TS
44482004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4449
4450 PR fortran/16404
4451 (parts ported from g95)
4452 * parse.h (gfc_state_data): New field do_variable.
4453 (gfc_check_do_variable): Add prototype.
4454 * parse.c (push_state): Initialize field 'do_variable'.
4455 (gfc_check_do_variable): New function.
4456 (parse_do_block): Remember do iterator variable.
4457 (parse_file): Initialize field 'do_variable'.
4458 * match.c (gfc_match_assignment, gfc_match_do,
4459 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4460 Add previously missing checks.
4461 (gfc_match_return): Reformat error message.
4462 * io.c (match_out_tag): New function.
4463 (match_open_element, match_close_element,
4464 match_file_element, match_dt_element): Call match_out_tag
4465 instead of match_vtag where appropriate.
4466 (match_io_iterator, match_io_element): Add missing check.
4467 (match_io): Reformat error message.
4468 (match_inquire_element): Call match_out_tag where appropriate.
4469
b38b6477
TS
4470 * parse.c (gfc_check_do_variable): Fix error locus.
4471
d157d978
TS
44722004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4473
4474 PR fortran/15129
4475 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4476 for every assumed length character dummy argument.
4477
c5a41953
TS
4478 PR fortran/15140
4479 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
0c0df4b3
TS
4480
4481 PR fortran/13792
4482 * simplify.c (gfc_simplify_bound): Copy the bound expression.
4483
20c9dc8a
TS
44842004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4485
769d99d9 4486 PR fortran/15324
20c9dc8a
TS
4487 * trans-array.c gfc_trans_g77_array,
4488 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4489 for assumed length characters.
4490 (gfc_conv_expr_descriptor): Set se->string_length if dealing
4491 with a character expression.
4492 (gfc_cvonv_array_parameter): Pass string length when passing
4493 character array according to g77 conventions.
4494
597073ac
PB
44952004-07-12 Paul Brook <paul@codesourcery.com>
4496
4497 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4498 * trans-array.c (gfc_trans_auto_array_allocation): Remove
4499 initialization code.
4500 * trans-common.c (create_common): Use gfc_conv_initializer.
4501 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4502 * trans-expr.c (gfc_conv_initializer): New function.
4503 (gfc_conv_structure): Use it.
4504 * trans.h (gfc_conv_initializer): Add prototype.
4505
682e69e1
PB
45062004-07-11 Paul Brook <paul@codesourcery.com>
4507
4508 PR fortran/15986
4509 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4510 variables.
4511 (parse_contained): Mark contained symbols as referenced.
4512
87bdc5f8
TS
45132004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4514
953e6630 4515 PR fortran/16455
87bdc5f8
TS
4516 * module.c (gfc_dump_module, gfc_use_module): Print locus
4517 when opening of module file fails.
4518
cdde7b65
TS
4519 PR fortran/16404
4520 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
e08b5a75
TS
4521
4522 PR fortran/16404
4523 * match.c (gfc_match_program): A program name is obligatory.
4524 (gfc_match_return): RETURN in main program is an extension.
4525 (gfc_match_block_data): A space is required before a block data
4526 name.
88199e7c
TS
4527
4528 PR fortran/16433
4529 * primary.c (match_boz_constant): Call gfc_notify_std only if
4530 we actually have a non-standard boz-literal-constant.
4531
f23c5627
TS
4532 PR fortran/15754
4533 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4534 warning if assigning NULL().
4535
9dcf6e73
JM
45362004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
4537
4538 * f95-lang.c (set_block): Remove.
4539 (gfc_clear_binding_stack): New.
4540 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4541 (struct binding_level): Remove block_created_by_back_end.
4542 (clear_binding_level): Likewise.
4543 (poplevel): Don't handle block_created_by_back_end.
4544
9cbf8b41
TS
45452004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4546
4547 * trans-decl.c (gfc_create_module_variable): Nothing to do if
4548 symbol is in common, because we ...
4549 (gfc_generate_module_vars): Call gfc_trans_common.
4550
331c72f3
PB
45512004-07-10 Paul Brook <paul@codesourcery.com>
4552
4553 * trans-array.c (gfc_build_null_descriptor): New function.
4554 (gfc_trans_static_array_pointer): Use it.
4555 * trans-array.h (gfc_build_null_descriptor): Add prototype.
4556 * trans-expr.c (gfc_conv_structure): Handle array pointers.
4557
53814b8f 45582004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 4559
53814b8f
TS
4560 PR fortran/16336
4561 * decl.c (gfc_match_save): Use-associated common block
4562 doesn't collide.
4563 * gfortran.h (gfc_common_head): Add new field 'name'.
4564 Fix typo in comment after #endif.
4565 * match.c (gfc_get_common): Add new argument from_common,
4566 mangle name if flag is set, fill in new field in structure
4567 gfc_common_head.
4568 (match_common): Set new arg in call to gfc_get_common,
4569 use-associated common block doesn't collide.
4570 * match.h (gfc_get_common): Adapt prototype.
4571 * module.c (load_commons): Set new arg in call to
4572 gfc_get_common.
4573 * symbol.c (free_common_tree): New function.
4574 (gfc_free_namespace): Call new function.
4575 * trans-common.c (several functions): Remove argument
4576 'name', use name from gfc_common_head instead.
4577
7d76d73a
TS
45782004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4579
4580 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4581 and RHS match. Return early if the RHS is NULL().
4582
794ba78b
TS
4583 PR fortran/16336
4584 * match.c (match_common): Fix error reporting for used common.
4585
104b260c
TS
4586 PR fortran/15969
4587 * trans-expr.c (gfc_conv_structure): Handle initialization
4588 of scalar pointer components.
4589
24727d92
TS
4590 * parse.c (decode_statement): Fix matching of BLOCK DATA.
4591
77dc4103
TS
4592 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4593 by fix for PR 15481.
f676971a 4594
a8a6b603
TS
45952004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4596
4597 * trans-common.c: Fix whitespace issues, make variable names
4598 more readable.
4599 (create_common): Additionally, make loop logic more obvious.
4600
46012004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
ad6e2a18
TS
4602 Paul Brook <paul@codesourcery.com>
4603
4604 PR fortran/13415
4605 * trans-common.c (calculate_length): Remove ...
4606 (get_segment_info): Merge into here. Save field type.
4607 (build_field): Use saved type.
4608 (create_common, new_condition, new_segment, finish_equivalences):
4609 Use new get_segment_info.
4610 * trans-types.c: Update comment.
4611
8598a113 46122004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 4613
8598a113
TS
4614 PR fortran/14077
4615 * moduele.c (mio_symbol): Don't I/O initial values unless
4616 symbol is a parameter.
4617
4077d207 46182004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
f676971a 4619
4077d207
TS
4620 PR fortran/13201
4621 * resolve.c (resolve_symbol): Verify that the shape of a
4622 parameter array is not only explicit, but also constant.
4623 * array.c (gfc_is_compile_time_shape): New function.
4624 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4625
51281118
TS
46262004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4627
4628 PR fortran/15481
4629 PR fortran/13372
4630 PR fortran/13575
4631 PR fortran/15978
4632 * module.c (write_symbol, write_symtree): Remove workaround.
4633 * primary.c (match_actual_arglist): Enhance comment.
4634 (gfc_match_rvalue): Handle function call with first argument
4635 a keyword argument correctly.
4636 * resolve.c (resolve_symbol): Change call to
4637 gfc_set_default_type to issue error if no implicit type
4638 can be found.
4639 * trans-decl.c (gfc_create_module_variable): Remove workaround.
f676971a 4640
60c9a35b
PB
46412004-07-08 Paul Brook <paul@codesourcery.com>
4642
4643 * intrinsic.c (add_sym_4s): New function.
4644 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4645
b41b2534
JB
46462004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
4647 Paul Brook <paul@codesourcery.com>
4648
4649 PR fortran/15280
4650 PR fortran/15665
4651 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4652 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4653 * intrinsic.c (add_functions): Identify iargc. Add
4654 command_argument_count.
4655 (add_subroutines): Resolve getarg. Add get_command and
4656 get_command_argument.
4657 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4658 gfc_resolve_get_command_argument): Add prototypes.
4659 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4660 gfc_resolve_get_command_argument): New functions.
4661 * trans-decl.c (gfor_fndecl_iargc): New variable.
4662 (gfc_build_intrinsic_function_decls): Set it.
4663 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4664 (gfc_conv_intrinsic_function): Use it.
4665 * trans.h (gfor_fndecl_iargc): Declare.
4666
e62be46e
MK
46672004-07-04 Matthias Klose <doko@debian.org>
4668
4669 * Make-lang.in: Generate and install gfortran man page.
4670 * invoke.texi: Remove extra '@c man end'.
4671
8fff4fc1
RH
46722004-07-04 Richard Henderson <rth@redhat.com>
4673
4674 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4675
1107b970
PB
46762004-07-04 Paul Brook <paul@codesourcery.com>
4677
4678 * decl.c (gfc_match_implicit_range): Don't use typespec.
4679 (gfc_match_implicit): Handle character selectors.
4680 * gfortran.h (gfc_set_implicit): Remove prototype.
4681 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4682 * parse.c (accept_statement): Don't call gfc_set_implicit.
4683 * symbol.c (new_ts): Remove.
4684 (gfc_set_implicit_none): Use same loop bounds as other functions.
4685 (gfc_set_implicit): Remove.
4686 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4687 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4688
4025c040
RH
46892004-06-30 Richard Henderson <rth@redhat.com>
4690
276b3fab
RH
4691 * match.c (var_element): Remove unused variable.
4692
4025c040
RH
4693 * trans-decl.c (gfc_generate_function_code): Don't set
4694 x_whole_function_mode_p.
4695 (gfc_generate_constructors): Likewise.
4696
6a0bec2c
RH
46972004-06-30 Richard Henderson <rth@redhat.com>
4698
4699 * trans-decl.c (gfc_generate_function_code): Don't set
4700 immediate_size_expand.
4701 (gfc_generate_constructors): Likewise.
4702
e5ddaa24
TS
47032004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4704
4705 PR fortran/16161
4706 * decl.c (gfc_match_type_spec): Rename second argument to
4707 'implicit_flag', reverse meaning. Don't match_char_spec if
4708 'implicit_flag' is set. Rename to ...
4709 (match_type_spec): ... this.
4710 (gfc_match_implicit_none, match_implicit_range): Move here
4711 from match.c.
4712 (gfc_match_implicit): Move here from match.c, try to
4713 match_char_len if match_implicit_range doesn't succeed for
4714 CHARACTER implicits. Call renamed fucntion match_type_spec.
4715 (gfc_match_data_decl, match_prefix): Call renamed function
4716 match_type_spec.
4717 * match.c (gfc_match_implicit_none, match_implicit_range,
4718 gfc_match_implicit): Move to decl.c.
4719 * match.h (gfc_match_implicit_none, gfc_match_implicit):
4720 Move protoypes to section 'decl.c'.
4721 (gfc_match_type_spec): Remove prototype.
4722
ef558756
TS
47232004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4724
f676971a 4725 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
ef558756
TS
4726 copyright years.
4727
7ab92584
SB
47282004-06-29 Steven Bosscher <stevenb@suse.de>
4729
4730 Make sure types in assignments are compatible. Mostly mechanical.
4731 * trans-const.h (gfc_index_one_node): New define.
4732 * trans-array.c (gfc_trans_allocate_array_storage,
4733 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4734 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4735 gfc_conv_array_ubound, gfc_conv_array_ref,
4736 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4737 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4738 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4739 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4740 types in assignments, conversions and conditionals for expressions.
4741 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4742 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4743 gfc_conv_function_call, gfc_trans_pointer_assignment,
4744 gfc_trans_scalar_assign): Likewise.
4745 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4746 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4747 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4748 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4749 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4750 gfc_conv_allocated, gfc_conv_associated,
4751 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4752 * trans-io.c (set_string): Likewise.
4753 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4754 gfc_do_allocate, generate_loop_for_temp_to_lhs,
4755 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4756 compute_overall_iter_number, gfc_trans_assign_need_temp,
4757 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4758 gfc_evaluate_where_mask, gfc_trans_where_assign,
4759 gfc_trans_where_2): Likewise.
4760 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4761 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4762
4763 * trans.c (gfc_add_modify_expr): Add sanity check that types
4764 for the lhs and rhs are the same for scalar assignments.
4765
fbc9b453
TS
47662004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4767
4768 * dump-parse-tree.c (show_common): New function.
4769 (gfc_show_namespace): Show commons.
4770
9056bd70
TS
47712004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4772 Andrew Vaught <andyv@firstinter.net>
4773
4774 PR fortran/13249
4775 PR fortran/15481
ef558756 4776 * decl.c (gfc_match_save): Adapt to new common structures,
9056bd70
TS
4777 don't allow saving USE-associated common.
4778 * dump-parse-tree (gfc_show_attr): (saved_)common are not
4779 symbol attributes any longer.
4780 (gfc_show_symbol): Don't show old-style commons any longer.
4781 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4782 interface.
4783 * gfortran.h (symbol_attribute): Remove common and saved_common
4784 attributes.
4785 (gfc_symbol): Remove common_head element.
4786 (gfc_common_head): New struct.
4787 (gfc_get_common_head): New macro.
4788 (gfc_symtree): Add field 'common' to union.
4789 (gfc_namespace): Add field 'common_root'; change type of field
4790 'blank_common' to blank_common.
4791 (gfc_add_data): New prototype.
4792 (gfc_traverse_symtree): Expect a symtree as first argument
4793 instead of namespace.
4794 * match.c (gfc_get_common): New function.
4795 (match_common_name): Change to take char * as argument, adapt,
4796 fix bug with empty name.
4797 (gfc_match_common): Adapt to new data structures. Disallow
4798 redeclaration of USE-associated COMMON-block. Fix bug with
4799 empty common.
4800 (var_element): Adapt to new common structures.
4801 * match.h (gfc_get_common): Declare.
4802 * module.c: Add 2004 to copyright years, add commons to module
4803 file layout description.
4804 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4805 for removed attributes.
4806 (mio_symbol): Adapt to new way of storing common relations.
4807 (load_commons): New function.
4808 (read_module): Skip common list on first pass, load_commons at
4809 second.
4810 (write_commons): New function.
4811 (write_module): Call write_commons().
4812 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4813 functions related to removed attributes.
4814 (gfc_add_data): New function.
4815 (gfc_clear_attr): Don't set removed attributes.
4816 (gfc_copy_attr): Don't copy removed attributes.
4817 (traverse_symtree): Remove.
f676971a 4818 (gfc_traverse_symtree): Don't traverse symbol
9056bd70
TS
4819 tree of the passed namespace, but require a symtree to be passed
4820 instead. Unify with traverse_symtree.
4821 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4822 interface.
4823 (save_symbol): Remove setting of removed attribute.
4824 * trans-common.c (gfc_sym_mangled_common_id): Change to
4825 take 'char *' argument instead of 'gfc_symbol'.
4826 (build_common_decl, new_segment, translate_common): Adapt to new
4827 data structures, add new
4828 argument name.
4829 (create_common): Adapt to new data structures, add new
4830 argument name. Fix typo in intialization of derived types.
4831 (finish_equivalences): Add second argument in call to
4832 create_common.
4833 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4834 (gfc_trans_common): Adapt to new data structures.
f676971a 4835 * trans-decl.c (gfc_create_module_variables): Remove test for
e23667c6 4836 removed attribute.
9056bd70 4837
50d78f96
TS
48382004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4839
4840 * io.c: Add 2004 to copyright years.
4841
c9543002
TS
48422004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4843 Andrew Vaught <andyv@firstinter.net>
4844
4845 * gfortran.h (gfc_gsymbol): New typedef.
4846 (gfc_gsym_root): New variable.
4847 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4848 * parse.c (global_used): New function.
4849 (parse_block_data): Check for double empty BLOCK DATA,
4850 use global symbol table.
4851 (parse_module): Use global symbol table.
4852 (add_global_procedure, add_global_program): New functions.
4853 (gfc_parse_file): Use global symbol table.
4854 * symbol.c (gfc_gsym_root): New variable.
4855 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4856 functions.
4857
78f2fb08
TS
48582004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4859
4860 * module.c (mio_gmp_real): Correct writing of negative numbers.
4861
48622004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
e063a048
TS
4863
4864 PR fortran/15963
4865 * expr.c (check_intrinsic_op): Allow comparison of characters.
4866 Make logic easier.
4867
ddc9ce91
TS
48682004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4869 Andrew Vaught <andyv@firstinter.net>
4870
4871 * decl.c (contained_procedure): New function.
4872 (match_end): Verify correctness of END STATEMENT in
4873 all cases.
4874
48752004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4876 Andrew Vaught <andyv@firstinter.net>
0ff0dfbf
TS
4877
4878 PR fortran/15190
4879 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4880 (decode_statement): Enforce required space in free-form.
4881
ddc9ce91 48822004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
44de5aeb
RK
4883
4884 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4885 * trans-array.c (gfc_conv_descriptor_data): Add operand
4886 for COMPONENT_REF.
4887 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4888 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4889 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4890 * trans-common.c (create_common): Likewise.
4891 * trans-expr.c (gfc_conv_component_ref): Likewise.
4892 * trans-io.c (set_parameter_value): Likewise.
4893 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4894 (transfer_expr): Likewise.
4895 * trans-decl.c (gfc_trans_auto_character_variable):
4896 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
ddc9ce91 4897 (gfc_gimplify_function): New function.
44de5aeb
RK
4898 (gfc_generate_function-code): Properly handle nested functions.
4899 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4900
8750f9cd
JB
49012004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
4902
4903 PR fortran/15750
4904 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4905 (gfc_resolve_inquire): Resolve the iolength tag. Return
4906 SUCCESS at end of function if no failure has occured.
4907 * resolve.c (resolve_code): Resolve if iolength is encountered.
4908 * trans-io.c: (ioparm_iolength, iocall_iolength,
4909 iocall_iolength_done): New variables.
4910 (last_dt): Add IOLENGTH.
4911 (gfc_build_io_library_fndecls ): Set iolength related variables.
4912 (gfc_trans_iolength): Implement.
4913 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4914
fa841200
TS
49152004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
4916
4917 PR fortran/15511
4918 * scanner.c (load_line): Don't truncate preprocessor lines.
4919 Reformat error message.
4920 (preprocessor_line): Issue warning in case of malformed
f676971a 4921 preprocessor line.
fa841200 4922
f5e440e1
TS
49232004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4924
4925 * resolve.c (resolve_symbol): Add comment in function body.
4926 (check_data_variable): Change type of mark to ar_type, adapt code
4927 accordingly.
4928
da4f9e3b
TS
49292004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4930
4931 * array.c (gfc_insert_constructor): Avoid redundant call to
4932 mpz_comp. Add 2004 to copyright years.
f676971a 4933
b40410b9
JM
49342004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
4935
4936 * trans.h (stmtblock_t): Change has_scope to unsigned int.
4937
160874e4
SK
49382004-06-20 Steven G. Kargl <kargls@comcast.net>
4939
4940 * arith.c (gfc_range_check): correct complex underflow.
4941
6ef42154
TS
49422004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4943
4944 PR fortran/15962
4945 * match.c (match_case_selector): Call gfc_match_init_expr
4946 instead of gfc_match_expr.
4947 * resolve.c (validate_case_label_expr): No need to check for
4948 constant, since it wouldn't have been matched with the fix to
4949 match.c.
4950
f51d8522 49512004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
7031baf4
TS
4952
4953 PR fortran/15211
4954 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
f676971a 4955 of strings.
7031baf4 4956
ce738b86
TS
49572004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4958
4959 PR fortran/15510
4960 * trans-deecl.c (generate_local_decl): Do not issue warning for
4961 unused variables if they're use associated.
4962
49632004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
81871c2a 4964 Andrew Vaught <andyv@firstinter.net>
f3207b37
TS
4965
4966 PR fortran/14928
4967 * gfortran.h (gfc_check_f): Add new field f3ml.
4968 * check.c (gfc_check_minloc_maxloc): Take argument list instead
4969 of individual arguments, reorder if necessary.
4970 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4971 * intrinsic.c (add_sym_3ml): New function.
4972 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
f676971a 4973 (check_specific): Catch special case MINLOC, MAXLOC.
f3207b37 4974
6956a6f3
PB
49752004-06-14 Paul Brook <paul@codesourcery.com>
4976
4977 * intrinsic.c (add_sym_2s): Use correct function types.
4978
fd528377
TS
49792004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4980
b3b65c9a 4981 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
fd528377
TS
4982 * data.c (gfc_get_section_index): Remove dependency on trans.h.
4983
2bd74949
SK
49842004-06-12 Steven G. Kargl <kargls@comcast.net>
4985
4986 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4987 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4988 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4989 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4990 * trans-intrinsic.c: Use symbols.
4991 * intrinsic.c (add_sym_2s): New function.
4992 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4993 * intrinsic.h: Function prototypes.
f676971a 4994 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2bd74949
SK
4995 gfc_resolve_srand): New functions.
4996
c52eae8d
TS
49972004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4998
4999 PR fortran/14957
5000 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
5001 contained procedure.
f676971a 5002
662ef0f5
TS
50032004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5004
5005 PR fortran/12841
5006 * interface.c (compare_parameter, compare_actual_formal): Don't
5007 check types and array shapes for NULL()
5008 * trans-expr.c (conv_function_call): No double indirection for
f676971a 5009 NULL()
662ef0f5 5010
293155b0
TM
50112004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
5012
5013 * trans-expr.c (gfc_conv_cst_int_power): Compute
5014 x**(-n) by converting it to (1/x)**n instead of
5015 1/x**n.
5016
62f1d470
TS
50172004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5018
5019 PR fortran/13372
5020 * module.c (write_symbol, write_symtree): Don't write symbols
5021 wrongly added to namespace.
5022 * trans-decl.c (gfc_create_module_variable): Don't create a
5023 backend decl for a symbol incorrectly added to namespace.
5024
a4ac5dd3
TS
50252004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5026
5027 PR fortran/13201
5028 * resolve.c (resolve_symbol): Verify that parameter array has an
5029 explicit shape. Fix typos and coding style issues in surrounding
5030 lines.
5031
50322004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
e0f2a7c6
TS
5033
5034 PR fortran/15478
5035 * gfortran.texi: The documentation doesn't contain infomration on
5036 how to report bugs, and shouldn't, so remove the line which
5037 says it does.
5038
f9fed73b
TS
50392004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5040
f676971a 5041 * intrinsic.c (sort_actual): Keep track of type of missing
f9fed73b
TS
5042 arguments. (Missing from previous commit.)
5043
1600fe22
TS
50442004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5045
5046 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
5047 * interface.c (compare_actual_formal): Keep type of omitted
5048 optional arguments.
5049 * trans-expr.c (gfc_conv_function_call): Add string length
5050 argument for omitted string argument.
5051
50522004-06-03 Paul Brook <paul@codesourcery.com>
7c87eac6
PB
5053
5054 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
5055 lists instead of compound expr chains.
5056 (gfc_trans_code): Annotate statement lists.
5057
13413760
TS
50582004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5059
5060 * trans-array.c: Fix spelling in comments.
5061
2fa54841
TS
50622004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5063
5064 PR fortran/15557
5065 * data.c (assign_substring_data_value): New function.
5066 (gfc_assign_data_value): Call the new function if we're dealing
5067 with a substring LHS.
5068
ea0ece09
TS
50692004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5070
5071 PR fortran/15477
5072 * gfortran.h (GFC_VERSION): Remove.
5073 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
5074 where used.
5075
c3e8c6b8
TS
50762004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5077
5078 * trans-types.c: Fix spelling & layout in comments.
5079
94716287
TS
50802004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5081
5082 PR fortran/14067
5083 * trans-const.c (gfc_conv_string_init): Allow variable string
5084 length lower than initialization string length.
5085
7b5b57b7
PB
50862004-05-30 Paul Brook <paul@codesourcery.com>
5087
5088 PR fortran/15620
5089 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
5090 * trans-expr.c (gfc_trans_string_copy): New function.
5091 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
5092 character lengths.
5093 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
5094 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
5095 * trans.h (struct gfc_saved_var): Define.
5096 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
5097
5f251c26
SK
50982004-05-30 Steven G. Kargl <kargls@comcast.net>
5099
5100 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
5101
e73c80ae
SK
51022004-05-29 Steven G. Kargl <kargls@comcast.net>
5103
5104 * simplify.c (gfc_simplify_log): Remove useless line of code.
5105
353c3b7e
PB
51062004-05-29 Paul Brook <paul@codesourcery.com>
5107
5108 * trans-common.c (find_equivalence): Find multiple rules.
5109
63645982
TS
51102004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5111
5112 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
5113 (gfc_current_locus): Declare new global variable.
5114 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
5115 (gfc_current_locus1): Rename ...
5116 (gfc_current_locus): ... to this.
5117 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
5118 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
5119 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
5120 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
5121 and gfc_current_locus(), respectively.
5122 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
5123 match_array_cons_element, gfc_match_array_constructor):
5124 Read/modify gfc_current_locus instead of calling gfc_set_locus()
5125 and gfc_current_locus().
5126 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
5127 match_attr_spec, gfc_match_function_decl, gfc_match_end,
5128 attr_decl1, gfc_match_save): Likewise.
5129 * error.c (error_print, gfc_internal_error): Likewise.
5130 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
5131 * interface.c (gfc_add_interface): Likewise.
5132 * io.c (gfc_match_format, match_dt_format, match_dt_element,
5133 match_io_iterator, match_io): Likewise.
5134 * match.c (gfc_match_space, gfc_match_eos,
5135 gfc_match_small_literal_int, gfc_match_st_label,
5136 gfc_match_strings, gfc_match_name, gfc_match_iterator,
5137 gfc_match_char, gfc_match, gfc_match_assignment,
5138 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
5139 gfc_match_nullify, gfc_match_call, match_implicit_range,
5140 gfc_match_implicit, gfc_match_data, match_case_selector,
5141 gfc_match_case, match_forall_iterator): Likewise.
5142 * matchexp.c (gfc_match_defined_op_name, next_operator,
5143 match_level_1, match_mult_operand, match_ext_mult_operand,
5144 match_add_operand, match_ext_add_operand, match_level_2,
5145 match_level_3, match_level_4, match_and_operand, match_or_operand,
5146 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
5147 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
5148 * parse.c (match_word, decode_statement, next_free, next_fixed,
5149 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
5150 Likewise.
5151 * primary.c (match_digits, match_integer_constant,
5152 match_boz_constant, match_real_constant, match_substring,
5153 next_string_char, match_charkind_name, match_string_constant,
5154 match_logical_constant, match_const_complex_part,
5155 match_complex_constant, match_actual_arg, match_keyword_arg,
5156 gfc_match_actual_arglist, gfc_match_structure_constructor,
5157 gfc_match_rvalue, gfc_match_variable): Likewise.
5158 * st.c (gfc_get_code): Likewise.
5159 * symbol.c (check_conflict, check_used, check_done,
5160 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
5161 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
5162 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
5163
4eeaf81e
RS
51642004-05-26 Roger Sayle <roger@eyesopen.com>
5165
5166 * io.c (format_asterisk): Silence compiler warnings by correcting
5167 the number of elements of a "locus" initializer.
5168
a2f29587
RS
51692004-05-25 Roger Sayle <roger@eyesopen.com>
5170
5171 PR fortran/13912
5172 * matchexp.c: Allow unary operators after arithmetic operators
5173 as a GNU extension.
5174 (match_ext_mult_operand, match_ext_add_operand): New functions.
5175 (match_mult_operand): Tweak to call match_ext_mult_operand.
5176 (match_add_operand): Tweak to call match_ext_mult_operand.
5177 (match_level_2): Rearrange to call match_ext_add_operand.
5178
45aae8f2
PB
51792004-05-25 Paul Brook <paul@codesourcery.com>
5180
5181 * expr.c (check_inquiry): Remove bogus tests.
5182
40e929f3
PB
51832004-05-23 Paul Brook <paul@codesourcery.com>
5184
5185 PR fortran/13773
5186 * expr.c (restricted_args): Remove redundant checks/argument.
5187 (external_spec_function): Update to match.
5188 (restricted_intrinsic): Rewrite.
5189
5291e69a
PB
51902004-05-23 Paul Brook <paul@codesourcery.com>
5191 Victor Leikehman <lei@haifasphere.co.il>
5192
5193 * gfortran.h (struct gfc_symbol): Add equiv_built.
5194 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
5195 messages.
5196 (current_length): Remove.
5197 (add_segments): New function.
5198 (build_equiv_decl): Create initialized common blocks.
5199 (build_common_decl): Always add decl to bindings.
5200 (create_common): Create initializers.
5201 (find_segment_info): Reformat to match coding conventions.
5202 (new_condition): Use add_segments.
5203 (add_condition, find_equivalence, add_equivalences): Move iteration
5204 inside functions. Only process each segment once.
5205 (new_segment, finish_equivalences, translate_common): Simplify.
5206
95d3f567
SK
52072004-05-23 Steven G. Kargl <kargls@comcast.net>
5208
5209 * check.c (gfc_check_random_seed): Issue for too many arguments.
5210
c1c52409
PB
52112004-05-22 Steven G. Kargl <kargls@comcast.net>
5212
5213 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
5214
52152004-05-22 Paul Brook <paul@codesourcery.com>
1854117e
PB
5216
5217 * dump-parse-tree.c (gfc_show_equiv): New function.
5218 (gfc_show_namespace): Use it.
5219
b6720768
VL
52202004-05-22 Victor Leikehman <lei@haifasphere.co.il>
5221
5222 PR fortran/13249
5223 * symbol.c (gfc_add_common): Disable checks to work around other more
5224 fundamental inadequacies.
5225
8c1d6d62 5226