OSDN Git Service

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