OSDN Git Service

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