OSDN Git Service

2006-06-05 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2006-06-05  Paul Thomas  <pault@gcc.gnu.org>
2
3         PR fortran/14067
4         * data.c (create_character_intializer): Add warning message
5         for truncated string.
6
7         PR fortran/16943
8         * symbol.c : Include flags.h.
9         (gfc_add_type): If a procedure and types are the same do not
10         throw an error unless standard is less than gnu or pedantic.
11
12         PR fortran/20838
13         * parse.c (parse_do_block): Error if named block do construct
14         does not have a named enddo.
15
16         PR fortran/27655
17         * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
18         as well as target and put error return at end of function.
19
20 2006-06-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
21
22         * trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
23         Add strings for common runtime error messages.
24         (gfc_trans_runtime_check): Add a locus argument, use a string
25         and not a string tree for the message.
26         * trans.h (gfc_trans_runtime_check): Change prototype accordingly.
27         (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
28         * trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
29         gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
30         (gfc_init_constants): Likewise.
31         * trans-const.h: Likewise.
32         * trans-decl.c (gfc_build_builtin_function_decls): Call to
33         _gfortran_runtime_error has only one argument, the message string.
34         * trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
35         locus.
36         * trans-array.c (gfc_trans_array_bound_check): Build precise
37         error messages.
38         (gfc_conv_array_ref): Use the new symbol argument and the locus
39         to build more precise error messages.
40         (gfc_conv_ss_startstride): More precise error messages.
41         * trans-expr.c (gfc_conv_variable): Give symbol reference and
42         locus to gfc_conv_array_ref.
43         (gfc_conv_function_call): Use the new prototype for
44         gfc_trans_runtime_check.
45         * trans-stmt.c (gfc_trans_goto): Build more precise error message.
46         * trans-io.c (set_string): Likewise.
47         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
48         for gfc_trans_runtime_check.
49
50 2006-06-01  Thomas Koenig  <Thomas.Koenig@online.de>
51
52         PR fortran/27715
53         * arith.c:  Cast the characters from the strings to unsigned
54         char to avoid values less than 0 for extended ASCII.
55
56 2006-06-01  Per Bothner  <bothner@bothner.com>
57
58         * data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
59         * scanner.c (gfc_gobble_whitespace): Likewise.
60
61 2006-06-01  Paul Thomas  <pault@gcc.gnu.org>
62
63         PR fortran/25098
64         PR fortran/25147
65         * interface.c (compare_parameter): Return 1 if the actual arg
66         is external and the formal is a procedure.
67         (compare_actual_formal): If the actual argument is a variable
68         and the formal a procedure, this an error.  If a gsymbol exists
69         for a procedure of the same name, this is not yet resolved and
70         the error is cleared.
71
72         * trans-intrinsic.c (gfc_conv_associated): Make provision for
73         zero array length or zero string length contingent on presence
74         of target, for consistency with standard.
75
76 2006-05-30  Asher Langton  <langton2@llnl.gov>
77
78         * symbol.c (check_conflict): Allow external, function, and
79         subroutine attributes with Cray pointees.
80         * trans-expr.c (gfc_conv_function_val): Translate Cray pointees
81         that point to procedures.
82         * gfortran.texi: Document new feature.
83
84 2006-05-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
85
86         PR fortran/27634
87         * io.c (check_format): Add error for missing period in format
88         specifier unless -std=legacy.
89         * gfortran.texi: Add description of expanded namelist read and
90         missing period in format extensions.
91
92 2006-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
93
94         PR fortran/19777
95         * trans-array.c (gfc_conv_array_ref): Perform out-of-bounds
96         checking for assumed-size arrrays for all but the last dimension.
97
98 2006-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
99
100         * invoke.texi: Change -fpackderived into -fpack-derived.
101
102 2006-05-29  Kazu Hirata  <kazu@codesourcery.com>
103
104         * options.c, primary.c, resolve.c, trans-common.c: Fix typos
105         in error messages.
106
107 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
108
109         * check.c, expr.c, resolve.c, trans-common.c,
110         trans-intrinsic.c, trans-stmt.c, trans-types.c: Fix comment typos.
111
112 2006-05-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
113
114         PR fortran/19777
115         * trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
116         checking for assumed-size arrrays.
117
118 2006-05-27  Paul Thomas  <pault@gcc.gnu.org>
119
120         * trans-intrinsic.c (gfc_conv_associated): If pointer in first
121         arguments has zero array length of zero string length, return
122         false.
123
124 2006-05-26  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
125
126         PR fortran/27524
127         * trans-array.c (gfc_trans_dummy_array_bias): Don't use stride as
128         a temporary variable when -fbounds-check is enabled, since its
129         value will be needed later.
130
131 2006-05-26  Thomas Koenig  <Thomas.Koenig@online.de>
132
133         PR fortran/23151
134         * io.c (match_io):  print (1,*) is an error.
135
136 2006-05-26  Paul Thomas  <pault@gcc.gnu.org>
137
138         PR fortran/27709
139         * resolve.c (find_array_spec): Add gfc_symbol, derived, and
140         use to track repeated component references.
141
142         PR fortran/27155
143         PR fortran/27449
144         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Use
145         se->string_length throughout and use memcpy to populate the
146         expression returned to the scalarizer.
147         (gfc_size_in_bytes): New function.
148
149 2006-05-21  Paul Thomas  <pault@gcc.gnu.org>
150
151         PR fortran/27613
152         * primary.c (gfc_match_rvalue): Test if symbol represents a
153         direct recursive function reference.  Error if array valued,
154         go to function0 otherwise.
155
156 2006-05-21  Paul Thomas  <pault@gcc.gnu.org>
157
158         PR fortran/25746
159         * interface.c (gfc_extend_assign): Use new EXEC_ASSIGN_CALL.
160         * gfortran.h : Put EXEC_ASSIGN_CALL in enum.
161         * trans-stmt.c (gfc_conv_elemental_dependencies): New function.
162         (gfc_trans_call): Call it.  Add new boolian argument to flag
163         need for dependency checking. Assert intent OUT and IN for arg1
164         and arg2.
165         (gfc_trans_forall_1): Use new code EXEC_ASSIGN_CALL.
166         trans-stmt.h : Modify prototype of gfc_trans_call.
167         trans.c (gfc_trans_code): Add call for EXEC_ASSIGN_CALL.
168         st.c (gfc_free_statement): Free actual for EXEC_ASSIGN_CALL.
169         * dependency.c (gfc_check_fncall_dependency): Don't check other
170         against itself.
171
172         PR fortran/25090
173         * resolve.c : Remove resolving_index_expr.
174         (entry_parameter): Remove.
175         (gfc_resolve_expr, resolve_charlen, resolve_fl_variable): Lift
176         calls to entry_parameter and references to resolving_index_expr.
177
178         PR fortran/27584
179         * check.c (gfc_check_associated): Replace NULL assert with an
180         error message, since it is possible to generate bad code that
181         has us fall through to here..
182
183         PR fortran/19015
184         * iresolve.c (maxloc, minloc): If DIM is not present, pass the
185         rank of ARRAY as the shape of the result.  Otherwise, pass the
186         shape of ARRAY, less the dimension DIM.
187         (maxval, minval): The same, when DIM is present, otherwise no
188         change.
189
190 2006-05-19  H.J. Lu  <hongjiu.lu@intel.com>
191
192         PR fortran/27662
193         * trans-array.c (gfc_conv_expr_descriptor): Don't zero the
194         first stride to indicate a temporary.
195         * trans-expr.c (gfc_conv_function_call): Likewise.
196
197 2006-05-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
198             Feng Wang  <fengwang@nudt.edu.cn>
199
200         PR fortran/27552
201         * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
202         * data.c (create_character_intializer): Set from_H flag if character is
203         initialized by Hollerith constant.
204
205 2006-05-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
206
207         PR fortran/26551
208         * resolve.c (resolve_call, resolve_function): Issue an error
209         if a function or subroutine call is recursive but the function or
210         subroutine wasn't declared as such.
211
212 2006-05-07  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
213
214         PR fortran/26551
215         * gfortran.dg/recursive_check_1.f: New test.
216
217
218 2006-05-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
219
220         PR fortran/27320
221         * dump-parse-tree.c (gfc_show_code_node): Try harder to find the
222         called procedure name.
223
224 2006-05-17  Jakub Jelinek  <jakub@redhat.com>
225
226         PR middle-end/27415
227         * trans-openmp.c (gfc_trans_omp_parallel_do,
228         gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set
229         OMP_PARALLEL_COMBINED flag.
230
231 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
232
233         PR driver/26885
234         * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with
235         $(GCC_OBJS).
236
237 2006-05-15  Paul Thomas  <pault@gcc.gnu.org>
238
239         PR fortran/25090
240         * resolve.c: Static resolving_index_expr initialized.
241         (entry_parameter): New function to emit errors for variables
242         that are not entry parameters.
243         (gfc_resolve_expr): Call entry_parameter, when resolving
244         variables, if the namespace has entries and resolving_index_expr
245         is set.
246         (resolve_charlen): Set resolving_index_expr before the call to
247         resolve_index_expr and reset it afterwards.
248         (resolve_fl_variable): The same before and after the call to
249         is_non_constant_shape_array, which ultimately makes a call to
250         gfc_resolve_expr.
251
252         PR fortran/25082
253         * resolve.c (resolve_code): Add error condition that the return
254         expression must be scalar.
255
256         PR fortran/27411
257         * matchexp.c (gfc_get_parentheses): New function.
258         (match_primary): Remove inline code and call above.
259         * gfortran.h: Provide prototype for gfc_get_parentheses.
260         * resolve.c (resolve_array_ref): Call the above, when start is a
261         derived type variable array reference.
262
263 2006-05-15  Jakub Jelinek  <jakub@redhat.com>
264
265         PR fortran/27446
266         * trans-openmp.c (gfc_trans_omp_array_reduction): Ensure
267         OMP_CLAUSE_REDUCTION_{INIT,MERGE} are set to BIND_EXPR.
268
269 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
270
271         * Make-lang.in (fortran/options.o): Depend on $(TARGET_H).
272
273 2006-05-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
274
275         PR fortran/27553
276         * parse.c (next_free): Return instead of calling decode_statement
277         upon error.
278
279 2005-05-10  Thomas Koenig  <Thomas.Koenig@online.de>
280
281         PR fortran/27470
282         * trans-array.c(gfc_array_allocate):  If ref->next exists
283         that is if there is a statement like ALLOCATE(foo%bar(2)),
284         F95 rules require that bar should be a pointer.
285
286 2006-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
287
288         PR fortran/20460
289         * resolve.c (gfc_resolve_index): Make REAL array indices a
290         GFC_STD_LEGACY feature.
291
292 2006-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
293
294         PR fortran/24549
295         * parse.c (reject_statement): Clear gfc_new_block.
296
297 2006-05-09  Steven G. Kargl  <kargls@comcast.net>
298
299         * invoke.texi: Missed file in previous commit.  Update
300          description of -fall-intrinsics
301
302 2006-05-07  Steven Boscher  <steven@gcc.gnu.org>
303
304         PR fortran/27378
305         * parse.c (next_statement): Add check to avoid an ICE when
306         gfc_current_locus.lb is not set.
307
308 2006-05-07  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
309
310         PR fortran/27457
311         * match.c (match_case_eos): Error out on garbage following
312         CASE(...).
313
314 2006-05-07  Paul Thomas  <pault@gcc.gnu.org>
315
316         PR fortran/24813
317         * trans-array.c (get_array_ctor_strlen): Remove static attribute.
318         * trans.h: Add prototype for get_array_ctor_strlen.
319         * trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
320         and call get_array_ctor_strlen.
321
322 2006-05-05  Steven G. Kargl  <kargls@comcast.net>
323
324         * invoke.texi: Update description of -fall-intrinsics
325         * options.c (gfc_post_options): Disable -Wnonstd-intrinsics if
326         -fall-intrinsics is used.
327         (gfc_handle_option): Permit -Wno-nonstd-intrinsics.
328
329 2006-05-04  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
330
331         * simplify.c (ascii_table): Fix wrong entry.
332
333 2006-05-02  Steven G. Kargl  <kargls@comcast.net>
334
335         PR fortran/26896
336         * lang.opt: Fix -Wtab description
337
338         PR fortran/20248  
339         * lang.opt: New flag -fall-intrinsics.
340         * invoke.texi:  Document option.
341         * gfortran.h (options_t):  New member flag_all_intrinsics.
342         * options.c (gfc_init_options, gfc_handle_option): Set new option.
343         sort nearby misplaced options.
344         * intrinsic.c (add_sym, make_generic, make_alias):  Use it.
345  
346 2006-05-02 Paul Thomas <pault@gcc.gnu.org>
347
348         PR fortran/27269
349         * module.c: Add static flag in_load_equiv.
350         (mio_expr_ref): Return if no symtree and in_load_equiv.
351         (load_equiv): If any of the equivalence members have no symtree, free
352         the equivalence and the associated expressions.
353
354         PR fortran/27324
355         * trans-common.c (gfc_trans_common): Invert the order of calls to
356         finish equivalences and gfc_commit_symbols.
357
358 2006-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
359
360         PR fortran/25681
361         * simplify.c (simplify_len): Character variables with constant
362         length can be simplified.
363
364 2006-04-29  H.J. Lu  <hongjiu.lu@intel.com>
365
366         PR fortran/27351
367         * trans-array.c (gfc_conv_array_transpose): Move gcc_assert
368         before gfc_conv_expr_descriptor.
369
370 2006-04-23  Paul Thomas  <pault@gcc.gnu.org>
371
372         PR fortran/25099
373         * resolve.c (resolve_call): Check conformity of elemental
374         subroutine actual arguments.
375
376 2006-04-22  Jakub Jelinek  <jakub@redhat.com>
377
378         PR fortran/26769
379         * iresolve.c (gfc_resolve_reshape): Use reshape_r16 for real(16).
380         (gfc_resolve_transpose): Use transpose_r16 for real(16).
381
382 2006-04-21 Paul Thomas <pault@gcc.gnu.org>
383
384         PR fortran/27122
385         * resolve.c (resolve_function): Remove general restriction on auto
386         character length function interfaces.
387         (gfc_resolve_uops): Check restrictions on defined operator
388         procedures.
389         (resolve_types): Call the check for defined operators.
390
391         PR fortran/27113
392         * trans-array.c (gfc_trans_array_constructor_subarray): Remove
393         redundant gfc_todo_error.
394         (get_array_ctor_var_strlen): Remove typo in enum.
395
396 2006-04-18  Bernhard Fischer  <aldot@gcc.gnu.org>
397
398         * parse.c (next_free): Use consistent error string between
399         free-form and fixed-form for illegal statement label of zero.
400         (next_fixed): Use consistent warning string between free-form
401         and fixed-form for statement labels for empty statements.
402
403 2006-04-18  Steve Ellcey  <sje@cup.hp.com>
404
405         * trans-io.c (gfc_build_io_library_fndecls): Align pad.
406
407 2006-04-16  Thomas Koenig  <Thomas.Koenig@online.de>
408
409         PR fortran/26017
410         * trans-array.c(gfc_array_init_size):  Introduce or_expr
411         which is true if the size along any dimension
412         is negative.  Create a temporary variable with base
413         name size.  If or_expr is true, set the temporary to 0,
414         to the normal size otherwise.
415
416 2006-04-16  Paul Thomas  <pault@gcc.gnu.org>
417
418         PR fortran/26822
419         * intrinsic.c (add_functions): Mark LOGICAL as elemental.
420
421         PR fortran/26787
422         * expr.c (gfc_check_assign): Extend scope of error to include
423         assignments to a procedure in the main program or, from a
424         module or internal procedure that is not that represented by
425         the lhs symbol. Use VARIABLE rather than l-value in message.
426
427         PR fortran/27096
428         * trans-array.c (gfc_trans_deferred_array): If the backend_decl
429         is not a descriptor, dereference and then test and use the type.
430
431         PR fortran/25597
432         * trans-decl.c (gfc_trans_deferred_vars): Check if an array
433         result, is also automatic character length.  If so, process
434         the character length.
435
436         PR fortran/18003
437         PR fortran/25669
438         PR fortran/26834
439         * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
440         data.info.dimen for bound intrinsics.
441         * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
442         UBOUND intrinsics and supply their shape information to the ss
443         and the loop.
444
445         PR fortran/27124
446         * trans_expr.c (gfc_trans_function_call):  Add a new block, post,
447         in to which all the argument post blocks are put.  Add this block
448         to se->pre after a byref call or to se->post, otherwise.
449
450 2006-04-14  Roger Sayle  <roger@eyesopen.com>
451
452         * trans-io.c (set_string): Use fold_build2 and build_int_cst instead
453         of build2 and convert to construct "x < 0" rather than "x <= -1".
454
455 2006-04-13  Richard Henderson  <rth@redhat.com>
456
457         * trans-openmp.c (gfc_trans_omp_sections): Adjust for changed
458         number of operands to OMP_SECTIONS.
459
460 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
461
462         * gfortran.texi: Fix typos.  Follow spelling conventions.
463         * resolve.c, trans-expr.c, trans-stmt.c: Fix comment typos.
464         Follow spelling conventions.
465
466 2006-04-05  Roger Sayle  <roger@eyesopen.com>
467
468         * dependency.c (get_no_elements): Delete function.
469         (get_deps): Delete function.
470         (transform_sections): Delete function.
471         (gfc_check_section_vs_section): Significant rewrite.
472
473 2006-04-04  H.J. Lu  <hongjiu.lu@intel.com>
474
475         PR fortran/25619
476         * trans-array.c (gfc_conv_expr_descriptor): Only dereference
477         character pointer when copying temporary.
478
479         PR fortran/23634
480         * trans-array.c (gfc_conv_expr_descriptor): Properly copy
481         temporary character with non constant size.
482
483 2006-04-03  Paul Thomas  <pault@gcc.gnu.org>
484
485         PR fortran/26891
486         * trans.h: Prototype for gfc_conv_missing_dummy.
487         * trans-expr (gfc_conv_missing_dummy): New function
488         (gfc_conv_function_call): Call it and tidy up some of the code.
489         * trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
490
491         PR fortran/26976
492         * array.c (gfc_array_dimen_size): If available, return shape[dimen].
493         * resolve.c (resolve_function): If available, use the argument
494         shape for the function expression.
495         * iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
496
497 2006-04-02  Erik Edelmann  <eedelman@gcc.gnu.org>
498
499         * trans-array.c (gfc_trans_dealloc_allocated): Take a
500         tree representation of the array to be deallocated as argument
501         instead of its gfc_symbol.
502         (gfc_trans_deferred_array): Update call to
503         gfc_trans_dealloc_allocated.
504         * trans-array.h (gfc_trans_dealloc_allocated): Update
505         prototype.
506         * trans-expr.c (gfc_conv_function_call): Update call to
507         gfc_trans_dealloc_allocated, get indirect reference to dummy
508         arguments.
509
510 2006-04-01  Roger Sayle  <roger@eyesopen.com>
511
512         PR fortran/25270
513         * trans-array.c (gfc_trans_allocate_array_storage): In array index
514         calculations use gfc_index_zero_node and gfc_index_one_node instead
515         of integer_zero_node and integer_one_node respectively.
516         (gfc_conv_array_transpose): Likewise.
517         (gfc_conv_ss_startstride): Likewise.
518         (gfc_trans_dummy_array_bias): Likewise.
519
520 2006-04-01  Roger Sayle  <roger@eyesopen.com>
521
522         * dependency.c (gfc_is_inside_range): Delete.
523         (gfc_check_element_vs_section): Significant rewrite.
524
525 2006-04-01  Roger Sayle  <roger@eyesopen.com>
526
527         * dependency.c (gfc_dep_compare_expr): Strip parentheses and unary
528         plus operators when comparing expressions.  Handle comparisons of
529         the form "X+C vs. X", "X vs. X+C", "X-C vs. X" and "X vs. X-C" where
530         C is an integer constant.  Handle comparisons of the form "P+Q vs.
531         R+S" and "P-Q vs. R-S".  Handle comparisons of integral extensions
532         specially (increasing functions) so extend(A) > extend(B), when A>B.
533         (gfc_check_element_vs_element): Move test later, so that we ignore
534         the fact that "A < B" or "A > B" when A or B contains a forall index.
535
536 2006-03-31  Asher Langton  <langton2@llnl.gov>
537
538         PR fortran/25358
539         * expr.c (gfc_check_assign): Allow cray pointee to be assumes-size.
540         
541 2006-03-30  Paul Thomas <paulthomas2@wanadoo.fr>
542             Bud Davis  <bdavis9659@sbcglobal.net>
543
544         PR 21130
545         * module.c (load_needed): Traverse entire tree before returning.
546
547 2006-03-30  Roger Sayle  <roger@eyesopen.com>
548
549         PR middle-end/22375
550         * trans.c (gfc_trans_runtime_check): Promote the arguments of
551         __builtin_expect to the correct types, and the result back to
552         boolean_type_node.
553
554 2006-03-29  Carlos O'Donell  <carlos@codesourcery.com>
555
556         * Make-lang.in: Rename docdir to gcc_docdir.
557
558 2006-03-28  Steven G. Kargl  <kargls@comcast.net>
559
560         * intrinsic.texi: s/floor/float in previous commit.
561
562 2006-03-28 Paul Thomas <pault@gcc.gnu.org>
563
564         PR fortran/26779
565         * resolve.c (resolve_fl_procedure): Do not check the access of
566         derived types for internal procedures.
567
568 2006-03-27  Jakub Jelinek  <jakub@redhat.com>
569
570         * io.c (check_io_constraints): Don't look at
571         dt->advance->value.charater.string, unless it is a CHARACTER
572         constant.
573
574         * f95-lang.c (gfc_get_alias_set): New function.
575         (LANG_HOOKS_GET_ALIAS_SET): Define.
576
577 2006-03-25  Steven G. Kargl  <kargls@comcast.net>
578
579         PR fortran/26816
580         * intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
581         * intrinsic.texi: Document FLOAT.
582
583 2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>
584
585         PR fortran/26769
586         * iresolve.c (gfc_resolve_reshape):  Remove doubling of
587         kind for complex. For real(kind=10), call reshape_r10.
588         (gfc_resolve_transpose):  For real(kind=10), call
589         transpose_r10.
590
591 2006-03-25  Roger Sayle  <roger@eyesopen.com>
592
593         * dependency.c (gfc_check_dependency): Improve handling of pointers;
594         Two variables of different types can't have a dependency, and two
595         variables with the same symbol are equal, even if pointers.
596
597 2006-03-24  Roger Sayle  <roger@eyesopen.com>
598
599         * gfortran.h (gfc_symbol): Add a new "forall_index" bit field.
600         * match.c (match_forall_iterator): Set forall_index field on
601         the iteration variable's symbol.
602         * dependency.c (contains_forall_index_p): New function to
603         traverse a gfc_expr to check whether it contains a variable
604         with forall_index set in it's symbol.
605         (gfc_check_element_vs_element): Return GFC_DEP_EQUAL for scalar
606         constant expressions that don't variables used as FORALL indices.
607
608 2006-03-22  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
609
610         PR driver/22600
611         * error.c (gfc_fatal_error): Return ICE_EXIT_CODE instead of 4.
612
613 2006-03-22  Thomas Koenig  <Thomas.Koenig@online.de>
614
615         PR fortran/19303
616         * gfortran.h (gfc_option_t):  Add record_marker.
617         * lang.opt:  Add -frecord-marker=4 and -frecord-marker=8.
618         * trans-decl.c:  Add gfor_fndecl_set_record_marker.
619         (gfc_build_builtin_function_decls): Set
620         gfor_fndecl_set_record_marker.
621         (gfc_generate_function_code):  If we are in the main program
622         and -frecord-marker was provided, call set_record_marker.
623         * options.c (gfc_handle_option):  Add handling for
624         -frecord-marker=4 and -frecord-marker=8.
625         * invoke.texi:  Document -frecord-marker.
626
627 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
628
629         PR fortran/17298
630         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): New
631         function to implement array valued TRANSFER intrinsic.
632         (gfc_conv_intrinsic_function): Call the new function if TRANSFER
633         and non-null se->ss.
634         (gfc_walk_intrinsic_function): Treat TRANSFER as one of the
635         special cases by calling gfc_walk_intrinsic_libfunc directly.
636
637 2006-03-21  Toon Moene  <toon@moene.indiv.nluug.nl>
638
639         * options.c (gfc_init_options): Initialize
640         flag_argument_noalias to 3.
641
642 2006-03-20  Thomas Koenig  <Thomas.Koenig@online.de>
643
644         PR fortran/20935
645         * iresolve.c (gfc_resolve_maxloc):   If mask is scalar,
646         prefix the function name with an "s".  If the mask is scalar
647         or if its kind is smaller than gfc_default_logical_kind,
648         coerce it to default kind.
649         (gfc_resolve_maxval):  Likewise.
650         (gfc_resolve_minloc):  Likewise.
651         (gfc_resolve_minval):  Likewise.
652         (gfc_resolve_product):  Likewise.
653         (gfc_resolve_sum):  Likewise.
654
655 2006-03-19  Paul Thomas  <pault@gcc.gnu.org>
656
657         PR fortran/26741
658         *expr.c (external_spec_function): Permit elemental functions.
659
660         PR fortran/26716
661         *interface.c (compare_actual_formal): Detect call for procedure
662         usage and require rank checking, in this case, for assumed shape
663         and deferred shape arrays.
664         (gfc_procedure_use): Revert to pre-PR25070 call to
665         compare_actual_formal that does not require rank checking..
666
667 2006-03-16  Roger Sayle  <roger@eyesopen.com>
668
669         * gfortran.h (gfc_equiv_info): Add length field.
670         * trans-common.c (copy_equiv_list_to_ns): Set the length field.
671         * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
672         and length fields to determine whether the two equivalenced symbols
673         overlap in memory.
674
675 2006-03-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
676
677         PR fortran/19101
678         * gfortran.h: Add warn_ampersand.
679         * invoke.texi: Add documentation for new option.
680         * lang.opt: Add Wampersand.
681         * options.c (gfc_init_options): Initialize warn_ampersand.
682         (gfc_post_options): Set the warn if pedantic.
683         (set_Wall): Set warn_ampersand.
684         (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
685         * scanner.c (gfc_next_char_literal): Add test for missing '&' in
686         continued character constant and give warning if missing.
687
688 2006-03-14  Steven G. Kargl  <kargls@comcast.net>
689
690         PR 18537
691         * gfortran.h: Wrap Copyright line.
692         (gfc_option_t): add warn_tabs member.
693         * lang.opt: Update Coyright year.  Add the Wtabs.
694         * invoke.texi: Document -Wtabs.
695         * scanner.c (gfc_gobble_whitespace): Use warn_tabs.  Add linenum to
696         suppress multiple warnings.
697         (load_line): Use warn_tabs.  Add linenum, current_line, seen_comment
698         to suppress multiple warnings.
699         * options.c (gfc_init_options): Initialize warn_tabs.
700         (set_Wall): set warn_tabs for -Wall.
701         (gfc_post_options): Adjust flag_tabs depending on -pedantic.
702         (gfc_handle_option):  Process command-line option -W[no-]tabs
703
704 2006-03-13  Paul Thomas  <pault@gcc.gnu.org>
705
706         PR fortran/25378
707         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
708         modify the condition for updating it, to implement the F2003 requirement for all(mask)
709         is false.
710
711 2006-03-13  Jakub Jelinek  <jakub@redhat.com>
712
713         * trans-openmp.c (gfc_trans_omp_variable): Handle references
714         to parent result.
715         * trans-expr.c (gfc_conv_variable): Remove useless setting
716         of parent_flag, formatting.
717
718         * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
719         GFC_DECL_RESULT flag.
720
721 2003-03-11  Roger Sayle  <roger@eyesopen.com>
722
723         * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
724         binary operators to compare equal if their operands are equal.
725         <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
726         to compare equal, if their operands are equal.
727
728 2006-03-11  Erik Edelmann  <eedelman@gcc.gnu.org>
729
730         * symbol.c (check_conflict): Allow allocatable function results,
731         except for elemental functions.
732         * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
733         (gfc_trans_create_temp_array): ... this, and add new argument
734         callee_alloc.
735         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
736         to gfc_trans_allocate_temp_array.
737         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
738         * trans-expr.c (gfc_conv_function_call): Use new arg of
739         gfc_trans_create_temp_array avoid pre-allocation of temporary
740         result variables of pointer AND allocatable functions.
741         (gfc_trans_arrayfunc_assign): Return NULL for allocatable
742         functions.
743         * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
744         from sym->result to sym.
745
746 2006-03-09  Erik Edelmann  <eedelman@gcc.gnu.org>
747
748         * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
749         attribute from sym to new_sym.  Call build_fold_indirect_ref()
750         for allocatable arguments.
751
752 2006-03-09 Paul Thomas <pault@gcc.gnu.org>
753
754         PR fortran/26257
755         * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
756         the offset and data when se->data_not_needed is set.
757         * trans.h: Include the data_not_need bit in gfc_se.
758         * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
759
760 2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
761             Erik Edelmann  <eedelman@gcc.gnu.org>
762
763         * trans-array.c (gfc_trans_dealloc_allocated): New function.
764         (gfc_trans_deferred_array): Use it, instead of inline code.
765         * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
766         * trans-expr.c (gfc_conv_function_call): Deallocate allocated
767         ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
768
769 2006-03-06  Paul Thomas  <pault@gcc.gnu.org>
770
771         PR fortran/26107
772         * resolve.c (resolve_function): Add name after test for pureness.
773
774         PR fortran/19546
775         * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
776         store current_function_decl, replace with parent, whilst calls are
777         made to gfc_get_fake_result_decl, and restore afterwards. Signal this
778         to gfc_get_fake_result_decl with a new argument, parent_flag.
779         * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
780         is set to zero.
781         * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
782         * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
783         add decl to parent function. Replace refs to current_fake_result_decl
784         with refs to this_result_decl.
785         (gfc_generate_function_code): Null parent_fake_result_decl before the
786         translation of code for contained procedures. Set parent_flag to zero
787         in call to gfc_get_fake_result_decl.
788         * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
789
790 2006-03-05  Steven G. Kargl  <kargls@comcast.net>
791
792         * simplify.c (gfc_simplify_verify):  Fix return when SET=''.
793
794 2006-03-05  Erik Edelmann  <eedelman@gcc.gnu.org>
795
796         PR fortran/16136
797         * symbol.c (conf_std): New macro.
798         (check_conflict): Use it to allow ALLOCATABLE dummy
799         arguments for F2003.
800         * trans-expr.c (gfc_conv_function_call): Pass the
801         address of the array descriptor when dummy argument is
802         ALLOCATABLE.
803         * interface.c (compare_allocatable): New function.
804         (compare_actual_formal): Use it.
805         * resolve.c (resolve_deallocate_expr,
806         resolve_allocate_expr): Check that INTENT(IN) variables
807         aren't (de)allocated.
808         * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
809         dummy arguments as supported.
810
811 2006-03-03  Roger Sayle  <roger@eyesopen.com>
812
813         * dependency.c (gfc_check_element_vs_element): Revert last change.
814
815 2006-03-03  Roger Sayle  <roger@eyesopen.com>
816
817         * dependency.c (gfc_check_element_vs_element): Consider two
818         unordered scalar subscripts as (potentially) equal.
819
820 2006-03-03  Roger Sayle  <roger@eyesopen.com>
821
822         * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
823         check whether two array references have a dependency.
824         (gfc_check_element_vs_element): Assume lref and rref must be
825         REF_ARRAYs.  If gfc_dep_compare_expr returns -2, assume these
826         references could potentially overlap.
827         (gfc_dep_resolver): Whitespace and comment tweaks.  Assume a
828         dependency if the references have different depths.  Rewrite
829         final term to clarrify we only have a dependency for overlaps.
830
831 2006-03-03  Thomas Koenig  <Thomas.Koenig@online.de>
832
833         PR fortran/25031
834         * trans-array.h:  Adjust gfc_array_allocate prototype.
835         * trans-array.c (gfc_array_allocate):  Change type of
836         gfc_array_allocatate to bool.  Function returns true if
837         it operates on an array.  Change second argument to gfc_expr.
838         Find last reference in chain.
839         If the function operates on an allocatable array, emit call to
840         allocate_array() or allocate64_array().
841         * trans-stmt.c (gfc_trans_allocate):  Code to follow to last
842         reference has been moved to gfc_array_allocate.
843         * trans.h:  Add declaration for gfor_fndecl_allocate_array and
844         gfor_fndecl_allocate64_array.
845         (gfc_build_builtin_function_decls):  Add gfor_fndecl_allocate_array
846         and gfor_fndecl_allocate64_array.
847
848 2006-03-01  Roger Sayle  <roger@eyesopen.com>
849
850         * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
851         INVERT argument to invert the sense of the WHEREMASK argument.
852         Remove unneeded code to AND together a list of masks.
853         (generate_loop_for_rhs_to_temp): Likewise.
854         (gfc_trans_assign_need_temp): Likewise.
855         (gfc_trans_forall_1): Likewise.
856         (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
857         to specify the sense of the MASK argument.
858         (gfc_trans_where_assign): Likewise.
859         (gfc_trans_where_2): Likewise.  Restructure code that decides
860         whether we need to allocate zero, one or two temporary masks.
861         If this is a top-level WHERE (i.e. the incoming MASK is NULL),
862         we only need to allocate at most one temporary mask, and can
863         invert it's sense to provide the complementary pending execution
864         mask.  Only calculate the size of the required temporary arrays
865         if we need any.
866         (gfc_trans_where): Update call to gfc_trans_where_2.
867
868 2006-03-01  Paul Thomas  <pault@gcc.gnu.org>
869
870         * iresolve.c (gfc_resolve_dot_product):  Remove any difference in
871         treatment of logical types.
872         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product):  New function. 
873
874         PR fortran/26393
875         * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
876         must be referenced to include unreferenced symbols in an interface
877         body. 
878
879         PR fortran/20938
880         * trans-array.c (gfc_conv_resolve_dependencies): Add call to
881         gfc_are_equivalenced_arrays.
882         * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
883         functions. (gfc_free_namespace): Call them.
884         * trans-common.c (copy_equiv_list_to_ns): New function.
885         (add_equivalences): Call it.
886         * gfortran.h: Add equiv_lists to gfc_namespace and define
887         gfc_equiv_list and gfc_equiv_info.
888         * dependency.c (gfc_are_equivalenced_arrays): New function.
889         (gfc_check_dependency): Call it.
890         * dependency.h: Prototype for gfc_are_equivalenced_arrays.
891
892 2006-03-01  Roger Sayle  <roger@eyesopen.com>
893
894         * dependency.c (gfc_is_same_range): Compare the stride, lower and
895         upper bounds when testing array reference ranges for equality.
896         (gfc_check_dependency): Fix indentation whitespace.
897         (gfc_check_element_vs_element): Likewise.
898         (gfc_dep_resolver): Likewise.
899
900 2006-02-28  Thomas Koenig  <Thomas.Koenig@online.de>
901
902         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
903         If the mask expression exists and has rank 0, enclose the
904         generated loop in an "if (mask)".  Put the default
905         initialization into the else branch.
906
907 2006-02-25  Thomas Koenig  <Thomas.Koenig@online.de>
908
909         PR fortran/23092
910         * trans-intrinsic.c (gfc_conv_intrinsic_arith):  If the
911         mask expression exists and has rank 0, enclose the generated
912         loop in an "if (mask)".
913         * (gfc_conv_intrinsic_minmaxloc):  Likewise.
914
915 2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
916
917         PR fortran/26409
918         * resolve.c (resolve_contained_functions, resolve_types,
919         gfc_resolve): Revert patch of 2006-02-19.
920
921 2006-02-24  Paul Thomas  <pault@gcc.gnu.org>
922
923         PR fortran/24519
924         * dependency.c (gfc_is_same_range): Correct typo.
925         (gfc_check_section_vs_section): Call gfc_is_same_range.
926
927         PR fortran/25395
928         * trans-common.c (add_equivalences): Add a new flag that is set when
929         an equivalence is seen that prevents more from being reset until the
930         start of a new traversal of the list, thus ensuring completion of
931         all the equivalences.
932
933 2006-02-23  Erik Edelmann  <eedelman@gcc.gnu.org>
934
935         * module.c (read_module): Remove redundant code lines.
936
937 2006-02-20 Rafael \81Ávila de Esp\81índola <rafael.espindola@gmail.com>
938         * Make-lang.in (FORTRAN): Remove
939         (.PHONY): Remove F95 and f95. Add fortran
940
941 2006-02-20  Roger Sayle  <roger@eyesopen.com>
942
943         * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
944         execution mask for empty WHERE/ELSEWHERE clauses.  Don't allocate
945         temporary mask arrays if they won't be used.
946
947 2006-02-20  Roger Sayle  <roger@eyesopen.com>
948
949         * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
950         traversing a linked list of MASKs.  The MASK is now always a
951         single element requiring no ANDing during the assignment.
952
953 2006-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
954
955         * gfortran.texi:  Document environment variables which
956         influence runtime behavior.
957
958 2006-02-19  H.J. Lu  <hongjiu.lu@intel.com>
959
960         * resolve.c (resolve_contained_functions): Call resolve_entries
961         first.
962         (resolve_types): Remove calls to resolve_entries and
963         resolve_contained_functions.
964         (gfc_resolve): Call resolve_contained_functions.
965
966 2006-02-19  Erik Edelmann  <eedelman@gcc.gnu.org>
967
968         PR fortran/26201
969         * intrinsic.c (gfc_convert_type_warn): Call
970         gfc_intrinsic_symbol() on the newly created symbol.
971
972 2006-02-19  Paul Thomas  <pault@gcc.gnu.org>
973
974         PR fortran/25054
975         * resolve.c (is_non_constant_shape_array): New function.
976         (resolve_fl_variable): Remove code for the new function and call it.
977         (resolve_fl_namelist): New function.  Add test for namelist array
978         with non-constant shape, using is_non_constant_shape_array.
979         (resolve_symbol): Remove code for resolve_fl_namelist and call it.
980
981         PR fortran/25089
982         * match.c (match_namelist): Increment the refs field of an accepted
983         namelist object symbol.
984         * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
985         with contained or module procedures.
986
987 2006-02-18  Roger Sayle  <roger@eyesopen.com>
988
989         * trans-stmt.c (struct temporary_list): Delete.
990         (gfc_trans_where_2): Major reorganization.  Remove no longer needed
991         TEMP argument.  Allocate and deallocate the control mask and
992         pending control mask locally.
993         (gfc_trans_forall_1): Delete TEMP local variable, and update
994         call to gfc_trans_where_2.  No need to deallocate arrays after.
995         (gfc_evaluate_where_mask): Major reorganization.  Change return
996         type to void.  Pass in parent execution mask, MASK, and two
997         already allocated mask arrays CMASK and PMASK.  On return
998         CMASK := MASK & COND, PMASK := MASK & !COND.  MASK, CMASK and
999         CMASK may all be NULL, or refer to the same temporary arrays.
1000         (gfc_trans_where): Update call to gfc_trans_where_2.  We no
1001         longer need a TEMP variable or to deallocate temporary arrays
1002         allocated by gfc_trans_where_2.
1003
1004 2006-02-18   Danny Smith  <dannysmith@users.sourceforeg.net>
1005
1006         * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
1007         * symbol.c (gfc_add_attribute): Likewise for definition.
1008         * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
1009
1010 2006-02-17  Richard Sandiford  <richard@codesourcery.com>
1011
1012         * trans-common.c: Include rtl.h earlier.
1013         * trans-decl.c: Likewise.
1014
1015 2006-02-16  Jakub Jelinek  <jakub@redhat.com>
1016
1017         PR fortran/26224
1018         * parse.c (parse_omp_do, parse_omp_structured_block): Call
1019         gfc_commit_symbols and gfc_warning_check.
1020
1021         * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
1022         PR middle-end/26316.
1023
1024 2006-02-16  Paul Thomas  <pault@gcc.gnu.org>
1025
1026         PR fortran/24557
1027         * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
1028         for character(*) arrays, rather than casting to the type and kind
1029         parameters of the formal argument.
1030
1031 2006-02-15  Toon Moene  <toon@moene.indiv.nluug.nl>
1032
1033         PR fortran/26054
1034         * options.c: Do not warn for Fortran 2003 features by default.
1035
1036 2006-02-15  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1037
1038         * check.c: Update copyright years.
1039         
1040         * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
1041         dim_range_check on not-present optional dim argument.
1042
1043 2006-02-15  Jakub Jelinek  <jakub@redhat.com>
1044
1045         PR libgomp/25938
1046         PR libgomp/25984
1047         * Make-lang.in (install-finclude-dir): New goal.
1048         (fortran.install-common): Depend on install-finclude-dir.
1049         * lang-specs.h: If not -nostdinc, add -I finclude.
1050
1051 2006-02-14  Thomas Koenig  <Thomas.Koenig@online.de>
1052
1053         PR fortran/25045
1054         * check.c (dim_check):  Perform all checks if dim is optional.
1055         (gfc_check_minloc_maxloc):  Use dim_check and dim_rank_check
1056         to check dim argument.
1057         (check_reduction):  Likewise.
1058
1059 2006-02-14  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1060
1061         PR fortran/26277
1062         * io.c (match_ltag): Mark label as referenced.
1063
1064 2006-02-14  Jakub Jelinek  <jakub@redhat.com>
1065             Richard Henderson  <rth@redhat.com>
1066             Diego Novillo  <dnovillo@redhat.com>
1067
1068         * invoke.texi: Document -fopenmp.
1069         * gfortran.texi (Extensions): Document OpenMP.
1070
1071         Backport from gomp-20050608-branch
1072         * trans-openmp.c: Call build_omp_clause instead of
1073         make_node when creating OMP_CLAUSE_* trees.
1074         (gfc_trans_omp_reduction_list): Remove argument 'code'.
1075         Adjust all callers.
1076
1077         * trans.h (build4_v): Define.
1078         * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
1079         Call build3_v to create OMP_SECTIONS nodes.
1080
1081         PR fortran/25162
1082         * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
1083         on all symbols added to the variable list.
1084
1085         * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
1086         procedure symbol in REDUCTION.
1087
1088         * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
1089         for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
1090
1091         * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument.  If PBLOCK
1092         is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
1093         that statement block.
1094         (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
1095         for non-ordered non-static combined loops.
1096         (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
1097
1098         * openmp.c: Include target.h and toplev.h.
1099         (gfc_match_omp_threadprivate): Emit diagnostic if target does
1100         not support TLS.
1101         * Make-lang.in (fortran/openmp.o): Add dependencies on
1102         target.h and toplev.h.
1103
1104         * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
1105         * trans-openmp.c (gfc_omp_privatize_by_reference): Make
1106         DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
1107         (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
1108         (gfc_trans_omp_variable): New function.
1109         (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
1110         * trans.h (GFC_DECL_RESULT): Define.
1111
1112         * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
1113         * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
1114         * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
1115
1116         * trans-openmp.c (gfc_omp_privatize_by_reference): Return
1117         true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
1118         (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
1119         functions.
1120         (gfc_trans_omp_clauses): Add WHERE argument.  Call
1121         gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
1122         for reductions.
1123         (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
1124         gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
1125         gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
1126         gfc_trans_omp_clauses callers.
1127
1128         * openmp.c (omp_current_do_code): New var.
1129         (gfc_resolve_omp_do_blocks): New function.
1130         (gfc_resolve_omp_parallel_blocks): Call it.
1131         (gfc_resolve_do_iterator): Add CODE argument.  Don't propagate
1132         predetermination if argument is !$omp do or !$omp parallel do
1133         iteration variable.
1134         * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
1135         for EXEC_OMP_DO.  Adjust gfc_resolve_do_iterator caller.
1136         * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
1137         (gfc_resolve_do_iterator): Add CODE argument.
1138
1139         * trans.h (gfc_omp_predetermined_sharing,
1140         gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
1141         prototypes.
1142         (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
1143         * trans-openmp.c (gfc_omp_predetermined_sharing,
1144         gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
1145         functions.
1146         * trans-common.c (build_equiv_decl, build_common_decl,
1147         create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
1148         * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
1149         on the decl.
1150         * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
1151         LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
1152         LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
1153
1154         * openmp.c (resolve_omp_clauses): Remove extraneous comma.
1155
1156         * symbol.c (check_conflict): Add conflict between cray_pointee and
1157         threadprivate.
1158         * openmp.c (gfc_match_omp_threadprivate): Fail if
1159         gfc_add_threadprivate returned FAILURE.
1160         (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
1161         {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
1162         {FIRST,LAST}PRIVATE and REDUCTION clauses.
1163
1164         * resolve.c (omp_workshare_flag): New variable.
1165         (resolve_function): Diagnose use of non-ELEMENTAL user defined
1166         function in WORKSHARE construct.
1167         (resolve_code): Cleanup forall_save use.  Make sure omp_workshare_flag
1168         is set to correct value in different contexts.
1169
1170         * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
1171         variable name.
1172         (resolve_omp_atomic): Likewise.
1173
1174         PR fortran/24493
1175         * scanner.c (skip_free_comments): Set at_bol at the beginning of the
1176         loop, not before it.
1177         (skip_fixed_comments): Handle ! comments in the middle of line here
1178         as well.
1179         (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
1180         not at BOL.
1181         (gfc_next_char_literal): Fix expected canonicalized *$omp string.
1182
1183         * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
1184         initialization to build OMP_FOR instead of build.
1185
1186         * trans-decl.c (gfc_gimplify_function): Invoke
1187         diagnose_omp_structured_block_errors.
1188
1189         * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
1190         (gfc_trans_omp_ordered): Use OMP_ORDERED.
1191
1192         * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
1193         gfc_resolve_omp_parallel_blocks): New prototypes.
1194         * resolve.c (resolve_blocks): Renamed to...
1195         (gfc_resolve_blocks): ... this.  Remove static.
1196         (gfc_resolve_forall): Adjust caller.
1197         (resolve_code): Only call gfc_resolve_blocks if code->block != 0
1198         and not for EXEC_OMP_PARALLEL* directives.  Call
1199         gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
1200         Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
1201         iterator.
1202         * openmp.c: Include pointer-set.h.
1203         (omp_current_ctx): New variable.
1204         (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
1205         functions.
1206         * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
1207
1208         * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
1209         look up symbol if it exists, use its name instead and, if it is not
1210         INTRINSIC, issue diagnostics.
1211
1212         * parse.c (parse_omp_do): Handle implied end do properly.
1213         (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
1214         return it instead of continuing.
1215
1216         * trans-openmp.c (gfc_trans_omp_critical): Update for changed
1217         operand numbering.
1218         (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
1219         gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
1220         gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
1221
1222         * trans.h (gfc_omp_privatize_by_reference): New prototype.
1223         * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
1224         to gfc_omp_privatize_by_reference.
1225         * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
1226
1227         * trans-stmt.h (gfc_trans_omp_directive): Add comment.
1228
1229         * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
1230         Disallow COMMON matching if it is set.
1231         (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
1232         (resolve_omp_clauses): Show locus in error messages.  Check that
1233         variable types in reduction clauses are appropriate for reduction
1234         operators.
1235
1236         * resolve.c (resolve_symbol): Don't error if a threadprivate module
1237         variable isn't SAVEd.
1238
1239         * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
1240         Fix typo in condition.  Fix DOVAR initialization.
1241
1242         * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
1243         rather than .min. etc.
1244
1245         * trans-openmpc.c (omp_not_yet): Remove.
1246         (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
1247         Force creation of BIND_EXPR around the workshare construct.
1248         (gfc_trans_omp_parallel_sections): Likewise.
1249         (gfc_trans_omp_parallel_workshare): Likewise.
1250
1251         * types.def (BT_I16, BT_FN_I16_VPTR_I16,
1252         BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
1253
1254         * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
1255         (gfc_trans_omp_code): New function.
1256         (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
1257         (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
1258         (gfc_trans_omp_sections): Likewise.  Only treat empty last section
1259         specially if lastprivate clause is present.
1260         * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
1261         builtin.
1262
1263         * trans-openmp.c (gfc_trans_omp_variable_list): Update for
1264         OMP_CLAUSE_DECL name change.
1265         (gfc_trans_omp_do): Likewise.
1266
1267         * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
1268         clauses.
1269         (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
1270         sync builtins directly.
1271         (gfc_trans_omp_single): Build OMP_SINGLE statement.
1272
1273         * trans-openmp.c (gfc_trans_add_clause): New.
1274         (gfc_trans_omp_variable_list): Take a tree code and build the clause
1275         node here.  Link it to the head of a list.
1276         (gfc_trans_omp_clauses): Update to match.
1277         (gfc_trans_omp_do): Use gfc_trans_add_clause.
1278
1279         * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
1280         gfc_omp_clauses *.  Use gfc_evaluate_now instead of creating
1281         temporaries by hand.
1282         (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
1283         (gfc_trans_omp_do): New function.
1284         (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
1285         (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
1286         Use buildN_v macros.
1287         (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
1288         gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
1289         gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
1290         (gfc_trans_omp_directive): Use them.
1291         * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
1292         * openmp.c (resolve_omp_clauses): Check for list items present
1293         in multiple clauses.
1294         (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
1295         and is not present in any clause variable lists other than PRIVATE
1296         or LASTPRIVATE.
1297
1298         * gfortran.h (symbol_attribute): Add threadprivate bit.
1299         (gfc_common_head): Add threadprivate member, change use_assoc
1300         and saved into char to save space.
1301         (gfc_add_threadprivate): New prototype.
1302         * symbol.c (check_conflict): Handle threadprivate.
1303         (gfc_add_threadprivate): New function.
1304         (gfc_copy_attr): Copy threadprivate.
1305         * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
1306         if IF or NUM_THREADS is constant.  Create OMP_CLAUSE_SCHEDULE and
1307         OMP_CLAUSE_ORDERED.
1308         * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
1309         outside a module and not in COMMON has is not SAVEd.
1310         (resolve_equivalence): Ensure THREADPRIVATE objects don't get
1311         EQUIVALENCEd.
1312         * trans-common.c: Include target.h and rtl.h.
1313         (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
1314         * trans-decl.c: Include rtl.h.
1315         (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
1316         * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
1317         * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
1318         (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
1319         * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
1320         is from current namespace.
1321         (gfc_match_omp_threadprivate): Rewrite.
1322         (resolve_omp_clauses): Check some clause restrictions.
1323         * module.c (ab_attribute): Add AB_THREADPRIVATE.
1324         (attr_bits): Add THREADPRIVATE.
1325         (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
1326         (load_commons, write_common, write_blank_common): Adjust for type
1327         change of saved, store/load threadprivate bit from the integer
1328         as well.
1329
1330         * types.def (BT_FN_UINT_UINT): New.
1331         (BT_FN_VOID_UINT_UINT): Remove.
1332
1333         * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
1334         gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
1335         gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
1336         (gfc_trans_omp_directive): Use them.
1337
1338         * openmp.c (expr_references_sym): Add SE argument, don't look
1339         into SE tree.
1340         (is_conversion): New function.
1341         (resolve_omp_atomic): Adjust expr_references_sym callers.  Handle
1342         promoted expressions.
1343         * trans-openmp.c (gfc_trans_omp_atomic): New function.
1344         (gfc_trans_omp_directive): Call it.
1345
1346         * f95-lang.c (builtin_type_for_size): New function.
1347         (gfc_init_builtin_functions): Initialize synchronization and
1348         OpenMP builtins.
1349         * types.def: New file.
1350         * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
1351         fortran/types.def.
1352
1353         * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
1354
1355         * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
1356         is NULL.
1357
1358         * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
1359         functions.
1360         (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
1361
1362         * parse.c (parse_omp_do): Call pop_state before next_statement.
1363         * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
1364         New functions.
1365         (gfc_resolve_omp_directive): Call them.
1366         * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
1367         leaves an OpenMP structured block or if EXIT terminates !$omp do
1368         loop.
1369
1370         * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
1371         (F95_OBJS): Add fortran/trans-openmp.o.
1372         (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
1373         * lang.opt: Add -fopenmp option.
1374         * options.c (gfc_init_options): Initialize it.
1375         (gfc_handle_option): Handle it.
1376         * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
1377         ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
1378         ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
1379         ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
1380         ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
1381         ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
1382         ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
1383         ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
1384         ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
1385         statement codes.
1386         (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
1387         OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
1388         OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
1389         OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
1390         OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
1391         OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
1392         New OpenMP variable list types.
1393         (gfc_omp_clauses): New typedef.
1394         (gfc_get_omp_clauses): Define.
1395         (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
1396         EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
1397         EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
1398         EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
1399         EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
1400         EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
1401         (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
1402         and omp_bool fields to ext union.
1403         (flag_openmp): Declare.
1404         (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
1405         * scanner.c (openmp_flag, openmp_locus): New variables.
1406         (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
1407         Handle OpenMP directive lines and conditional compilation magic
1408         comments.
1409         * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
1410         * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
1411         parse_omp_structured_block): New functions.
1412         (next_free, next_fixed): Parse OpenMP directives.
1413         (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
1414         codes.
1415         (gfc_ascii_statement): Handle ST_OMP_* codes.
1416         (parse_executable): Rearrange the loop slightly, so that
1417         parse_omp_do can return next_statement.
1418         * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
1419         gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
1420         gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
1421         gfc_match_omp_parallel, gfc_match_omp_parallel_do,
1422         gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
1423         gfc_match_omp_sections, gfc_match_omp_single,
1424         gfc_match_omp_threadprivate, gfc_match_omp_workshare,
1425         gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
1426         * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
1427         (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
1428         directives.
1429         * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
1430         EXEC_OMP_* directives.
1431         * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
1432         * trans-stmt.h (gfc_trans_omp_directive): New prototype.
1433         * openmp.c: New file.
1434         * trans-openmp.c: New file.
1435
1436 2006-02-13  Andrew Pinski  <pinskia@physics.uc.edu>
1437             Jakub Jelinek  <jakub@redhat.com>
1438
1439         PR fortran/26246
1440         * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
1441         gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
1442
1443 2006-02-13  Paul Thomas  <pault@gcc.gnu.org>
1444
1445         PR fortran/26074
1446         PR fortran/25103
1447         * resolve.c (resolve_symbol): Extend the requirement that module
1448         arrays have constant bounds to those in the main program.  At the
1449         same time simplify the array bounds, to avoiding trapping parameter
1450         array references, and exclude automatic character length from main
1451         and modules. Rearrange resolve_symbol and resolve_derived to put as
1452         each flavor together, as much as is possible and move all specific
1453         code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
1454         functions.
1455         (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
1456         New functions to do work of resolve_symbol.
1457         (resolve_index_expr): New function that is called from resolved_symbol
1458         and is extracted from resolve_charlen.
1459         (resolve_charlen): Call this new function.
1460         (resolve_fl_derived): Renamed resolve_derived to be consistent with
1461         the naming of the new functions for the other flavours.  Change the
1462         charlen checking so that the style is consistent with other similar
1463         checks. Add the generation of the gfc_dt_list, removed from resolve_
1464         symbol.
1465
1466         PR fortran/20861
1467         * resolve.c (resolve_actual_arglist): Prevent internal procedures
1468         from being dummy arguments.
1469
1470         PR fortran/20871
1471         * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
1472         procedures from being dummy arguments.
1473
1474         PR fortran/25083
1475         * resolve.c (check_data_variable): Add test that data variable is in
1476         COMMON.
1477
1478         PR fortran/25088
1479         * resolve.c (resolve_call): Add test that the subroutine does not
1480         have a type.
1481
1482 2006-02-12  Erik Edelmann  <eedelman@gcc.gnu.org>
1483
1484         PR fortran/25806
1485         * trans-array.c (gfc_trans_allocate_array_storage): New argument
1486         dealloc; free the temporary only if dealloc is true.
1487         (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
1488         passed onwards to gfc_trans_allocate_array_storage.
1489         (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
1490         gfc_trans_allocate_temp_array.
1491         * trans-array.h (gfc_trans_allocate_temp_array): Update function
1492         prototype.
1493         * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
1494         to gfc_trans_allocate_temp_array to false in case of functions
1495         returning pointers.
1496         (gfc_trans_arrayfunc_assign): Return NULL for functions returning
1497         pointers.
1498
1499 2006-02-10  Steven G. Kargl  <kargls@comcast.net>
1500
1501         PR fortran/20858
1502         *decl.c (variable_decl): Improve error message.  Remove initialization
1503         typespec.  Wrap long line.
1504         *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
1505         and rank.
1506         *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
1507         are set.
1508
1509
1510 2006-02-10  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1511
1512         PR fortran/14771
1513         * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
1514         * expr.c (check_intrinsic_op): Likewise.
1515         * module.c (mio_expr): Likewise.
1516
1517 2006-02-09  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1518
1519         * dump-parse-tree.c: Update copyright years.
1520         * matchexp.c: Likewise.
1521         * module.c: Likewise.
1522
1523         PR fortran/14771
1524         * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
1525         * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
1526         * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
1527         if it were INTRINSIC_UPLUS.
1528         * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
1529         * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
1530         * matchexp.c (match_primary): Record parentheses surrounding
1531         numeric expressions.
1532         * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
1533         dumping.
1534         * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
1535
1536 2006-02-09  Paul Thomas  <pault@gcc.gnu.org>
1537
1538         PR fortran/26038
1539         * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
1540         scalar with missing backend_decl for the hidden dummy charlen.
1541
1542         PR fortran/25059
1543         * interface.c (gfc_extend_assign): Remove detection of non-PURE
1544         subroutine in assignment interface, with gfc_error, and put it in
1545         * resolve.c (resolve_code).
1546
1547         PR fortran/25070
1548         * interface.c (gfc_procedure_use): Flag rank checking for non-
1549         elemental, contained or interface procedures in call to
1550         (compare_actual_formal), where ranks are checked for assumed
1551         shape arrays..
1552
1553 2006-02-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1554
1555         PR libfortran/25425
1556         * trans-decl.c (gfc_generate_function_code): Add new argument,
1557         pedantic, to set_std call.
1558
1559 2006-02-06  Thomas Koenig  <Thomas.Koenig@online.de>
1560
1561         PR libfortran/23815
1562         * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
1563         variable.
1564         * invoke.texi:  Mention the "Runtime" chapter.
1565         Document the -fconvert= option.
1566         * gfortran.h:  Add options_convert.
1567         * lang.opt:  Add fconvert=little-endian, fconvert=big-endian,
1568         fconvert=native and fconvert=swap.
1569         * trans-decl.c (top level):  Add gfor_fndecl_set_convert.
1570         (gfc_build_builtin_function_decls):  Set gfor_fndecl_set_convert.
1571         (gfc_generate_function_code):  If -fconvert was specified,
1572         and this is the main program, add a call to set_convert().
1573         * options.c:  Handle the -fconvert options.
1574
1575 2006-02-06  Roger Sayle  <roger@eyesopen.com>
1576
1577         * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
1578         to be NULL to indicate that the not mask isn't required.
1579         (gfc_trans_where_2): Remove PMASK argument.  Avoid calculating the
1580         pending mask for the last clause of a WHERE chain.  Update recursive
1581         call.
1582         (gfc_trans_forall_1): Update call to gfc_trans_where_2.
1583         (gfc_trans_where): Likewise.
1584
1585 2006-02-06  Jakub Jelinek  <jakub@redhat.com>
1586
1587         Backport from gomp-20050608-branch
1588         * trans-decl.c (create_function_arglist): Handle dummy functions.
1589
1590         * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
1591         TYPE_SIZE_UNIT.
1592         (gfc_trans_vla_type_sizes): Also "gimplify"
1593         GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
1594         * trans-array.c (gfc_trans_deferred_array): Call
1595         gfc_trans_vla_type_sizes.
1596
1597         * trans-decl.c (saved_function_decls, saved_parent_function_decls):
1598         Remove unnecessary initialization.
1599         (create_function_arglist): Make sure __result has complete type.
1600         (gfc_get_fake_result_decl): Change current_fake_result_decl into
1601         a tree chain.  For entry master, create a separate variable
1602         for each result name.  For BT_CHARACTER results, call
1603         gfc_finish_var_decl on length even if it has been already created,
1604         but not pushdecl'ed.
1605         (gfc_trans_vla_type_sizes): For function/entry result, adjust
1606         result value type, not the FUNCTION_TYPE.
1607         (gfc_generate_function_code): Adjust for current_fake_result_decl
1608         changes.
1609         (gfc_trans_deferred_vars): Likewise.  Call gfc_trans_vla_type_sizes
1610         even on result if it is assumed-length character.
1611
1612         * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
1613         Call gfc_trans_vla_type_sizes.
1614         (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
1615         (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
1616         gfc_trans_vla_type_sizes): New functions.
1617         (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
1618         callers.  Call gfc_trans_vla_type_sizes on assumed-length
1619         character parameters.
1620         * trans-array.c (gfc_trans_array_bounds,
1621         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
1622         gfc_trans_vla_type_sizes.
1623         * trans.h (gfc_trans_vla_type_sizes): New prototype.
1624
1625         * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
1626         arrays without constant size, create also an index var for
1627         GFC_TYPE_ARRAY_SIZE (type).  If the type is incomplete, complete
1628         it as 0..size-1.
1629         (gfc_create_string_length): Don't call gfc_defer_symbol_init
1630         if just creating DECL_ARGUMENTS.
1631         (gfc_get_symbol_decl): Call gfc_finish_var_decl and
1632         gfc_defer_symbol_init even if ts.cl->backend_decl is already
1633         set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
1634         (create_function_arglist): Rework, so that hidden length
1635         arguments for CHARACTER parameters are created together with
1636         the parameters.  Resolve ts.cl->backend_decl for CHARACTER
1637         parameters.  If the argument is a non-constant length array
1638         or CHARACTER, ensure PARM_DECL has different type than
1639         its DECL_ARG_TYPE.
1640         (generate_local_decl): Call gfc_get_symbol_decl even
1641         for non-referenced non-constant length CHARACTER parameters
1642         after optionally issuing warnings.
1643         * trans-array.c (gfc_trans_array_bounds): Set last stride
1644         to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
1645         (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
1646         variable as well.
1647
1648         * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
1649
1650         * trans-stmt.c (gfc_trans_simple_do): Fix comment.
1651
1652 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1653
1654         * dependency.c (gfc_check_dependency): Remove unused vars and nvars
1655         arguments.  Replace with an "identical" argument.  A full array
1656         reference to the same symbol is a dependency if identical is true.
1657         * dependency.h (gfc_check_dependency): Update prototype.
1658         * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
1659         * trans-stmt.c: #include dependency.h for gfc_check_dependency.
1660         (gfc_trans_forall_1): Update calls to gfc_check_dependency.
1661         (gfc_trans_where_2): Likewise.  Remove unneeded variables.
1662         (gfc_trans_where_3): New function for simple non-dependent WHEREs.
1663         (gfc_trans_where): Call gfc_trans_where_3 to translate simple
1664         F90-style WHERE statements without internal dependencies.
1665         * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
1666
1667 2006-02-05  H.J. Lu  <hongjiu.lu@intel.com>
1668
1669         PR fortran/26041
1670         PR fortran/26064
1671         * resolve.c (resolve_types): New function.
1672         (resolve_codes): Likewise.
1673         (gfc_resolve): Use them.
1674
1675 2006-02-05  Roger Sayle  <roger@eyesopen.com>
1676
1677         * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
1678         masks instead of LOGICAL*4.
1679
1680 2006-02-05  Jakub Jelinek  <jakub@redhat.com>
1681
1682         * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
1683
1684 2006-02-04  Thomas Koenig  <Thomas.Koenig@online.de>
1685
1686         PR fortran/25075
1687         check.c (identical_dimen_shape):  New function.
1688         (check_dot_product):  Use identical_dimen_shape() to check sizes
1689         for dot_product.
1690         (gfc_check_matmul):  Likewise.
1691         (gfc_check_merge):  Check conformance between tsource and fsource
1692         and between tsource and mask.
1693         (gfc_check_pack):  Check conformance between array and mask.
1694
1695 2006-02-03  Steven G. Kargl  <kargls@comcast>
1696             Paul Thomas  <pault@gcc.gnu.org>
1697
1698         PR fortran/20845
1699         * resolve.c (resolve_symbol): Default initialization of derived type
1700         component reguires the SAVE attribute.
1701
1702 2006-02-02  Steven G. Kargl  <kargls@comcast>
1703
1704         PR fortran/24958
1705         match.c (gfc_match_nullify):  Free the list from head not tail.
1706
1707         PR fortran/25072
1708         * match.c (match_forall_header): Fix internal error caused by bogus
1709         gfc_epxr pointers.
1710
1711
1712 2006-01-31  Thomas Koenig  <Thomas.Koenig@online.de>
1713
1714         PR fortran/26039
1715         expr.c (gfc_check_conformance):  Reorder error message
1716         to avoid plural.
1717         check.c(gfc_check_minloc_maxloc):  Call gfc_check_conformance
1718         for checking arguments array and mask.
1719         (check_reduction):  Likewise.
1720
1721 2006-01-30  Erik Edelmann  <eedelman@gcc.gnu.org>
1722
1723         PR fortran/24266
1724         * trans-io.c (set_internal_unit): Check the rank of the
1725         expression node itself instead of its symbol.
1726
1727 2006-01-29  Paul Thomas  <pault@gcc.gnu.org>
1728
1729         PR fortran/18578
1730         PR fortran/18579
1731         PR fortran/20857
1732         PR fortran/20885
1733         * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
1734         if actual argument is not a variable.
1735
1736 2006-01-28  Paul Thomas  <pault@gcc.gnu.org>
1737
1738         PR fortran/17911
1739         * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
1740         the lvalue is a use associated procedure.
1741
1742         PR fortran/20895
1743         PR fortran/25030
1744         * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
1745         character lengths are not the same.  Use gfc_dep_compare_expr for the
1746         comparison.
1747         * gfortran.h: Add prototype for gfc_dep_compare_expr.
1748         * dependency.h: Remove prototype for gfc_dep_compare_expr.
1749
1750 2006-01-27  Paul Thomas  <pault@gcc.gnu.org>
1751
1752         PR fortran/25964
1753         * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
1754         generic_ids exempted from assumed size checking.
1755
1756 2006-01-27  Jakub Jelinek  <jakub@redhat.com>
1757
1758         PR fortran/25324
1759         * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
1760         * lang.opt (fpreprocessed): New option.
1761         * scanner.c: Include toplev.h.
1762         (gfc_src_file, gfc_src_preprocessor_lines): New variables.
1763         (preprocessor_line): Unescape filename if there were any
1764         backslashes.
1765         (load_file): If initial and gfc_src_file is not NULL,
1766         use it rather than opening the file.  If gfc_src_preprocessor_lines
1767         has non-NULL elements, pass it to preprocessor_line.
1768         (unescape_filename, gfc_read_orig_filename): New functions.
1769         * gfortran.h (gfc_option_t): Add flag_preprocessed.
1770         (gfc_read_orig_filename): New prototype.
1771         * options.c (gfc_init_options): Clear flag_preprocessed.
1772         (gfc_post_options): If flag_preprocessed, call
1773         gfc_read_orig_filename.
1774         (gfc_handle_option): Handle OPT_fpreprocessed.
1775         * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
1776         sources.
1777
1778 2006-01-27  Erik Edelmann  <eedelman@gcc.gnu.org>
1779
1780         * symbol.c (free_old_symbol): Fix confusing comment, and add code
1781           to free old_symbol->formal.
1782
1783 2006-01-26  Paul Thomas  <pault@gcc.gnu.org>
1784
1785         PR fortran/25964
1786         * resolve.c (resolve_function): Exclude statement functions from
1787         global reference checking.
1788
1789         PR fortran/25084
1790         PR fortran/20852
1791         PR fortran/25085
1792         PR fortran/25086
1793         * resolve.c (resolve_function): Declare a gfc_symbol to replace the
1794         references through the symtree to the symbol associated with the
1795         function expresion. Give error on reference to an assumed character
1796         length function is defined in an interface or an external function
1797         that is not a dummy argument.
1798         (resolve_symbol): Give error if an assumed character length function
1799         is array-valued, pointer-valued, pure or recursive. Emit warning
1800         that character(*) value functions are obsolescent in F95.
1801
1802         PR fortran/25416
1803         * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
1804         prevents any assumed character length function call from getting here
1805         except intrinsics such as SPREAD. In this case, ensure that no
1806         segfault occurs from referencing non-existent charlen->length->
1807         expr_type and provide a backend_decl for the charlen from the charlen
1808         of the first actual argument.
1809
1810         Cure temp name confusion.
1811         * trans-expr.c (gfc_get_interface_mapping_array): Change name of
1812         temporary from "parm" to "ifm" to avoid clash with temp coming from
1813         trans-array.c.
1814
1815 2006-01-25  Erik Edelmann  <eedelman@gcc.gnu.org>
1816
1817         PR fortran/25716
1818         * symbol.c (free_old_symbol): New function.
1819         (gfc_commit_symbols): Use it.
1820         (gfc_commit_symbol): New function.
1821         (gfc_use_derived): Use it.
1822         * gfortran.h: Add prototype for gfc_commit_symbol.
1823         * intrinsic.c (gfc_find_function): Search in 'conversion'
1824         if not found in 'functions'.
1825         (gfc_convert_type_warn): Add a symtree to the new
1826         expression node, and commit the new symtree->n.sym.
1827         * resolve.c (gfc_resolve_index): Make sure typespec is
1828         properly initialized.
1829
1830 2006-01-23  Paul Thomas  <pault@gcc.gnu.org>
1831
1832         PR fortran/25901
1833         * decl.c (get_proc_name): Replace subroutine and function attributes
1834         in "already defined" test by the formal arglist pointer being non-NULL.
1835
1836         Fix regression in testing of admissability of attributes.
1837         * symbol.c (gfc_add_attribute): If the current_attr has non-zero
1838         intent, do not do the check for a dummy being used.
1839         * decl.c (attr_decl1): Add current_attr.intent as the third argument
1840         in the call to gfc_add_attribute.
1841         * gfortran.h: Add the third argument to the prototype for
1842         gfc_add_attribute.
1843
1844 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1845
1846         * gfortranspec.c (lang_specific_driver): Update copyright notice
1847         date.
1848
1849 2006-01-21  Paul Thomas  <pault@gcc.gnu.org>
1850
1851         PR fortran/25124
1852         PR fortran/25625
1853         * decl.c (get_proc_name): If there is an existing
1854         symbol in the encompassing namespace, call errors
1855         if it is a procedure of the same name or the kind
1856         field is set, indicating a type declaration.
1857
1858         PR fortran/20881
1859         PR fortran/23308
1860         PR fortran/25538
1861         PR fortran/25710
1862         * decl.c (add_global_entry): New function to check
1863         for existing global symbol with this name and to
1864         create new one if none exists.
1865         (gfc_match_entry): Call add_global_entry before
1866         matching argument lists for subroutine and function
1867         entries.
1868         * gfortran.h: Prototype for existing function,
1869         global_used.
1870         * resolve.c (resolve_global_procedure): New function
1871         to check global symbols for procedures.
1872         (resolve_call, resolve_function): Calls to this
1873         new function for non-contained and non-module
1874         procedures.
1875         * match.c (match_common): Add check for existing
1876         global symbol, creat one if none exists and emit
1877         error if there is a clash.
1878         * parse.c (global_used): Remove static and use the
1879         gsymbol name rather than the new_block name, so that
1880         the function can be called from resolve.c.
1881         (parse_block_data, parse_module, add_global_procedure):
1882         Improve checks for existing gsymbols.  Emit error if
1883         already defined or if references were to another type.
1884         Set defined flag.
1885
1886         PR fortran/PR24276
1887         * trans-expr.c (gfc_conv_aliased_arg): New function called by 
1888         gfc_conv_function_call that coverts an expression for an aliased
1889         component reference to a derived type array into a temporary array
1890         of the same type as the component.  The temporary is passed as an
1891         actual argument for the procedure call and is copied back to the
1892         derived type after the call.
1893         (is_aliased_array): New function that detects an array reference
1894         that is followed by a component reference.
1895         (gfc_conv_function_call): Detect an aliased actual argument with
1896         is_aliased_array and convert it to a temporary and back again
1897         using gfc_conv_aliased_arg.
1898
1899 2006-01-19  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1900
1901         * gfortranspec.c: Update copyright years.
1902         * trans.c: Likewise.
1903         * trans-array.c: Likewise.
1904         * trans-array.h: Likewise.
1905         * trans-decl.c: Likewise.
1906         * trans-stmt.c: Likewise.
1907         * trans-stmt.h: Likewise.
1908         * trans-types.c: Likewise.
1909
1910 2006-01-18  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1911
1912         PR fortran/18540
1913         PR fortran/18937
1914         * gfortran.h (BBT_HEADER): Move definition up.
1915         (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
1916         * io.c (format_asterisk): Adapt initializer.
1917         * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
1918         as extension.
1919         (warn_unused_label): Take gfc_st_label label as argument, adapt to
1920         new data structure.
1921         (gfc_resolve): Adapt call to warn_unused_label.
1922         * symbol.c (compare_st_labels): New function.
1923         (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
1924         using balanced binary tree.
1925         * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
1926         with 'cnt'.
1927         (warn_unused_label): Adapt to binary tree.
1928         * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
1929         * primary.c (match_kind_param): Do away with cnt.
1930
1931 2006-01-18  Paul Thomas  <pault@gcc.gnu.org>
1932
1933         PR fortran/20869
1934         PR fortran/20875
1935         PR fortran/25024
1936         * symbol.c (check_conflict): Add pointer valued elemental
1937         functions and internal procedures with the external attribute
1938         to the list of conflicts.
1939         (gfc_add_attribute): New catch-all function to perform the
1940         checking of symbol attributes for attribute declaration
1941         statements.
1942         * decl.c (attr_decl1): Call gfc_add_attribute for each of -
1943         (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
1944         gfc_match_pointer, gfc_match_dimension, gfc_match_target):
1945         Remove spurious calls to checks in symbol.c.  Set the
1946         attribute directly and use the call to attr_decl() for
1947         checking.
1948         * gfortran.h:  Add prototype for gfc_add_attribute.
1949
1950         PR fortran/25785
1951         * resolve.c (resolve_function): Exclude PRESENT from assumed size
1952         argument checking. Replace strcmp's with comparisons with generic
1953         codes.
1954
1955 2006-01-16  Rafael \81Ávila de Esp\81índola  <rafael.espindola@gmail.com>
1956
1957         * gfortranspec.c (lang_specific_spec_functions): Remove.
1958
1959 2006-01-16  Richard Guenther  <rguenther@suse.de>
1960
1961         * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
1962         (gfc_trans_arithmetic_if): Likewise.
1963         (gfc_trans_simple_do): Likewise.
1964         (gfc_trans_do): Likewise.
1965         (gfc_trans_do_while): Likewise.
1966         (gfc_trans_logical_select): Likewise.
1967         (gfc_trans_forall_loop): Likewise.
1968         (generate_loop_for_temp_to_lhs): Likewise.
1969         (generate_loop_for_rhs_to_temp): Likewise.
1970         (gfc_trans_allocate): Likewise.
1971         * trans.c (gfc_add_expr_to_block): Do not fold expr again.
1972
1973 2006-01-16  Richard Guenther  <rguenther@suse.de>
1974
1975         * trans-expr.c (gfc_conv_function_call): Use fold_build2.
1976         * trans-stmt.c (gfc_trans_goto): Likewise.  Use build_int_cst.
1977         * trans.c (gfc_trans_runtime_check): Don't fold the condition
1978         again.
1979
1980 2006-01-13  Steven G. Kargl  <kargls@comcast.net>
1981
1982         PR fortran/25756
1983         * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
1984         unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
1985         from g95).
1986
1987 2006-01-13  Diego Novillo  <dnovillo@redhat.com>
1988
1989         * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
1990         nodes.
1991
1992 2006-01-11  Tobias Schl\81üter  <tobias.schlueter@physik.uni-muenchen.de>
1993
1994         * parse.c (next_fixed): Remove superfluous string concatenation.
1995
1996 2006-01-11  Bernhard Fischer  <rep.nop@aon.at>
1997
1998         PR fortran/25486
1999         * scanner.c (load_line): use maxlen to determine the line-length used
2000         for padding lines in fixed form.
2001
2002 2006-01-11  Paul Thomas  <pault@gcc.gnu.org>
2003
2004         PR fortran/25730
2005         * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
2006         character lengths.
2007
2008 2006-01-09  Andrew Pinski  <pinskia@physics.uc.edu>
2009
2010         fortran/24936
2011         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
2012         to avoid type mismatch.
2013
2014 2006-01-09  Andrew Pinski  <pinskia@physics.uc.edu>
2015
2016         PR fortran/21977
2017         * trans-decl.c (gfc_generate_function_code): Move the NULLing of
2018         current_fake_result_decl down to below generate_local_vars.
2019
2020 2006-01-09  Feng Wang  <fengwang@nudt.edu.cn>
2021
2022         PR fortran/12456
2023         * trans-expr.c (gfc_to_single_character): New function that converts
2024         string to single character if its length is 1.
2025         (gfc_build_compare_string):New function that compare string and handle
2026         single character specially.
2027         (gfc_conv_expr_op): Use gfc_build_compare_string.
2028         (gfc_trans_string_copy): Use gfc_to_single_character.
2029         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
2030         gfc_build_compare_string.
2031         * trans.h (gfc_build_compare_string): Add prototype.
2032
2033 2006-01-09  Feng Wang  <fengwang@nudt.edu.cn>
2034
2035         * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
2036         constant.
2037         (gfc_simplify_ichar): Get the result from unsinged char and in the
2038         range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
2039
2040 2006-01-08  Erik Edelmann  <eedelman@gcc.gnu.org>
2041
2042         PR fortran/25093
2043         * resolve.c (resolve_fntype): Check that PUBLIC functions
2044         aren't of PRIVATE type.
2045
2046 2006-01-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2047
2048         * decl.c (gfc_match_function_decl): Correctly error out in case of
2049         omitted function argument list.
2050
2051 2006-01-07  Paul Thomas  <pault@gcc.gnu.org>
2052
2053         PR fortran/22146
2054         * trans-array.c (gfc_reverse_ss): Remove static attribute.
2055         (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
2056         the function call with the corresponding gfc_actual_arglist*.  Change
2057         code accordingly.
2058         (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
2059         now requires the actual argument list instead of the expression for
2060         the function call.
2061         * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
2062         and provide a prototype for gfc_reverse_ss.
2063         * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
2064         where an elemental subroutine has array valued actual arguments.
2065
2066         PR fortran/25029
2067         PR fortran/21256
2068         PR fortran/20868
2069         PR fortran/20870
2070         * resolve.c (check_assumed_size_reference): New function to check for upper
2071         bound in assumed size array references.
2072         (resolve_assumed_size_actual): New function to do a very restricted scan
2073         of actual argument expressions of those procedures for which incomplete
2074         assumed size array references are not allowed.
2075         (resolve_function, resolve_call): Switch off assumed size checking of
2076         actual arguments, except for elemental procedures and intrinsic
2077         inquiry functions, in some circumstances.
2078         (resolve_variable): Call check_assumed_size_reference.
2079
2080 2006-01-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2081
2082         PR fortran/24268
2083         * io.c (next_char_not_space): New function that returns the next
2084         character that is not white space.
2085         (format_lex): Use the new function to skip whitespace within
2086         a format string.
2087
2088 2006-01-05  Erik Edelmann  <eedelman@gcc.gnu.org>
2089
2090         PR fortran/23675
2091         * expr.c (gfc_expr_set_symbols_referenced): New function.
2092         * gfortran.h: Add a function prototype for it.
2093         * resolve.c (resolve_function): Use it for
2094         use associated character functions lengths.
2095         * expr.c, gfortran.h, resolve.c: Updated copyright years.
2096
2097 2006-01-03  Steven G. Kargl  <kargls@comcast.net>
2098
2099         PR fortran/25101
2100         * resolve.c (resolve_forall_iterators):  Check for scalar variables;
2101         Check stride is nonzero.
2102
2103 2006-01-02  Steven G. Kargl  <kargls@comcast.net>
2104
2105         PR fortran/24640
2106         * parse.c (next_free): Check for whitespace after the label.
2107         * match.c (gfc_match_small_literal_int): Initialize cnt variable.
2108
2109 2006-01-01  Steven G. Kargl  <kargls@comcast.net>
2110
2111         * ChangeLog: Split previous years into ...
2112         * ChangeLog-2002: here.
2113         * ChangeLog-2003: here.
2114         * ChangeLog-2004: here.
2115         * ChangeLog-2005: here.