OSDN Git Service

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