OSDN Git Service

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