OSDN Git Service

2006-03-28 Steven G. Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2006-03-28  Steven G. Kargl  <kargls@comcast.net>
2
3         * intrinsic.texi: s/floor/float in previous commit.
4
5 2006-03-28 Paul Thomas <pault@gcc.gnu.org>
6
7         PR fortran/26779
8         *resolve.c (resolve_fl_procedure): Do not check the access of
9         derived types for internal procedures.
10
11 2006-03-27  Jakub Jelinek  <jakub@redhat.com>
12
13         * io.c (check_io_constraints): Don't look at
14         dt->advance->value.charater.string, unless it is a CHARACTER
15         constant.
16
17         * f95-lang.c (gfc_get_alias_set): New function.
18         (LANG_HOOKS_GET_ALIAS_SET): Define.
19
20 2006-03-25  Steven G. Kargl  <kargls@comcast.net>
21
22         PR fortran/26816
23         * intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
24         * intrinsic.texi: Document FLOAT.
25
26 2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>
27
28         PR fortran/26769
29         * iresolve.c (gfc_resolve_reshape):  Remove doubling of
30         kind for complex. For real(kind=10), call reshape_r10.
31         (gfc_resolve_transpose):  For real(kind=10), call
32         transpose_r10.
33
34 2006-03-25  Roger Sayle  <roger@eyesopen.com>
35
36         * dependency.c (gfc_check_dependency): Improve handling of pointers;
37         Two variables of different types can't have a dependency, and two
38         variables with the same symbol are equal, even if pointers.
39
40 2006-03-24  Roger Sayle  <roger@eyesopen.com>
41
42         * gfortran.h (gfc_symbol): Add a new "forall_index" bit field.
43         * match.c (match_forall_iterator): Set forall_index field on
44         the iteration variable's symbol.
45         * dependency.c (contains_forall_index_p): New function to
46         traverse a gfc_expr to check whether it contains a variable
47         with forall_index set in it's symbol.
48         (gfc_check_element_vs_element): Return GFC_DEP_EQUAL for scalar
49         constant expressions that don't variables used as FORALL indices.
50
51 2006-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
52
53         PR driver/22600
54         * error.c (gfc_fatal_error): Return ICE_EXIT_CODE instead of 4.
55
56 2006-03-22  Thomas Koenig  <Thomas.Koenig@online.de>
57
58         PR fortran/19303
59         * gfortran.h (gfc_option_t):  Add record_marker.
60         * lang.opt:  Add -frecord-marker=4 and -frecord-marker=8.
61         * trans-decl.c:  Add gfor_fndecl_set_record_marker.
62         (gfc_build_builtin_function_decls): Set
63         gfor_fndecl_set_record_marker.
64         (gfc_generate_function_code):  If we are in the main program
65         and -frecord-marker was provided, call set_record_marker.
66         * options.c (gfc_handle_option):  Add handling for
67         -frecord-marker=4 and -frecord-marker=8.
68         * invoke.texi:  Document -frecord-marker.
69
70 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
71
72         PR fortran/17298
73         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): New
74         function to implement array valued TRANSFER intrinsic.
75         (gfc_conv_intrinsic_function): Call the new function if TRANSFER
76         and non-null se->ss.
77         (gfc_walk_intrinsic_function): Treat TRANSFER as one of the
78         special cases by calling gfc_walk_intrinsic_libfunc directly.
79
80 2006-03-21  Toon Moene  <toon@moene.indiv.nluug.nl>
81
82         * options.c (gfc_init_options): Initialize
83         flag_argument_noalias to 3.
84
85 2006-03-20  Thomas Koenig  <Thomas.Koenig@online.de>
86
87         PR fortran/20935
88         * iresolve.c (gfc_resolve_maxloc):   If mask is scalar,
89         prefix the function name with an "s".  If the mask is scalar
90         or if its kind is smaller than gfc_default_logical_kind,
91         coerce it to default kind.
92         (gfc_resolve_maxval):  Likewise.
93         (gfc_resolve_minloc):  Likewise.
94         (gfc_resolve_minval):  Likewise.
95         (gfc_resolve_product):  Likewise.
96         (gfc_resolve_sum):  Likewise.
97
98 2006-03-19  Paul Thomas  <pault@gcc.gnu.org>
99
100         PR fortran/26741
101         *expr.c (external_spec_function): Permit elemental functions.
102
103         PR fortran/26716
104         *interface.c (compare_actual_formal): Detect call for procedure
105         usage and require rank checking, in this case, for assumed shape
106         and deferred shape arrays.
107         (gfc_procedure_use): Revert to pre-PR25070 call to
108         compare_actual_formal that does not require rank checking..
109
110 2006-03-16  Roger Sayle  <roger@eyesopen.com>
111
112         * gfortran.h (gfc_equiv_info): Add length field.
113         * trans-common.c (copy_equiv_list_to_ns): Set the length field.
114         * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
115         and length fields to determine whether the two equivalenced symbols
116         overlap in memory.
117
118 2006-03-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
119
120         PR fortran/19101
121         * gfortran.h: Add warn_ampersand.
122         * invoke.texi: Add documentation for new option.
123         * lang.opt: Add Wampersand.
124         * options.c (gfc_init_options): Initialize warn_ampersand.
125         (gfc_post_options): Set the warn if pedantic.
126         (set_Wall): Set warn_ampersand.
127         (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
128         * scanner.c (gfc_next_char_literal): Add test for missing '&' in
129         continued character constant and give warning if missing.
130
131 2006-03-14  Steven G. Kargl  <kargls@comcast.net>
132
133         PR 18537
134         * gfortran.h: Wrap Copyright line.
135         (gfc_option_t): add warn_tabs member.
136         * lang.opt: Update Coyright year.  Add the Wtabs.
137         * invoke.texi: Document -Wtabs.
138         * scanner.c (gfc_gobble_whitespace): Use warn_tabs.  Add linenum to
139         suppress multiple warnings.
140         (load_line): Use warn_tabs.  Add linenum, current_line, seen_comment
141         to suppress multiple warnings.
142         * options.c (gfc_init_options): Initialize warn_tabs.
143         (set_Wall): set warn_tabs for -Wall.
144         (gfc_post_options): Adjust flag_tabs depending on -pedantic.
145         (gfc_handle_option):  Process command-line option -W[no-]tabs
146
147 2006-03-13  Paul Thomas  <pault@gcc.gnu.org>
148
149         PR fortran/25378
150         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
151         modify the condition for updating it, to implement the F2003 requirement for all(mask)
152         is false.
153
154 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
155
156         * trans-openmp.c (gfc_trans_omp_variable): Handle references
157         to parent result.
158         * trans-expr.c (gfc_conv_variable): Remove useless setting
159         of parent_flag, formatting.
160
161         * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
162         GFC_DECL_RESULT flag.
163
164 2003-03-11  Roger Sayle  <roger@eyesopen.com>
165
166         * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
167         binary operators to compare equal if their operands are equal.
168         <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
169         to compare equal, if their operands are equal.
170
171 2006-03-11  Erik Edelmann  <eedelman@gcc.gnu.org>
172
173         * symbol.c (check_conflict): Allow allocatable function results,
174         except for elemental functions.
175         * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
176         (gfc_trans_create_temp_array): ... this, and add new argument
177         callee_alloc.
178         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
179         to gfc_trans_allocate_temp_array.
180         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
181         * trans-expr.c (gfc_conv_function_call): Use new arg of
182         gfc_trans_create_temp_array avoid pre-allocation of temporary
183         result variables of pointer AND allocatable functions.
184         (gfc_trans_arrayfunc_assign): Return NULL for allocatable
185         functions.
186         * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
187         from sym->result to sym.
188
189 2006-03-09  Erik Edelmann  <eedelman@gcc.gnu.org>
190
191         * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
192         attribute from sym to new_sym.  Call build_fold_indirect_ref()
193         for allocatable arguments.
194
195 2006-03-09 Paul Thomas <pault@gcc.gnu.org>
196
197         PR fortran/26257
198         * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
199         the offset and data when se->data_not_needed is set.
200         * trans.h: Include the data_not_need bit in gfc_se.
201         * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
202
203 2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
204             Erik Edelmann  <eedelman@gcc.gnu.org>
205
206         * trans-array.c (gfc_trans_dealloc_allocated): New function.
207         (gfc_trans_deferred_array): Use it, instead of inline code.
208         * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
209         * trans-expr.c (gfc_conv_function_call): Deallocate allocated
210         ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
211
212 2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
213
214         PR fortran/26107
215         * resolve.c (resolve_function): Add name after test for pureness.
216
217         PR fortran/19546
218         * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
219         store current_function_decl, replace with parent, whilst calls are
220         made to gfc_get_fake_result_decl, and restore afterwards. Signal this
221         to gfc_get_fake_result_decl with a new argument, parent_flag.
222         * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
223         is set to zero.
224         * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
225         * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
226         add decl to parent function. Replace refs to current_fake_result_decl
227         with refs to this_result_decl.
228         (gfc_generate_function_code): Null parent_fake_result_decl before the
229         translation of code for contained procedures. Set parent_flag to zero
230         in call to gfc_get_fake_result_decl.
231         * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
232
233 2006-03-05  Steven G. Kargl  <kargls@comcast.net>
234
235         * simplify.c (gfc_simplify_verify):  Fix return when SET=''.
236
237 2006-03-05  Erik Edelmann  <eedelman@gcc.gnu.org>
238
239         PR fortran/16136
240         * symbol.c (conf_std): New macro.
241         (check_conflict): Use it to allow ALLOCATABLE dummy
242         arguments for F2003.
243         * trans-expr.c (gfc_conv_function_call): Pass the
244         address of the array descriptor when dummy argument is
245         ALLOCATABLE.
246         * interface.c (compare_allocatable): New function.
247         (compare_actual_formal): Use it.
248         * resolve.c (resolve_deallocate_expr,
249         resolve_allocate_expr): Check that INTENT(IN) variables
250         aren't (de)allocated.
251         * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
252         dummy arguments as supported.
253
254 2006-03-03  Roger Sayle  <roger@eyesopen.com>
255
256         * dependency.c (gfc_check_element_vs_element): Revert last change.
257
258 2006-03-03  Roger Sayle  <roger@eyesopen.com>
259
260         * dependency.c (gfc_check_element_vs_element): Consider two
261         unordered scalar subscripts as (potentially) equal.
262
263 2006-03-03  Roger Sayle  <roger@eyesopen.com>
264
265         * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
266         check whether two array references have a dependency.
267         (gfc_check_element_vs_element): Assume lref and rref must be
268         REF_ARRAYs.  If gfc_dep_compare_expr returns -2, assume these
269         references could potentially overlap.
270         (gfc_dep_resolver): Whitespace and comment tweaks.  Assume a
271         dependency if the references have different depths.  Rewrite
272         final term to clarrify we only have a dependency for overlaps.
273
274 2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>
275
276         PR fortran/25031
277         * trans-array.h:  Adjust gfc_array_allocate prototype.
278         * trans-array.c (gfc_array_allocate):  Change type of
279         gfc_array_allocatate to bool.  Function returns true if
280         it operates on an array.  Change second argument to gfc_expr.
281         Find last reference in chain.
282         If the function operates on an allocatable array, emit call to
283         allocate_array() or allocate64_array().
284         * trans-stmt.c (gfc_trans_allocate):  Code to follow to last
285         reference has been moved to gfc_array_allocate.
286         * trans.h:  Add declaration for gfor_fndecl_allocate_array and
287         gfor_fndecl_allocate64_array.
288         (gfc_build_builtin_function_decls):  Add gfor_fndecl_allocate_array
289         and gfor_fndecl_allocate64_array.
290
291 2006-03-01  Roger Sayle  <roger@eyesopen.com>
292
293         * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
294         INVERT argument to invert the sense of the WHEREMASK argument.
295         Remove unneeded code to AND together a list of masks.
296         (generate_loop_for_rhs_to_temp): Likewise.
297         (gfc_trans_assign_need_temp): Likewise.
298         (gfc_trans_forall_1): Likewise.
299         (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
300         to specify the sense of the MASK argument.
301         (gfc_trans_where_assign): Likewise.
302         (gfc_trans_where_2): Likewise.  Restructure code that decides
303         whether we need to allocate zero, one or two temporary masks.
304         If this is a top-level WHERE (i.e. the incoming MASK is NULL),
305         we only need to allocate at most one temporary mask, and can
306         invert it's sense to provide the complementary pending execution
307         mask.  Only calculate the size of the required temporary arrays
308         if we need any.
309         (gfc_trans_where): Update call to gfc_trans_where_2.
310
311 2006-03-01  Paul Thomas  <pault@gcc.gnu.org>
312
313         * iresolve.c (gfc_resolve_dot_product):  Remove any difference in
314         treatment of logical types.
315         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 
316
317         PR fortran/26393
318         * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
319         must be referenced to include unreferenced symbols in an interface
320         body. 
321
322         PR fortran/20938
323         * trans-array.c (gfc_conv_resolve_dependencies): Add call to
324         gfc_are_equivalenced_arrays.
325         * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
326         functions. (gfc_free_namespace): Call them.
327         * trans-common.c (copy_equiv_list_to_ns): New function.
328         (add_equivalences): Call it.
329         * gfortran.h: Add equiv_lists to gfc_namespace and define
330         gfc_equiv_list and gfc_equiv_info.
331         * dependency.c (gfc_are_equivalenced_arrays): New function.
332         (gfc_check_dependency): Call it.
333         * dependency.h: Prototype for gfc_are_equivalenced_arrays.
334
335 2006-03-01  Roger Sayle  <roger@eyesopen.com>
336
337         * dependency.c (gfc_is_same_range): Compare the stride, lower and
338         upper bounds when testing array reference ranges for equality.
339         (gfc_check_dependency): Fix indentation whitespace.
340         (gfc_check_element_vs_element): Likewise.
341         (gfc_dep_resolver): Likewise.
342
343 2006-02-28  Thomas Koenig  <Thomas.Koenig@online.de>
344
345         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
346         If the mask expression exists and has rank 0, enclose the
347         generated loop in an "if (mask)".  Put the default
348         initialization into the else branch.
349
350 2006-02-25  Thomas Koenig  <Thomas.Koenig@online.de>
351
352         PR fortran/23092
353         * trans-intrinsic.c (gfc_conv_intrinsic_arith):  If the
354         mask expression exists and has rank 0, enclose the generated
355         loop in an "if (mask)".
356         * (gfc_conv_intrinsic_minmaxloc):  Likewise.
357
358 2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
359
360         PR fortran/26409
361         * resolve.c (resolve_contained_functions, resolve_types,
362         gfc_resolve): Revert patch of 2006-02-19.
363
364 2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
365
366         PR fortran/24519
367         * dependency.c (gfc_is_same_range): Correct typo.
368         (gfc_check_section_vs_section): Call gfc_is_same_range.
369
370         PR fortran/25395
371         * trans-common.c (add_equivalences): Add a new flag that is set when
372         an equivalence is seen that prevents more from being reset until the
373         start of a new traversal of the list, thus ensuring completion of
374         all the equivalences.
375
376 2006-02-23  Erik Edelmann  <eedelman@gcc.gnu.org>
377
378         * module.c (read_module): Remove redundant code lines.
379
380 2006-02-20 Rafael \81Ávila de Esp\81índola <rafael.espindola@gmail.com>
381         * Make-lang.in (FORTRAN): Remove
382         (.PHONY): Remove F95 and f95. Add fortran
383
384 2006-02-20  Roger Sayle  <roger@eyesopen.com>
385
386         * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
387         execution mask for empty WHERE/ELSEWHERE clauses.  Don't allocate
388         temporary mask arrays if they won't be used.
389
390 2006-02-20  Roger Sayle  <roger@eyesopen.com>
391
392         * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
393         traversing a linked list of MASKs.  The MASK is now always a
394         single element requiring no ANDing during the assignment.
395
396 2006-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
397
398         * gfortran.texi:  Document environment variables which
399         influence runtime behavior.
400
401 2006-02-19  H.J. Lu  <hongjiu.lu@intel.com>
402
403         * resolve.c (resolve_contained_functions): Call resolve_entries
404         first.
405         (resolve_types): Remove calls to resolve_entries and
406         resolve_contained_functions.
407         (gfc_resolve): Call resolve_contained_functions.
408
409 2006-02-19  Erik Edelmann  <eedelman@gcc.gnu.org>
410
411         PR fortran/26201
412         * intrinsic.c (gfc_convert_type_warn): Call
413         gfc_intrinsic_symbol() on the newly created symbol.
414
415 2006-02-19  Paul Thomas  <pault@gcc.gnu.org>
416
417         PR fortran/25054
418         * resolve.c (is_non_constant_shape_array): New function.
419         (resolve_fl_variable): Remove code for the new function and call it.
420         (resolve_fl_namelist): New function.  Add test for namelist array
421         with non-constant shape, using is_non_constant_shape_array.
422         (resolve_symbol): Remove code for resolve_fl_namelist and call it.
423
424         PR fortran/25089
425         * match.c (match_namelist): Increment the refs field of an accepted
426         namelist object symbol.
427         * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
428         with contained or module procedures.
429
430 2006-02-18  Roger Sayle  <roger@eyesopen.com>
431
432         * trans-stmt.c (struct temporary_list): Delete.
433         (gfc_trans_where_2): Major reorganization.  Remove no longer needed
434         TEMP argument.  Allocate and deallocate the control mask and
435         pending control mask locally.
436         (gfc_trans_forall_1): Delete TEMP local variable, and update
437         call to gfc_trans_where_2.  No need to deallocate arrays after.
438         (gfc_evaluate_where_mask): Major reorganization.  Change return
439         type to void.  Pass in parent execution mask, MASK, and two
440         already allocated mask arrays CMASK and PMASK.  On return
441         CMASK := MASK & COND, PMASK := MASK & !COND.  MASK, CMASK and
442         CMASK may all be NULL, or refer to the same temporary arrays.
443         (gfc_trans_where): Update call to gfc_trans_where_2.  We no
444         longer need a TEMP variable or to deallocate temporary arrays
445         allocated by gfc_trans_where_2.
446
447 2006-02-18   Danny Smith  <dannysmith@users.sourceforeg.net>
448
449         * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
450         * symbol.c (gfc_add_attribute): Likewise for definition.
451         * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
452
453 2006-02-17  Richard Sandiford  <richard@codesourcery.com>
454
455         * trans-common.c: Include rtl.h earlier.
456         * trans-decl.c: Likewise.
457
458 2006-02-16  Jakub Jelinek  <jakub@redhat.com>
459
460         PR fortran/26224
461         * parse.c (parse_omp_do, parse_omp_structured_block): Call
462         gfc_commit_symbols and gfc_warning_check.
463
464         * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
465         PR middle-end/26316.
466
467 2006-02-16  Paul Thomas  <pault@gcc.gnu.org>
468
469         PR fortran/24557
470         * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
471         for character(*) arrays, rather than casting to the type and kind
472         parameters of the formal argument.
473
474 2006-02-15  Toon Moene  <toon@moene.indiv.nluug.nl>
475
476         PR fortran/26054
477         * options.c: Do not warn for Fortran 2003 features by default.
478
479 2006-02-15  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
480
481         * check.c: Update copyright years.
482         
483         * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
484         dim_range_check on not-present optional dim argument.
485
486 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
487
488         PR libgomp/25938
489         PR libgomp/25984
490         * Make-lang.in (install-finclude-dir): New goal.
491         (fortran.install-common): Depend on install-finclude-dir.
492         * lang-specs.h: If not -nostdinc, add -I finclude.
493
494 2006-02-14  Thomas Koenig  <Thomas.Koenig@online.de>
495
496         PR fortran/25045
497         * check.c (dim_check):  Perform all checks if dim is optional.
498         (gfc_check_minloc_maxloc):  Use dim_check and dim_rank_check
499         to check dim argument.
500         (check_reduction):  Likewise.
501
502 2006-02-14  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
503
504         PR fortran/26277
505         * io.c (match_ltag): Mark label as referenced.
506
507 2006-02-14  Jakub Jelinek  <jakub@redhat.com>
508             Richard Henderson  <rth@redhat.com>
509             Diego Novillo  <dnovillo@redhat.com>
510
511         * invoke.texi: Document -fopenmp.
512         * gfortran.texi (Extensions): Document OpenMP.
513
514         Backport from gomp-20050608-branch
515         * trans-openmp.c: Call build_omp_clause instead of
516         make_node when creating OMP_CLAUSE_* trees.
517         (gfc_trans_omp_reduction_list): Remove argument 'code'.
518         Adjust all callers.
519
520         * trans.h (build4_v): Define.
521         * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
522         Call build3_v to create OMP_SECTIONS nodes.
523
524         PR fortran/25162
525         * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
526         on all symbols added to the variable list.
527
528         * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
529         procedure symbol in REDUCTION.
530
531         * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
532         for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
533
534         * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument.  If PBLOCK
535         is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
536         that statement block.
537         (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
538         for non-ordered non-static combined loops.
539         (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
540
541         * openmp.c: Include target.h and toplev.h.
542         (gfc_match_omp_threadprivate): Emit diagnostic if target does
543         not support TLS.
544         * Make-lang.in (fortran/openmp.o): Add dependencies on
545         target.h and toplev.h.
546
547         * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
548         * trans-openmp.c (gfc_omp_privatize_by_reference): Make
549         DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
550         (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
551         (gfc_trans_omp_variable): New function.
552         (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
553         * trans.h (GFC_DECL_RESULT): Define.
554
555         * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
556         * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
557         * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
558
559         * trans-openmp.c (gfc_omp_privatize_by_reference): Return
560         true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
561         (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
562         functions.
563         (gfc_trans_omp_clauses): Add WHERE argument.  Call
564         gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
565         for reductions.
566         (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
567         gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
568         gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
569         gfc_trans_omp_clauses callers.
570
571         * openmp.c (omp_current_do_code): New var.
572         (gfc_resolve_omp_do_blocks): New function.
573         (gfc_resolve_omp_parallel_blocks): Call it.
574         (gfc_resolve_do_iterator): Add CODE argument.  Don't propagate
575         predetermination if argument is !$omp do or !$omp parallel do
576         iteration variable.
577         * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
578         for EXEC_OMP_DO.  Adjust gfc_resolve_do_iterator caller.
579         * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
580         (gfc_resolve_do_iterator): Add CODE argument.
581
582         * trans.h (gfc_omp_predetermined_sharing,
583         gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
584         prototypes.
585         (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
586         * trans-openmp.c (gfc_omp_predetermined_sharing,
587         gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
588         functions.
589         * trans-common.c (build_equiv_decl, build_common_decl,
590         create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
591         * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
592         on the decl.
593         * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
594         LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
595         LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
596
597         * openmp.c (resolve_omp_clauses): Remove extraneous comma.
598
599         * symbol.c (check_conflict): Add conflict between cray_pointee and
600         threadprivate.
601         * openmp.c (gfc_match_omp_threadprivate): Fail if
602         gfc_add_threadprivate returned FAILURE.
603         (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
604         {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
605         {FIRST,LAST}PRIVATE and REDUCTION clauses.
606
607         * resolve.c (omp_workshare_flag): New variable.
608         (resolve_function): Diagnose use of non-ELEMENTAL user defined
609         function in WORKSHARE construct.
610         (resolve_code): Cleanup forall_save use.  Make sure omp_workshare_flag
611         is set to correct value in different contexts.
612
613         * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
614         variable name.
615         (resolve_omp_atomic): Likewise.
616
617         PR fortran/24493
618         * scanner.c (skip_free_comments): Set at_bol at the beginning of the
619         loop, not before it.
620         (skip_fixed_comments): Handle ! comments in the middle of line here
621         as well.
622         (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
623         not at BOL.
624         (gfc_next_char_literal): Fix expected canonicalized *$omp string.
625
626         * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
627         initialization to build OMP_FOR instead of build.
628
629         * trans-decl.c (gfc_gimplify_function): Invoke
630         diagnose_omp_structured_block_errors.
631
632         * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
633         (gfc_trans_omp_ordered): Use OMP_ORDERED.
634
635         * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
636         gfc_resolve_omp_parallel_blocks): New prototypes.
637         * resolve.c (resolve_blocks): Renamed to...
638         (gfc_resolve_blocks): ... this.  Remove static.
639         (gfc_resolve_forall): Adjust caller.
640         (resolve_code): Only call gfc_resolve_blocks if code->block != 0
641         and not for EXEC_OMP_PARALLEL* directives.  Call
642         gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
643         Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
644         iterator.
645         * openmp.c: Include pointer-set.h.
646         (omp_current_ctx): New variable.
647         (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
648         functions.
649         * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
650
651         * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
652         look up symbol if it exists, use its name instead and, if it is not
653         INTRINSIC, issue diagnostics.
654
655         * parse.c (parse_omp_do): Handle implied end do properly.
656         (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
657         return it instead of continuing.
658
659         * trans-openmp.c (gfc_trans_omp_critical): Update for changed
660         operand numbering.
661         (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
662         gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
663         gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
664
665         * trans.h (gfc_omp_privatize_by_reference): New prototype.
666         * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
667         to gfc_omp_privatize_by_reference.
668         * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
669
670         * trans-stmt.h (gfc_trans_omp_directive): Add comment.
671
672         * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
673         Disallow COMMON matching if it is set.
674         (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
675         (resolve_omp_clauses): Show locus in error messages.  Check that
676         variable types in reduction clauses are appropriate for reduction
677         operators.
678
679         * resolve.c (resolve_symbol): Don't error if a threadprivate module
680         variable isn't SAVEd.
681
682         * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
683         Fix typo in condition.  Fix DOVAR initialization.
684
685         * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
686         rather than .min. etc.
687
688         * trans-openmpc.c (omp_not_yet): Remove.
689         (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
690         Force creation of BIND_EXPR around the workshare construct.
691         (gfc_trans_omp_parallel_sections): Likewise.
692         (gfc_trans_omp_parallel_workshare): Likewise.
693
694         * types.def (BT_I16, BT_FN_I16_VPTR_I16,
695         BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
696
697         * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
698         (gfc_trans_omp_code): New function.
699         (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
700         (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
701         (gfc_trans_omp_sections): Likewise.  Only treat empty last section
702         specially if lastprivate clause is present.
703         * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
704         builtin.
705
706         * trans-openmp.c (gfc_trans_omp_variable_list): Update for
707         OMP_CLAUSE_DECL name change.
708         (gfc_trans_omp_do): Likewise.
709
710         * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
711         clauses.
712         (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
713         sync builtins directly.
714         (gfc_trans_omp_single): Build OMP_SINGLE statement.
715
716         * trans-openmp.c (gfc_trans_add_clause): New.
717         (gfc_trans_omp_variable_list): Take a tree code and build the clause
718         node here.  Link it to the head of a list.
719         (gfc_trans_omp_clauses): Update to match.
720         (gfc_trans_omp_do): Use gfc_trans_add_clause.
721
722         * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
723         gfc_omp_clauses *.  Use gfc_evaluate_now instead of creating
724         temporaries by hand.
725         (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
726         (gfc_trans_omp_do): New function.
727         (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
728         (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
729         Use buildN_v macros.
730         (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
731         gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
732         gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
733         (gfc_trans_omp_directive): Use them.
734         * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
735         * openmp.c (resolve_omp_clauses): Check for list items present
736         in multiple clauses.
737         (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
738         and is not present in any clause variable lists other than PRIVATE
739         or LASTPRIVATE.
740
741         * gfortran.h (symbol_attribute): Add threadprivate bit.
742         (gfc_common_head): Add threadprivate member, change use_assoc
743         and saved into char to save space.
744         (gfc_add_threadprivate): New prototype.
745         * symbol.c (check_conflict): Handle threadprivate.
746         (gfc_add_threadprivate): New function.
747         (gfc_copy_attr): Copy threadprivate.
748         * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
749         if IF or NUM_THREADS is constant.  Create OMP_CLAUSE_SCHEDULE and
750         OMP_CLAUSE_ORDERED.
751         * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
752         outside a module and not in COMMON has is not SAVEd.
753         (resolve_equivalence): Ensure THREADPRIVATE objects don't get
754         EQUIVALENCEd.
755         * trans-common.c: Include target.h and rtl.h.
756         (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
757         * trans-decl.c: Include rtl.h.
758         (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
759         * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
760         * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
761         (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
762         * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
763         is from current namespace.
764         (gfc_match_omp_threadprivate): Rewrite.
765         (resolve_omp_clauses): Check some clause restrictions.
766         * module.c (ab_attribute): Add AB_THREADPRIVATE.
767         (attr_bits): Add THREADPRIVATE.
768         (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
769         (load_commons, write_common, write_blank_common): Adjust for type
770         change of saved, store/load threadprivate bit from the integer
771         as well.
772
773         * types.def (BT_FN_UINT_UINT): New.
774         (BT_FN_VOID_UINT_UINT): Remove.
775
776         * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
777         gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
778         gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
779         (gfc_trans_omp_directive): Use them.
780
781         * openmp.c (expr_references_sym): Add SE argument, don't look
782         into SE tree.
783         (is_conversion): New function.
784         (resolve_omp_atomic): Adjust expr_references_sym callers.  Handle
785         promoted expressions.
786         * trans-openmp.c (gfc_trans_omp_atomic): New function.
787         (gfc_trans_omp_directive): Call it.
788
789         * f95-lang.c (builtin_type_for_size): New function.
790         (gfc_init_builtin_functions): Initialize synchronization and
791         OpenMP builtins.
792         * types.def: New file.
793         * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
794         fortran/types.def.
795
796         * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
797
798         * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
799         is NULL.
800
801         * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
802         functions.
803         (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
804
805         * parse.c (parse_omp_do): Call pop_state before next_statement.
806         * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
807         New functions.
808         (gfc_resolve_omp_directive): Call them.
809         * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
810         leaves an OpenMP structured block or if EXIT terminates !$omp do
811         loop.
812
813         * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
814         (F95_OBJS): Add fortran/trans-openmp.o.
815         (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
816         * lang.opt: Add -fopenmp option.
817         * options.c (gfc_init_options): Initialize it.
818         (gfc_handle_option): Handle it.
819         * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
820         ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
821         ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
822         ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
823         ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
824         ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
825         ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
826         ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
827         ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
828         statement codes.
829         (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
830         OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
831         OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
832         OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
833         OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
834         OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
835         New OpenMP variable list types.
836         (gfc_omp_clauses): New typedef.
837         (gfc_get_omp_clauses): Define.
838         (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
839         EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
840         EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
841         EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
842         EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
843         EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
844         (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
845         and omp_bool fields to ext union.
846         (flag_openmp): Declare.
847         (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
848         * scanner.c (openmp_flag, openmp_locus): New variables.
849         (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
850         Handle OpenMP directive lines and conditional compilation magic
851         comments.
852         * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
853         * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
854         parse_omp_structured_block): New functions.
855         (next_free, next_fixed): Parse OpenMP directives.
856         (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
857         codes.
858         (gfc_ascii_statement): Handle ST_OMP_* codes.
859         (parse_executable): Rearrange the loop slightly, so that
860         parse_omp_do can return next_statement.
861         * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
862         gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
863         gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
864         gfc_match_omp_parallel, gfc_match_omp_parallel_do,
865         gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
866         gfc_match_omp_sections, gfc_match_omp_single,
867         gfc_match_omp_threadprivate, gfc_match_omp_workshare,
868         gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
869         * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
870         (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
871         directives.
872         * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
873         EXEC_OMP_* directives.
874         * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
875         * trans-stmt.h (gfc_trans_omp_directive): New prototype.
876         * openmp.c: New file.
877         * trans-openmp.c: New file.
878
879 2006-02-13  Andrew Pinski  <pinskia@physics.uc.edu>
880             Jakub Jelinek  <jakub@redhat.com>
881
882         PR fortran/26246
883         * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
884         gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
885
886 2006-02-13  Paul Thomas  <pault@gcc.gnu.org>
887
888         PR fortran/26074
889         PR fortran/25103
890         * resolve.c (resolve_symbol): Extend the requirement that module
891         arrays have constant bounds to those in the main program.  At the
892         same time simplify the array bounds, to avoiding trapping parameter
893         array references, and exclude automatic character length from main
894         and modules. Rearrange resolve_symbol and resolve_derived to put as
895         each flavor together, as much as is possible and move all specific
896         code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
897         functions.
898         (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
899         New functions to do work of resolve_symbol.
900         (resolve_index_expr): New function that is called from resolved_symbol
901         and is extracted from resolve_charlen.
902         (resolve_charlen): Call this new function.
903         (resolve_fl_derived): Renamed resolve_derived to be consistent with
904         the naming of the new functions for the other flavours.  Change the
905         charlen checking so that the style is consistent with other similar
906         checks. Add the generation of the gfc_dt_list, removed from resolve_
907         symbol.
908
909         PR fortran/20861
910         * resolve.c (resolve_actual_arglist): Prevent internal procedures
911         from being dummy arguments.
912
913         PR fortran/20871
914         * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
915         procedures from being dummy arguments.
916
917         PR fortran/25083
918         * resolve.c (check_data_variable): Add test that data variable is in
919         COMMON.
920
921         PR fortran/25088
922         * resolve.c (resolve_call): Add test that the subroutine does not
923         have a type.
924
925 2006-02-12  Erik Edelmann  <eedelman@gcc.gnu.org>
926
927         PR fortran/25806
928         * trans-array.c (gfc_trans_allocate_array_storage): New argument
929         dealloc; free the temporary only if dealloc is true.
930         (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
931         passed onwards to gfc_trans_allocate_array_storage.
932         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
933         gfc_trans_allocate_temp_array.
934         * trans-array.h (gfc_trans_allocate_temp_array): Update function
935         prototype.
936         * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
937         to gfc_trans_allocate_temp_array to false in case of functions
938         returning pointers.
939         (gfc_trans_arrayfunc_assign): Return NULL for functions returning
940         pointers.
941
942 2006-02-10  Steven G. Kargl  <kargls@comcast.net>
943
944         PR fortran/20858
945         *decl.c (variable_decl): Improve error message.  Remove initialization
946         typespec.  Wrap long line.
947         *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
948         and rank.
949         *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
950         are set.
951
952
953 2006-02-10  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
954
955         PR fortran/14771
956         * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
957         * expr.c (check_intrinsic_op): Likewise.
958         * module.c (mio_expr): Likewise.
959
960 2006-02-09  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
961
962         * dump-parse-tree.c: Update copyright years.
963         * matchexp.c: Likewise.
964         * module.c: Likewise.
965
966         PR fortran/14771
967         * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
968         * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
969         * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
970         if it were INTRINSIC_UPLUS.
971         * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
972         * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
973         * matchexp.c (match_primary): Record parentheses surrounding
974         numeric expressions.
975         * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
976         dumping.
977         * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
978
979 2006-02-09  Paul Thomas  <pault@gcc.gnu.org>
980
981         PR fortran/26038
982         * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
983         scalar with missing backend_decl for the hidden dummy charlen.
984
985         PR fortran/25059
986         * interface.c (gfc_extend_assign): Remove detection of non-PURE
987         subroutine in assignment interface, with gfc_error, and put it in
988         * resolve.c (resolve_code).
989
990         PR fortran/25070
991         * interface.c (gfc_procedure_use): Flag rank checking for non-
992         elemental, contained or interface procedures in call to
993         (compare_actual_formal), where ranks are checked for assumed
994         shape arrays..
995
996 2006-02-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
997
998         PR libfortran/25425
999         * trans-decl.c (gfc_generate_function_code): Add new argument,
1000         pedantic, to set_std call.
1001
1002 2006-02-06  Thomas Koenig  <Thomas.Koenig@online.de>
1003
1004         PR libfortran/23815
1005         * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
1006         variable.
1007         * invoke.texi:  Mention the "Runtime" chapter.
1008         Document the -fconvert= option.
1009         * gfortran.h:  Add options_convert.
1010         * lang.opt:  Add fconvert=little-endian, fconvert=big-endian,
1011         fconvert=native and fconvert=swap.
1012         * trans-decl.c (top level):  Add gfor_fndecl_set_convert.
1013         (gfc_build_builtin_function_decls):  Set gfor_fndecl_set_convert.
1014         (gfc_generate_function_code):  If -fconvert was specified,
1015         and this is the main program, add a call to set_convert().
1016         * options.c:  Handle the -fconvert options.
1017
1018 2006-02-06  Roger Sayle  <roger@eyesopen.com>
1019
1020         * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
1021         to be NULL to indicate that the not mask isn't required.
1022         (gfc_trans_where_2): Remove PMASK argument.  Avoid calculating the
1023         pending mask for the last clause of a WHERE chain.  Update recursive
1024         call.
1025         (gfc_trans_forall_1): Update call to gfc_trans_where_2.
1026         (gfc_trans_where): Likewise.
1027
1028 2006-02-06  Jakub Jelinek  <jakub@redhat.com>
1029
1030         Backport from gomp-20050608-branch
1031         * trans-decl.c (create_function_arglist): Handle dummy functions.
1032
1033         * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
1034         TYPE_SIZE_UNIT.
1035         (gfc_trans_vla_type_sizes): Also "gimplify"
1036         GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
1037         * trans-array.c (gfc_trans_deferred_array): Call
1038         gfc_trans_vla_type_sizes.
1039
1040         * trans-decl.c (saved_function_decls, saved_parent_function_decls):
1041         Remove unnecessary initialization.
1042         (create_function_arglist): Make sure __result has complete type.
1043         (gfc_get_fake_result_decl): Change current_fake_result_decl into
1044         a tree chain.  For entry master, create a separate variable
1045         for each result name.  For BT_CHARACTER results, call
1046         gfc_finish_var_decl on length even if it has been already created,
1047         but not pushdecl'ed.
1048         (gfc_trans_vla_type_sizes): For function/entry result, adjust
1049         result value type, not the FUNCTION_TYPE.
1050         (gfc_generate_function_code): Adjust for current_fake_result_decl
1051         changes.
1052         (gfc_trans_deferred_vars): Likewise.  Call gfc_trans_vla_type_sizes
1053         even on result if it is assumed-length character.
1054
1055         * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
1056         Call gfc_trans_vla_type_sizes.
1057         (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
1058         (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
1059         gfc_trans_vla_type_sizes): New functions.
1060         (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
1061         callers.  Call gfc_trans_vla_type_sizes on assumed-length
1062         character parameters.
1063         * trans-array.c (gfc_trans_array_bounds,
1064         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
1065         gfc_trans_vla_type_sizes.
1066         * trans.h (gfc_trans_vla_type_sizes): New prototype.
1067
1068         * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
1069         arrays without constant size, create also an index var for
1070         GFC_TYPE_ARRAY_SIZE (type).  If the type is incomplete, complete
1071         it as 0..size-1.
1072         (gfc_create_string_length): Don't call gfc_defer_symbol_init
1073         if just creating DECL_ARGUMENTS.
1074         (gfc_get_symbol_decl): Call gfc_finish_var_decl and
1075         gfc_defer_symbol_init even if ts.cl->backend_decl is already
1076         set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
1077         (create_function_arglist): Rework, so that hidden length
1078         arguments for CHARACTER parameters are created together with
1079         the parameters.  Resolve ts.cl->backend_decl for CHARACTER
1080         parameters.  If the argument is a non-constant length array
1081         or CHARACTER, ensure PARM_DECL has different type than
1082         its DECL_ARG_TYPE.
1083         (generate_local_decl): Call gfc_get_symbol_decl even
1084         for non-referenced non-constant length CHARACTER parameters
1085         after optionally issuing warnings.
1086         * trans-array.c (gfc_trans_array_bounds): Set last stride
1087         to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
1088         (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
1089         variable as well.
1090
1091         * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
1092
1093         * trans-stmt.c (gfc_trans_simple_do): Fix comment.
1094
1095 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1096
1097         * dependency.c (gfc_check_dependency): Remove unused vars and nvars
1098         arguments.  Replace with an "identical" argument.  A full array
1099         reference to the same symbol is a dependency if identical is true.
1100         * dependency.h (gfc_check_dependency): Update prototype.
1101         * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
1102         * trans-stmt.c: #include dependency.h for gfc_check_dependency.
1103         (gfc_trans_forall_1): Update calls to gfc_check_dependency.
1104         (gfc_trans_where_2): Likewise.  Remove unneeded variables.
1105         (gfc_trans_where_3): New function for simple non-dependent WHEREs.
1106         (gfc_trans_where): Call gfc_trans_where_3 to translate simple
1107         F90-style WHERE statements without internal dependencies.
1108         * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
1109
1110 2006-02-05  H.J. Lu  <hongjiu.lu@intel.com>
1111
1112         PR fortran/26041
1113         PR fortran/26064
1114         * resolve.c (resolve_types): New function.
1115         (resolve_codes): Likewise.
1116         (gfc_resolve): Use them.
1117
1118 2006-02-05  Roger Sayle  <roger@eyesopen.com>
1119
1120         * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
1121         masks instead of LOGICAL*4.
1122
1123 2006-02-05  Jakub Jelinek  <jakub@redhat.com>
1124
1125         * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
1126
1127 2006-02-04  Thomas Koenig  <Thomas.Koenig@online.de>
1128
1129         PR fortran/25075
1130         check.c (identical_dimen_shape):  New function.
1131         (check_dot_product):  Use identical_dimen_shape() to check sizes
1132         for dot_product.
1133         (gfc_check_matmul):  Likewise.
1134         (gfc_check_merge):  Check conformance between tsource and fsource
1135         and between tsource and mask.
1136         (gfc_check_pack):  Check conformance between array and mask.
1137
1138 2006-02-03  Steven G. Kargl  <kargls@comcast>
1139             Paul Thomas  <pault@gcc.gnu.org>
1140
1141         PR fortran/20845
1142         * resolve.c (resolve_symbol): Default initialization of derived type
1143         component reguires the SAVE attribute.
1144
1145 2006-02-02  Steven G. Kargl  <kargls@comcast>
1146
1147         PR fortran/24958
1148         match.c (gfc_match_nullify):  Free the list from head not tail.
1149
1150         PR fortran/25072
1151         * match.c (match_forall_header): Fix internal error caused by bogus
1152         gfc_epxr pointers.
1153
1154
1155 2006-01-31  Thomas Koenig  <Thomas.Koenig@online.de>
1156
1157         PR fortran/26039
1158         expr.c (gfc_check_conformance):  Reorder error message
1159         to avoid plural.
1160         check.c(gfc_check_minloc_maxloc):  Call gfc_check_conformance
1161         for checking arguments array and mask.
1162         (check_reduction):  Likewise.
1163
1164 2006-01-30  Erik Edelmann  <eedelman@gcc.gnu.org>
1165
1166         PR fortran/24266
1167         * trans-io.c (set_internal_unit): Check the rank of the
1168         expression node itself instead of its symbol.
1169
1170 2006-01-29  Paul Thomas  <pault@gcc.gnu.org>
1171
1172         PR fortran/18578
1173         PR fortran/18579
1174         PR fortran/20857
1175         PR fortran/20885
1176         * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
1177         if actual argument is not a variable.
1178
1179 2006-01-28  Paul Thomas  <pault@gcc.gnu.org>
1180
1181         PR fortran/17911
1182         * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
1183         the lvalue is a use associated procedure.
1184
1185         PR fortran/20895
1186         PR fortran/25030
1187         * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
1188         character lengths are not the same.  Use gfc_dep_compare_expr for the
1189         comparison.
1190         * gfortran.h: Add prototype for gfc_dep_compare_expr.
1191         * dependency.h: Remove prototype for gfc_dep_compare_expr.
1192
1193 2006-01-27  Paul Thomas  <pault@gcc.gnu.org>
1194
1195         PR fortran/25964
1196         * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
1197         generic_ids exempted from assumed size checking.
1198
1199 2006-01-27  Jakub Jelinek  <jakub@redhat.com>
1200
1201         PR fortran/25324
1202         * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
1203         * lang.opt (fpreprocessed): New option.
1204         * scanner.c: Include toplev.h.
1205         (gfc_src_file, gfc_src_preprocessor_lines): New variables.
1206         (preprocessor_line): Unescape filename if there were any
1207         backslashes.
1208         (load_file): If initial and gfc_src_file is not NULL,
1209         use it rather than opening the file.  If gfc_src_preprocessor_lines
1210         has non-NULL elements, pass it to preprocessor_line.
1211         (unescape_filename, gfc_read_orig_filename): New functions.
1212         * gfortran.h (gfc_option_t): Add flag_preprocessed.
1213         (gfc_read_orig_filename): New prototype.
1214         * options.c (gfc_init_options): Clear flag_preprocessed.
1215         (gfc_post_options): If flag_preprocessed, call
1216         gfc_read_orig_filename.
1217         (gfc_handle_option): Handle OPT_fpreprocessed.
1218         * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
1219         sources.
1220
1221 2006-01-27  Erik Edelmann  <eedelman@gcc.gnu.org>
1222
1223         * symbol.c (free_old_symbol): Fix confusing comment, and add code
1224           to free old_symbol->formal.
1225
1226 2006-01-26  Paul Thomas  <pault@gcc.gnu.org>
1227
1228         PR fortran/25964
1229         * resolve.c (resolve_function): Exclude statement functions from
1230         global reference checking.
1231
1232         PR fortran/25084
1233         PR fortran/20852
1234         PR fortran/25085
1235         PR fortran/25086
1236         * resolve.c (resolve_function): Declare a gfc_symbol to replace the
1237         references through the symtree to the symbol associated with the
1238         function expresion. Give error on reference to an assumed character
1239         length function is defined in an interface or an external function
1240         that is not a dummy argument.
1241         (resolve_symbol): Give error if an assumed character length function
1242         is array-valued, pointer-valued, pure or recursive. Emit warning
1243         that character(*) value functions are obsolescent in F95.
1244
1245         PR fortran/25416
1246         * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
1247         prevents any assumed character length function call from getting here
1248         except intrinsics such as SPREAD. In this case, ensure that no
1249         segfault occurs from referencing non-existent charlen->length->
1250         expr_type and provide a backend_decl for the charlen from the charlen
1251         of the first actual argument.
1252
1253         Cure temp name confusion.
1254         * trans-expr.c (gfc_get_interface_mapping_array): Change name of
1255         temporary from "parm" to "ifm" to avoid clash with temp coming from
1256         trans-array.c.
1257
1258 2006-01-25  Erik Edelmann  <eedelman@gcc.gnu.org>
1259
1260         PR fortran/25716
1261         * symbol.c (free_old_symbol): New function.
1262         (gfc_commit_symbols): Use it.
1263         (gfc_commit_symbol): New function.
1264         (gfc_use_derived): Use it.
1265         * gfortran.h: Add prototype for gfc_commit_symbol.
1266         * intrinsic.c (gfc_find_function): Search in 'conversion'
1267         if not found in 'functions'.
1268         (gfc_convert_type_warn): Add a symtree to the new
1269         expression node, and commit the new symtree->n.sym.
1270         * resolve.c (gfc_resolve_index): Make sure typespec is
1271         properly initialized.
1272
1273 2006-01-23  Paul Thomas  <pault@gcc.gnu.org>
1274
1275         PR fortran/25901
1276         * decl.c (get_proc_name): Replace subroutine and function attributes
1277         in "already defined" test by the formal arglist pointer being non-NULL.
1278
1279         Fix regression in testing of admissability of attributes.
1280         * symbol.c (gfc_add_attribute): If the current_attr has non-zero
1281         intent, do not do the check for a dummy being used.
1282         * decl.c (attr_decl1): Add current_attr.intent as the third argument
1283         in the call to gfc_add_attribute.
1284         * gfortran.h: Add the third argument to the prototype for
1285         gfc_add_attribute.
1286
1287 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1288
1289         * gfortranspec.c (lang_specific_driver): Update copyright notice
1290         date.
1291
1292 2006-01-21  Paul Thomas  <pault@gcc.gnu.org>
1293
1294         PR fortran/25124
1295         PR fortran/25625
1296         * decl.c (get_proc_name): If there is an existing
1297         symbol in the encompassing namespace, call errors
1298         if it is a procedure of the same name or the kind
1299         field is set, indicating a type declaration.
1300
1301         PR fortran/20881
1302         PR fortran/23308
1303         PR fortran/25538
1304         PR fortran/25710
1305         * decl.c (add_global_entry): New function to check
1306         for existing global symbol with this name and to
1307         create new one if none exists.
1308         (gfc_match_entry): Call add_global_entry before
1309         matching argument lists for subroutine and function
1310         entries.
1311         * gfortran.h: Prototype for existing function,
1312         global_used.
1313         * resolve.c (resolve_global_procedure): New function
1314         to check global symbols for procedures.
1315         (resolve_call, resolve_function): Calls to this
1316         new function for non-contained and non-module
1317         procedures.
1318         * match.c (match_common): Add check for existing
1319         global symbol, creat one if none exists and emit
1320         error if there is a clash.
1321         * parse.c (global_used): Remove static and use the
1322         gsymbol name rather than the new_block name, so that
1323         the function can be called from resolve.c.
1324         (parse_block_data, parse_module, add_global_procedure):
1325         Improve checks for existing gsymbols.  Emit error if
1326         already defined or if references were to another type.
1327         Set defined flag.
1328
1329         PR fortran/PR24276
1330         * trans-expr.c (gfc_conv_aliased_arg): New function called by 
1331         gfc_conv_function_call that coverts an expression for an aliased
1332         component reference to a derived type array into a temporary array
1333         of the same type as the component.  The temporary is passed as an
1334         actual argument for the procedure call and is copied back to the
1335         derived type after the call.
1336         (is_aliased_array): New function that detects an array reference
1337         that is followed by a component reference.
1338         (gfc_conv_function_call): Detect an aliased actual argument with
1339         is_aliased_array and convert it to a temporary and back again
1340         using gfc_conv_aliased_arg.
1341
1342 2006-01-19  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1343
1344         * gfortranspec.c: Update copyright years.
1345         * trans.c: Likewise.
1346         * trans-array.c: Likewise.
1347         * trans-array.h: Likewise.
1348         * trans-decl.c: Likewise.
1349         * trans-stmt.c: Likewise.
1350         * trans-stmt.h: Likewise.
1351         * trans-types.c: Likewise.
1352
1353 2006-01-18  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1354
1355         PR fortran/18540
1356         PR fortran/18937
1357         * gfortran.h (BBT_HEADER): Move definition up.
1358         (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
1359         * io.c (format_asterisk): Adapt initializer.
1360         * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
1361         as extension.
1362         (warn_unused_label): Take gfc_st_label label as argument, adapt to
1363         new data structure.
1364         (gfc_resolve): Adapt call to warn_unused_label.
1365         * symbol.c (compare_st_labels): New function.
1366         (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
1367         using balanced binary tree.
1368         * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
1369         with 'cnt'.
1370         (warn_unused_label): Adapt to binary tree.
1371         * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
1372         * primary.c (match_kind_param): Do away with cnt.
1373
1374 2006-01-18  Paul Thomas  <pault@gcc.gnu.org>
1375
1376         PR fortran/20869
1377         PR fortran/20875
1378         PR fortran/25024
1379         * symbol.c (check_conflict): Add pointer valued elemental
1380         functions and internal procedures with the external attribute
1381         to the list of conflicts.
1382         (gfc_add_attribute): New catch-all function to perform the
1383         checking of symbol attributes for attribute declaration
1384         statements.
1385         * decl.c (attr_decl1): Call gfc_add_attribute for each of -
1386         (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
1387         gfc_match_pointer, gfc_match_dimension, gfc_match_target):
1388         Remove spurious calls to checks in symbol.c.  Set the
1389         attribute directly and use the call to attr_decl() for
1390         checking.
1391         * gfortran.h:  Add prototype for gfc_add_attribute.
1392
1393         PR fortran/25785
1394         * resolve.c (resolve_function): Exclude PRESENT from assumed size
1395         argument checking. Replace strcmp's with comparisons with generic
1396         codes.
1397
1398 2006-01-16  Rafael \81Ávila de Esp\81índola  <rafael.espindola@gmail.com>
1399
1400         * gfortranspec.c (lang_specific_spec_functions): Remove.
1401
1402 2006-01-16  Richard Guenther  <rguenther@suse.de>
1403
1404         * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
1405         (gfc_trans_arithmetic_if): Likewise.
1406         (gfc_trans_simple_do): Likewise.
1407         (gfc_trans_do): Likewise.
1408         (gfc_trans_do_while): Likewise.
1409         (gfc_trans_logical_select): Likewise.
1410         (gfc_trans_forall_loop): Likewise.
1411         (generate_loop_for_temp_to_lhs): Likewise.
1412         (generate_loop_for_rhs_to_temp): Likewise.
1413         (gfc_trans_allocate): Likewise.
1414         * trans.c (gfc_add_expr_to_block): Do not fold expr again.
1415
1416 2006-01-16  Richard Guenther  <rguenther@suse.de>
1417
1418         * trans-expr.c (gfc_conv_function_call): Use fold_build2.
1419         * trans-stmt.c (gfc_trans_goto): Likewise.  Use build_int_cst.
1420         * trans.c (gfc_trans_runtime_check): Don't fold the condition
1421         again.
1422
1423 2006-01-13  Steven G. Kargl  <kargls@comcast.net>
1424
1425         PR fortran/25756
1426         * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
1427         unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
1428         from g95).
1429
1430 2006-01-13  Diego Novillo  <dnovillo@redhat.com>
1431
1432         * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
1433         nodes.
1434
1435 2006-01-11  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1436
1437         * parse.c (next_fixed): Remove superfluous string concatenation.
1438
1439 2006-01-11  Bernhard Fischer  <rep.nop@aon.at>
1440
1441         PR fortran/25486
1442         * scanner.c (load_line): use maxlen to determine the line-length used
1443         for padding lines in fixed form.
1444
1445 2006-01-11  Paul Thomas  <pault@gcc.gnu.org>
1446
1447         PR fortran/25730
1448         * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
1449         character lengths.
1450
1451 2006-01-09  Andrew Pinski  <pinskia@physics.uc.edu>
1452
1453         fortran/24936
1454         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
1455         to avoid type mismatch.
1456
1457 2006-01-09  Andrew Pinski  <pinskia@physics.uc.edu>
1458
1459         PR fortran/21977
1460         * trans-decl.c (gfc_generate_function_code): Move the NULLing of
1461         current_fake_result_decl down to below generate_local_vars.
1462
1463 2006-01-09  Feng Wang  <fengwang@nudt.edu.cn>
1464
1465         PR fortran/12456
1466         * trans-expr.c (gfc_to_single_character): New function that converts
1467         string to single character if its length is 1.
1468         (gfc_build_compare_string):New function that compare string and handle
1469         single character specially.
1470         (gfc_conv_expr_op): Use gfc_build_compare_string.
1471         (gfc_trans_string_copy): Use gfc_to_single_character.
1472         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
1473         gfc_build_compare_string.
1474         * trans.h (gfc_build_compare_string): Add prototype.
1475
1476 2006-01-09  Feng Wang  <fengwang@nudt.edu.cn>
1477
1478         * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
1479         constant.
1480         (gfc_simplify_ichar): Get the result from unsinged char and in the
1481         range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
1482
1483 2006-01-08  Erik Edelmann  <eedelman@gcc.gnu.org>
1484
1485         PR fortran/25093
1486         * resolve.c (resolve_fntype): Check that PUBLIC functions
1487         aren't of PRIVATE type.
1488
1489 2006-01-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1490
1491         * decl.c (gfc_match_function_decl): Correctly error out in case of
1492         omitted function argument list.
1493
1494 2006-01-07  Paul Thomas  <pault@gcc.gnu.org>
1495
1496         PR fortran/22146
1497         * trans-array.c (gfc_reverse_ss): Remove static attribute.
1498         (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
1499         the function call with the corresponding gfc_actual_arglist*.  Change
1500         code accordingly.
1501         (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
1502         now requires the actual argument list instead of the expression for
1503         the function call.
1504         * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
1505         and provide a prototype for gfc_reverse_ss.
1506         * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
1507         where an elemental subroutine has array valued actual arguments.
1508
1509         PR fortran/25029
1510         PR fortran/21256
1511         PR fortran/20868
1512         PR fortran/20870
1513         * resolve.c (check_assumed_size_reference): New function to check for upper
1514         bound in assumed size array references.
1515         (resolve_assumed_size_actual): New function to do a very restricted scan
1516         of actual argument expressions of those procedures for which incomplete
1517         assumed size array references are not allowed.
1518         (resolve_function, resolve_call): Switch off assumed size checking of
1519         actual arguments, except for elemental procedures and intrinsic
1520         inquiry functions, in some circumstances.
1521         (resolve_variable): Call check_assumed_size_reference.
1522
1523 2006-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1524
1525         PR fortran/24268
1526         * io.c (next_char_not_space): New function that returns the next
1527         character that is not white space.
1528         (format_lex): Use the new function to skip whitespace within
1529         a format string.
1530
1531 2006-01-05  Erik Edelmann  <eedelman@gcc.gnu.org>
1532
1533         PR fortran/23675
1534         * expr.c (gfc_expr_set_symbols_referenced): New function.
1535         * gfortran.h: Add a function prototype for it.
1536         * resolve.c (resolve_function): Use it for
1537         use associated character functions lengths.
1538         * expr.c, gfortran.h, resolve.c: Updated copyright years.
1539
1540 2006-01-03  Steven G. Kargl  <kargls@comcast.net>
1541
1542         PR fortran/25101
1543         * resolve.c (resolve_forall_iterators):  Check for scalar variables;
1544         Check stride is nonzero.
1545
1546 2006-01-02  Steven G. Kargl  <kargls@comcast.net>
1547
1548         PR fortran/24640
1549         * parse.c (next_free): Check for whitespace after the label.
1550         * match.c (gfc_match_small_literal_int): Initialize cnt variable.
1551
1552 2006-01-01  Steven G. Kargl  <kargls@comcast.net>
1553
1554         * ChangeLog: Split previous years into ...
1555         * ChangeLog-2002: here.
1556         * ChangeLog-2003: here.
1557         * ChangeLog-2004: here.
1558         * ChangeLog-2005: here.