OSDN Git Service

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