OSDN Git Service

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