]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
6e5584a01a40fdf0d1c9366a88a9dd0e9ffdf1c6
[gcc.git] / gcc / fortran / ChangeLog
1 2006-10-03 Paul Thomas <pault@gcc.gnu.org>
2
3 PR fortran/29284
4 PR fortran/29321
5 PR fortran/29322
6 * trans-expr.c (gfc_conv_function_call): Check the expression
7 and the formal symbol are present when testing the actual
8 argument.
9
10 PR fortran/25091
11 PR fortran/25092
12 * resolve.c (resolve_entries): It is an error if the entries
13 of an array-valued function do not have the same shape.
14
15 2006-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
16
17 PR middle-end/27478
18 * trans-decl.c (gfc_get_fake_result_decl): Mark var as
19 TREE_ADDRESSABLE.
20
21 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
22
23 PR fortran/19262
24 * gfortran.h (gfc_option_t): Add max_continue_fixed and
25 max_continue_free.
26 * options.c (gfc_init_options): Initialize fixed form and free form
27 consecutive continuation line limits.
28 * scanner.c (gfc_scanner_init_1): Initialize continue_line
29 and continue_count. (gfc_next_char_literal): Count the number of
30 continuation lines in the current statement and warn if limit
31 is exceeded.
32
33 2006-10-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
34
35 PR fortran/19260
36 * scanner.c (gfc_next_char_literal): Add check for missing '&'
37 and warn if in_string, otherwise return ' '.
38
39 2006-10-02 Francois-Xavier Coudert <coudert@clipper.ens.fr>
40
41 PR fortran/29210
42 * primary.c (match_sym_complex_part): Named constants as real or
43 imaginary part of complex a named constant are only allowed in
44 Fortran 2003.
45
46 2006-10-01 Brooks Moses <bmoses@stanford.edu>
47
48 * gfortran.texi: Corrected references to MALLOC intrinsic.
49 * invoke.texi: Minor cleanup and clarification to the Dialect
50 Options section.
51
52 2006-09-30 Brooks Moses <bmoses@stanford.edu>
53
54 * invoke.texi: Add mention of BOZ constants and integer
55 overflow to -fno-range-check.
56 * gfortran.texi: Add mention of -fno-range-check to
57 section on BOZ contants.
58
59 2006-09-30 Bernhard Fischer <aldot@gcc.gnu.org>
60
61 * resolve.c: Fix commentary typo. Fix whitespace.
62
63 2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
64
65 fortran/29147
66 * arith.c (gfc_check_integer_range): Disable range checking via
67 -fno-range-check.
68
69 2006-09-28 Steven G. Kargl <kargl@gcc.gnu.org>
70
71 * arith.c: Change conditional test for inclusion of arctangent().
72 (gfc_check_real_range): Change conditional test for use of
73 mpfr_subnormalize.
74 * simplify.c (gfc_simplify_atan2): Fix conditional for use of
75 mpfr_atan2() instead of arctangent().
76 (gfc_simplify_exponent): Fix conditional for use of mpfr_get_exp().
77 (gfc_simplify_log): Fix conditional for use of mpfr_atan2() instead
78 of arctangent().
79 (gfc_simplify_nearest): Fix conditional for use of mpfr_nextafter().
80
81 2006-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
82
83 * arith.c: Conditionally include arctangent2().
84 (gfc_check_real_range): Use mpfr_subnormalize in preference to local
85 hack.
86 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Append
87 l for long double functions.
88 * simplify.c: Wrap Copyright to new line.
89 (gfc_simplify_atan2): Use mpfr_atan2 in preference to arctangent2().
90 (gfc_simplify_log): Ditto.
91
92
93 PR fortran/28276
94 * simplify.c (gfc_simplify_exponent): Use mpfr_get_exp in
95 preference to broken local hack.
96
97 PR fortran/27021
98 * simplify.c (gfc_simplify_nearest): Use mpfr_nexttoward and
99 mpfr_subnormalize to handle numbers near zero in preference to broken
100 local hack.
101
102 2006-09-26 Jakub Jelinek <jakub@redhat.com>
103
104 PR fortran/29097
105 * scanner.c (include_line): Handle conditional include.
106
107 2006-09-25 Tobias Schluter <tobias.schlueter@physik.uni-muenchen.de>
108
109 PR fortran/21203
110 * error.c (show_loci): No need to risk an ICE to output a
111 slightly nicer error message.
112
113 2006-09-19 Paul Thomas <pault@gcc.gnu.org>
114 Steven Bosscher <steven@gcc.gnu.org>
115
116 PR fortran/29101
117 * trans-stmt.c (gfc_trans_character_select): Store the label
118 from select_string and then clean up any temporaries from the
119 conversion of the select expression, before branching to the
120 selected case.
121
122 2006-09-18 Paul Thomas <pault@gcc.gnu.org>
123
124 PR fortran/28526
125 * primary.c (match_variable): If the compiler is in a module
126 specification block, an interface block or a contains section,
127 reset host_flag to force the changed symbols mechanism.
128
129 PR fortran/29101
130 * trans-stmt.c (gfc_trans_character_select): Add the post block
131 for the expression to the main block, after the call to
132 select_string and the last label.
133
134 2006-09-18 Paul Thomas <pault@gcc.gnu.org>
135
136 PR fortran/29060
137 * iresolve.c (resolve_spread): Build shape for result if the
138 source shape is available and dim and ncopies are constants.
139
140 2006-09-18 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
141
142 PR fortran/28817
143 PR fortran/21918
144 * trans-decl.c (generate_local_decl): Change from 'warning' to
145 'gfc_warning' to have line numbers correctly reported.
146
147 2006-09-15 Paul Thomas <pault@gcc.gnu.org>
148
149 PR fortran/29051
150 * decl.c (match_old_style_init): Set the 'where' field of the
151 gfc_data structure 'newdata'.
152
153 * match.c (match_case_eos): Add a comprehensible error message.
154
155 2006-09-13 Wolfgang Gellerich <gellerich@de.ibm.com>
156
157 * trans-expr.c (gfc_add_interface_mapping): For characters, dereference
158 pointer if necessary and then perform the cast.
159
160 2006-09-11 Steven G. Kargl <kargl@gcc.gnu.org>
161
162 * intrinsic.c: Update Copyright date.
163 * intrinsic.h: Ditto.
164
165 2006-09-11 Paul Thomas <pault@gcc.gnu.org>
166
167 PR fortran/28890
168 * trans-expr.c (gfc_conv_function_call): Obtain the string length
169 of a dummy character(*) function from the symbol if it is not
170 already translated. For a call to a character(*) function, use
171 the passed, hidden string length argument, which is available
172 from the backend_decl of the formal argument.
173 * resolve.c (resolve_function): It is an error if a function call
174 to a character(*) function is other than a dummy procedure or
175 an intrinsic.
176
177 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
178
179 PR fortran/28959
180 * trans-types.c (gfc_get_derived_type): Use the parent namespace of
181 the procedure if the type's own namespace does not have a parent.
182
183 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
184
185 PR fortran/28923
186 * expr.c (find_array_section): Only use the array lower and upper
187 bounds for the start and end of the sections, where the expr is
188 NULL.
189
190 2006-09-10 Paul Thomas <pault@gcc.gnu.org>
191
192 PR fortran/28914
193 * trans-array.c (gfc_trans_array_constructor_value): Create a temporary
194 loop variable to hold the current loop variable in case it is modified
195 by the array constructor.
196
197 2006-09-07 Steven G. Kargl <kargls@comcast.net>
198
199 * gfortran.h (gfc_integer_info): Eliminate max_int.
200 * arith.c (gfc_arith_init_1): Remove initialization of max_int.
201 (gfc_arith_done_1): Remove clearing of max_int.
202 (gfc_check_integer_range): Fix range chekcing of overflow.
203 * simplify.c (gfc_simplify_not): Construct mask that was max_int.
204
205 2006-09-05 Paul Thomas <pault@gcc.gnu.org>
206
207 PR fortran/28908
208 * gfortran.h : Restore the gfc_dt_list structure and reference
209 to it in gfc_namespace.
210 * resolve.c (resolve_fl_derived): Restore the building of the
211 list of derived types for the current namespace. Modify the
212 restored code so that a check is made to see if the symbol is
213 already in the list.
214 (resolve_fntype): Make sure that the specification block
215 version of the derived type is used for a module function that
216 returns that type.
217 * symbol.c (gfc_free_dt_list): Restore.
218 (gfc_free_namespace): Restore call to previous.
219 * trans-types.c (copy_dt_decls_ifequal): Restore.
220 (gfc_get_derived_type): Restore all the paraphenalia for
221 association of derived types, including calls to previous.
222 Modify the restored code such that all derived types are built
223 if their symbols are found in the parent namespace; not just
224 non-module types. Add backend_decls to like derived types in
225 sibling namespaces, as well as that of the derived type.
226
227 2006-08-30 Kazu Hirata <kazu@codesourcery.com>
228
229 * match.c: Fix a comment typo.
230
231 2006-08-30 Paul Thomas <pault@gcc.gnu.org>
232
233 PR fortran/28885
234 * trans-expr.c (gfc_conv_aliased_arg): Ensure that the temp
235 declaration is retained for INTENT(OUT) arguments.
236
237 PR fortran/28873
238 PR fortran/20067
239 * resolve.c (resolve_generic_f): Make error message more
240 comprehensible.
241 (resolve_generic_s): Restructure search for specific procedures
242 to be similar to resolve_generic_f and change to similar error
243 message. Ensure that symbol reference is refreshed, in case
244 the search produces a NULL.
245 (resolve_specific_s): Restructure search, as above and as
246 resolve_specific_f. Ensure that symbol reference is refreshed,
247 in case the search produces a NULL.
248
249 PR fortran/25077
250 PR fortran/25102
251 * interface.c (check_operator_interface): Throw error if the
252 interface assignment tries to change intrinsic type assigments
253 or has less than two arguments. Also, it is an error if an
254 interface operator contains an alternate return.
255
256 PR fortran/24866
257 * parse.c (gfc_fixup_sibling_symbols): Do not modify the symbol
258 if it is a dummy in the contained namespace.
259
260 2006-08-29 Steven G. Kargl <kargls@comcast.net>
261
262 PR fortran/28866
263 * match.c: Wrap copyright.
264 (gfc_match_assignment): Return MATCH_NO for failed lvalue. Remove
265 gotos. Move error handling of FL_PARAMETER to ...
266 * gfc_match_if: Deal with MATCH_NO from above.
267 * primary.c: Wrap copyright.
268 (match_variable): ... here. Improve error messages.
269
270 2006-08-29 Paul Thomas <pault@gcc.gnu.org>
271
272 PR fortran/28788
273 * symbol.c (gfc_use_derived): Never eliminate the symbol,
274 following reassociation of use associated derived types.
275
276 2006-08-26 Steven G. Kargl <kargls@comcast.net>
277
278 * arith.h: Update Copyright dates. Fix whitespace.
279 * arith.c: Update Copyright dates. Fix whitespace. Fix comments.
280 (gfc_arith_done_1): Clean up pedantic_min_int and subnormal.
281
282 2006-08-26 Tobias Burnus <burnus@net-b.de>
283
284 * gfortran.texi: Note variable initialization causes SAVE attribute.
285 * intrinsic.texi: Clarify support for KIND=16 and KIND=10.
286 Mention -std=f2003. Cross reference INQUIRE from ACCESS intrinsic.
287 Add missing ) in ACOS.
288
289 2006-08-26 Daniel Franke <franke.daniel@gmail.com>
290
291 * intrinsic.texi: Update Copyright date. Added documentation
292 for ACOSH, AND, ASINH, ATANH, CHDIR, FGET, FGETC, FPUT, FPUTC,
293 GETCWD, OR and XOR intrinsics, removed inadvertently introduced
294 doc-stubs for EQV and NEQV, corrected some typographical errors.
295
296 2006-08-24 Daniel Franke <franke.daniel@gmail.com>,
297 Brooks Moses <bmoses@stanford.edu>
298
299 * intrinsic.texi: Added doc-stubs for undocumented intrinsics,
300 added a "See Also" section, renamed the "Options" section to
301 "Standard", improved the index, and made numerous minor
302 typo corrections and grammatical fixes.
303
304 2006-08-24 Paul Thomas <pault@gcc.gnu.org>
305
306 PR fortran/28788
307 * symbol.c (shift_types): Shift the derived type references in
308 formal namespaces.
309 (gfc_use_derived): Return if the derived type symbol is already
310 in another namspace. Add searches for the derived type in
311 sibling namespaces.
312
313 PR fortran/28771
314 * decl.c (add_init_expr_to_sym): Restore the original but
315 restricted to parameter arrays to fix a regression.
316
317 2006-08-23 Steven G. Kargl <kargls@comcast.net>
318
319 * gfortran.texi: Fix last commit where a "no" was deleted and
320 a grammatical error was introduced.
321
322 2006-08-23 Steven G. Kargl <kargls@comcast.net>
323
324 * gfortran.texi: Spell check. Add a few contributors to
325 Chapter 9. Expand the description of BOZ constant handling.
326
327 2006-08-20 Janne Blomqvist <jb@gcc.gnu.org>
328
329 PR fortran/25828
330 * gfortran.texi: Mention STREAM I/O among supported F2003
331 features.
332
333 2006-08-20 Paul Thomas <pault@gcc.gnu.org>
334
335 PR fortran/28601
336 PR fortran/28630
337 * gfortran.h : Eliminate gfc_dt_list structure and reference
338 to it in gfc_namespace.
339 * resolve.c (resolve_fl_derived): Remove the building of the
340 list of derived types for the current namespace.
341 * symbol.c (find_renamed_type): New function to find renamed
342 derived types by symbol name rather than symtree name.
343 (gfc_use_derived): Search parent namespace for identical
344 derived type and use it, even if local version is complete,
345 except in interface bodies. Ensure that renamed derived types
346 are found by call to find_renamed_type. Recurse for derived
347 type components.
348 (gfc_free_dt_list): Remove.
349 (gfc_free_namespace): Remove call to previous.
350 * trans-types.c (copy_dt_decls_ifequal): Remove.
351 (gfc_get_derived_type): Remove all the paraphenalia for
352 association of derived types, including calls to previous.
353 * match.c (gfc_match_allocate): Call gfc_use_derived to
354 associate any derived types that are being allocated.
355
356 PR fortran/20886
357 * resolve.c (resolve_actual_arglist): The passing of
358 a generic procedure name as an actual argument is an
359 error.
360
361 PR fortran/28735
362 * resolve.c (resolve_variable): Check for a symtree before
363 resolving references.
364
365 PR fortran/28762
366 * primary.c (match_variable): Return MATCH_NO if the symbol
367 is that of the program.
368
369 PR fortran/28425
370 * trans-expr.c (gfc_trans_subcomponent_assign): Translate
371 derived type component expressions other than another derived
372 type constructor.
373
374 PR fortran/28496
375 * expr.c (find_array_section): Correct errors in
376 the handling of a missing start value for the
377 index triplet in an array reference.
378
379 PR fortran/18111
380 * trans-decl.c (gfc_build_dummy_array_decl): Before resetting
381 reference to backend_decl, set it DECL_ARTIFICIAL.
382 (gfc_get_symbol_decl): Likewise for original dummy decl, when
383 a copy is made of an array.
384 (create_function_arglist): Likewise for the _entry paramter
385 in entry_masters.
386 (build_entry_thunks): Likewise for dummies in entry thunks.
387
388 PR fortran/28600
389 * trans-decl.c (gfc_get_symbol_decl): Ensure that the
390 DECL_CONTEXT of the length of a character dummy is the
391 same as that of the symbol declaration.
392
393 PR fortran/28771
394 * decl.c (add_init_expr_to_sym): Remove setting of charlen for
395 an initializer of an assumed charlen variable.
396
397 PR fortran/28660
398 * trans-decl.c (generate_expr_decls): New function.
399 (generate_dependency_declarations): New function.
400 (generate_local_decl): Call previous if not either a dummy or
401 a declaration in an entry master.
402
403 2006-08-19 Erik Edelmann <eedelman@gcc.gnu.org>
404
405 PR fortran/25217
406 * resolve.c (resolve_fl_variable): Set a default initializer for
407 derived types with INTENT(OUT) even if 'flag' is true.
408 * trans-expr.c (gfc_conv_function_call): Insert code to
409 reinitialize INTENT(OUT) arguments of derived type with default
410 initializers.
411
412 2006-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
413
414 PR fortran/25828
415 * gfortran.h: Add new pointer for stream position to st_inquire.
416 Rename gfc_large_io_int_kind to gfc_intio_kind.
417 * trans-types.c (gfc_init_kinds): use gfc_intio_kind.
418 * io.c: Add new IO tag for file position going in and another for out.
419 (match_dt_element): Match new tag_spos.
420 (gfc_resolve_dt): Resolve new tag_spos.
421 (gfc_free_inquire): Free inquire->strm_pos.
422 (match_inquire_element): Match new tag_strm_out.
423 (gfc_resolve_inquire): Resolve new tag_strm_out.
424 * trans-io.c: Rename IOPARM_type_large_io_int to IOPARM_type_intio.
425 (gfc_build_st_parameter): Same.
426 (gfc_build_io_library_fndecls) Same. and add build pointer type pintio.
427 (gfc_trans_inquire): Translate strm_pos for inquire.
428 * ioparm.def: Reorder flags to accomodate addition of new inquire
429 flag for strm_pos_out and add it in.
430
431 2006-08-06 Paul Thomas <pault@gcc.gnu.org>
432
433 PR fortran/28590
434 * parse.c (parse_derived): Remove the test for sequence type
435 components of a sequence type.
436 * resolve.c (resolve_fl_derived): Put the test here so that
437 pointer components are tested.
438
439 2006-08-05 Steven G. Kargl <kargls@comcast.nt>
440
441 PR fortran/28548
442 * resolve.c(resolve_elemental_actual): Add flags.h to use -pedantic
443 and exclude conversion functions in conditional. Change gfc_error
444 to gfc_warning.
445 (warn_unused_label) Rename to ...
446 (warn_unused_fortran_label) avoid warn_unused_label in flags.h.
447
448 2006-07-30 Francois-Xavier Coudert <coudert@clipper.ens.fr>
449
450 * intrinsic.c (add_functions): Add ACCESS, CHMOD, RSHIFT, LSHIFT.
451 (add_subroutines): Add LTIME, GMTIME and CHMOD.
452 * intrinsic.h (gfc_check_access_func, gfc_check_chmod,
453 gfc_check_chmod_sub, gfc_check_ltime_gmtime, gfc_simplify_rshift,
454 gfc_simplify_lshift, gfc_resolve_access, gfc_resolve_chmod,
455 gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
456 gfc_resolve_gmtime, gfc_resolve_ltime): Add prototypes.
457 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_ACCESS,
458 GFC_ISYM_CHMOD, GFC_ISYM_LSHIFT, GFC_ISYM_RSHIFT.
459 * iresolve.c (gfc_resolve_access, gfc_resolve_chmod,
460 gfc_resolve_rshift, gfc_resolve_lshift, gfc_resolve_chmod_sub,
461 gfc_resolve_gmtime, gfc_resolve_ltime): New functions.
462 * check.c (gfc_check_access_func, gfc_check_chmod,
463 gfc_check_chmod_sub, gfc_check_ltime_gmtime): New functions.
464 * trans-intrinsic.c (gfc_conv_intrinsic_rlshift): New function.
465 (gfc_conv_intrinsic_function): Add cases for the new GFC_ISYM_*.
466
467 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
468
469 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
470
471 2006-07-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
472
473 * intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG,
474 LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
475 (add_subroutines): Add LSTAT intrinsic subroutine.
476 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_INT2,
477 GFC_ISYM_INT8, GFC_ISYM_LONG, GFC_ISYM_LSTAT, GFC_ISYM_MCLOCK
478 and GFC_ISYM_MCLOCK8.
479 * iresolve.c (gfc_resolve_int2, gfc_resolve_int8,
480 gfc_resolve_long, gfc_resolve_lstat, gfc_resolve_mclock,
481 gfc_resolve_mclock8, gfc_resolve_lstat_sub): New functions.
482 * check.c (gfc_check_intconv): New function.
483 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
484 the added GFC_ISYM_*.
485 * simplify.c (gfc_simplify_intconv, gfc_simplify_int2,
486 gfc_simplify_int8, gfc_simplify_long): New functions.
487 * intrinsic.h (gfc_check_intconv, gfc_simplify_int2,
488 gfc_simplify_int8, gfc_simplify_long, gfc_resolve_int2,
489 gfc_resolve_int8, gfc_resolve_long, gfc_resolve_lstat,
490 gfc_resolve_mclock, gfc_resolve_mclock8, gfc_resolve_lstat_sub):
491 Add prototypes.
492
493 2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
494
495 PR fortran/28416
496 * trans-array.c (gfc_conv_array_parameter): Give special treatment for
497 ALLOCATABLEs if they are themselves dummy variables.
498
499 2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
500
501 PR fortran/25289
502 * gfortran.h: Declare gfc_large_io_int_kind.
503 * trans-types.c (gfc_init_kinds): Set gfc_large_io_int_kind
504 to size 8 or 4.
505 * trans-io.c (enum iofield_type): Add large_io_int type.
506 (gfc_build_st_parameter): Same.
507 (gfc_build_io_library_fndecls): Same.
508 * ioparm_def: Use large_io_int to define rec.
509
510 2006-07-22 Steven Bosscher <steven@gcc.gnu.org>
511
512 PR fortran/28439
513 * trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
514
515 2006-07-16 Jakub Jelinek <jakub@redhat.com>
516
517 PR fortran/28390
518 * trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
519 code->exp.omp_clauses rather than in the 3rd function argument.
520
521 2006-07-16 Paul Thomas <pault@gcc.gnu.org>
522
523 PR fortran/28384
524 * trans-common.c (translate_common): If common_segment is NULL
525 emit error that common block does not exist.
526
527 PR fortran/20844
528 * io.c (check_io_constraints): It is an error if an ADVANCE
529 specifier appears without an explicit format.
530
531 PR fortran/28201
532 * resolve.c (resolve_generic_s): For a use_associated function,
533 do not search for an alternative symbol in the parent name
534 space.
535
536 PR fortran/20893
537 * resolve.c (resolve_elemental_actual): New function t combine
538 all the checks of elemental procedure actual arguments. In
539 addition, check of array valued optional args(this PR) has
540 been added.
541 (resolve_function, resolve_call): Remove parts that treated
542 elemental procedure actual arguments and call the above.
543
544 2006-07-14 Steven G. Kargl <kargls@comcast.net>
545
546 * trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths
547
548 006-07-13 Paul Thomas <pault@gcc.gnu.org>
549
550 PR fortran/28353
551 * trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
552 that intent is INOUT (fixes regression).
553
554 PR fortran/25097
555 * check.c (check_present): The only permitted reference is a
556 full array reference.
557
558 PR fortran/20903
559 * decl.c (variable_decl): Add error if a derived type is not
560 from the current namespace if the namespace is an interface
561 body.
562
563 2006-07-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
564
565 PR fortran/28163
566 * trans-expr.c (gfc_trans_string_copy): Generate inline code
567 to perform string copying instead of calling a library function.
568 * trans-decl.c (gfc_build_intrinsic_function_decls): Don't build
569 decl for copy_string.
570 * trans.h (gfor_fndecl_copy_string): Remove prototype.
571
572 2006-07-11 Feng Wang <fengwang@nudt.edu.cn>
573
574 PR fortran/28213
575 * trans-io.c (transfer_expr): Deal with Hollerith constants used in
576 I/O list.
577
578 2006-07-07 Kazu Hirata <kazu@codesourcery.com>
579
580 * intrinsic.texi: Fix typos.
581
582 2006-07-07 Paul Thomas <pault@gcc.gnu.org>
583
584 PR fortran/28237
585 PR fortran/23420
586 * io.c (resolve_tag): Any integer that is not an assigned
587 variable is an error.
588
589 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
590
591 PR fortran/28129
592 * trans-array.c (gfc_trans_array_bound_check): Add a locus
593 argument, and use it in the error messages.
594 (gfc_conv_array_index_offset): Donc perform bounds checking on
595 the last dimension of assumed-size arrays.
596
597 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
598
599 PR fortran/27874
600 * trans-stmt.c (compute_inner_temp_size): Don't perform bounds
601 checking when calculating the bounds of scalarization.
602
603 2006-07-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
604
605 PR fortran/20892
606 * interface.c (gfc_match_interface): Don't allow dummy procedures
607 to have a generic interface.
608
609 2006-07-04 Paul Thomas <pault@gcc.gnu.org>
610
611 PR fortran/28174
612 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
613 ensure that the substring reference uses a new charlen.
614 * trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
615 the argument list, lift the treatment of missing string lengths
616 from the above and implement the use of the intent.
617 (gfc_conv_function_call): Add the extra argument to the call to
618 the above.
619
620 PR fortran/28167
621 * trans-array.c (get_array_ctor_var_strlen): Treat a constant
622 substring reference.
623 * array.c (gfc_resolve_character_array_constructor): Remove
624 static attribute and add the gfc_ prefix, make use of element
625 charlens for the expression and pick up constant string lengths
626 for expressions that are not themselves constant.
627 * gfortran.h : resolve_character_array_constructor prototype
628 added.
629 * resolve.c (gfc_resolve_expr): Call resolve_character_array_
630 constructor again after expanding the constructor, to ensure
631 that the character length is passed to the expression.
632
633 2006-07-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
634 Daniel Franke <franke.daniel@gmail.com>
635
636 * intrinsic.c (add_subroutines): Add ITIME and IDATE.
637 * intrinsic.h (gfc_check_itime_idate,gfc_resolve_idate,
638 fc_resolve_itime): New protos.
639 * iresolve.c (gfc_resolve_itime, gfc_resolve_idate): New functions.
640 * check.c (gfc_check_itime_idate): New function.
641 * intrinsic.texi: Document the new intrinsics.
642
643 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
644
645 * intrinsics/date_and_time.c (itime0,idate0,itime_i4,itime_i8,
646 idate_i4,idate_i8): New functions.
647
648
649 2006-07-03 Asher Langton <langton2@llnl.gov>
650
651 * decl.c (match_old_style_init): Add data attribute to symbol.
652
653 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
654
655 * iresolve.c (gfc_resolve_cpu_time, gfc_resolve_random_number):
656 Remove ATTRIBUTE_UNUSED for used argument.
657
658 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
659
660 * intrinsic.texi: Document new intrinsics.
661
662 2006-07-01 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
663
664 PR fortran/19259
665 * parse.c (next_free): Error out on line starting with semicolon.
666 (next_fixed): Fix formatting. Error out on line starting with
667 semicolon.
668
669 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
670
671 * check.c: Fix a comment typo.
672
673 2006-06-25 Paul Thomas <pault@gcc.gnu.org>
674
675 PR fortran/25056
676 * interface.c (compare_actual_formal): Signal an error if the formal
677 argument is a pure procedure and the actual is not pure.
678
679 PR fortran/27554
680 * resolve.c (resolve_actual_arglist): If the type of procedure
681 passed as an actual argument is not already declared, see if it is
682 an intrinsic.
683
684 PR fortran/25073
685 * resolve.c (resolve_select): Use bits 1 and 2 of a new int to
686 keep track of the appearance of constant logical case expressions.
687 Signal an error is either value appears more than once.
688
689 PR fortran/20874
690 * resolve.c (resolve_fl_procedure): Signal an error if an elemental
691 function is not scalar valued.
692
693 PR fortran/20867
694 * match.c (recursive_stmt_fcn): Perform implicit typing of variables.
695
696 PR fortran/22038
697 * match.c (match_forall_iterator): Mark new variables as
698 FL_UNKNOWN if the match fails.
699
700 PR fortran/28119
701 * match.c (gfc_match_forall): Remove extraneous call to
702 gfc_match_eos.
703
704 PR fortran/25072
705 * resolve.c (resolve_code, resolve_function): Rework
706 forall_flag scheme so that it is set and has a value of
707 2, when the code->expr (ie. the forall mask) is resolved.
708 This is used to change "block" to "mask" in the non-PURE
709 error message.
710
711 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
712
713 PR fortran/28081
714 * resolve.c (resolve_substring): Don't issue out-of-bounds
715 error messages when the range has zero size.
716
717 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
718
719 PR fortran/23862
720 * lang-specs.h (f95-cpp-input): Pass -ffree-form to f951 unless
721 -ffixed-form is explicitly specified.
722
723 2006-06-24 Paul Thomas <pault@gcc.gnu.org>
724
725 PR fortran/28118
726 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
727 use the substring reference to calculate the length if the
728 expression does not have a charlen.
729
730 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
731
732 PR fortran/28094
733 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Support cases where
734 there is no integer kind equal to the resulting real kind.
735 * intrinsic.c (add_functions): MODULO is not allowed as an actual
736 argument.
737
738 2006-06-23 Steven G. Kargl <kargls@comcast.net>
739
740 PR fortran/27981
741 * match.c (gfc_match_if): Handle errors in assignment in simple if.
742
743 2006-06-22 Asher Langton <langton2@llnl.gov>
744
745 PR fortran/24748
746 * primary.c (gfc_match_rvalue): Don't call match_substring for
747 implicit non-character types.
748
749 2006-06-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
750
751 PR libfortran/26769
752 * iresolve.c (gfc_resolve_reshape): Call reshape_r4 and
753 reshape_r8 instead of reshape_4 and reshape_8.
754 (gfc_resolve_transpose): Likewise for transpose.
755
756 2006-06-21 Francois-Xavier Coudert <coudert@clipper.ens.fr>
757
758 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_unary_op,
759 gfc_conv_cst_int_power, gfc_conv_string_tmp,
760 gfc_conv_function_call): Replace calls to convert on constant
761 integer nodes by build_int_cst.
762 * trans-stmt.c (gfc_trans_do): Likewise.
763 * trans-io.c (set_internal_unit, transfer_namelist_element):
764 Likewise.
765 * trans-decl.c (build_entry_thunks): Likewise.
766
767 2006-06-20 Steven G. Kargl <kargls@comcast.net>
768
769 * simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t
770 variable.
771
772 2006-06-20 Paul Thomas <pault@gcc.gnu.org>
773
774 PR fortran/25049
775 PR fortran/25050
776 * check.c (non_init_transformational): New function.
777 (find_substring_ref): New function to signal use of disallowed
778 transformational intrinsic in an initialization expression.
779 (gfc_check_all_any): Call previous if initialization expr.
780 (gfc_check_count): The same.
781 (gfc_check_cshift): The same.
782 (gfc_check_dot_product): The same.
783 (gfc_check_eoshift): The same.
784 (gfc_check_minloc_maxloc): The same.
785 (gfc_check_minval_maxval): The same.
786 (gfc_check_gfc_check_product_sum): The same.
787 (gfc_check_pack): The same.
788 (gfc_check_spread): The same.
789 (gfc_check_transpose): The same.
790 (gfc_check_unpack): The same.
791
792 PR fortran/18769
793 *intrinsic.c (add_functions): Add gfc_simplify_transfer.
794 *intrinsic.h : Add prototype for gfc_simplify_transfer.
795 *simplify.c (gfc_simplify_transfer) : New function to act as
796 placeholder for eventual implementation. Emit error for now.
797
798 PR fortran/16206
799 * expr.c (find_array_element): Eliminate condition on length of
800 offset. Add bounds checking. Rearrange exit. Return try and
801 put gfc_constructor result as an argument.
802 (find_array_section): New function.
803 (find_substring_ref): New function.
804 (simplify_const_ref): Add calls to previous.
805 (simplify_parameter_variable): Return on NULL expr.
806 (gfc_simplify_expr): Only call gfc_expand_constructor for full
807 arrays.
808
809 PR fortran/20876
810 * match.c (gfc_match_forall): Add missing locus to gfc_code.
811
812 2006-06-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
813
814 PR fortran/26801
815 * trans-intrinsic.c (gfc_conv_associated): Use pre and post blocks
816 of the scalarization expression.
817
818 2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
819
820 PR fortran/19310
821 PR fortran/19904
822 * arith.c (gfc_range_check): Return ARITH_OK if -fno-range-check. Add
823 return of ARITH_NAN, ARITH_UNDERFLOW, and ARITH_OVERFLOW.
824 (gfc_arith_divide): If -fno-range-check allow mpfr to divide by zero.
825 * gfortran.h (gfc_option_t): Add new flag.
826 * invoke.texi: Document new flag.
827 * lang.opt: Add option -frange-check.
828 * options.c (gfc_init_options): Initialize new flag.
829 (gfc_handle_options): Set flag if invoked.
830 * simplify.c (range_check): Add error messages for
831 overflow, underflow, and other errors.
832 * trans-const.c (gfc_conv_mpfr_to_tree): Build NaN and Inf from mpfr
833 result.
834
835 2006-06-17 Karl Berry <karl@gnu.org>
836
837 * gfortran.texi (@dircategory): Use "Software development"
838 instead of "Programming", following the Free Software Directory.
839
840 2006-06-16 Francois-Xavier Coudert <coudert@clipper.ens.fr>
841
842 PR fortran/27965
843 * trans-array.c (gfc_conv_ss_startstride): Correct the runtime
844 conditions for bounds-checking. Check for nonzero stride.
845 Don't check the last dimension of assumed-size arrays. Fix the
846 dimension displayed in the error message.
847
848 2006-06-15 Thomas Koenig <Thomas.Koenig@online.de>
849
850 * trans-array.h (gfc_trans_create_temp_array): Add bool
851 argument.
852 * trans-arrray.c (gfc_trans_create_temp_array): Add extra
853 argument "function" to show if we are translating a function.
854 If we are translating a function, perform checks whether
855 the size along any argument is negative. In that case,
856 allocate size 0.
857 (gfc_trans_allocate_storage): Add function argument (as
858 false) to gfc_trans_create_temp_array call.
859 * trans-expr.c (gfc_conv_function_call): Add function
860 argument (as true) to gfc_trans_create_temp_array call.
861 * trans-stmt.c (gfc_conv_elemental_dependencies): Add
862 function argument (as false) to gfc_trans_create_temp_array
863 call.
864 * trans-intrinsic.c: Likewise.
865
866 2006-06-10 Paul Thomas <pault@gcc.gnu.org>
867
868 PR fortran/24558
869 PR fortran/20877
870 PR fortran/25047
871 * decl.c (get_proc_name): Add new argument to flag that a
872 module function entry is being treated. If true, correct
873 error condition, add symtree to module namespace and add
874 a module procedure.
875 (gfc_match_function_decl, gfc_match_entry,
876 gfc_match_subroutine): Use the new argument in calls to
877 get_proc_name.
878 * resolve.c (resolve_entries): ENTRY symbol reference to
879 to master entry namespace if a module function.
880 * trans-decl.c (gfc_create_module_variable): Return if
881 the symbol is an entry.
882 * trans-exp.c (gfc_conv_variable): Check that parent_decl
883 is not NULL.
884
885 2006-06-09 Jakub Jelinek <jakub@redhat.com>
886
887 PR fortran/27916
888 * trans-openmp.c (gfc_omp_clause_default_ctor): New function.
889 * trans.h (gfc_omp_clause_default_ctor): New prototype.
890 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Define.
891
892 2006-06-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
893
894 PR fortran/27958
895 * trans-expr.c (gfc_conv_substring): If the substring start is
896 greater than its end, the length of the substring is zero, and
897 not negative.
898 (gfc_trans_string_copy): Don't generate a call to
899 _gfortran_copy_string when destination length is zero.
900
901 2006-06-08 Asher Langton <langton2@llnl.gov>
902
903 PR fortran/27786
904 * trans-array.c (gfc_conv_array_ref): Eliminate bounds checking
905 for assumed-size Cray pointees.
906
907 2006-06-08 Steven G. Kargl <kargls@comcat.net>
908
909 * intrinsic.c (add_subroutine): Make make_noreturn() conditional on
910 the appropriate symbol name.
911
912 2006-06-07 Paul Thomas <pault@gcc.gnu.org>
913
914 PR fortran/23091
915 * resolve.c (resolve_fl_variable): Error if an automatic
916 object has the SAVE attribute.
917
918 PR fortran/24168
919 * expr.c (simplify_intrinsic_op): Transfer the rank and
920 the locus to the simplified expression.
921
922 PR fortran/25090
923 PR fortran/25058
924 * gfortran.h : Add int entry_id to gfc_symbol.
925 * resolve.c : Add static variables current_entry_id and
926 specification_expr.
927 (resolve_variable): During code resolution, check if a
928 reference to a dummy variable in an executable expression
929 is preceded by its appearance as a parameter in an entry.
930 Likewise check its specification expressions.
931 (resolve_code): Update current_entry_id on EXEC_ENTRY.
932 (resolve_charlen, resolve_fl_variable): Set and reset
933 specifiaction_expr.
934 (is_non_constant_shape_array): Do not return on detection
935 of a variable but continue to resolve all the expressions.
936 (resolve_codes): set current_entry_id to an out of range
937 value.
938
939 2006-06-06 Mike Stump <mrs@apple.com>
940
941 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
942 installing during build.
943
944 2006-06-06 Paul Thomas <pault@gcc.gnu.org>
945
946 PR fortran/27897
947 * match.c (gfc_match_common): Fix code typo. Remove
948 sym->name, since sym is NULL, and replace with name.
949
950 2006-06-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
951
952 PR libfortran/27895
953 * resolve.c (compute_last_value_for_triplet): New function.
954 (check_dimension): Correctly handle zero-sized array sections.
955 Add checking on last element of array sections.
956
957 2006-06-05 Steven G. Kargl <kargls@comcast.net>
958
959 * data.c (gfc_assign_data_value): Fix comment typo. Remove
960 a spurious return.
961
962 2006-06-05 Paul Thomas <pault@gcc.gnu.org>
963
964 PR fortran/14067
965 * data.c (create_character_intializer): Add warning message
966 for truncated string.
967
968 PR fortran/16943
969 * symbol.c : Include flags.h.
970 (gfc_add_type): If a procedure and types are the same do not
971 throw an error unless standard is less than gnu or pedantic.
972
973 PR fortran/20839
974 * parse.c (parse_do_block): Error if named block do construct
975 does not have a named enddo.
976
977 PR fortran/27655
978 * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
979 as well as target and put error return at end of function.
980
981 2006-06-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
982
983 * trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
984 Add strings for common runtime error messages.
985 (gfc_trans_runtime_check): Add a locus argument, use a string
986 and not a string tree for the message.
987 * trans.h (gfc_trans_runtime_check): Change prototype accordingly.
988 (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
989 * trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
990 gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
991 (gfc_init_constants): Likewise.
992 * trans-const.h: Likewise.
993 * trans-decl.c (gfc_build_builtin_function_decls): Call to
994 _gfortran_runtime_error has only one argument, the message string.
995 * trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
996 locus.
997 * trans-array.c (gfc_trans_array_bound_check): Build precise
998 error messages.
999 (gfc_conv_array_ref): Use the new symbol argument and the locus
1000 to build more precise error messages.
1001 (gfc_conv_ss_startstride): More precise error messages.
1002 * trans-expr.c (gfc_conv_variable): Give symbol reference and
1003 locus to gfc_conv_array_ref.
1004 (gfc_conv_function_call): Use the new prototype for
1005 gfc_trans_runtime_check.
1006 * trans-stmt.c (gfc_trans_goto): Build more precise error message.
1007 * trans-io.c (set_string): Likewise.
1008 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
1009 for gfc_trans_runtime_check.
1010
1011 2006-06-01 Thomas Koenig <Thomas.Koenig@online.de>
1012
1013 PR fortran/27715
1014 * arith.c: Cast the characters from the strings to unsigned
1015 char to avoid values less than 0 for extended ASCII.
1016
1017 2006-06-01 Per Bothner <bothner@bothner.com>
1018
1019 * data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
1020 * scanner.c (gfc_gobble_whitespace): Likewise.
1021
1022 2006-06-01 Paul Thomas <pault@gcc.gnu.org>
1023
1024 PR fortran/25098
1025 PR fortran/25147
1026 * interface.c (compare_parameter): Return 1 if the actual arg
1027 is external and the formal is a procedure.
1028 (compare_actual_formal): If the actual argument is a variable
1029 and the formal a procedure, this an error. If a gsymbol exists
1030 for a procedure of the same name, this is not yet resolved and
1031 the error is cleared.
1032
1033 * trans-intrinsic.c (gfc_conv_associated): Make provision for
1034 zero array length or zero string length contingent on presence
1035 of target, for consistency with standard.
1036
1037 2006-05-30 Asher Langton <langton2@llnl.gov>
1038
1039 * symbol.c (check_conflict): Allow external, function, and
1040 subroutine attributes with Cray pointees.
1041 * trans-expr.c (gfc_conv_function_val): Translate Cray pointees
1042 that point to procedures.
1043 * gfortran.texi: Document new feature.
1044
1045 2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1046
1047 PR fortran/27634
1048 * io.c (check_format): Add error for missing period in format
1049 specifier unless -std=legacy.
1050 * gfortran.texi: Add description of expanded namelist read and
1051 missing period in format extensions.
1052
1053 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1054
1055 PR fortran/19777
1056 * trans-array.c (gfc_conv_array_ref): Perform out-of-bounds
1057 checking for assumed-size arrrays for all but the last dimension.
1058
1059 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1060
1061 * invoke.texi: Change -fpackderived into -fpack-derived.
1062
1063 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1064
1065 * options.c, primary.c, resolve.c, trans-common.c: Fix typos
1066 in error messages.
1067
1068 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1069
1070 * check.c, expr.c, resolve.c, trans-common.c,
1071 trans-intrinsic.c, trans-stmt.c, trans-types.c: Fix comment typos.
1072
1073 2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1074
1075 PR fortran/19777
1076 * trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
1077 checking for assumed-size arrrays.
1078
1079 2006-05-27 Paul Thomas <pault@gcc.gnu.org>
1080
1081 * trans-intrinsic.c (gfc_conv_associated): If pointer in first
1082 arguments has zero array length of zero string length, return
1083 false.
1084
1085 2006-05-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1086
1087 PR fortran/27524
1088 * trans-array.c (gfc_trans_dummy_array_bias): Don't use stride as
1089 a temporary variable when -fbounds-check is enabled, since its
1090 value will be needed later.
1091
1092 2006-05-26 Thomas Koenig <Thomas.Koenig@online.de>
1093
1094 PR fortran/23151
1095 * io.c (match_io): print (1,*) is an error.
1096
1097 2006-05-26 Paul Thomas <pault@gcc.gnu.org>
1098
1099 PR fortran/27709
1100 * resolve.c (find_array_spec): Add gfc_symbol, derived, and
1101 use to track repeated component references.
1102
1103 PR fortran/27155
1104 PR fortran/27449
1105 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Use
1106 se->string_length throughout and use memcpy to populate the
1107 expression returned to the scalarizer.
1108 (gfc_size_in_bytes): New function.
1109
1110 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
1111
1112 PR fortran/27613
1113 * primary.c (gfc_match_rvalue): Test if symbol represents a
1114 direct recursive function reference. Error if array valued,
1115 go to function0 otherwise.
1116
1117 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
1118
1119 PR fortran/25746
1120 * interface.c (gfc_extend_assign): Use new EXEC_ASSIGN_CALL.
1121 * gfortran.h : Put EXEC_ASSIGN_CALL in enum.
1122 * trans-stmt.c (gfc_conv_elemental_dependencies): New function.
1123 (gfc_trans_call): Call it. Add new boolian argument to flag
1124 need for dependency checking. Assert intent OUT and IN for arg1
1125 and arg2.
1126 (gfc_trans_forall_1): Use new code EXEC_ASSIGN_CALL.
1127 trans-stmt.h : Modify prototype of gfc_trans_call.
1128 trans.c (gfc_trans_code): Add call for EXEC_ASSIGN_CALL.
1129 st.c (gfc_free_statement): Free actual for EXEC_ASSIGN_CALL.
1130 * dependency.c (gfc_check_fncall_dependency): Don't check other
1131 against itself.
1132
1133 PR fortran/25090
1134 * resolve.c : Remove resolving_index_expr.
1135 (entry_parameter): Remove.
1136 (gfc_resolve_expr, resolve_charlen, resolve_fl_variable): Lift
1137 calls to entry_parameter and references to resolving_index_expr.
1138
1139 PR fortran/27584
1140 * check.c (gfc_check_associated): Replace NULL assert with an
1141 error message, since it is possible to generate bad code that
1142 has us fall through to here..
1143
1144 PR fortran/19015
1145 * iresolve.c (maxloc, minloc): If DIM is not present, pass the
1146 rank of ARRAY as the shape of the result. Otherwise, pass the
1147 shape of ARRAY, less the dimension DIM.
1148 (maxval, minval): The same, when DIM is present, otherwise no
1149 change.
1150
1151 2006-05-19 H.J. Lu <hongjiu.lu@intel.com>
1152
1153 PR fortran/27662
1154 * trans-array.c (gfc_conv_expr_descriptor): Don't zero the
1155 first stride to indicate a temporary.
1156 * trans-expr.c (gfc_conv_function_call): Likewise.
1157
1158 2006-05-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1159 Feng Wang <fengwang@nudt.edu.cn>
1160
1161 PR fortran/27552
1162 * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
1163 * data.c (create_character_intializer): Set from_H flag if character is
1164 initialized by Hollerith constant.
1165
1166 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1167
1168 PR fortran/26551
1169 * resolve.c (resolve_call, resolve_function): Issue an error
1170 if a function or subroutine call is recursive but the function or
1171 subroutine wasn't declared as such.
1172
1173 2006-05-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1174
1175 PR fortran/26551
1176 * gfortran.dg/recursive_check_1.f: New test.
1177
1178
1179 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1180
1181 PR fortran/27320
1182 * dump-parse-tree.c (gfc_show_code_node): Try harder to find the
1183 called procedure name.
1184
1185 2006-05-17 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR middle-end/27415
1188 * trans-openmp.c (gfc_trans_omp_parallel_do,
1189 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set
1190 OMP_PARALLEL_COMBINED flag.
1191
1192 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1193
1194 PR driver/26885
1195 * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with
1196 $(GCC_OBJS).
1197
1198 2006-05-15 Paul Thomas <pault@gcc.gnu.org>
1199
1200 PR fortran/25090
1201 * resolve.c: Static resolving_index_expr initialized.
1202 (entry_parameter): New function to emit errors for variables
1203 that are not entry parameters.
1204 (gfc_resolve_expr): Call entry_parameter, when resolving
1205 variables, if the namespace has entries and resolving_index_expr
1206 is set.
1207 (resolve_charlen): Set resolving_index_expr before the call to
1208 resolve_index_expr and reset it afterwards.
1209 (resolve_fl_variable): The same before and after the call to
1210 is_non_constant_shape_array, which ultimately makes a call to
1211 gfc_resolve_expr.
1212
1213 PR fortran/25082
1214 * resolve.c (resolve_code): Add error condition that the return
1215 expression must be scalar.
1216
1217 PR fortran/27411
1218 * matchexp.c (gfc_get_parentheses): New function.
1219 (match_primary): Remove inline code and call above.
1220 * gfortran.h: Provide prototype for gfc_get_parentheses.
1221 * resolve.c (resolve_array_ref): Call the above, when start is a
1222 derived type variable array reference.
1223
1224 2006-05-15 Jakub Jelinek <jakub@redhat.com>
1225
1226 PR fortran/27446
1227 * trans-openmp.c (gfc_trans_omp_array_reduction): Ensure
1228 OMP_CLAUSE_REDUCTION_{INIT,MERGE} are set to BIND_EXPR.
1229
1230 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1231
1232 * Make-lang.in (fortran/options.o): Depend on $(TARGET_H).
1233
1234 2006-05-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1235
1236 PR fortran/27553
1237 * parse.c (next_free): Return instead of calling decode_statement
1238 upon error.
1239
1240 2005-05-10 Thomas Koenig <Thomas.Koenig@online.de>
1241
1242 PR fortran/27470
1243 * trans-array.c(gfc_array_allocate): If ref->next exists
1244 that is if there is a statement like ALLOCATE(foo%bar(2)),
1245 F95 rules require that bar should be a pointer.
1246
1247 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1248
1249 PR fortran/20460
1250 * resolve.c (gfc_resolve_index): Make REAL array indices a
1251 GFC_STD_LEGACY feature.
1252
1253 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1254
1255 PR fortran/24549
1256 * parse.c (reject_statement): Clear gfc_new_block.
1257
1258 2006-05-09 Steven G. Kargl <kargls@comcast.net>
1259
1260 * invoke.texi: Missed file in previous commit. Update
1261 description of -fall-intrinsics
1262
1263 2006-05-07 Steven Boscher <steven@gcc.gnu.org>
1264
1265 PR fortran/27378
1266 * parse.c (next_statement): Add check to avoid an ICE when
1267 gfc_current_locus.lb is not set.
1268
1269 2006-05-07 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
1270
1271 PR fortran/27457
1272 * match.c (match_case_eos): Error out on garbage following
1273 CASE(...).
1274
1275 2006-05-07 Paul Thomas <pault@gcc.gnu.org>
1276
1277 PR fortran/24813
1278 * trans-array.c (get_array_ctor_strlen): Remove static attribute.
1279 * trans.h: Add prototype for get_array_ctor_strlen.
1280 * trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
1281 and call get_array_ctor_strlen.
1282
1283 2006-05-05 Steven G. Kargl <kargls@comcast.net>
1284
1285 * invoke.texi: Update description of -fall-intrinsics
1286 * options.c (gfc_post_options): Disable -Wnonstd-intrinsics if
1287 -fall-intrinsics is used.
1288 (gfc_handle_option): Permit -Wno-nonstd-intrinsics.
1289
1290 2006-05-04 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
1291
1292 * simplify.c (ascii_table): Fix wrong entry.
1293
1294 2006-05-02 Steven G. Kargl <kargls@comcast.net>
1295
1296 PR fortran/26896
1297 * lang.opt: Fix -Wtab description
1298
1299 PR fortran/20248
1300 * lang.opt: New flag -fall-intrinsics.
1301 * invoke.texi: Document option.
1302 * gfortran.h (options_t): New member flag_all_intrinsics.
1303 * options.c (gfc_init_options, gfc_handle_option): Set new option.
1304 sort nearby misplaced options.
1305 * intrinsic.c (add_sym, make_generic, make_alias): Use it.
1306
1307 2006-05-02 Paul Thomas <pault@gcc.gnu.org>
1308
1309 PR fortran/27269
1310 * module.c: Add static flag in_load_equiv.
1311 (mio_expr_ref): Return if no symtree and in_load_equiv.
1312 (load_equiv): If any of the equivalence members have no symtree, free
1313 the equivalence and the associated expressions.
1314
1315 PR fortran/27324
1316 * trans-common.c (gfc_trans_common): Invert the order of calls to
1317 finish equivalences and gfc_commit_symbols.
1318
1319 2006-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
1320
1321 PR fortran/25681
1322 * simplify.c (simplify_len): Character variables with constant
1323 length can be simplified.
1324
1325 2006-04-29 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 PR fortran/27351
1328 * trans-array.c (gfc_conv_array_transpose): Move gcc_assert
1329 before gfc_conv_expr_descriptor.
1330
1331 2006-04-23 Paul Thomas <pault@gcc.gnu.org>
1332
1333 PR fortran/25099
1334 * resolve.c (resolve_call): Check conformity of elemental
1335 subroutine actual arguments.
1336
1337 2006-04-22 Jakub Jelinek <jakub@redhat.com>
1338
1339 PR fortran/26769
1340 * iresolve.c (gfc_resolve_reshape): Use reshape_r16 for real(16).
1341 (gfc_resolve_transpose): Use transpose_r16 for real(16).
1342
1343 2006-04-21 Paul Thomas <pault@gcc.gnu.org>
1344
1345 PR fortran/27122
1346 * resolve.c (resolve_function): Remove general restriction on auto
1347 character length function interfaces.
1348 (gfc_resolve_uops): Check restrictions on defined operator
1349 procedures.
1350 (resolve_types): Call the check for defined operators.
1351
1352 PR fortran/27113
1353 * trans-array.c (gfc_trans_array_constructor_subarray): Remove
1354 redundant gfc_todo_error.
1355 (get_array_ctor_var_strlen): Remove typo in enum.
1356
1357 2006-04-18 Bernhard Fischer <aldot@gcc.gnu.org>
1358
1359 * parse.c (next_free): Use consistent error string between
1360 free-form and fixed-form for illegal statement label of zero.
1361 (next_fixed): Use consistent warning string between free-form
1362 and fixed-form for statement labels for empty statements.
1363
1364 2006-04-18 Steve Ellcey <sje@cup.hp.com>
1365
1366 * trans-io.c (gfc_build_io_library_fndecls): Align pad.
1367
1368 2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
1369
1370 PR fortran/26017
1371 * trans-array.c(gfc_array_init_size): Introduce or_expr
1372 which is true if the size along any dimension
1373 is negative. Create a temporary variable with base
1374 name size. If or_expr is true, set the temporary to 0,
1375 to the normal size otherwise.
1376
1377 2006-04-16 Paul Thomas <pault@gcc.gnu.org>
1378
1379 PR fortran/26822
1380 * intrinsic.c (add_functions): Mark LOGICAL as elemental.
1381
1382 PR fortran/26787
1383 * expr.c (gfc_check_assign): Extend scope of error to include
1384 assignments to a procedure in the main program or, from a
1385 module or internal procedure that is not that represented by
1386 the lhs symbol. Use VARIABLE rather than l-value in message.
1387
1388 PR fortran/27096
1389 * trans-array.c (gfc_trans_deferred_array): If the backend_decl
1390 is not a descriptor, dereference and then test and use the type.
1391
1392 PR fortran/25597
1393 * trans-decl.c (gfc_trans_deferred_vars): Check if an array
1394 result, is also automatic character length. If so, process
1395 the character length.
1396
1397 PR fortran/18003
1398 PR fortran/25669
1399 PR fortran/26834
1400 * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
1401 data.info.dimen for bound intrinsics.
1402 * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
1403 UBOUND intrinsics and supply their shape information to the ss
1404 and the loop.
1405
1406 PR fortran/27124
1407 * trans_expr.c (gfc_trans_function_call): Add a new block, post,
1408 in to which all the argument post blocks are put. Add this block
1409 to se->pre after a byref call or to se->post, otherwise.
1410
1411 2006-04-14 Roger Sayle <roger@eyesopen.com>
1412
1413 * trans-io.c (set_string): Use fold_build2 and build_int_cst instead
1414 of build2 and convert to construct "x < 0" rather than "x <= -1".
1415
1416 2006-04-13 Richard Henderson <rth@redhat.com>
1417
1418 * trans-openmp.c (gfc_trans_omp_sections): Adjust for changed
1419 number of operands to OMP_SECTIONS.
1420
1421 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
1422
1423 * gfortran.texi: Fix typos. Follow spelling conventions.
1424 * resolve.c, trans-expr.c, trans-stmt.c: Fix comment typos.
1425 Follow spelling conventions.
1426
1427 2006-04-05 Roger Sayle <roger@eyesopen.com>
1428
1429 * dependency.c (get_no_elements): Delete function.
1430 (get_deps): Delete function.
1431 (transform_sections): Delete function.
1432 (gfc_check_section_vs_section): Significant rewrite.
1433
1434 2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 PR fortran/25619
1437 * trans-array.c (gfc_conv_expr_descriptor): Only dereference
1438 character pointer when copying temporary.
1439
1440 PR fortran/23634
1441 * trans-array.c (gfc_conv_expr_descriptor): Properly copy
1442 temporary character with non constant size.
1443
1444 2006-04-03 Paul Thomas <pault@gcc.gnu.org>
1445
1446 PR fortran/26891
1447 * trans.h: Prototype for gfc_conv_missing_dummy.
1448 * trans-expr (gfc_conv_missing_dummy): New function
1449 (gfc_conv_function_call): Call it and tidy up some of the code.
1450 * trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
1451
1452 PR fortran/26976
1453 * array.c (gfc_array_dimen_size): If available, return shape[dimen].
1454 * resolve.c (resolve_function): If available, use the argument
1455 shape for the function expression.
1456 * iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
1457
1458 2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org>
1459
1460 * trans-array.c (gfc_trans_dealloc_allocated): Take a
1461 tree representation of the array to be deallocated as argument
1462 instead of its gfc_symbol.
1463 (gfc_trans_deferred_array): Update call to
1464 gfc_trans_dealloc_allocated.
1465 * trans-array.h (gfc_trans_dealloc_allocated): Update
1466 prototype.
1467 * trans-expr.c (gfc_conv_function_call): Update call to
1468 gfc_trans_dealloc_allocated, get indirect reference to dummy
1469 arguments.
1470
1471 2006-04-01 Roger Sayle <roger@eyesopen.com>
1472
1473 PR fortran/25270
1474 * trans-array.c (gfc_trans_allocate_array_storage): In array index
1475 calculations use gfc_index_zero_node and gfc_index_one_node instead
1476 of integer_zero_node and integer_one_node respectively.
1477 (gfc_conv_array_transpose): Likewise.
1478 (gfc_conv_ss_startstride): Likewise.
1479 (gfc_trans_dummy_array_bias): Likewise.
1480
1481 2006-04-01 Roger Sayle <roger@eyesopen.com>
1482
1483 * dependency.c (gfc_is_inside_range): Delete.
1484 (gfc_check_element_vs_section): Significant rewrite.
1485
1486 2006-04-01 Roger Sayle <roger@eyesopen.com>
1487
1488 * dependency.c (gfc_dep_compare_expr): Strip parentheses and unary
1489 plus operators when comparing expressions. Handle comparisons of
1490 the form "X+C vs. X", "X vs. X+C", "X-C vs. X" and "X vs. X-C" where
1491 C is an integer constant. Handle comparisons of the form "P+Q vs.
1492 R+S" and "P-Q vs. R-S". Handle comparisons of integral extensions
1493 specially (increasing functions) so extend(A) > extend(B), when A>B.
1494 (gfc_check_element_vs_element): Move test later, so that we ignore
1495 the fact that "A < B" or "A > B" when A or B contains a forall index.
1496
1497 2006-03-31 Asher Langton <langton2@llnl.gov>
1498
1499 PR fortran/25358
1500 * expr.c (gfc_check_assign): Allow cray pointee to be assumes-size.
1501
1502 2006-03-30 Paul Thomas <paulthomas2@wanadoo.fr>
1503 Bud Davis <bdavis9659@sbcglobal.net>
1504
1505 PR 21130
1506 * module.c (load_needed): Traverse entire tree before returning.
1507
1508 2006-03-30 Roger Sayle <roger@eyesopen.com>
1509
1510 PR middle-end/22375
1511 * trans.c (gfc_trans_runtime_check): Promote the arguments of
1512 __builtin_expect to the correct types, and the result back to
1513 boolean_type_node.
1514
1515 2006-03-29 Carlos O'Donell <carlos@codesourcery.com>
1516
1517 * Make-lang.in: Rename docdir to gcc_docdir.
1518
1519 2006-03-28 Steven G. Kargl <kargls@comcast.net>
1520
1521 * intrinsic.texi: s/floor/float in previous commit.
1522
1523 2006-03-28 Paul Thomas <pault@gcc.gnu.org>
1524
1525 PR fortran/26779
1526 * resolve.c (resolve_fl_procedure): Do not check the access of
1527 derived types for internal procedures.
1528
1529 2006-03-27 Jakub Jelinek <jakub@redhat.com>
1530
1531 * io.c (check_io_constraints): Don't look at
1532 dt->advance->value.charater.string, unless it is a CHARACTER
1533 constant.
1534
1535 * f95-lang.c (gfc_get_alias_set): New function.
1536 (LANG_HOOKS_GET_ALIAS_SET): Define.
1537
1538 2006-03-25 Steven G. Kargl <kargls@comcast.net>
1539
1540 PR fortran/26816
1541 * intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
1542 * intrinsic.texi: Document FLOAT.
1543
1544 2006-03-25 Thomas Koenig <Thomas.Koenig@online.de>
1545
1546 PR fortran/26769
1547 * iresolve.c (gfc_resolve_reshape): Remove doubling of
1548 kind for complex. For real(kind=10), call reshape_r10.
1549 (gfc_resolve_transpose): For real(kind=10), call
1550 transpose_r10.
1551
1552 2006-03-25 Roger Sayle <roger@eyesopen.com>
1553
1554 * dependency.c (gfc_check_dependency): Improve handling of pointers;
1555 Two variables of different types can't have a dependency, and two
1556 variables with the same symbol are equal, even if pointers.
1557
1558 2006-03-24 Roger Sayle <roger@eyesopen.com>
1559
1560 * gfortran.h (gfc_symbol): Add a new "forall_index" bit field.
1561 * match.c (match_forall_iterator): Set forall_index field on
1562 the iteration variable's symbol.
1563 * dependency.c (contains_forall_index_p): New function to
1564 traverse a gfc_expr to check whether it contains a variable
1565 with forall_index set in it's symbol.
1566 (gfc_check_element_vs_element): Return GFC_DEP_EQUAL for scalar
1567 constant expressions that don't variables used as FORALL indices.
1568
1569 2006-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1570
1571 PR driver/22600
1572 * error.c (gfc_fatal_error): Return ICE_EXIT_CODE instead of 4.
1573
1574 2006-03-22 Thomas Koenig <Thomas.Koenig@online.de>
1575
1576 PR fortran/19303
1577 * gfortran.h (gfc_option_t): Add record_marker.
1578 * lang.opt: Add -frecord-marker=4 and -frecord-marker=8.
1579 * trans-decl.c: Add gfor_fndecl_set_record_marker.
1580 (gfc_build_builtin_function_decls): Set
1581 gfor_fndecl_set_record_marker.
1582 (gfc_generate_function_code): If we are in the main program
1583 and -frecord-marker was provided, call set_record_marker.
1584 * options.c (gfc_handle_option): Add handling for
1585 -frecord-marker=4 and -frecord-marker=8.
1586 * invoke.texi: Document -frecord-marker.
1587
1588 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
1589
1590 PR fortran/17298
1591 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): New
1592 function to implement array valued TRANSFER intrinsic.
1593 (gfc_conv_intrinsic_function): Call the new function if TRANSFER
1594 and non-null se->ss.
1595 (gfc_walk_intrinsic_function): Treat TRANSFER as one of the
1596 special cases by calling gfc_walk_intrinsic_libfunc directly.
1597
1598 2006-03-21 Toon Moene <toon@moene.indiv.nluug.nl>
1599
1600 * options.c (gfc_init_options): Initialize
1601 flag_argument_noalias to 3.
1602
1603 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de>
1604
1605 PR fortran/20935
1606 * iresolve.c (gfc_resolve_maxloc): If mask is scalar,
1607 prefix the function name with an "s". If the mask is scalar
1608 or if its kind is smaller than gfc_default_logical_kind,
1609 coerce it to default kind.
1610 (gfc_resolve_maxval): Likewise.
1611 (gfc_resolve_minloc): Likewise.
1612 (gfc_resolve_minval): Likewise.
1613 (gfc_resolve_product): Likewise.
1614 (gfc_resolve_sum): Likewise.
1615
1616 2006-03-19 Paul Thomas <pault@gcc.gnu.org>
1617
1618 PR fortran/26741
1619 *expr.c (external_spec_function): Permit elemental functions.
1620
1621 PR fortran/26716
1622 *interface.c (compare_actual_formal): Detect call for procedure
1623 usage and require rank checking, in this case, for assumed shape
1624 and deferred shape arrays.
1625 (gfc_procedure_use): Revert to pre-PR25070 call to
1626 compare_actual_formal that does not require rank checking..
1627
1628 2006-03-16 Roger Sayle <roger@eyesopen.com>
1629
1630 * gfortran.h (gfc_equiv_info): Add length field.
1631 * trans-common.c (copy_equiv_list_to_ns): Set the length field.
1632 * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
1633 and length fields to determine whether the two equivalenced symbols
1634 overlap in memory.
1635
1636 2006-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1637
1638 PR fortran/19101
1639 * gfortran.h: Add warn_ampersand.
1640 * invoke.texi: Add documentation for new option.
1641 * lang.opt: Add Wampersand.
1642 * options.c (gfc_init_options): Initialize warn_ampersand.
1643 (gfc_post_options): Set the warn if pedantic.
1644 (set_Wall): Set warn_ampersand.
1645 (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
1646 * scanner.c (gfc_next_char_literal): Add test for missing '&' in
1647 continued character constant and give warning if missing.
1648
1649 2006-03-14 Steven G. Kargl <kargls@comcast.net>
1650
1651 PR 18537
1652 * gfortran.h: Wrap Copyright line.
1653 (gfc_option_t): add warn_tabs member.
1654 * lang.opt: Update Coyright year. Add the Wtabs.
1655 * invoke.texi: Document -Wtabs.
1656 * scanner.c (gfc_gobble_whitespace): Use warn_tabs. Add linenum to
1657 suppress multiple warnings.
1658 (load_line): Use warn_tabs. Add linenum, current_line, seen_comment
1659 to suppress multiple warnings.
1660 * options.c (gfc_init_options): Initialize warn_tabs.
1661 (set_Wall): set warn_tabs for -Wall.
1662 (gfc_post_options): Adjust flag_tabs depending on -pedantic.
1663 (gfc_handle_option): Process command-line option -W[no-]tabs
1664
1665 2006-03-13 Paul Thomas <pault@gcc.gnu.org>
1666
1667 PR fortran/25378
1668 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
1669 modify the condition for updating it, to implement the F2003 requirement for all(mask)
1670 is false.
1671
1672 2006-03-13 Jakub Jelinek <jakub@redhat.com>
1673
1674 * trans-openmp.c (gfc_trans_omp_variable): Handle references
1675 to parent result.
1676 * trans-expr.c (gfc_conv_variable): Remove useless setting
1677 of parent_flag, formatting.
1678
1679 * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
1680 GFC_DECL_RESULT flag.
1681
1682 2003-03-11 Roger Sayle <roger@eyesopen.com>
1683
1684 * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
1685 binary operators to compare equal if their operands are equal.
1686 <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
1687 to compare equal, if their operands are equal.
1688
1689 2006-03-11 Erik Edelmann <eedelman@gcc.gnu.org>
1690
1691 * symbol.c (check_conflict): Allow allocatable function results,
1692 except for elemental functions.
1693 * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
1694 (gfc_trans_create_temp_array): ... this, and add new argument
1695 callee_alloc.
1696 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
1697 to gfc_trans_allocate_temp_array.
1698 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1699 * trans-expr.c (gfc_conv_function_call): Use new arg of
1700 gfc_trans_create_temp_array avoid pre-allocation of temporary
1701 result variables of pointer AND allocatable functions.
1702 (gfc_trans_arrayfunc_assign): Return NULL for allocatable
1703 functions.
1704 * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
1705 from sym->result to sym.
1706
1707 2006-03-09 Erik Edelmann <eedelman@gcc.gnu.org>
1708
1709 * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
1710 attribute from sym to new_sym. Call build_fold_indirect_ref()
1711 for allocatable arguments.
1712
1713 2006-03-09 Paul Thomas <pault@gcc.gnu.org>
1714
1715 PR fortran/26257
1716 * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
1717 the offset and data when se->data_not_needed is set.
1718 * trans.h: Include the data_not_need bit in gfc_se.
1719 * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
1720
1721 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
1722 Erik Edelmann <eedelman@gcc.gnu.org>
1723
1724 * trans-array.c (gfc_trans_dealloc_allocated): New function.
1725 (gfc_trans_deferred_array): Use it, instead of inline code.
1726 * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
1727 * trans-expr.c (gfc_conv_function_call): Deallocate allocated
1728 ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
1729
1730 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
1731
1732 PR fortran/26107
1733 * resolve.c (resolve_function): Add name after test for pureness.
1734
1735 PR fortran/19546
1736 * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
1737 store current_function_decl, replace with parent, whilst calls are
1738 made to gfc_get_fake_result_decl, and restore afterwards. Signal this
1739 to gfc_get_fake_result_decl with a new argument, parent_flag.
1740 * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
1741 is set to zero.
1742 * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
1743 * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
1744 add decl to parent function. Replace refs to current_fake_result_decl
1745 with refs to this_result_decl.
1746 (gfc_generate_function_code): Null parent_fake_result_decl before the
1747 translation of code for contained procedures. Set parent_flag to zero
1748 in call to gfc_get_fake_result_decl.
1749 * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
1750
1751 2006-03-05 Steven G. Kargl <kargls@comcast.net>
1752
1753 * simplify.c (gfc_simplify_verify): Fix return when SET=''.
1754
1755 2006-03-05 Erik Edelmann <eedelman@gcc.gnu.org>
1756
1757 PR fortran/16136
1758 * symbol.c (conf_std): New macro.
1759 (check_conflict): Use it to allow ALLOCATABLE dummy
1760 arguments for F2003.
1761 * trans-expr.c (gfc_conv_function_call): Pass the
1762 address of the array descriptor when dummy argument is
1763 ALLOCATABLE.
1764 * interface.c (compare_allocatable): New function.
1765 (compare_actual_formal): Use it.
1766 * resolve.c (resolve_deallocate_expr,
1767 resolve_allocate_expr): Check that INTENT(IN) variables
1768 aren't (de)allocated.
1769 * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
1770 dummy arguments as supported.
1771
1772 2006-03-03 Roger Sayle <roger@eyesopen.com>
1773
1774 * dependency.c (gfc_check_element_vs_element): Revert last change.
1775
1776 2006-03-03 Roger Sayle <roger@eyesopen.com>
1777
1778 * dependency.c (gfc_check_element_vs_element): Consider two
1779 unordered scalar subscripts as (potentially) equal.
1780
1781 2006-03-03 Roger Sayle <roger@eyesopen.com>
1782
1783 * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
1784 check whether two array references have a dependency.
1785 (gfc_check_element_vs_element): Assume lref and rref must be
1786 REF_ARRAYs. If gfc_dep_compare_expr returns -2, assume these
1787 references could potentially overlap.
1788 (gfc_dep_resolver): Whitespace and comment tweaks. Assume a
1789 dependency if the references have different depths. Rewrite
1790 final term to clarrify we only have a dependency for overlaps.
1791
1792 2006-03-03 Thomas Koenig <Thomas.Koenig@online.de>
1793
1794 PR fortran/25031
1795 * trans-array.h: Adjust gfc_array_allocate prototype.
1796 * trans-array.c (gfc_array_allocate): Change type of
1797 gfc_array_allocatate to bool. Function returns true if
1798 it operates on an array. Change second argument to gfc_expr.
1799 Find last reference in chain.
1800 If the function operates on an allocatable array, emit call to
1801 allocate_array() or allocate64_array().
1802 * trans-stmt.c (gfc_trans_allocate): Code to follow to last
1803 reference has been moved to gfc_array_allocate.
1804 * trans.h: Add declaration for gfor_fndecl_allocate_array and
1805 gfor_fndecl_allocate64_array.
1806 (gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
1807 and gfor_fndecl_allocate64_array.
1808
1809 2006-03-01 Roger Sayle <roger@eyesopen.com>
1810
1811 * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
1812 INVERT argument to invert the sense of the WHEREMASK argument.
1813 Remove unneeded code to AND together a list of masks.
1814 (generate_loop_for_rhs_to_temp): Likewise.
1815 (gfc_trans_assign_need_temp): Likewise.
1816 (gfc_trans_forall_1): Likewise.
1817 (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
1818 to specify the sense of the MASK argument.
1819 (gfc_trans_where_assign): Likewise.
1820 (gfc_trans_where_2): Likewise. Restructure code that decides
1821 whether we need to allocate zero, one or two temporary masks.
1822 If this is a top-level WHERE (i.e. the incoming MASK is NULL),
1823 we only need to allocate at most one temporary mask, and can
1824 invert it's sense to provide the complementary pending execution
1825 mask. Only calculate the size of the required temporary arrays
1826 if we need any.
1827 (gfc_trans_where): Update call to gfc_trans_where_2.
1828
1829 2006-03-01 Paul Thomas <pault@gcc.gnu.org>
1830
1831 * iresolve.c (gfc_resolve_dot_product): Remove any difference in
1832 treatment of logical types.
1833 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function.
1834
1835 PR fortran/26393
1836 * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
1837 must be referenced to include unreferenced symbols in an interface
1838 body.
1839
1840 PR fortran/20938
1841 * trans-array.c (gfc_conv_resolve_dependencies): Add call to
1842 gfc_are_equivalenced_arrays.
1843 * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
1844 functions. (gfc_free_namespace): Call them.
1845 * trans-common.c (copy_equiv_list_to_ns): New function.
1846 (add_equivalences): Call it.
1847 * gfortran.h: Add equiv_lists to gfc_namespace and define
1848 gfc_equiv_list and gfc_equiv_info.
1849 * dependency.c (gfc_are_equivalenced_arrays): New function.
1850 (gfc_check_dependency): Call it.
1851 * dependency.h: Prototype for gfc_are_equivalenced_arrays.
1852
1853 2006-03-01 Roger Sayle <roger@eyesopen.com>
1854
1855 * dependency.c (gfc_is_same_range): Compare the stride, lower and
1856 upper bounds when testing array reference ranges for equality.
1857 (gfc_check_dependency): Fix indentation whitespace.
1858 (gfc_check_element_vs_element): Likewise.
1859 (gfc_dep_resolver): Likewise.
1860
1861 2006-02-28 Thomas Koenig <Thomas.Koenig@online.de>
1862
1863 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
1864 If the mask expression exists and has rank 0, enclose the
1865 generated loop in an "if (mask)". Put the default
1866 initialization into the else branch.
1867
1868 2006-02-25 Thomas Koenig <Thomas.Koenig@online.de>
1869
1870 PR fortran/23092
1871 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the
1872 mask expression exists and has rank 0, enclose the generated
1873 loop in an "if (mask)".
1874 * (gfc_conv_intrinsic_minmaxloc): Likewise.
1875
1876 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
1877
1878 PR fortran/26409
1879 * resolve.c (resolve_contained_functions, resolve_types,
1880 gfc_resolve): Revert patch of 2006-02-19.
1881
1882 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
1883
1884 PR fortran/24519
1885 * dependency.c (gfc_is_same_range): Correct typo.
1886 (gfc_check_section_vs_section): Call gfc_is_same_range.
1887
1888 PR fortran/25395
1889 * trans-common.c (add_equivalences): Add a new flag that is set when
1890 an equivalence is seen that prevents more from being reset until the
1891 start of a new traversal of the list, thus ensuring completion of
1892 all the equivalences.
1893
1894 2006-02-23 Erik Edelmann <eedelman@gcc.gnu.org>
1895
1896 * module.c (read_module): Remove redundant code lines.
1897
1898 2006-02-20 Rafael \81Ávila de Esp\81índola <rafael.espindola@gmail.com>
1899 * Make-lang.in (FORTRAN): Remove
1900 (.PHONY): Remove F95 and f95. Add fortran
1901
1902 2006-02-20 Roger Sayle <roger@eyesopen.com>
1903
1904 * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
1905 execution mask for empty WHERE/ELSEWHERE clauses. Don't allocate
1906 temporary mask arrays if they won't be used.
1907
1908 2006-02-20 Roger Sayle <roger@eyesopen.com>
1909
1910 * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
1911 traversing a linked list of MASKs. The MASK is now always a
1912 single element requiring no ANDing during the assignment.
1913
1914 2006-02-19 Thomas Koenig <Thomas.Koenig@online.de>
1915
1916 * gfortran.texi: Document environment variables which
1917 influence runtime behavior.
1918
1919 2006-02-19 H.J. Lu <hongjiu.lu@intel.com>
1920
1921 * resolve.c (resolve_contained_functions): Call resolve_entries
1922 first.
1923 (resolve_types): Remove calls to resolve_entries and
1924 resolve_contained_functions.
1925 (gfc_resolve): Call resolve_contained_functions.
1926
1927 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org>
1928
1929 PR fortran/26201
1930 * intrinsic.c (gfc_convert_type_warn): Call
1931 gfc_intrinsic_symbol() on the newly created symbol.
1932
1933 2006-02-19 Paul Thomas <pault@gcc.gnu.org>
1934
1935 PR fortran/25054
1936 * resolve.c (is_non_constant_shape_array): New function.
1937 (resolve_fl_variable): Remove code for the new function and call it.
1938 (resolve_fl_namelist): New function. Add test for namelist array
1939 with non-constant shape, using is_non_constant_shape_array.
1940 (resolve_symbol): Remove code for resolve_fl_namelist and call it.
1941
1942 PR fortran/25089
1943 * match.c (match_namelist): Increment the refs field of an accepted
1944 namelist object symbol.
1945 * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
1946 with contained or module procedures.
1947
1948 2006-02-18 Roger Sayle <roger@eyesopen.com>
1949
1950 * trans-stmt.c (struct temporary_list): Delete.
1951 (gfc_trans_where_2): Major reorganization. Remove no longer needed
1952 TEMP argument. Allocate and deallocate the control mask and
1953 pending control mask locally.
1954 (gfc_trans_forall_1): Delete TEMP local variable, and update
1955 call to gfc_trans_where_2. No need to deallocate arrays after.
1956 (gfc_evaluate_where_mask): Major reorganization. Change return
1957 type to void. Pass in parent execution mask, MASK, and two
1958 already allocated mask arrays CMASK and PMASK. On return
1959 CMASK := MASK & COND, PMASK := MASK & !COND. MASK, CMASK and
1960 CMASK may all be NULL, or refer to the same temporary arrays.
1961 (gfc_trans_where): Update call to gfc_trans_where_2. We no
1962 longer need a TEMP variable or to deallocate temporary arrays
1963 allocated by gfc_trans_where_2.
1964
1965 2006-02-18 Danny Smith <dannysmith@users.sourceforeg.net>
1966
1967 * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
1968 * symbol.c (gfc_add_attribute): Likewise for definition.
1969 * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
1970
1971 2006-02-17 Richard Sandiford <richard@codesourcery.com>
1972
1973 * trans-common.c: Include rtl.h earlier.
1974 * trans-decl.c: Likewise.
1975
1976 2006-02-16 Jakub Jelinek <jakub@redhat.com>
1977
1978 PR fortran/26224
1979 * parse.c (parse_omp_do, parse_omp_structured_block): Call
1980 gfc_commit_symbols and gfc_warning_check.
1981
1982 * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
1983 PR middle-end/26316.
1984
1985 2006-02-16 Paul Thomas <pault@gcc.gnu.org>
1986
1987 PR fortran/24557
1988 * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
1989 for character(*) arrays, rather than casting to the type and kind
1990 parameters of the formal argument.
1991
1992 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl>
1993
1994 PR fortran/26054
1995 * options.c: Do not warn for Fortran 2003 features by default.
1996
1997 2006-02-15 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
1998
1999 * check.c: Update copyright years.
2000
2001 * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
2002 dim_range_check on not-present optional dim argument.
2003
2004 2006-02-15 Jakub Jelinek <jakub@redhat.com>
2005
2006 PR libgomp/25938
2007 PR libgomp/25984
2008 * Make-lang.in (install-finclude-dir): New goal.
2009 (fortran.install-common): Depend on install-finclude-dir.
2010 * lang-specs.h: If not -nostdinc, add -I finclude.
2011
2012 2006-02-14 Thomas Koenig <Thomas.Koenig@online.de>
2013
2014 PR fortran/25045
2015 * check.c (dim_check): Perform all checks if dim is optional.
2016 (gfc_check_minloc_maxloc): Use dim_check and dim_rank_check
2017 to check dim argument.
2018 (check_reduction): Likewise.
2019
2020 2006-02-14 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2021
2022 PR fortran/26277
2023 * io.c (match_ltag): Mark label as referenced.
2024
2025 2006-02-14 Jakub Jelinek <jakub@redhat.com>
2026 Richard Henderson <rth@redhat.com>
2027 Diego Novillo <dnovillo@redhat.com>
2028
2029 * invoke.texi: Document -fopenmp.
2030 * gfortran.texi (Extensions): Document OpenMP.
2031
2032 Backport from gomp-20050608-branch
2033 * trans-openmp.c: Call build_omp_clause instead of
2034 make_node when creating OMP_CLAUSE_* trees.
2035 (gfc_trans_omp_reduction_list): Remove argument 'code'.
2036 Adjust all callers.
2037
2038 * trans.h (build4_v): Define.
2039 * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
2040 Call build3_v to create OMP_SECTIONS nodes.
2041
2042 PR fortran/25162
2043 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
2044 on all symbols added to the variable list.
2045
2046 * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
2047 procedure symbol in REDUCTION.
2048
2049 * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
2050 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
2051
2052 * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK
2053 is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
2054 that statement block.
2055 (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
2056 for non-ordered non-static combined loops.
2057 (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
2058
2059 * openmp.c: Include target.h and toplev.h.
2060 (gfc_match_omp_threadprivate): Emit diagnostic if target does
2061 not support TLS.
2062 * Make-lang.in (fortran/openmp.o): Add dependencies on
2063 target.h and toplev.h.
2064
2065 * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
2066 * trans-openmp.c (gfc_omp_privatize_by_reference): Make
2067 DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
2068 (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
2069 (gfc_trans_omp_variable): New function.
2070 (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
2071 * trans.h (GFC_DECL_RESULT): Define.
2072
2073 * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
2074 * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
2075 * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
2076
2077 * trans-openmp.c (gfc_omp_privatize_by_reference): Return
2078 true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
2079 (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
2080 functions.
2081 (gfc_trans_omp_clauses): Add WHERE argument. Call
2082 gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
2083 for reductions.
2084 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
2085 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
2086 gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
2087 gfc_trans_omp_clauses callers.
2088
2089 * openmp.c (omp_current_do_code): New var.
2090 (gfc_resolve_omp_do_blocks): New function.
2091 (gfc_resolve_omp_parallel_blocks): Call it.
2092 (gfc_resolve_do_iterator): Add CODE argument. Don't propagate
2093 predetermination if argument is !$omp do or !$omp parallel do
2094 iteration variable.
2095 * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
2096 for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller.
2097 * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
2098 (gfc_resolve_do_iterator): Add CODE argument.
2099
2100 * trans.h (gfc_omp_predetermined_sharing,
2101 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
2102 prototypes.
2103 (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
2104 * trans-openmp.c (gfc_omp_predetermined_sharing,
2105 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
2106 functions.
2107 * trans-common.c (build_equiv_decl, build_common_decl,
2108 create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
2109 * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
2110 on the decl.
2111 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
2112 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
2113 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
2114
2115 * openmp.c (resolve_omp_clauses): Remove extraneous comma.
2116
2117 * symbol.c (check_conflict): Add conflict between cray_pointee and
2118 threadprivate.
2119 * openmp.c (gfc_match_omp_threadprivate): Fail if
2120 gfc_add_threadprivate returned FAILURE.
2121 (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
2122 {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
2123 {FIRST,LAST}PRIVATE and REDUCTION clauses.
2124
2125 * resolve.c (omp_workshare_flag): New variable.
2126 (resolve_function): Diagnose use of non-ELEMENTAL user defined
2127 function in WORKSHARE construct.
2128 (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag
2129 is set to correct value in different contexts.
2130
2131 * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
2132 variable name.
2133 (resolve_omp_atomic): Likewise.
2134
2135 PR fortran/24493
2136 * scanner.c (skip_free_comments): Set at_bol at the beginning of the
2137 loop, not before it.
2138 (skip_fixed_comments): Handle ! comments in the middle of line here
2139 as well.
2140 (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
2141 not at BOL.
2142 (gfc_next_char_literal): Fix expected canonicalized *$omp string.
2143
2144 * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
2145 initialization to build OMP_FOR instead of build.
2146
2147 * trans-decl.c (gfc_gimplify_function): Invoke
2148 diagnose_omp_structured_block_errors.
2149
2150 * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
2151 (gfc_trans_omp_ordered): Use OMP_ORDERED.
2152
2153 * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
2154 gfc_resolve_omp_parallel_blocks): New prototypes.
2155 * resolve.c (resolve_blocks): Renamed to...
2156 (gfc_resolve_blocks): ... this. Remove static.
2157 (gfc_resolve_forall): Adjust caller.
2158 (resolve_code): Only call gfc_resolve_blocks if code->block != 0
2159 and not for EXEC_OMP_PARALLEL* directives. Call
2160 gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
2161 Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
2162 iterator.
2163 * openmp.c: Include pointer-set.h.
2164 (omp_current_ctx): New variable.
2165 (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
2166 functions.
2167 * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
2168
2169 * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
2170 look up symbol if it exists, use its name instead and, if it is not
2171 INTRINSIC, issue diagnostics.
2172
2173 * parse.c (parse_omp_do): Handle implied end do properly.
2174 (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
2175 return it instead of continuing.
2176
2177 * trans-openmp.c (gfc_trans_omp_critical): Update for changed
2178 operand numbering.
2179 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
2180 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
2181 gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
2182
2183 * trans.h (gfc_omp_privatize_by_reference): New prototype.
2184 * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
2185 to gfc_omp_privatize_by_reference.
2186 * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
2187
2188 * trans-stmt.h (gfc_trans_omp_directive): Add comment.
2189
2190 * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
2191 Disallow COMMON matching if it is set.
2192 (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
2193 (resolve_omp_clauses): Show locus in error messages. Check that
2194 variable types in reduction clauses are appropriate for reduction
2195 operators.
2196
2197 * resolve.c (resolve_symbol): Don't error if a threadprivate module
2198 variable isn't SAVEd.
2199
2200 * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
2201 Fix typo in condition. Fix DOVAR initialization.
2202
2203 * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
2204 rather than .min. etc.
2205
2206 * trans-openmpc.c (omp_not_yet): Remove.
2207 (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
2208 Force creation of BIND_EXPR around the workshare construct.
2209 (gfc_trans_omp_parallel_sections): Likewise.
2210 (gfc_trans_omp_parallel_workshare): Likewise.
2211
2212 * types.def (BT_I16, BT_FN_I16_VPTR_I16,
2213 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
2214
2215 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
2216 (gfc_trans_omp_code): New function.
2217 (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
2218 (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
2219 (gfc_trans_omp_sections): Likewise. Only treat empty last section
2220 specially if lastprivate clause is present.
2221 * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
2222 builtin.
2223
2224 * trans-openmp.c (gfc_trans_omp_variable_list): Update for
2225 OMP_CLAUSE_DECL name change.
2226 (gfc_trans_omp_do): Likewise.
2227
2228 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
2229 clauses.
2230 (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
2231 sync builtins directly.
2232 (gfc_trans_omp_single): Build OMP_SINGLE statement.
2233
2234 * trans-openmp.c (gfc_trans_add_clause): New.
2235 (gfc_trans_omp_variable_list): Take a tree code and build the clause
2236 node here. Link it to the head of a list.
2237 (gfc_trans_omp_clauses): Update to match.
2238 (gfc_trans_omp_do): Use gfc_trans_add_clause.
2239
2240 * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
2241 gfc_omp_clauses *. Use gfc_evaluate_now instead of creating
2242 temporaries by hand.
2243 (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
2244 (gfc_trans_omp_do): New function.
2245 (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
2246 (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
2247 Use buildN_v macros.
2248 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
2249 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
2250 gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
2251 (gfc_trans_omp_directive): Use them.
2252 * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
2253 * openmp.c (resolve_omp_clauses): Check for list items present
2254 in multiple clauses.
2255 (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
2256 and is not present in any clause variable lists other than PRIVATE
2257 or LASTPRIVATE.
2258
2259 * gfortran.h (symbol_attribute): Add threadprivate bit.
2260 (gfc_common_head): Add threadprivate member, change use_assoc
2261 and saved into char to save space.
2262 (gfc_add_threadprivate): New prototype.
2263 * symbol.c (check_conflict): Handle threadprivate.
2264 (gfc_add_threadprivate): New function.
2265 (gfc_copy_attr): Copy threadprivate.
2266 * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
2267 if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and
2268 OMP_CLAUSE_ORDERED.
2269 * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
2270 outside a module and not in COMMON has is not SAVEd.
2271 (resolve_equivalence): Ensure THREADPRIVATE objects don't get
2272 EQUIVALENCEd.
2273 * trans-common.c: Include target.h and rtl.h.
2274 (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
2275 * trans-decl.c: Include rtl.h.
2276 (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
2277 * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
2278 * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
2279 (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
2280 * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
2281 is from current namespace.
2282 (gfc_match_omp_threadprivate): Rewrite.
2283 (resolve_omp_clauses): Check some clause restrictions.
2284 * module.c (ab_attribute): Add AB_THREADPRIVATE.
2285 (attr_bits): Add THREADPRIVATE.
2286 (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
2287 (load_commons, write_common, write_blank_common): Adjust for type
2288 change of saved, store/load threadprivate bit from the integer
2289 as well.
2290
2291 * types.def (BT_FN_UINT_UINT): New.
2292 (BT_FN_VOID_UINT_UINT): Remove.
2293
2294 * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
2295 gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
2296 gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
2297 (gfc_trans_omp_directive): Use them.
2298
2299 * openmp.c (expr_references_sym): Add SE argument, don't look
2300 into SE tree.
2301 (is_conversion): New function.
2302 (resolve_omp_atomic): Adjust expr_references_sym callers. Handle
2303 promoted expressions.
2304 * trans-openmp.c (gfc_trans_omp_atomic): New function.
2305 (gfc_trans_omp_directive): Call it.
2306
2307 * f95-lang.c (builtin_type_for_size): New function.
2308 (gfc_init_builtin_functions): Initialize synchronization and
2309 OpenMP builtins.
2310 * types.def: New file.
2311 * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
2312 fortran/types.def.
2313
2314 * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
2315
2316 * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
2317 is NULL.
2318
2319 * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
2320 functions.
2321 (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
2322
2323 * parse.c (parse_omp_do): Call pop_state before next_statement.
2324 * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
2325 New functions.
2326 (gfc_resolve_omp_directive): Call them.
2327 * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
2328 leaves an OpenMP structured block or if EXIT terminates !$omp do
2329 loop.
2330
2331 * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
2332 (F95_OBJS): Add fortran/trans-openmp.o.
2333 (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
2334 * lang.opt: Add -fopenmp option.
2335 * options.c (gfc_init_options): Initialize it.
2336 (gfc_handle_option): Handle it.
2337 * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
2338 ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
2339 ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
2340 ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
2341 ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
2342 ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
2343 ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
2344 ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
2345 ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
2346 statement codes.
2347 (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
2348 OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
2349 OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
2350 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
2351 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
2352 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
2353 New OpenMP variable list types.
2354 (gfc_omp_clauses): New typedef.
2355 (gfc_get_omp_clauses): Define.
2356 (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
2357 EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
2358 EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
2359 EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
2360 EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
2361 EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
2362 (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
2363 and omp_bool fields to ext union.
2364 (flag_openmp): Declare.
2365 (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
2366 * scanner.c (openmp_flag, openmp_locus): New variables.
2367 (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
2368 Handle OpenMP directive lines and conditional compilation magic
2369 comments.
2370 * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
2371 * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
2372 parse_omp_structured_block): New functions.
2373 (next_free, next_fixed): Parse OpenMP directives.
2374 (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
2375 codes.
2376 (gfc_ascii_statement): Handle ST_OMP_* codes.
2377 (parse_executable): Rearrange the loop slightly, so that
2378 parse_omp_do can return next_statement.
2379 * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
2380 gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
2381 gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
2382 gfc_match_omp_parallel, gfc_match_omp_parallel_do,
2383 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
2384 gfc_match_omp_sections, gfc_match_omp_single,
2385 gfc_match_omp_threadprivate, gfc_match_omp_workshare,
2386 gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
2387 * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
2388 (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
2389 directives.
2390 * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
2391 EXEC_OMP_* directives.
2392 * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
2393 * trans-stmt.h (gfc_trans_omp_directive): New prototype.
2394 * openmp.c: New file.
2395 * trans-openmp.c: New file.
2396
2397 2006-02-13 Andrew Pinski <pinskia@physics.uc.edu>
2398 Jakub Jelinek <jakub@redhat.com>
2399
2400 PR fortran/26246
2401 * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
2402 gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
2403
2404 2006-02-13 Paul Thomas <pault@gcc.gnu.org>
2405
2406 PR fortran/26074
2407 PR fortran/25103
2408 * resolve.c (resolve_symbol): Extend the requirement that module
2409 arrays have constant bounds to those in the main program. At the
2410 same time simplify the array bounds, to avoiding trapping parameter
2411 array references, and exclude automatic character length from main
2412 and modules. Rearrange resolve_symbol and resolve_derived to put as
2413 each flavor together, as much as is possible and move all specific
2414 code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
2415 functions.
2416 (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
2417 New functions to do work of resolve_symbol.
2418 (resolve_index_expr): New function that is called from resolved_symbol
2419 and is extracted from resolve_charlen.
2420 (resolve_charlen): Call this new function.
2421 (resolve_fl_derived): Renamed resolve_derived to be consistent with
2422 the naming of the new functions for the other flavours. Change the
2423 charlen checking so that the style is consistent with other similar
2424 checks. Add the generation of the gfc_dt_list, removed from resolve_
2425 symbol.
2426
2427 PR fortran/20861
2428 * resolve.c (resolve_actual_arglist): Prevent internal procedures
2429 from being dummy arguments.
2430
2431 PR fortran/20871
2432 * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
2433 procedures from being dummy arguments.
2434
2435 PR fortran/25083
2436 * resolve.c (check_data_variable): Add test that data variable is in
2437 COMMON.
2438
2439 PR fortran/25088
2440 * resolve.c (resolve_call): Add test that the subroutine does not
2441 have a type.
2442
2443 2006-02-12 Erik Edelmann <eedelman@gcc.gnu.org>
2444
2445 PR fortran/25806
2446 * trans-array.c (gfc_trans_allocate_array_storage): New argument
2447 dealloc; free the temporary only if dealloc is true.
2448 (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
2449 passed onwards to gfc_trans_allocate_array_storage.
2450 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
2451 gfc_trans_allocate_temp_array.
2452 * trans-array.h (gfc_trans_allocate_temp_array): Update function
2453 prototype.
2454 * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
2455 to gfc_trans_allocate_temp_array to false in case of functions
2456 returning pointers.
2457 (gfc_trans_arrayfunc_assign): Return NULL for functions returning
2458 pointers.
2459
2460 2006-02-10 Steven G. Kargl <kargls@comcast.net>
2461
2462 PR fortran/20858
2463 *decl.c (variable_decl): Improve error message. Remove initialization
2464 typespec. Wrap long line.
2465 *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
2466 and rank.
2467 *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
2468 are set.
2469
2470
2471 2006-02-10 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2472
2473 PR fortran/14771
2474 * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
2475 * expr.c (check_intrinsic_op): Likewise.
2476 * module.c (mio_expr): Likewise.
2477
2478 2006-02-09 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2479
2480 * dump-parse-tree.c: Update copyright years.
2481 * matchexp.c: Likewise.
2482 * module.c: Likewise.
2483
2484 PR fortran/14771
2485 * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
2486 * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
2487 * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
2488 if it were INTRINSIC_UPLUS.
2489 * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
2490 * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
2491 * matchexp.c (match_primary): Record parentheses surrounding
2492 numeric expressions.
2493 * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
2494 dumping.
2495 * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
2496
2497 2006-02-09 Paul Thomas <pault@gcc.gnu.org>
2498
2499 PR fortran/26038
2500 * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
2501 scalar with missing backend_decl for the hidden dummy charlen.
2502
2503 PR fortran/25059
2504 * interface.c (gfc_extend_assign): Remove detection of non-PURE
2505 subroutine in assignment interface, with gfc_error, and put it in
2506 * resolve.c (resolve_code).
2507
2508 PR fortran/25070
2509 * interface.c (gfc_procedure_use): Flag rank checking for non-
2510 elemental, contained or interface procedures in call to
2511 (compare_actual_formal), where ranks are checked for assumed
2512 shape arrays..
2513
2514 2006-02-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2515
2516 PR libfortran/25425
2517 * trans-decl.c (gfc_generate_function_code): Add new argument,
2518 pedantic, to set_std call.
2519
2520 2006-02-06 Thomas Koenig <Thomas.Koenig@online.de>
2521
2522 PR libfortran/23815
2523 * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
2524 variable.
2525 * invoke.texi: Mention the "Runtime" chapter.
2526 Document the -fconvert= option.
2527 * gfortran.h: Add options_convert.
2528 * lang.opt: Add fconvert=little-endian, fconvert=big-endian,
2529 fconvert=native and fconvert=swap.
2530 * trans-decl.c (top level): Add gfor_fndecl_set_convert.
2531 (gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert.
2532 (gfc_generate_function_code): If -fconvert was specified,
2533 and this is the main program, add a call to set_convert().
2534 * options.c: Handle the -fconvert options.
2535
2536 2006-02-06 Roger Sayle <roger@eyesopen.com>
2537
2538 * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
2539 to be NULL to indicate that the not mask isn't required.
2540 (gfc_trans_where_2): Remove PMASK argument. Avoid calculating the
2541 pending mask for the last clause of a WHERE chain. Update recursive
2542 call.
2543 (gfc_trans_forall_1): Update call to gfc_trans_where_2.
2544 (gfc_trans_where): Likewise.
2545
2546 2006-02-06 Jakub Jelinek <jakub@redhat.com>
2547
2548 Backport from gomp-20050608-branch
2549 * trans-decl.c (create_function_arglist): Handle dummy functions.
2550
2551 * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
2552 TYPE_SIZE_UNIT.
2553 (gfc_trans_vla_type_sizes): Also "gimplify"
2554 GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
2555 * trans-array.c (gfc_trans_deferred_array): Call
2556 gfc_trans_vla_type_sizes.
2557
2558 * trans-decl.c (saved_function_decls, saved_parent_function_decls):
2559 Remove unnecessary initialization.
2560 (create_function_arglist): Make sure __result has complete type.
2561 (gfc_get_fake_result_decl): Change current_fake_result_decl into
2562 a tree chain. For entry master, create a separate variable
2563 for each result name. For BT_CHARACTER results, call
2564 gfc_finish_var_decl on length even if it has been already created,
2565 but not pushdecl'ed.
2566 (gfc_trans_vla_type_sizes): For function/entry result, adjust
2567 result value type, not the FUNCTION_TYPE.
2568 (gfc_generate_function_code): Adjust for current_fake_result_decl
2569 changes.
2570 (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
2571 even on result if it is assumed-length character.
2572
2573 * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
2574 Call gfc_trans_vla_type_sizes.
2575 (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
2576 (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
2577 gfc_trans_vla_type_sizes): New functions.
2578 (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
2579 callers. Call gfc_trans_vla_type_sizes on assumed-length
2580 character parameters.
2581 * trans-array.c (gfc_trans_array_bounds,
2582 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
2583 gfc_trans_vla_type_sizes.
2584 * trans.h (gfc_trans_vla_type_sizes): New prototype.
2585
2586 * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
2587 arrays without constant size, create also an index var for
2588 GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
2589 it as 0..size-1.
2590 (gfc_create_string_length): Don't call gfc_defer_symbol_init
2591 if just creating DECL_ARGUMENTS.
2592 (gfc_get_symbol_decl): Call gfc_finish_var_decl and
2593 gfc_defer_symbol_init even if ts.cl->backend_decl is already
2594 set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
2595 (create_function_arglist): Rework, so that hidden length
2596 arguments for CHARACTER parameters are created together with
2597 the parameters. Resolve ts.cl->backend_decl for CHARACTER
2598 parameters. If the argument is a non-constant length array
2599 or CHARACTER, ensure PARM_DECL has different type than
2600 its DECL_ARG_TYPE.
2601 (generate_local_decl): Call gfc_get_symbol_decl even
2602 for non-referenced non-constant length CHARACTER parameters
2603 after optionally issuing warnings.
2604 * trans-array.c (gfc_trans_array_bounds): Set last stride
2605 to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
2606 (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
2607 variable as well.
2608
2609 * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
2610
2611 * trans-stmt.c (gfc_trans_simple_do): Fix comment.
2612
2613 2006-02-04 Roger Sayle <roger@eyesopen.com>
2614
2615 * dependency.c (gfc_check_dependency): Remove unused vars and nvars
2616 arguments. Replace with an "identical" argument. A full array
2617 reference to the same symbol is a dependency if identical is true.
2618 * dependency.h (gfc_check_dependency): Update prototype.
2619 * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
2620 * trans-stmt.c: #include dependency.h for gfc_check_dependency.
2621 (gfc_trans_forall_1): Update calls to gfc_check_dependency.
2622 (gfc_trans_where_2): Likewise. Remove unneeded variables.
2623 (gfc_trans_where_3): New function for simple non-dependent WHEREs.
2624 (gfc_trans_where): Call gfc_trans_where_3 to translate simple
2625 F90-style WHERE statements without internal dependencies.
2626 * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
2627
2628 2006-02-05 H.J. Lu <hongjiu.lu@intel.com>
2629
2630 PR fortran/26041
2631 PR fortran/26064
2632 * resolve.c (resolve_types): New function.
2633 (resolve_codes): Likewise.
2634 (gfc_resolve): Use them.
2635
2636 2006-02-05 Roger Sayle <roger@eyesopen.com>
2637
2638 * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
2639 masks instead of LOGICAL*4.
2640
2641 2006-02-05 Jakub Jelinek <jakub@redhat.com>
2642
2643 * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
2644
2645 2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
2646
2647 PR fortran/25075
2648 check.c (identical_dimen_shape): New function.
2649 (check_dot_product): Use identical_dimen_shape() to check sizes
2650 for dot_product.
2651 (gfc_check_matmul): Likewise.
2652 (gfc_check_merge): Check conformance between tsource and fsource
2653 and between tsource and mask.
2654 (gfc_check_pack): Check conformance between array and mask.
2655
2656 2006-02-03 Steven G. Kargl <kargls@comcast>
2657 Paul Thomas <pault@gcc.gnu.org>
2658
2659 PR fortran/20845
2660 * resolve.c (resolve_symbol): Default initialization of derived type
2661 component reguires the SAVE attribute.
2662
2663 2006-02-02 Steven G. Kargl <kargls@comcast>
2664
2665 PR fortran/24958
2666 match.c (gfc_match_nullify): Free the list from head not tail.
2667
2668 PR fortran/25072
2669 * match.c (match_forall_header): Fix internal error caused by bogus
2670 gfc_epxr pointers.
2671
2672
2673 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
2674
2675 PR fortran/26039
2676 expr.c (gfc_check_conformance): Reorder error message
2677 to avoid plural.
2678 check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance
2679 for checking arguments array and mask.
2680 (check_reduction): Likewise.
2681
2682 2006-01-30 Erik Edelmann <eedelman@gcc.gnu.org>
2683
2684 PR fortran/24266
2685 * trans-io.c (set_internal_unit): Check the rank of the
2686 expression node itself instead of its symbol.
2687
2688 2006-01-29 Paul Thomas <pault@gcc.gnu.org>
2689
2690 PR fortran/18578
2691 PR fortran/18579
2692 PR fortran/20857
2693 PR fortran/20885
2694 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
2695 if actual argument is not a variable.
2696
2697 2006-01-28 Paul Thomas <pault@gcc.gnu.org>
2698
2699 PR fortran/17911
2700 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
2701 the lvalue is a use associated procedure.
2702
2703 PR fortran/20895
2704 PR fortran/25030
2705 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
2706 character lengths are not the same. Use gfc_dep_compare_expr for the
2707 comparison.
2708 * gfortran.h: Add prototype for gfc_dep_compare_expr.
2709 * dependency.h: Remove prototype for gfc_dep_compare_expr.
2710
2711 2006-01-27 Paul Thomas <pault@gcc.gnu.org>
2712
2713 PR fortran/25964
2714 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
2715 generic_ids exempted from assumed size checking.
2716
2717 2006-01-27 Jakub Jelinek <jakub@redhat.com>
2718
2719 PR fortran/25324
2720 * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
2721 * lang.opt (fpreprocessed): New option.
2722 * scanner.c: Include toplev.h.
2723 (gfc_src_file, gfc_src_preprocessor_lines): New variables.
2724 (preprocessor_line): Unescape filename if there were any
2725 backslashes.
2726 (load_file): If initial and gfc_src_file is not NULL,
2727 use it rather than opening the file. If gfc_src_preprocessor_lines
2728 has non-NULL elements, pass it to preprocessor_line.
2729 (unescape_filename, gfc_read_orig_filename): New functions.
2730 * gfortran.h (gfc_option_t): Add flag_preprocessed.
2731 (gfc_read_orig_filename): New prototype.
2732 * options.c (gfc_init_options): Clear flag_preprocessed.
2733 (gfc_post_options): If flag_preprocessed, call
2734 gfc_read_orig_filename.
2735 (gfc_handle_option): Handle OPT_fpreprocessed.
2736 * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
2737 sources.
2738
2739 2006-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
2740
2741 * symbol.c (free_old_symbol): Fix confusing comment, and add code
2742 to free old_symbol->formal.
2743
2744 2006-01-26 Paul Thomas <pault@gcc.gnu.org>
2745
2746 PR fortran/25964
2747 * resolve.c (resolve_function): Exclude statement functions from
2748 global reference checking.
2749
2750 PR fortran/25084
2751 PR fortran/20852
2752 PR fortran/25085
2753 PR fortran/25086
2754 * resolve.c (resolve_function): Declare a gfc_symbol to replace the
2755 references through the symtree to the symbol associated with the
2756 function expresion. Give error on reference to an assumed character
2757 length function is defined in an interface or an external function
2758 that is not a dummy argument.
2759 (resolve_symbol): Give error if an assumed character length function
2760 is array-valued, pointer-valued, pure or recursive. Emit warning
2761 that character(*) value functions are obsolescent in F95.
2762
2763 PR fortran/25416
2764 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
2765 prevents any assumed character length function call from getting here
2766 except intrinsics such as SPREAD. In this case, ensure that no
2767 segfault occurs from referencing non-existent charlen->length->
2768 expr_type and provide a backend_decl for the charlen from the charlen
2769 of the first actual argument.
2770
2771 Cure temp name confusion.
2772 * trans-expr.c (gfc_get_interface_mapping_array): Change name of
2773 temporary from "parm" to "ifm" to avoid clash with temp coming from
2774 trans-array.c.
2775
2776 2006-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
2777
2778 PR fortran/25716
2779 * symbol.c (free_old_symbol): New function.
2780 (gfc_commit_symbols): Use it.
2781 (gfc_commit_symbol): New function.
2782 (gfc_use_derived): Use it.
2783 * gfortran.h: Add prototype for gfc_commit_symbol.
2784 * intrinsic.c (gfc_find_function): Search in 'conversion'
2785 if not found in 'functions'.
2786 (gfc_convert_type_warn): Add a symtree to the new
2787 expression node, and commit the new symtree->n.sym.
2788 * resolve.c (gfc_resolve_index): Make sure typespec is
2789 properly initialized.
2790
2791 2006-01-23 Paul Thomas <pault@gcc.gnu.org>
2792
2793 PR fortran/25901
2794 * decl.c (get_proc_name): Replace subroutine and function attributes
2795 in "already defined" test by the formal arglist pointer being non-NULL.
2796
2797 Fix regression in testing of admissability of attributes.
2798 * symbol.c (gfc_add_attribute): If the current_attr has non-zero
2799 intent, do not do the check for a dummy being used.
2800 * decl.c (attr_decl1): Add current_attr.intent as the third argument
2801 in the call to gfc_add_attribute.
2802 * gfortran.h: Add the third argument to the prototype for
2803 gfc_add_attribute.
2804
2805 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2806
2807 * gfortranspec.c (lang_specific_driver): Update copyright notice
2808 date.
2809
2810 2006-01-21 Paul Thomas <pault@gcc.gnu.org>
2811
2812 PR fortran/25124
2813 PR fortran/25625
2814 * decl.c (get_proc_name): If there is an existing
2815 symbol in the encompassing namespace, call errors
2816 if it is a procedure of the same name or the kind
2817 field is set, indicating a type declaration.
2818
2819 PR fortran/20881
2820 PR fortran/23308
2821 PR fortran/25538
2822 PR fortran/25710
2823 * decl.c (add_global_entry): New function to check
2824 for existing global symbol with this name and to
2825 create new one if none exists.
2826 (gfc_match_entry): Call add_global_entry before
2827 matching argument lists for subroutine and function
2828 entries.
2829 * gfortran.h: Prototype for existing function,
2830 global_used.
2831 * resolve.c (resolve_global_procedure): New function
2832 to check global symbols for procedures.
2833 (resolve_call, resolve_function): Calls to this
2834 new function for non-contained and non-module
2835 procedures.
2836 * match.c (match_common): Add check for existing
2837 global symbol, creat one if none exists and emit
2838 error if there is a clash.
2839 * parse.c (global_used): Remove static and use the
2840 gsymbol name rather than the new_block name, so that
2841 the function can be called from resolve.c.
2842 (parse_block_data, parse_module, add_global_procedure):
2843 Improve checks for existing gsymbols. Emit error if
2844 already defined or if references were to another type.
2845 Set defined flag.
2846
2847 PR fortran/PR24276
2848 * trans-expr.c (gfc_conv_aliased_arg): New function called by
2849 gfc_conv_function_call that coverts an expression for an aliased
2850 component reference to a derived type array into a temporary array
2851 of the same type as the component. The temporary is passed as an
2852 actual argument for the procedure call and is copied back to the
2853 derived type after the call.
2854 (is_aliased_array): New function that detects an array reference
2855 that is followed by a component reference.
2856 (gfc_conv_function_call): Detect an aliased actual argument with
2857 is_aliased_array and convert it to a temporary and back again
2858 using gfc_conv_aliased_arg.
2859
2860 2006-01-19 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2861
2862 * gfortranspec.c: Update copyright years.
2863 * trans.c: Likewise.
2864 * trans-array.c: Likewise.
2865 * trans-array.h: Likewise.
2866 * trans-decl.c: Likewise.
2867 * trans-stmt.c: Likewise.
2868 * trans-stmt.h: Likewise.
2869 * trans-types.c: Likewise.
2870
2871 2006-01-18 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2872
2873 PR fortran/18540
2874 PR fortran/18937
2875 * gfortran.h (BBT_HEADER): Move definition up.
2876 (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
2877 * io.c (format_asterisk): Adapt initializer.
2878 * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
2879 as extension.
2880 (warn_unused_label): Take gfc_st_label label as argument, adapt to
2881 new data structure.
2882 (gfc_resolve): Adapt call to warn_unused_label.
2883 * symbol.c (compare_st_labels): New function.
2884 (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
2885 using balanced binary tree.
2886 * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
2887 with 'cnt'.
2888 (warn_unused_label): Adapt to binary tree.
2889 * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
2890 * primary.c (match_kind_param): Do away with cnt.
2891
2892 2006-01-18 Paul Thomas <pault@gcc.gnu.org>
2893
2894 PR fortran/20869
2895 PR fortran/20875
2896 PR fortran/25024
2897 * symbol.c (check_conflict): Add pointer valued elemental
2898 functions and internal procedures with the external attribute
2899 to the list of conflicts.
2900 (gfc_add_attribute): New catch-all function to perform the
2901 checking of symbol attributes for attribute declaration
2902 statements.
2903 * decl.c (attr_decl1): Call gfc_add_attribute for each of -
2904 (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
2905 gfc_match_pointer, gfc_match_dimension, gfc_match_target):
2906 Remove spurious calls to checks in symbol.c. Set the
2907 attribute directly and use the call to attr_decl() for
2908 checking.
2909 * gfortran.h: Add prototype for gfc_add_attribute.
2910
2911 PR fortran/25785
2912 * resolve.c (resolve_function): Exclude PRESENT from assumed size
2913 argument checking. Replace strcmp's with comparisons with generic
2914 codes.
2915
2916 2006-01-16 Rafael \81Ávila de Esp\81índola <rafael.espindola@gmail.com>
2917
2918 * gfortranspec.c (lang_specific_spec_functions): Remove.
2919
2920 2006-01-16 Richard Guenther <rguenther@suse.de>
2921
2922 * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
2923 (gfc_trans_arithmetic_if): Likewise.
2924 (gfc_trans_simple_do): Likewise.
2925 (gfc_trans_do): Likewise.
2926 (gfc_trans_do_while): Likewise.
2927 (gfc_trans_logical_select): Likewise.
2928 (gfc_trans_forall_loop): Likewise.
2929 (generate_loop_for_temp_to_lhs): Likewise.
2930 (generate_loop_for_rhs_to_temp): Likewise.
2931 (gfc_trans_allocate): Likewise.
2932 * trans.c (gfc_add_expr_to_block): Do not fold expr again.
2933
2934 2006-01-16 Richard Guenther <rguenther@suse.de>
2935
2936 * trans-expr.c (gfc_conv_function_call): Use fold_build2.
2937 * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst.
2938 * trans.c (gfc_trans_runtime_check): Don't fold the condition
2939 again.
2940
2941 2006-01-13 Steven G. Kargl <kargls@comcast.net>
2942
2943 PR fortran/25756
2944 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
2945 unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
2946 from g95).
2947
2948 2006-01-13 Diego Novillo <dnovillo@redhat.com>
2949
2950 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
2951 nodes.
2952
2953 2006-01-11 Tobias Schl\81üter <tobias.schlueter@physik.uni-muenchen.de>
2954
2955 * parse.c (next_fixed): Remove superfluous string concatenation.
2956
2957 2006-01-11 Bernhard Fischer <rep.nop@aon.at>
2958
2959 PR fortran/25486
2960 * scanner.c (load_line): use maxlen to determine the line-length used
2961 for padding lines in fixed form.
2962
2963 2006-01-11 Paul Thomas <pault@gcc.gnu.org>
2964
2965 PR fortran/25730
2966 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
2967 character lengths.
2968
2969 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
2970
2971 fortran/24936
2972 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
2973 to avoid type mismatch.
2974
2975 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
2976
2977 PR fortran/21977
2978 * trans-decl.c (gfc_generate_function_code): Move the NULLing of
2979 current_fake_result_decl down to below generate_local_vars.
2980
2981 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
2982
2983 PR fortran/12456
2984 * trans-expr.c (gfc_to_single_character): New function that converts
2985 string to single character if its length is 1.
2986 (gfc_build_compare_string):New function that compare string and handle
2987 single character specially.
2988 (gfc_conv_expr_op): Use gfc_build_compare_string.
2989 (gfc_trans_string_copy): Use gfc_to_single_character.
2990 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
2991 gfc_build_compare_string.
2992 * trans.h (gfc_build_compare_string): Add prototype.
2993
2994 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
2995
2996 * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
2997 constant.
2998 (gfc_simplify_ichar): Get the result from unsinged char and in the
2999 range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
3000
3001 2006-01-08 Erik Edelmann <eedelman@gcc.gnu.org>
3002
3003 PR fortran/25093
3004 * resolve.c (resolve_fntype): Check that PUBLIC functions
3005 aren't of PRIVATE type.
3006
3007 2006-01-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3008
3009 * decl.c (gfc_match_function_decl): Correctly error out in case of
3010 omitted function argument list.
3011
3012 2006-01-07 Paul Thomas <pault@gcc.gnu.org>
3013
3014 PR fortran/22146
3015 * trans-array.c (gfc_reverse_ss): Remove static attribute.
3016 (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
3017 the function call with the corresponding gfc_actual_arglist*. Change
3018 code accordingly.
3019 (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
3020 now requires the actual argument list instead of the expression for
3021 the function call.
3022 * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
3023 and provide a prototype for gfc_reverse_ss.
3024 * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
3025 where an elemental subroutine has array valued actual arguments.
3026
3027 PR fortran/25029
3028 PR fortran/21256
3029 PR fortran/20868
3030 PR fortran/20870
3031 * resolve.c (check_assumed_size_reference): New function to check for upper
3032 bound in assumed size array references.
3033 (resolve_assumed_size_actual): New function to do a very restricted scan
3034 of actual argument expressions of those procedures for which incomplete
3035 assumed size array references are not allowed.
3036 (resolve_function, resolve_call): Switch off assumed size checking of
3037 actual arguments, except for elemental procedures and intrinsic
3038 inquiry functions, in some circumstances.
3039 (resolve_variable): Call check_assumed_size_reference.
3040
3041 2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3042
3043 PR fortran/24268
3044 * io.c (next_char_not_space): New function that returns the next
3045 character that is not white space.
3046 (format_lex): Use the new function to skip whitespace within
3047 a format string.
3048
3049 2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
3050
3051 PR fortran/23675
3052 * expr.c (gfc_expr_set_symbols_referenced): New function.
3053 * gfortran.h: Add a function prototype for it.
3054 * resolve.c (resolve_function): Use it for
3055 use associated character functions lengths.
3056 * expr.c, gfortran.h, resolve.c: Updated copyright years.
3057
3058 2006-01-03 Steven G. Kargl <kargls@comcast.net>
3059
3060 PR fortran/25101
3061 * resolve.c (resolve_forall_iterators): Check for scalar variables;
3062 Check stride is nonzero.
3063
3064 2006-01-02 Steven G. Kargl <kargls@comcast.net>
3065
3066 PR fortran/24640
3067 * parse.c (next_free): Check for whitespace after the label.
3068 * match.c (gfc_match_small_literal_int): Initialize cnt variable.
3069
3070 2006-01-01 Steven G. Kargl <kargls@comcast.net>
3071
3072 * ChangeLog: Split previous years into ...
3073 * ChangeLog-2002: here.
3074 * ChangeLog-2003: here.
3075 * ChangeLog-2004: here.
3076 * ChangeLog-2005: here.
This page took 0.157107 seconds and 4 git commands to generate.