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