OSDN Git Service

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