OSDN Git Service

PR fortran/33522
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-09-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2
3         PR fortran/33522
4         * trans-types.c (gfc_get_desc_dim_type): Mark artificial
5         variables with TREE_NO_WARNING.
6         (gfc_get_array_descriptor_base): Likewise.
7
8 2007-09-22  Paul Thomas  <pault@gcc.gnu.org>
9
10         PR fortran/33337
11         PR fortran/33376
12         * trans-decl.c (gfc_create_module_variable): Output
13         derived type parameters.
14         * arith.c (gfc_parentheses): Return the argument if
15         it is a constant expression.
16         * primary.c (gfc_match_rvalue): Remove the clearing of
17         the module name and the use_assoc attribute for derived
18         type parameter expressions.
19
20 2007-09-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
21
22         PR fortran/33502
23         * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
24         and debug_hooks->end_source_file when entering and exiting
25         included files.
26         (gfc_define_undef_line): New function.
27         (load_file): Ignore #define and #undef preprocessor lines
28         while reading source files.
29         * parse.c (next_statement): Handle #define and #undef
30         preprocessor lines.
31         (gfc_parse_file): Call debug_hooks->start_source_file and
32         debug_hooks->end_source_file for the main source file if
33         requested by the debug format.
34         * gfortran.h (gfc_define_undef_line): Add prototype.
35
36 2007-09-22  Tobias Burnus  <burnus@net-b.de>
37
38         PR fortran/33445
39         * scanner.c (skip_free_comments): Warn if !$OMP& is used
40         if no OpenMP directive is to be continued.
41
42 2007-09-21  Paul Thomas  <pault@gcc.gnu.org>
43
44         *trans-expr.c (gfc_trans_pointer_assignment): Convert array
45         descriptor for subref pointer assignements, rather than using
46         the loop info version.
47
48 2007-09-21  Tobias Burnus  <burnus@net-b.de>
49
50         PR fortran/33037
51         * simplify.c (gfc_simplify_transfer): Warn if source size
52         is smaller than result size.
53
54 2007-09-20  Asher Langton  <langton2@llnl.gov>
55
56         PR fortran/20441
57         * gfortran.h : Add init_local_* enums and init_flag_* flags to
58         gfc_option_t.
59         * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
60         -finit-character, and -finit-logical flags.
61         * invoke.texi: Document new options.
62         * resolve.c (build_init_assign): New function.
63         (apply_init_assign): Move part of function into build_init_assign.
64         (build_default_init_expr): Build local initializer (-finit-*).
65         (apply_default_init_local): Apply local initializer (-finit-*).
66         (resolve_fl_variable): Try to add local initializer (-finit-*).
67         * options.c (gfc_init_options, gfc_handle_option,
68         gfc_post_options): Handle -finit-local-zero, -finit-real,
69         -finit-integer, -finit-character, and -finit-logical flags.
70
71 2007-09-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
72
73         PR fortran/33221
74         * gfortran.h (symbol_attribute): Add zero_comp field.
75         * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
76         * decl.c (gfc_match_data_decl): Likewise.
77         (gfc_match_derived_decl): Likewise.
78         * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
79         (mio_symbol_attribute): Write and read AB_ZERO_COMP.
80         * resolve.c (resolve_symbol): Handle case of emtpy derived types.
81         * parse.c (parse_derived): Likewise.
82
83 2007-09-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
84
85         PR fortran/33288
86         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
87         reduce_binary_aa): Call ourselves recursively if an element of
88         the constructor is itself a constant array.
89
90 2007-09-20  Tobias Schlüter  <tobi@gcc.gnu.org>
91
92         * io.c (resolve_tag_format): New function using code split out
93         and simplified from ...
94         (resolve_tag): ... this function.  Simplify logic.  Unify
95         IOSTAT, IOLENGTH and SIZE handling.
96
97 2007-09-20  Christopher D. Rickett  <crickett@lanl.gov>
98
99         PR fortran/33497
100         * resolve.c (gfc_iso_c_func_interface): Use information from
101         subcomponent if applicable.
102
103 2007-09-20  Tobias Burnus  <burnus@net-b.de>
104
105         PR fortran/33325
106         * intrinsic.text: Add documentation of the intrinsic modules.
107         * gfortran.texi: Link to intrinsic-modules section and to
108         the GOMP manual.
109
110 2007-09-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
111
112         PR fortran/31119
113         * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
114         checking for optional args when they are present.
115
116 2007-09-18  Tobias Burnus  <burnus@net-b.de>
117
118         PR fortran/33231
119         * resolve.c (resolve_elemental_actual): Check for conformance
120         of intent out/inout dummies.
121
122 2007-09-17  Tobias Burnus  <burnus@net-b.de>
123
124         PR fortran/33106
125         * resolve.c (resolve_symbol): Reject public variable of
126         private derived-types for Fortran 95.
127
128 2007-09-17  Tobias Burnus  <burnus@net-b.de>
129
130         * resolve.c (resolve_fl_procedure): Allow private dummies
131         for Fortran 2003.
132
133 2007-09-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
134
135         * trans-types.c (gfc_get_desc_dim_type): Do not to try
136         emit debug info.
137         (gfc_get_array_descriptor_base): Likewise.
138         (gfc_get_mixed_entry_union): Likewise
139         (gfc_get_derived_type): Set decl location for fields and
140         derived type itself.
141
142 2007-09-16  Paul Thomas  <pault@gcc.gnu.org>
143
144         PR fortran/29396
145         PR fortran/29606
146         PR fortran/30625
147         PR fortran/30871
148         * trans.h : Add extra argument to gfc_build_array_ref. Rename
149         gfc_conv_aliased_arg to gfc_conv_subref_array_arg.  Move
150         prototype of is_aliased_array to gfortran.h and rename it
151         gfc_is_subref_array.  Add field span to lang_decl, add a new
152         decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
153         and a new type flag GFC_DECL_SUBREF_ARRAY_P.
154         * trans.c (gfc_build_array_ref): Add the new argument, decl.
155         If this is a subreference array pointer, use the lang_decl
156         field 'span' to calculate the offset in bytes and use pointer
157         arithmetic to address the element.
158         * trans-array.c (gfc_conv_scalarized_array_ref,
159         gfc_conv_array_ref): Add the backend declaration as the third
160         field, if it is likely to be a subreference array pointer.
161         (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
162         gfc_trans_array_constructor_element, structure_alloc_comps,
163         gfc_conv_array_index_offset): For all other references to
164         gfc_build_array_ref, set the third argument to NULL.
165         (gfc_get_dataptr_offset): New function.
166         (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
167         is a subreference array, then calculate the offset to the
168         subreference of the first element and set the descriptor data
169         pointer to this, using gfc_get_dataptr_offset.
170         trans-expr.c (gfc_get_expr_charlen): Use the expression for the
171         character length for a character subreference.
172         (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
173         third argument in call to gfc_build_array_ref.
174         (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
175         (is_aliased_array): Remove.
176         (gfc_conv_function_call): Change reference to is_aliased_array
177         to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
178         gfc_conv_subref_array_arg.
179         (gfc_trans_pointer_assignment): Add the array element length to
180         the lang_decl 'span' field.
181         * gfortran.h : Add subref_array_pointer to symbol_attribute and
182         add the prototype for gfc_is_subref_array.
183         * trans-stmt.c : Add NULL for third argument in all references
184         to gfc_build_array_ref.
185         * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
186         If this is a subreference array pointer, return true.
187         (gfc_check_pointer_assign): If the rhs is a subreference array,
188         set the lhs subreference_array_pointer attribute.
189         * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
190         field if the symbol is a subreference array pointer and set an
191         initial value of zero for the 'span' field.
192         * trans-io.c (set_internal_unit): Refer to is_subref_array and
193         gfc_conv_subref_array_arg.
194         (nml_get_addr_expr): Add NULL third argument to
195         gfc_build_array_ref. 
196         (gfc_trans_transfer): Use the scalarizer for a subreference
197         array.
198
199 2007-09-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
200
201         * iresolve.c (resolve_mask_arg): If a mask is an array
202         expression, convert it to kind=1.
203
204 2007-09-13  Tobias Burnus  <burnus@net-b.de>
205
206         PR fortran/33343
207         * expr.c (gfc_check_conformance): Print ranks in the error message.
208         * resolve.c (resolve_elemental_actual): Check also conformance of
209         the actual arguments for elemental functions.
210
211 2007-09-13  Tobias Burnus  <burnus@net-b.de>
212
213         * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
214         Allow prefixes only to be specified once.
215
216 2007-09-13  Tobias Burnus  <burnus@net-b.de>
217
218         PR fortran/33412
219         * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
220
221 2007-09-12  Tobias Burnus  <burnus@net-b.de>
222
223         PR fortran/33297
224         * check.c (scalar_check): Move up in the file.
225         (kind_check): Call scalar_check.
226         (dim_check): If optional, do not call nonoptional_check; use
227         bool for optional.
228         (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
229         gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
230         gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
231         for dim_check; honor changed meaning of optional.
232         (gfc_check_int): Replace checks by kind_check.
233         (gfc_check_size): Replace checks by dim_check.
234
235 2007-09-12  Tobias Burnus  <burnus@net-b.de>
236
237         PR fortran/33284
238         PR fortran/33310
239         * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
240         and between BIND(C) and PARAMETER.
241
242 2007-09-12  Tobias Burnus  <burnus@net-b.de>
243
244         * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
245
246 2007-09-12  Jan Hubicka  <jh@suse.cz>
247
248         * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
249
250 2007-09-12  Christopher D. Rickett  <crickett@lanl.gov>
251
252         PR fortran/33395
253         * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
254         intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
255         and C_NULL_FUNPTR expressions.
256
257 2007-09-11  Christopher D. Rickett  <crickett@lanl.gov>
258
259         PR fortran/33040
260         * trans-expr.c (gfc_trans_structure_assign): Convert component
261         C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
262         * trans-types.c (gfc_get_derived_type): Create a backend_decl for
263         the c_address field of C_PTR and C_FUNPTR and ensure initializer
264         is of proper type/kind for (void *).
265
266 2007-09-11  Jan Hubicka <jh@suse.cz>
267
268         * f95-lang.c (gfc_expand_function): Kill.
269         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
270
271 2007-09-08  Tobias Burnus  <burnus@net-b.de>
272
273         PR fortran/31547
274         * gfortran.texi: Document when CPP is called.
275
276         * intrinsic.texi (IOR): Fix typos.
277
278 2007-09-10  Paul Thomas  <pault@gcc.gnu.org>
279
280         PR fortran/33370
281         * trans-expr.c (copyable_array_p):  Add tests that expression
282         is a variable, that it has no subreferences and that it is a
283         full array.
284         (gfc_trans_assignment): Change conditions to suit modifications
285         to copyable_array_p.
286
287 2007-09-06  Tom Tromey  <tromey@redhat.com>
288
289         * scanner.c (get_file): Update.
290         (load_file): Update.
291         (gfc_next_char_literal): Use gfc_linebuf_linenum.
292         * f95-lang.c (gfc_init): Update.
293         * gfortran.h (gfc_linebuf_linenum): New macro.
294
295 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
296
297         * trans-decl.c (build_entry_thunks): Use set_cfun.
298         (gfc_generate_function_code): Likewise.
299
300 2007-09-05  Paul Thomas  <pault@gcc.gnu.org>
301
302         PR fortran/31564
303         * primary.c (gfc_match_rvalue): Make expressions that refer
304         to derived type parameters that have array references into
305         variable expressions.  Remove references to use association
306         from the symbol.
307
308         PR fortran/33241
309         * decl.c (add_init_expr_to_sym): Provide assumed character
310         length parameters with the length of the initialization
311         expression, if a constant, or that of the first element of
312         an array.
313
314 2007-09-04  Janus Weil  <jaydub66@gmail.com>
315             Paul Thomas  <pault@gcc.gnu.org>
316
317         * decl.c (match_procedure_decl,match_procedure_in_interface,
318         gfc_match_procedure): Handle PROCEDURE statements.
319         * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
320         (enum gfc_statement): New element "ST_PROCEDURE".
321         (strcut symbol_attribute): New member "unsigned procedure".
322         * interface.c (check_interface0): Extended error checking.
323         * match.h: Add gfc_match_procedure prototype.
324         * parse.c (decode_statement,next_statement,gfc_ascii_statement,
325         parse_derived,parse_interface): Implement PROCEDURE statements.
326         * resolve.c (resolve_symbol): Ditto.
327         * symbol.c (check_conflict): Ditto.
328         (gfc_add_proc): New function for setting the procedure attribute.
329         (copy_formal_args): New function for copying formal argument lists.
330
331 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
332
333         * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
334
335 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
336
337         * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
338         * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
339         * parse.c (parse_omp_structured_block): Likewise,
340         * st.c (gfc_free_statement): Likewise,
341
342 2007-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
343
344         PR fortran/31675
345         * libgfortran.h: New file.
346         * iso-fortran-env.def: Use macros in the new header instead of
347         hardcoded integer constants.
348         * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
349         fortran/libgfortran.h.
350         * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
351         ioerror_codes): Remove.
352         * trans.c (ERROR_ALLOCATION): Remove.
353         (gfc_call_malloc, gfc_allocate_with_status,
354         gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
355         * trans-types.h (GFC_DTYPE_*): Remove.
356         * trans-decl.c (gfc_generate_function_code): Use
357         GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
358         * trans-io.c (set_parameter_value, set_parameter_ref): Use
359         LIBERROR_* macros instead of IOERROR_ macros.
360         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
361         LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
362         * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
363         CONVERT_NATIVE.
364         (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
365
366 2007-09-02  Steven G. Kargl  <kargl@gcc.gnu.org>
367
368         * invoke.texi: Fix the -frange-checking option entry.
369
370 2007-09-02  Roger Sayle  <roger@eyesopen.com>
371
372         * decl.c (match_string_p): New helper function to explicitly match
373         a string of characters.
374         (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
375         Delete decls array and peek_char.  Rewrite decl attribute parser to
376         avoid calling gfc_match_strings.
377         * match.c (gfc_match_strings): Delete unused function.
378         * match.h (gfc_match_strings): Delete prototype.
379
380 2007-09-02  Tobias Schlüuter  <tobi@gcc.gnu.org>
381
382         * dump-parse-tree.c (show_char_const): New function.
383         (gfc_show_expr): Use it.
384         * expr.c (find_substring_ref): Rework to not keep characters
385         dangling beyond end of string.
386
387 2007-09-02  H.J. Lu  <hongjiu.lu@intel.com>
388
389         PR fortran/33276
390         * array.c (expand_iterator): Initialize frame.prev.
391
392 2007-08-31  Tobias Burnus  <burnus@net-b.de>
393
394         PR fortran/33232
395         * io.c (match_io): Also diagnose extra comma for READ.
396
397 2007-08-31  Joseph Myers  <joseph@codesourcery.com>
398
399         * intrinsic.texi (LGAMMA): Remove empty @cindex line.
400
401 2007-08-31  Paul Thomas  <pault@gcc.gnu.org>
402
403         PR fortran/31879
404         PR fortran/31197
405         PR fortran/31258
406         PR fortran/32703
407         * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
408         * resolve.c (gfc_resolve_substring_charlen): New function.
409         (resolve_ref): Call gfc_resolve_substring_charlen.
410         (gfc_resolve_character_operator): New function.
411         (gfc_resolve_expr): Call the new functions in cases where the
412         character length is missing.
413         * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
414         transpose, unpack): Call gfc_resolve_substring_charlen for
415         source expressions that are character and have a reference.
416         * trans.h (gfc_trans_init_string_length) Change name to
417         gfc_conv_string_length; modify references in trans-expr.c,
418         trans-array.c and trans-decl.c.
419         * trans-expr.c (gfc_trans_string_length): Handle case of no
420         backend_decl.
421         (gfc_conv_aliased_arg): Remove code for treating substrings
422         and replace with call to gfc_trans_string_length.
423         * trans-array.c (gfc_conv_expr_descriptor): Remove code for
424         treating strings and call gfc_trans_string_length instead.
425
426 2007-08-30  Tobias Burnus  <burnus@net-b.de>
427
428         PR fortran/33228
429         * interface.c (check_interface0): Improve error for external procs.
430         (check_sym_interfaces): Fix checking of module procedures.
431
432 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
433
434         PR fortran/32989
435         * iresolve.c (gfc_resolve_getarg): Handle non-default integer
436         kinds.
437         * check.c (gfc_check_getarg): New function
438         * intrinsic.h: Add prototype for gfc_check_getarg.
439         * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
440         * intrinsic.texi (GETARG): Adjust documentation.
441
442 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
443             Tobias Burnus  <burnus@gcc.gnu.org>
444
445         PR fortran/33105
446         * intrinsic.c (add_functions): Add IS_IOSTAT_END and
447         IS_IOSTAT_EOR intrinsics.
448         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
449         GFC_ISYM_IS_IOSTAT_EOR.
450         * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
451         (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
452         GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
453         * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
454
455 2007-08-28  Christopher D. Rickett  <crickett@lanl.gov>
456
457         PR fortran/33215
458         * decl.c (build_sym): Pass number of identifiers on line to
459         set_binding_label.
460         (set_binding_label): Verify that only one identifier given if
461         NAME= specified, even if the given binding label has zero length.
462         (gfc_match_bind_c): Remove declaration for has_name_equals because
463         it hides the static global one that is needed.
464
465 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
466
467         * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
468         (gfc_array_allocate): Use gfc_allocate_with_status and
469         gfc_allocate_array_with_status.
470         (gfc_array_deallocate): Use gfc_deallocate_with_status.
471         (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
472         * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
473         (gfc_trans_deallocate): Use gfc_deallocate_with_status.
474         * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
475         gfc_deallocate_with_status, gfc_call_realloc): New functions.
476         * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
477         gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
478         (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
479         gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
480         * f95-lang.c (gfc_init_builtin_functions): Create decl for
481         BUILT_IN_REALLOC.
482         * trans-decl.c (gfor_fndecl_internal_realloc,
483         gfor_fndecl_allocate, gfor_fndecl_allocate_array,
484         gfor_fndecl_deallocate): Remove function decls.
485         (gfc_build_builtin_function_decls): Likewise.
486
487 2007-08-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
488
489         PR fortran/33055
490         Revert previous patch.
491
492 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
493
494         PR fortran/22244
495         * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
496         * trans-types.c: Include flags.h.
497         (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
498         correct bounds and dimensions for packed arrays.
499
500 2007-08-27  Tobias Burnus  <burnus@net-b.de>
501
502         * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
503
504 2007-08-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
505
506         PR fortran/33055
507         * trans-io.c (create_dummy_iostat): New function to create a unique
508         dummy variable expression to use with IOSTAT.
509         (gfc_trans_inquire): Use the new function to pass unit number error info
510         to run-time library if a regular IOSTAT variable was not given.
511
512 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
513
514         * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
515         GFC_ISYM_LGAMMA.
516
517 2007-08-26  Asher Langton  <langton2@llnl.gov>
518             Tobias Burnus  <burnus@net-b.de>
519
520         * gfortran.h (gfc_option_t): Add flag_recursive.
521         * lang.opt: Add -frecursive option and update -fopenmp.
522         * invoke.texi (-frecursive): Document new option.
523         (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
524         * options.c (gfc_init_options, gfc_post_options,
525         gfc_handle_option): Add -frecursive and modify -fopenmp.
526         (gfc_post_options): Add warning for conflicting flags.
527
528 2007-08-26  Tobias Burnus  <burnus@net-b.de>
529
530         PR fortran/31298
531         * module.c (mio_symbol_ref,mio_interface_rest):  Return pointer_info.
532         (load_operator_interfaces): Support multible loading of an operator.
533
534 2007-08-26  Tobias Burnus  <burnus@net-b.de>
535
536         PR fortran/32985
537         * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
538         * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
539         fix walking through the tree.
540
541 2007-08-26  Tobias Burnus  <burnus@net-b.de>
542
543         PR fortran/32980
544         * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
545         gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
546         * mathbuiltins.def: Define GAMMA and LGAMMA.
547         * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
548         and DLGAMA.
549         * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
550         * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
551         * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
552
553 2007-08-26  Tobias Burnus  <burnus@net-b.de>
554
555         PR fortran/33188
556         * parse.c (parse_derived): Support empty derived type
557         definitions for Fortran 2003.
558
559 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
560
561         * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
562         * trans.h (gfc_omp_privatize_by_reference): Likewise.
563
564 2007-08-24  Tobias Burnus  <burnus@net-b.de>
565
566         PR fortran/33178
567         * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
568         expression check.
569
570 2007-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
571
572         PR fortran/32972
573         * iresolve.c:  Don't convert array masks.
574
575 2007-08-24  Tobias Burnus  <burnus@net-b.de>
576
577         PR fortran/33139
578         * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
579         whole-array pointer assignments.
580
581 2007-08-23  Jakub Jelinek  <jakub@redhat.com>
582
583         * decl.c (variable_decl): Don't share charlen structs if
584         length == NULL.
585         * trans-decl.c (create_function_arglist): Assert
586         f->sym->ts.cl->backend_decl is NULL instead of unsharing
587         charlen struct here.
588
589 2007-08-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
590
591         PR fortran/33095
592         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
593         runtime error checking.
594
595 2007-08-22  Roger Sayle  <roger@eyesopen.com>
596             Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
597
598         * match.c (intrinsic_operators): Delete.
599         (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
600         gfc_match_strings.
601
602 2007-08-22  Christopher D. Rickett  <crickett@lanl.gov>
603
604         PR fortran/33020
605         * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
606         kind for optional SHAPE parameter of C_F_POINTER.
607
608 2007-08-22  Janus Weil  <jaydub66@gmail.com>
609
610         * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
611         (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
612         (gfc_match_mopdproc): Bugfix to reject module procedures in
613         abstract interfaces.
614
615 2007-08-22  Kai Tietz  <kai.tietz@onevision.com>
616
617         * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
618         Pmode.
619
620 2007-08-21  Paul Brook  <paul@codesourcery.com>
621             Nathan Sidwell  <nathan@codesourcery.com>
622             Mark Mitchell  <mark@codesourcery.com>
623             Joseph Myers  <joseph@codesourcery.com>
624
625         * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
626         * Make-lang.in (gfortran.pod): Define BUGURL.
627         * invoke.texi: Use BUGURL for bug-reporting instructions.
628
629 2007-08-19  Roger Sayle  <roger@eyesopen.com>
630
631         * match.c (intrinsic_operators): Make static.
632         (gfc_op2string): New function for converting a gfc_intrinsic_op to
633         to a "const char*", replacing the macro of the same name.
634         * gfortran.h (intrinsic_operators): Delete prototype.
635         (gfc_op2string): Replace macro with function prototype.
636
637 2007-08-18  Tobias Burnus  <burnus@net-b.de>
638
639         * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
640         * symbol.c (gfc_is_intrinsic_typename): New function.
641         * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
642         (parse_interface): Use gfc_is_intrinsic_typename.
643         * decl.c (gfc_match_derived_decl): Ditto.
644         * module.c (gfc_match_use): Use gcc_unreachable() for
645         INTERFACE_ABSTRACT in switch().
646
647 2007-08-18  Roger Sayle  <roger@eyesopen.com>
648
649         * primary.c (match_logical_constant_string): New function to match
650         a ".true." or a ".false.".
651         (match_logical_constant): Use it instead of gfc_match_strings.
652
653 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
654             Janus Weil  <jaydub66@gmail.com>
655
656         * interface.c (gfc_match_interface,gfc_match_abstract_interface,
657         gfc_match_end_interface,gfc_add_interface): Add abstract interface.
658         * dump-parse-tree.c (gfc_show_attr): Ditto.
659         * gfortran.h (interface_type,symbol_attribute): Ditto.
660         * module.c (gfc_match_use,ab_attribute,attr_bits,
661         mio_symbol_attribute): Ditto.
662         * resolve.c (resolve_function): Ditto.
663         * match.h: Ditto.
664         * parse.c (decode_statement): Ditto.
665         (parse_interface): Ditto, check for C1203 (name of abstract interface
666         cannot be the same as an intrinsic type).
667         * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
668         (access_attr_decl): Handle Abstract interfaces.
669
670 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
671
672         PR fortran/32881
673         * expr.c (gfc_check_pointer_assign): If the rhs is the
674         initialization expression for the rhs, there is no error.
675
676 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
677
678         PR fortran/32875
679         * trans-array.c (get_array_ctor_strlen): Set the character
680         length of a zero length array to zero.
681
682 2007-08-16  Tobias Burnus  <burnus@net-b.de>
683
684         PR fortran/33072
685         * module.c (gfc_match_use): Mark user operators as such.
686         (find_use_name_n): Distinguish between operators and other symbols.
687         (find_use_name,number_use_names,mio_namelist,
688          load_operator_interfaces,load_generic_interfaces,read_module,
689          write_generic): Update find_use_name_n calls.
690
691 2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
692
693         PR fortran/29459
694         * trans.c (gfc_create_var_np): Do not emit warnings for
695         anonymous variables.
696
697 2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
698
699         PR fortran/33066
700         * decl.c (gfc_get_type_attr_spec): Fix whitespace.
701         (gfc_match_derived_decl): Fix logic.
702
703 2007-08-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
704
705         PR fortran/33073
706         * trans-intrinsic.c (build_fixbound_expr): Convert to result type
707         in all cases.
708
709 2007-08-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
710
711         PR fortran/32594
712         * trans-expr.c (gfc_conv_substring_expr): Only call
713         gfc_conv_substring if expr->ref is not NULL.
714         * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
715         expression might be a constant.
716         (gfc_simplify_expr): Handle missing start and end, as well as
717         missing ref.
718
719 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
720
721         PR fortran/32926
722         * match.c (gfc_match_call): Do not create a new symtree in the
723         case where the existing symbol is external and not referenced.
724
725 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
726
727         PR fortran/32827
728         * decl.c (variable_decl): Check for an imported symbol
729         by looking for its symtree and testing for the imported
730         attribute.
731         (gfc_match_import): Remove change of symbol's namespace
732         and set the attribute imported instead.
733         * symbol.c (gfc_get_sym_tree): It is not an error if a
734         symbol is imported.
735         * gfortran.h : Add the 'imported' to symbol_attribute.
736
737 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
738
739         PR fortran/32962
740         * trans-array.c (gfc_conv_array_transpose): Set the offset
741         of the destination to zero if the loop is zero based.
742
743 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
744
745         PR fortran/29600
746         * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
747         * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
748         * check.c (gfc_check_achar): Check for the optional KIND argument.
749         * simplify.c (gfc_simplify_achar): Use KIND argument.
750         * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
751         gfc_resolve_achar): Adjust prototypes.
752
753 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
754
755         PR fortran/30964
756         PR fortran/33054
757         * trans-expr.c (gfc_conv_function_call): When no formal argument
758         list is available, we still substitute missing optional arguments.
759         * check.c (gfc_check_random_seed): Correct the check on the
760         number of arguments to RANDOM_SEED.
761         * intrinsic.c (add_subroutines): Add a resolution function to
762         RANDOM_SEED.
763         * iresolve.c (gfc_resolve_random_seed): New function.
764         * intrinsic.h (gfc_resolve_random_seed): New prototype.
765
766 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
767
768         PR fortran/32860
769         * error.c (error_uinteger): New function.
770         (error_integer): Call error_uinteger.
771         (error_print): Handle %u, %lu, %li and %ld format specifiers.
772         * interface.c (compare_actual_formal): Use the new %lu specifier.
773
774 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
775
776         PR fortran/31629
777         * lang.opt (-fmodule-private): New option.
778         * gfortran.h (gfc_option_t): Add flag_module_private member.
779         * invoke.texi (-fmodule-private): Document the new option.
780         * module.c (gfc_check_access): Allow the -fmodule-private option
781         to modify the default behaviour.
782         * options.c (gfc_init_options): Initialize flag_module_private.
783         (gfc_handle_option): Handle -fmodule-private.
784
785 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
786
787         PR fortran/29600
788         * intrinsic.c (add_functions): Add KIND arguments to COUNT,
789         IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
790         and VERIFY.
791         * iresolve.c (gfc_resolve_count): Add kind argument.
792         (gfc_resolve_iachar): New function.
793         (gfc_resolve_ichar): Add kind argument.
794         (gfc_resolve_index_func): Likewise.
795         (gfc_resolve_lbound): Likewise.
796         (gfc_resolve_len): Likewise.
797         (gfc_resolve_len_trim): Likewise.
798         (gfc_resolve_scan): Likewise.
799         (gfc_resolve_size): New function.
800         (gfc_resolve_ubound): Add kind argument.
801         (gfc_resolve_verify): Likewise.
802         * trans-decl.c (gfc_get_extern_function_decl): Allow specific
803         intrinsics to have 4 arguments.
804         * check.c (gfc_check_count): Add kind argument.
805         (gfc_check_ichar_iachar): Likewise.
806         (gfc_check_index): Likewise.
807         (gfc_check_lbound): Likewise.
808         (gfc_check_len_lentrim): New function.
809         (gfc_check_scan): Add kind argument.
810         (gfc_check_size): Likewise.
811         (gfc_check_ubound): Likewise.
812         (gfc_check_verify): Likewise.
813         * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
814         INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
815         * simplify.c (get_kind): Whitespace fix.
816         (int_expr_with_kind): New function.
817         (gfc_simplify_iachar): Add kind argument.
818         (gfc_simplify_iachar): Likewise.
819         (gfc_simplify_ichar): Likewise.
820         (gfc_simplify_index): Likewise.
821         (simplify_bound_dim): Likewise.
822         (simplify_bound): Likewise.
823         (gfc_simplify_lbound): Likewise.
824         (gfc_simplify_len): Likewise.
825         (gfc_simplify_len_trim): Likewise.
826         (gfc_simplify_scan): Likewise.
827         (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
828         (gfc_simplify_size): Add kind argument.
829         (gfc_simplify_ubound): Likewise.
830         (gfc_simplify_verify): Likewise.
831         * intrinsic.h: Update prototypes and add new ones.
832         * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
833         gfc_conv_intrinsic_index_scan_verify.
834         (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
835         (gfc_conv_intrinsic_function): Call
836         gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
837         SCAN and VERIFY intrinsics.
838
839 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
840
841         PR fortran/31189
842         * invoke.texi (-fbacktrace): Document the new behaviour.
843
844 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
845
846         PR fortran/32937
847         * trans-array.c (gfc_conv_expr_descriptor): Use
848         gfc_conv_const_charlen to generate backend_decl of right type.
849         * trans-expr.c (gfc_conv_expr_op): Use correct return type.
850         (gfc_build_compare_string): Use int type instead of default
851         integer kind for single character comparison.
852         (gfc_conv_aliased_arg): Give backend_decl the right type.
853         * trans-decl.c (gfc_build_intrinsic_function_decls): Make
854         compare_string return an int.
855
856 2007-08-11  Ian Lance Taylor  <iant@google.com>
857
858         * f95-lang.c (gfc_get_alias_set): Change return type to
859         alias_set_type.
860
861 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
862
863         PR fortran/31270
864         * trans.c (gfc_trans_runtime_check): Reorder arguments and
865         add extra variable arguments. Hand them to the library function.
866         * trans.h (gfc_trans_runtime_check): Update prototype.
867         * trans-array.c (gfc_trans_array_bound_check): Issue more
868         detailled error messages.
869         (gfc_conv_array_ref): Likewise.
870         (gfc_conv_ss_startstride): Likewise.
871         (gfc_trans_dummy_array_bias): Reorder arguments to
872         gfc_trans_runtime_check.
873         * trans-expr.c (gfc_conv_substring): Issue more detailled
874         error messages.
875         (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
876         * trans-stmt.c (gfc_trans_goto): Likewise.
877         * trans-io.c (set_string): Reorder arguments to
878         gfc_trans_runtime_check and issue a more detailled error message.
879         * trans-decl.c (gfc_build_builtin_function_decls): Make
880         runtime_error and runtime_error_at handle a variable number of
881         arguments.
882         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
883         to gfc_trans_runtime_check.
884         (gfc_conv_intrinsic_minmax): Likewise.
885         (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
886
887 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
888
889         * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
890         * options.c (gfc_post_options): Likewise.
891         * parse.c (parse_omp_structured_block): Likewise.
892         * st.c (gfc_free_statement): Likewise.
893
894 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
895
896         PR fortran/32933
897         * trans-decl.c (gfc_build_builtin_function_decls): Change
898         prototype for associated.
899         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
900         result of __builtin_isnan into a boolean.
901         (gfc_conv_intrinsic_strcmp): Cleanup.
902         (gfc_conv_associated): Convert the result of the associated
903         function into a boolean.
904
905 2007-08-09  Tobias Burnus  <burnus@net-b.de>
906
907         PR fortran/32987
908         * io.c (format_token): Add FMT_ERROR.
909         (next_char_not_space): Print error/warning when
910         '\t' are used in format specifications.
911         (format_lex): Propagate error.
912         (check_format): Ditto.
913
914 2007-08-09  Tobias Burnus  <burnus@net-b.de>
915
916         PR fortran/33001
917         * arith.c (arith_error): Point in the error message
918         to -fno-range-check.
919
920 2007-08-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
921
922         PR fortran/32902
923         * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
924
925 2007-08-06  Christopher D. Rickett  <crickett@lanl.gov>
926
927         PR fortran/32732
928         * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
929         actual arg expressions for scalar characters passed by-value to
930         bind(c) routines.
931         (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
932         * trans.h: Add prototype for gfc_conv_scalar_char_value.
933         * trans-decl.c (generate_local_decl): Convert by-value character
934         dummy args of bind(c) procedures using
935         gfc_conv_scalar_char_value.
936
937 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
938
939         PR fortran/30947
940         * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
941         with the kind of the STATUS argument.
942
943 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
944
945         PR fortran/30948
946         * intrinsic.c (add_functions): Fix name of argument to CHDIR.
947
948 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
949
950         PR fortran/30933
951         * iresolve.c (gfc_resolve_exit): Convert argument to default
952         integer kind.
953
954 2007-08-06  Daniel Franke  <franke.daniel@gmail.com>
955
956         * resolve.c (derived_pointer): Removed, replaced callers by access 
957         to appropiate attribute bit.
958         (derived_inaccessable): Shortcut recursion depth.
959         (resolve_fl_namelist): Fixed checks for private components in namelists.
960
961 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
962
963         PR fortran/29828
964         * trans.h (gfor_fndecl_string_minmax): New prototype.
965         * trans-decl.c (gfor_fndecl_string_minmax): New variable.
966         (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
967         * check.c (gfc_check_min_max): Allow for character arguments.
968         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
969         (gfc_conv_intrinsic_function): Add special case for MIN and MAX
970         intrinsics with character arguments.
971         * simplify.c (simplify_min_max): Add simplification for character
972         arguments.
973
974 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
975
976         PR fortran/31612
977         * invoke.texi: Adjust documentation for option -fsyntax-only.
978
979 2007-08-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
980             Tobias Burnus  <burnus@gcc.gnu.org>
981
982         PR fortran/32979
983         * intrinsic.h (gfc_check_isnan): Add prototype.
984         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
985         * intrinsic.c (add_functions): Add ISNAN intrinsic.
986         * check.c (gfc_check_isnan): New function.
987         * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
988         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
989         to translate ISNAN.
990         * intrinsic.texi: Document ISNAN.
991
992 2007-08-04  Paul Thomas  <pault@gcc.gnu.org>
993
994         PR fortran/31214
995         * symbol.c (get_unique_symtree): Moved from module.c.
996         * module.c (get_unique_symtree): Moved to symbol.c.
997         * decl.c (get_proc_name): Transfer the typespec from the local
998         symbol to the module symbol, in the case that an entry is also
999         a module procedure.  Ensure the local symbol is cleaned up by
1000         pointing to it with a unique symtree.
1001
1002         * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
1003
1004 2008-08-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1005
1006         PR fortran/32969
1007         * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
1008         expected KIND.
1009         (gfc_resolve_scale): Ditto.
1010         (gfc_resolve_set_exponent): Ditto.
1011         (gfc_resolve_spacing): Ditto.
1012  
1013         PR fortran/32968
1014         * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
1015         gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
1016         expected KIND, and fold the result to the expected KIND.
1017
1018 2007-08-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1019
1020         PR fortran/31202
1021         * f95-lang.c (gfc_init_builtin_functions): Defin builtins for 
1022         lround{f,,l} and llround{f,,l}.
1023         * trans-intrinsic.c (build_fix_expr): Generate calls to the
1024         {l,}round{f,,l} functions.
1025
1026 2007-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1027
1028         PR libfortran/32954
1029         * intrinsic.c (resolve_mask_arg):  New function.
1030         (gfc_resolve_maxloc):  Use resolve_mask_arg for mask resolution.
1031         (gfc_resolve_maxval):  Likewise.
1032         (gfc_resolve_minloc):  Likewise.
1033         (gfc_resolve_minval):  Likewise.
1034         (gfc_resolve_pack):  Likewise.
1035         (gfc_resolve_product):  Likewise.
1036         (gfc_resolve_sum):  Likewise.
1037         (gfc_resolve_unpack):  Likewise.
1038
1039 2007-08-01  Tobias Burnus  <burnus@net-b.de>
1040
1041         PR fortran/32936
1042         * match.c (gfc_match_allocate): Better check that STAT is
1043         a variable.
1044
1045         * check.c (gfc_check_allocated): Reorder checks to improve
1046         error message.
1047
1048 2007-08-01  Nick Clifton  <nickc@redhat.com>
1049
1050         * arith.c: Change copyright header to refer to version 3 of the
1051         GNU General Public License and to point readers at the COPYING3
1052         file and the FSF's license web page.
1053         * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
1054         symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
1055         matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
1056         Make-lang.in, trans-openmp.c, gfortran.h, error.c,
1057         iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
1058         expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
1059         trans-types.c, trans.h, gfortranspec.c, trans-types.h,
1060         lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
1061         iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
1062         match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
1063         parse.h, types.def, convert.c, dependency.h, primary.c,
1064         trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
1065
1066 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
1067
1068         * trans-decl.c (generate_local_decl): Emit warning on unused parameter
1069         on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
1070         messages that start with lower case to upper case.
1071         * invoke.texi (-Wparameter-unused): Document differences between gcc
1072         and gfortran regarding this option.
1073
1074 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
1075
1076         PR fortran/32945
1077         * expr.c (check_specification_function): Skip check if no symtree 
1078         is available.
1079
1080 2007-08-01  Paul Thomas  <pault@gcc.gnu.org>
1081
1082         PR fortran/31609
1083         * resolve.c (resolve_entries): Entries declared to be module
1084         procedures must point to the function namespace.
1085
1086 2007-07-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1087
1088         PR fortran/32938
1089         * trans-stmt.c (gfc_trans_return): Convert to correct type.
1090
1091 2007-07-31  Steven G. Kargl  <kargl@gcc.gnu.org>
1092
1093         PR fortran/32942
1094         * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
1095         type.
1096
1097 2007-07-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1098
1099         * invoke.texi: Document -fsign-zero flag.
1100
1101 2007-07-29  Paul Thomas  <pault@gcc.gnu.org>
1102
1103         PR fortran/31211
1104         * trans-expr.c (gfc_conv_expr_reference): Add block for case of
1105         scalar pointer functions so that NULL result is correctly
1106         handled.
1107
1108         PR fortran/32682
1109         * trans-array.c (gfc_trans_array_constructor): On detecting a
1110         multi-dimensional parameter array, set the loop limits.
1111
1112 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
1113
1114         PR fortran/32906
1115         * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
1116         adjusted error message.
1117
1118 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
1119
1120         * invoke.texi: Removed -w from option summary.
1121
1122 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
1123
1124         PR fortran/32879
1125         * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
1126         used for random number generator.
1127
1128 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
1129
1130         * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
1131         typos.
1132         * intrinsic.texi, invoke.texi: Fix typos.
1133
1134 2007-07-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1135
1136         PR fortran/31609
1137         * resolve.c (generic_sym): Check for a same symbol and if so, return to
1138         avoid infinite recursion.
1139
1140 2007-07-28  Daniel Franke  <franke.daniel@gmail.com>
1141
1142         PR fortran/31818
1143         PR fortran/32876
1144         PR fortran/32905
1145         * gfortran.h (symbol_attribute): Added bits for pointer_comp, 
1146         private_comp.
1147         * parse.c (parse_derived): Set pointer_comp/private_comp bits if 
1148         the derived type ultimately contains pointer components or private 
1149         components.
1150         * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
1151         (attr_bits): Added names for new ab_attributes.
1152         (mio_symbol_attribute): Save/restore new attribute bits in modules.
1153         * match.c (gfc_match_namelist): Removed check for namelist objects
1154         of assumed shape.
1155         * resolve.c (resolve_fl_namelist): Added check for pointer or
1156         private components in nested types. Added check for namelist objects
1157         of assumed shape.
1158
1159 2007-07-28  Paul Thomas  <pault@gcc.gnu.org>
1160
1161         PR fortran/32880
1162         * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
1163         for lse and rse pre expressions, for derived types with
1164         allocatable components.  Instead, assign the lhs to a temporary
1165         and deallocate after the assignment.
1166
1167 2007-07-28  Janne Blomqvist  <jb@gcc.gnu.org>
1168
1169         PR fortran/32909
1170         * trans-stmt.c (gfc_trans_character_select): Replace occurrences
1171         of gfc_c_int_type_node with integer_type_node.
1172         * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
1173         (gfc_build_builtin_function_decls): Likewise.
1174         (gfc_generate_function_code): Likewise.
1175         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1176
1177 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
1178
1179         * trans-decl.c (gfc_build_builtin_function_decls): Use existing
1180         gfc_array_index_type rather than creating another typenode for
1181         gfc_index_integer_kind.
1182
1183 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
1184
1185         * trans-io.c (gfc_build_io_library_fndecls): Change to use
1186         gfc_array_index_type for array descriptor triplets instead of
1187         gfc_int4_type_node.
1188
1189 2007-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
1190
1191         PR fortran/32899
1192         * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
1193
1194 2007-07-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1195             Daniel Franke  <franke.daniel@gmail.com>
1196
1197         PR fortran/32760
1198         * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
1199         attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
1200
1201 2007-07-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1202
1203         PR fortran/32035
1204         * trans-stmt.c (gfc_trans_character_select): Replace the
1205         mechanism with labels by a SWITCH_EXPR.
1206         * trans-decl.c (gfc_build_builtin_function_decls): Change
1207         return type for select_string.
1208
1209 2007-07-27  Paul Thomas  <pault@gcc.gnu.org>
1210
1211         PR fortran/32903
1212         * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
1213         derived types as referenced, if they have the the default
1214         initializer set.
1215
1216 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1217
1218         * gfortran.h (generate_isocbinding_symbol): Constify.
1219         * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
1220         generate_isocbinding_symbol): Likewise.
1221
1222 2007-07-24  Paul Thomas  <pault@gcc.gnu.org>
1223
1224         PR fortran/31205
1225         PR fortran/32842
1226         * trans-expr.c (gfc_conv_function_call): Remove the default
1227         initialization of intent(out) derived types.
1228         * symbol.c (gfc_lval_expr_from_sym): New function.
1229         * matchexp.c (gfc_get_parentheses): Return argument, if it is
1230         character and posseses a ref.
1231         * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
1232         * resolve.c (has_default_initializer): Move higher up in file.
1233         (resolve_code): On detecting an interface assignment, check
1234         if the rhs and the lhs are the same symbol.  If this is so,
1235         enclose the rhs in parenetheses to generate a temporary and
1236         prevent any possible aliasing.
1237         (apply_default_init): Remove code making the lval and call
1238         gfc_lval_expr_from_sym instead.
1239         (resolve_operator): Give a parentheses expression a type-
1240         spec if it has no type.
1241         * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
1242         initializer, if any, to an intent(out) derived type, using
1243         gfc_lval_expr_from_sym and gfc_trans_assignment.  Check if
1244         the dummy is present.
1245
1246 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
1247
1248         PR fortran/32867
1249         * expr.c (check_init_expr): Simplify matched functions.
1250
1251 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
1252
1253         PR fortran/32778
1254         * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
1255         of the selected standard.
1256         (make generic): Likewise.
1257         (make alias): Likewise, set standard the alias belongs to.
1258         (add_subroutines): Call make_noreturn unconditionally.
1259         (check_intrinsic_standard): Change return value to try.
1260         (gfc_intrinsic_func_interface): Check return value of above function.
1261         (gfc_intrinsic_sub_interface): Likewise.
1262
1263 2007-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1264
1265         PR fortran/30814
1266         * trans-decl.c (generate_function_code):  Add argument
1267         for flag_bounds_check to the array for set_options.
1268         * invoke.texi (-fbounds-check): Document new libarary run-time
1269         behaviour.
1270
1271 2007-07-23  Daniel Franke  <franke.daniel@gmail.com>
1272
1273         PR fortran/25104
1274         PR fortran/31639
1275         * expr.c (check_transformational): Reject valid transformational
1276         intrinsics to avoid ICE.
1277         (check_inquiry): Report error for assumed character lengths for
1278         all supported standards.
1279         (check_init_expr): Whitespace fix.
1280
1281 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
1282
1283         PR fortran/32797
1284         PR fortran/32800
1285         * decl.c (verify_bind_c_sym): Use the result symbol for functions
1286         with a result clause.  Warn if implicitly typed.  Verify the type
1287         and rank of the SHAPE argument, if given.
1288         * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
1289         check the actual args against the formal, sorting them if
1290         necessary.
1291         * symbol.c (gen_shape_param): Initialize type of SHAPE param to
1292         BT_VOID.
1293
1294 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
1295
1296         PR fortran/32732
1297         * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
1298         value character dummy args of BIND(C) procedures.
1299         * trans-expr.c (gfc_conv_variable): Do not build address
1300         expression for BT_CHARACTER dummy args.
1301
1302 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
1303             Tobias Burnus  <burnus@net-b.de>
1304
1305         PR fortran/32600
1306         * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
1307         * trans-types.c: Add pfunc_type_node.
1308         (gfc_init_types,gfc_typenode_for_spec): Use it.
1309         * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
1310         improve error message.
1311
1312 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
1313
1314         PR fortran/32710
1315         * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
1316         the current is a namelist.
1317
1318 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
1319
1320         PR fortran/29962
1321         PR fortran/31253
1322         PR fortran/31265
1323         PR fortran/31639
1324         * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
1325         generic, specific, actual_ok, noreturn into bits of a bitfield, 
1326         added bits for inquiry, transformational, conversion.
1327         * check.c (non_init_transformational): Removed, removed all callers.
1328         * intrinsic.c (enum class): New.
1329         (add_sym*): Replaced argument elemetal by enum class. Changed all
1330         callers.
1331         (add_functions): Assign appropriate classes to intrinsic functions.
1332         (add_subroutines): Assign appropriate classes to intrinsic subroutines.
1333         (add_conv): Set conversion attribute.
1334         (gfc_init_expr_extensions): Removed, removed all callers.
1335         (gfc_intrinsic_func_interface): Reimplemented check for non-standard
1336         initializatione expressions.
1337         * expr.c (check_specification_function): New.
1338         (gfc_is_constant_expr): Added check for specification functions.
1339         (check_init_expr_arguments): New.
1340         (check_inquiry): Changed return value to MATCH, added checks for
1341         inquiry functions defined by F2003.
1342         (check_transformational): New.
1343         (check_null): New.
1344         (check_elemental): New.
1345         (check_conversion): New.
1346         (check_init_expr): Call new check functions, add more specific error
1347         messages.
1348
1349 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
1350
1351         PR fortran/32627
1352         * resolve.c (set_name_and_label): Set kind number for character
1353         version of c_f_pointer.
1354         (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
1355         that of the actual SHAPE arg.
1356         * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
1357
1358 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
1359
1360         PR fortran/32801
1361         * symbol.c (generate_isocbinding_symbol): Remove unnecessary
1362         conditional.
1363
1364         PR fortran/32804
1365         * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
1366         deferred-shape arrays as args to C_LOC.  Fix bug in testing
1367         character args to C_LOC.
1368
1369 2007-07-21  Lee Millward  <lee.millward@gmail.com>
1370
1371         PR fortran/32823
1372         * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
1373         arguments passed, not just the first one. Adjust code to 
1374         refer to "args[0]" instead of "arg" as a result.
1375         
1376 2007-07-19  Christopher D. Rickett  <crickett@lanl.gov>
1377
1378         PR fortran/32600
1379         * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
1380
1381 2007-07-18  Christopher D. Rickett  <crickett@lanl.gov>
1382
1383         PR fortran/32801
1384         * symbol.c (generate_isocbinding_symbol): Fix bug where
1385         ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
1386         ISOCBINDING_PTR.
1387
1388 2007-07-17  Janus Weil  <jaydub66@gmail.com> 
1389
1390         PR fortran/32535
1391         * resolve.c (resolve_fl_namelist): Check for namelist private 
1392         components in contained subprograms.
1393
1394 2007-07-17  Paul Thomas  <pault@gcc.gnu.org>
1395
1396         PR fortran/31320
1397         PR fortran/32665
1398         * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
1399         renormalization unity base is done independently of existing
1400         lbound value.
1401         (gfc_trans_scalar_assign): If rhs is not a variable, put
1402         lse->pre after rse->pre to ensure that de-allocation of lhs
1403         occurs after evaluation of rhs.
1404
1405 2007-07-16  Lee Millward  <lee.millward@gmail.com>
1406
1407         PR fortran/32222
1408         PR fortran/32238
1409         PR fortran/32242        
1410         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1411         to operate on a stack allocated array for the intrinsic arguments
1412         instead of creating a TREE_LIST. Add two new parameters for the
1413         array and the number of elements. Update all callers to allocate
1414         an array of the correct length to pass in. Update comment.
1415         (gfc_intrinsic_argument_list_length): New function.
1416         (gfc_conv_intrinsic_conversion): Call it.
1417         (gfc_conv_intrinsic_mnimax): Likewise.
1418         (gfc_conv_intrinsic_merge): Likewise.
1419         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1420         constructors.
1421         (gfc_conv_intrinsic_cmplx): Likewise.
1422         (gfc_conv_intrinsic_ctime): Likewise.
1423         (gfc_covn_intrinsic_fdate): Likewise.
1424         (gfc_conv_intrinsic_ttynam): Likewise.
1425         (gfc_conv_intrinsic_ishftc): Likewise.
1426         (gfc_conv_intrinsic_index): Likewise.
1427         (gfc_conv_intrinsic_scan): Likewise.
1428         (gfc_conv_intrinsic_verify): Likewise.
1429         (gfc_conv_intrinsic_trim): Likewise.
1430         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1431         (gfc_conv_intrinsic_exponent): Likewise.
1432         (gfc_conv_intrinsic_bound): Likewise.
1433         (gfc_conv_intrinsic_abs): Likewise.
1434         (gfc_conv_intrinsic_mod): Likewise.
1435         (gfc_conv_intrinsic_sign): Likewise.
1436         (gfc_conv_intrinsic_len): Likewise.
1437         (gfc_conv_intrinsic_adjust): Likewise.
1438         (gfc_conv_intrinsic_si_kind): Likewise. 
1439         
1440 2007-07-16  Janne Blomqvist  <jb@gcc.gnu.org>
1441
1442         PR fortran/32748
1443         * trans-decl.c (gfc_build_builtin_function_decls): Remove
1444         DECL_IS_MALLOC attribute from internal_realloc, thus reverting
1445         part of my 2007-07-03 patch.
1446
1447 2007-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1448             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1449
1450         PR fortran/32611
1451         * gfortran.h (gfc_option_t): Add flag_sign_zero field.
1452         * lang.opt (-fsign-zero): New option.
1453         * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
1454         * trans-decl.c (gfc_build_builtin_function_decls): Build the function
1455         declaration to pass an array containing the options to be used by the
1456         runtime library. (gfc_generate_function_code): Build an array that
1457         contains option values to be passed to the runtime library and the call
1458         to the function. 
1459         * options.c (gfc_init_options): Initialize the flag_sign_zero field.
1460         (gfc_handle_option): Handle the -fsign-zero option.
1461
1462 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1463
1464         PR fortran/32036
1465         * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
1466
1467 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1468
1469         PR fortran/32357
1470         * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
1471         to C int.
1472
1473 2007-07-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1474
1475         PR libfortran/32731
1476         * iresolve.c(gfc_resolve_pack):  A scalar mask has
1477         to be kind=4, an array mask with kind<4 is converted
1478         to gfc_default_logical_kind automatically.
1479         (gfc_resolve_unpack):  Convert mask to gfc_default_lotical_kind
1480         if it has a kind<4.
1481
1482 2007-07-14  Paul Thomas  <pault@gcc.gnu.org>
1483
1484         PR fortran/32724
1485         * parse.c (parse_spec): Emit error on unexpected statement
1486         function.
1487
1488 2007-07-13  Daniel Franke  <franke.daniel@gmail.com>
1489
1490         * invoke.texi: Unified upper- and lower-case in menus.
1491         (-w, -W): Removed, documented by gcc.
1492         * intrinsic.texi: Unified Class-section entries, added
1493         subroutine/function warning where appropiate.
1494
1495 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
1496
1497         PR fortran/31639
1498         * decl.c (gfc_match_suffix): Removed surplus general error that hides
1499         a more specific message.
1500         * resolve.c (resolve_fl_variable): Reject illegal initializiers only
1501         if not already done.
1502         (resolve_fl_procedure): Added check for initializers of functions.
1503
1504 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
1505
1506         PR fortran/32704
1507         * invoke.texi (-static-libgfortran): Document new option.
1508
1509 2007-07-12  Paul Thomas  <pault@gcc.gnu.org>
1510
1511         PR fortran/32634
1512         PR fortran/32727
1513         * module.c (write_generic): Restore patch of 2007-07-10 and use
1514         symbol name if there are no use names. 
1515
1516 2007-07-12  Christopher D. Rickett  <crickett@lanl.gov>
1517
1518         PR fortran/32599
1519         * decl.c (verify_c_interop_param): Require character string dummy
1520         args to BIND(C) procedures to have length 1.
1521         * resolve.c (resolve_fl_procedure): Modify parameter checking for
1522         BIND(C) procedures.
1523
1524         PR fortran/32601
1525         * resolve.c (gfc_iso_c_func_interface): Verify that a valid
1526         expression is given as an argument to C_LOC and C_ASSOCIATED.
1527         * trans-io.c (transfer_expr): Add argument for code block.  Add
1528         standards check to determine if an error message should be
1529         reported for printing C_PTR or C_FUNPTR.
1530         (transfer_array_component): Update arguments to transfer_expr.
1531         (gfc_trans_transfer): Ditto.
1532
1533         * symbol.c (gen_cptr_param): Fix whitespace.
1534
1535 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
1536
1537         PR fortran/32550
1538         * trans.h (GFC_POINTER_TYPE_P): Define.
1539         * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
1540         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
1541         if GFC_POINTER_TYPE_P is set on the type.
1542
1543 2007-07-12  Richard Guenther  <rguenther@suse.de>
1544
1545         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
1546         arguments to gfc_charlen_type_node.
1547         * trans-io.c (gfc_convert_array_to_string): Convert type
1548         size to gfc_array_index_type.
1549
1550 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
1551
1552         PR fortran/32634
1553         PR fortran/32727
1554         * module.c: Reverted Paul's patch from 2007-07-10.
1555
1556 2007-07-11  Richard Guenther  <rguenther@suse.de>
1557
1558         * trans-array.c (gfc_conv_array_parameter): Use correct
1559         types for comparison.
1560         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1561         correct types for POINTER_PLUS_EXPR.
1562         * trans-stmt.c (gfc_trans_forall_loop): Use correct type
1563         for integer one constant.
1564
1565 2007-07-10  Paul Thomas  <pault@gcc.gnu.org>
1566
1567         PR fortran/32157
1568         * resolve.c (is_external_proc): New function.  Adds test that
1569         the symbol is not an intrinsic procedure.
1570         * (resolve_function, resolve_call): Replace logical statements
1571         with call to is_external_proc.
1572
1573         PR fortran/32689
1574         * simplify.c (gfc_simplify_transfer): If mold has rank, the
1575         result is an array.
1576
1577         PR fortran/32634
1578         * module.c (write_generic): Write the local name of the
1579         interface. 
1580
1581 2007-07-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1582
1583         PR fortran/29459
1584         * trans-array.c (gfc_trans_array_constructor): Mark offset field
1585         with TREE_NO_WARNING.
1586         * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
1587         stride and size variables with TREE_NO_WARNING.
1588
1589 2007-07-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1590
1591         * trans-decl.c (set_tree_decl_type_code): Remove function.
1592         (generate_local_decl): Remove reference to set_tree_decl_type_code.
1593
1594 2007-07-09  Daniel Franke  <franke.daniel@gmail.com>
1595
1596         PR fortran/31129
1597         * trans-decl.c (generate_local_decl) Emit a warning if an unused
1598         parameter is found.
1599
1600 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
1601
1602         PR fortran/29876
1603         * module.c (gfc_match_use): Do not set an non-existant 
1604         intrinsic operator if a user-defined operator is found.
1605
1606 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
1607
1608         PR fortran/24784
1609         PR fortran/28004
1610         * trans-decl.c (generate_local_decl): Adjusted warning on unused 
1611         dummy arguments, tell middle-end not to emit additional warnings.
1612
1613 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
1614             Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1615
1616         PR fortran/17711
1617         * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
1618         INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS, 
1619         INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1620         * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1621         * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1622         Added gfc_intrinsic_op as third argument type.
1623         * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1624         * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1625         * interface.c (check_operator_interface): Likewise.
1626         (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and 
1627         Fortran 90 style operators using new enum values.
1628         (gfc_extend_expr): Likewise.
1629         (gfc_add_interface): Likewise.
1630         * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1631         operators from Fortran 90 style operators using new enum values.
1632         * matchexp.c (match_level_4): Account for new enum values.
1633         * module.c (mio_expr): Likewise.
1634         * resolve.c (resolve_operator): Deal with new enum values, fix
1635         inconsistent error messages.
1636         * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1637
1638 2007-07-08  Tobias Burnus  <burnus@net-b.de>
1639
1640         PR fortran/32669
1641         * interface.c (get_expr_storage_size): Properly obtain lower bound.
1642         (compare_actual_formal): Add space before parenthesis.
1643
1644 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
1645
1646         PR fortran/25094
1647         * resolve.c (resolve_fl_procedure): Added check for PRIVATE types 
1648         in PUBLIC interfaces.
1649
1650 2007-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1651
1652         PR fortran/32644
1653         * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1654         gfc_match_bind_c does not return MATCH_YES.
1655
1656 2007-07-07  Kazu Hirata  <kazu@codesourcery.com>
1657
1658         * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1659         trans-array.c, trans-decl.c: Fix comment typos.  Follow
1660         spelling conventions.
1661         * intrinsic.texi: Fix typos.  Follow spelling conventions.
1662
1663 2007-05-06  Daniel Franke  <franke.daniel@gmail.com>
1664
1665         PR fortran/32633
1666         * symbol.c (save_status): New.
1667         * gfortran.h (save_status): Added external declaration.
1668         (check_conflict): Check for conflicting explicite SAVE statements
1669         only.
1670         (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1671         * module.c (ab_attribute, attr_bits): Removed enumerator value 
1672         AB_SAVE for save attribute.
1673         (mio_symbol_attribute): Import/export the full SAVE status, 
1674         removed usage of AB_SAVE.
1675         * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1676         * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1677         already explicit.
1678
1679 2007-07-05  Daniel Franke  <franke.daniel@gmail.com>
1680             Tobias Burnus  <burnus@net-b.de>
1681
1682         PR fortran/32359
1683         * gfortran.h (symbol_attribute): Change save attribute into an enum.
1684         * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1685         * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1686         * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1687         (resolve_symbol): Allow OMP threadprivate with
1688         initialization SAVEd and save_all variable.
1689         * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1690
1691 2007-07-05  Paul Thomas  <pault@gcc.gnu.org>
1692
1693         PR fortran/32526
1694         * match.c (gfc_match_call): Check, in all cases, that a symbol
1695         is neither generic nor a subroutine before trying to add it as
1696         a subroutine.
1697
1698         PR fortran/32613
1699         * match.c (gfc_match_do): Reset the implied_index attribute.
1700
1701 2007-07-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1702
1703         PR fortran/31198
1704         * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1705         arguments correctly for MIN and MAX intrinsics.
1706
1707 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1708
1709         PR fortran/32545
1710         * io.c (check_format): Always call gfc_error for errors.
1711         (check_format_string): Change type of this function to try and
1712         return the result of check_format.
1713         (check_io_constraints): Return MATCH_ERROR if check_format_string
1714         returns FAILURE.
1715
1716 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1717
1718         PR fortran/32612
1719         * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1720
1721 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1722
1723         PR fortran/32432
1724         * gfortran.h: Change type of gfc_assign_data_value from void to try.
1725         * data.c (gfc_assign_data_value): Return FAILURE if error found.
1726         * resolve.c (check_data_variable): If gfc_assign_data_value returns
1727         failure, break out of loop and return failure.
1728
1729 2007-07-03  Christopher D. Rickett  <crickett@lanl.gov>
1730
1731         PR fortran/32579
1732         * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1733         (build_formal_args): Pass intrinsic module symbol id to
1734         gen_cptr_param.
1735
1736 2007-07-03  Tobias Burnus  <burnus@net-b.de>
1737
1738         PR fortran/25062
1739         * resolve.c (resolve_common_blocks): New check function.
1740         (resolve_types): Use it.
1741
1742 2007-07-03  Tobias Burnus  <burnus@net-b.de>
1743
1744         PR fortran/30940
1745         * interface.c (get_sym_storage_size): New function.
1746         (get_sym_storage_size): New function.
1747         (compare_actual_formal): Enhance sequence association
1748         support and improve checking.
1749
1750 2007-07-03  Janne Blomqvist  <jb@gcc.gnu.org>
1751
1752         * trans-decl.c (gfc_build_builtin_function_decls): Mark
1753         internal_realloc as a malloc function.
1754
1755 2007-07-03  Tobias Burnus  <burnus@net-b.de>
1756
1757         PR fortran/20888
1758         * resolve.c (resolve_operator): Check for NULL as operand.
1759
1760 2007-07-02  Tobias Burnus  <burnus@net-b.de>
1761
1762         * gfortran.texi (Fortran 2003): Add ISO Bind C.
1763         * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1764         C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1765
1766 2007-07-01  Christopher D. Rickett  <crickett@lanl.gov>
1767
1768         * interface.c (gfc_compare_derived_types): Special case for comparing
1769         derived types across namespaces.
1770         (gfc_compare_types): Deal with BT_VOID.
1771         (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1772         * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1773         to SCALAR
1774         (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and 
1775         NULL_FUNPTR.
1776         (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1777         * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1778         Implicitly declared.
1779         (check_conflict): Add BIND(C) and check for conflicts.
1780         (gfc_add_explicit_interface): Whitespace.       
1781         (gfc_add_is_bind_c): New function.  
1782         (gfc_copy_attr): Use it.
1783         (gfc_new_symbol): Initialize ISO C Binding objects.
1784         (get_iso_c_binding_dt):  New function.
1785         (verify_bind_c_derived_type): Ditto.
1786         (gen_special_c_interop_ptr): Ditto.
1787         (add_formal_arg): Ditto.
1788         (gen_cptr_param): Ditto.
1789         (gen_fptr_param): Ditto.
1790         (gen_shape_param): Ditto.
1791         (add_proc_interface): Ditto.
1792         (build_formal_args): Ditto.
1793         (generate_isocbinding_symbol):  Ditto.
1794         (get_iso_c_sym):  Ditto.
1795         * decl.c (num_idents_on_line, has_name_equals): New variables.
1796         (verify_c_interop_param): New function.
1797         (build_sym): Finish binding labels and deal with COMMON blocks.
1798         (add_init_expr_to_sym): Check if the initialized expression is
1799         an iso_c_binding named constants
1800         (variable_decl): Set ISO C Binding type_spec components.
1801         (gfc_match_kind_spec): Check match for C interoperable kind.
1802         (match_char_spec): Fix comment. Chnage gfc_match_small_int
1803         to gfc_match_small_int_expr.  Check for C interoperable kind.
1804         (match_type_spec): Clear the current binding label.
1805         (match_attr_spec): Add DECL_IS_BIND_C.  If BIND(C) is found, use it
1806         to set attributes.
1807         (set_binding_label): New function.
1808         (set_com_block_bind_c): Ditto.
1809         (verify_c_interop): Ditto.
1810         (verify_com_block_vars_c_interop): Ditto.
1811         (verify_bind_c_sym): Ditto.
1812         (set_verify_bind_c_sym): Ditto.
1813         (set_verify_bind_c_com_block): Ditto.
1814         (get_bind_c_idents): Ditto.
1815         (gfc_match_bind_c_stmt): Ditto.
1816         (gfc_match_data_decl): Use num_idents_on_line.
1817         (match_result): Deal with right paren in BIND(C).
1818         (gfc_match_suffix): New function.
1819         (gfc_match_function_decl): Use it.  Code is re-arranged to deal with
1820         ISO C Binding result clauses.
1821         (gfc_match_subroutine):  Deal with BIND(C).
1822         (gfc_match_bind_c): New function.
1823         (gfc_get_type_attr_spec): New function.  Code is re-arranged in and
1824         taken from gfc_match_derived_decl.
1825         (gfc_match_derived_decl): Add check for BIND(C).
1826         * trans-common.c: Forward declare gfc_get_common.
1827         (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1828         'gfc_common_head *com'.  Check for ISO C Binding of the common block.
1829         (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1830         * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1831         (bt): Add BT_VOID
1832         (sym_flavor): Add FL_VOID.
1833         (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1834         (CInteropKind_t): New struct.
1835         (c_interop_kinds_table): Use it.  Declare an array of structs.
1836         (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1837         bitfields.
1838         (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1839         (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1840         common_block members.
1841         (gfc_common_head): Add binding_label and is_bind_c members.
1842         (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1843         Add prototypes for get_c_kind, gfc_validate_c_kind, 
1844         gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1845         verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1846         verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1847         generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1848         * iso-c-binding.def: New file. This file contains the definitions
1849         of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1850         module.
1851         * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1852          or C_NULL_FUNPTR expressions.
1853         * expr.c (gfc_copy_expr): Add BT_VOID case.  For BT_CHARACTER, the
1854         ISO C Binding requires a minimum string length of 1 for '\0'.  
1855         * module.c (intmod_sym): New struct.
1856         (pointer_info): Add binding_label member.
1857         (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1858         (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1859         (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1860         (mio_symbol_attribute): Deal with ISO C Binding attributes.
1861         (bt_types): Add "VOID".
1862         (mio_typespec): Deal with ISO C Binding components.
1863         (mio_namespace_ref): Add intmod variable. 
1864         (mio_symbol): Check for symbols from an intrinsic module.
1865         (load_commons): Check for BIND(C) common block.
1866         (read_module): Read binding_label and use it.
1867         (write_common): Add label.  Write BIND(C) info.
1868         (write_blank_common): Blank commons are not BIND(C).  Explicitly
1869         set is_bind_c=0.
1870         (write_symbol): Deal with binding_label.
1871         (sort_iso_c_rename_list): New function.
1872         (import_iso_c_binding_module): Ditto.
1873         (create_int_parameter): Add to args.
1874         (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1875         intrinsic module.
1876         * trans-types.c (c_interop_kinds_table): new array of structs. 
1877         (gfc_validate_c_kind): New function.
1878         (gfc_check_any_c_kind): Ditto.
1879         (get_real_kind_from_node): Ditto.
1880         (get_int_kind_from_node): Ditto.
1881         (get_int_kind_from_width): Ditto.
1882         (get_int_kind_from_minimal_width): Ditto.
1883         (init_c_interop_kinds): Ditto.
1884         (gfc_init_kinds): call init_c_interop_kinds.
1885         (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1886         Adjust handling of BT_DERIVED.
1887         (gfc_sym_type): Whitespace.
1888         (gfc_get_derived_type):  Account for iso_c_binding derived types
1889         * resolve.c (is_scalar_expr_ptr): New function.
1890         (gfc_iso_c_func_interface): Ditto.
1891         (resolve_function): Use gfc_iso_c_func_interface. 
1892         (set_name_and_label): New function.
1893         (gfc_iso_c_sub_interface): Ditto.
1894         (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1895         (resolve_bind_c_comms): New function.
1896         (resolve_bind_c_derived_types): Ditto.
1897         (gfc_verify_binding_labels): Ditto.
1898         (resolve_fl_procedure): Check for ISO C interoperability.
1899         (resolve_symbol): Check C interoperability.
1900         (resolve_types): Walk the namespace.  Check COMMON blocks.
1901         * trans-decl.c (gfc_sym_mangled_identifier):  Prevent the mangling
1902         of identifiers that have an assigned binding label.
1903         (gfc_sym_mangled_function_id): Use the binding label rather than
1904         the mangled name.
1905         (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1906         segment of the object file, because this is what C would do.
1907         (gfc_create_module_variable): Conver to proper types
1908         (set_tree_decl_type_code): New function.
1909         (generate_local_decl): Check dummy variables and derived types for
1910         ISO C Binding attributes.
1911         * match.c (gfc_match_small_int_expr): New function.
1912         (gfc_match_name_C): Ditto.
1913         (match_common_name): Deal with ISO C Binding in COMMON blocks
1914         * trans-io.c (transfer_expr):  Deal with C_NULL_PTR or C_NULL_FUNPTR
1915         expressions
1916         * match.h: Add prototypes for gfc_match_small_int_expr,
1917         gfc_match_name_C, match_common_name, set_com_block_bind_c,
1918         set_binding_label, set_verify_bind_c_sym,
1919         set_verify_bind_c_com_block, get_bind_c_idents,
1920         gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1921         gfc_get_type_attr_spec
1922         * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1923         (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1924         later for valiadation.
1925         * primary.c (got_delim): Set ISO C Binding components of ts.
1926         (match_logical_constant): Ditto.
1927         (match_complex_constant): Ditto.
1928         (match_complex_constant): Ditto.
1929         (gfc_match_rvalue): Check for existence of at least one arg for
1930         C_LOC, C_FUNLOC, and C_ASSOCIATED.
1931         * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1932         (get_c_kind): New function.
1933
1934 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
1935
1936         PR fortran/32239
1937         * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1938         real**int4 powers.
1939         * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1940         builtins table.
1941
1942 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
1943
1944         * trans.h: Remove decls for 64-bit allocation functions.
1945         * trans-array.c (gfc_grow_array): Always pick the standard realloc
1946         function decl.
1947         (gfc_array_allocate): Likewise.
1948         * trans-decl.c: Remove trees for 64-bit allocation functions.
1949         (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1950         allocations functions, use index_int_type for normal allocation
1951         functions.
1952
1953 2007-06-30  Daniel Franke  <franke.daniel@gmail.com>
1954
1955         PR fortran/20373
1956         * intrinsic.c (add_functions): Additional function types.
1957         (gfc_convert_type_warn): Remove intrinsic-flag from
1958         conversion functions.
1959         * resolve.c (resolve_symbol): Added type checks to 
1960         explicitly defined intrinsics.
1961
1962 2007-06-30  Tobias Burnus  <burnus@net-b.de>
1963
1964         PR fortran/32555
1965         * io.c (check_format): Allow zero to precede the
1966         P edit descriptor.
1967
1968 2007-06-30  Paul Thomas  <pault@gcc.gnu.org>
1969
1970         PR fortran/32472
1971         * simplify.c (gfc_simplify_repeat): Add handling of character
1972         literal for first argument.
1973
1974 2007-06-29  Daniel Franke  <franke.daniel@gmail.com>
1975
1976         * resolve.c (resolve_operator): Added check whether a user
1977         defined operator is available.
1978
1979 2007-06-29  Daniel Franke <franke.daniel@gmail.com>
1980
1981         * openmp.c (resolve_omp_clauses): Adjust error message to
1982         better reflect the actual requirement.
1983
1984 2007-06-29  Tobias Burnus  <burnus@net-b.de>
1985
1986         PR fortran/32483
1987         * io.c (format_lex): Fix FMT_ZERO.
1988         (check_format,check_format_string,gfc_match_format,
1989         check_io_constraints) Additional checking for READ.
1990
1991 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1992
1993         PR other/31400
1994         * lang.opt (static-libgfortran): New option.
1995         * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1996         (Option): Add OPTION_static and OPTION_static_libgfortran.
1997         (lookup_option): Handle the new -static-libgfortran option.
1998         (lang_specific_driver): Check whether -static is passed.
1999         Handle the new -static-libgfortran option.
2000         * options.c (gfc_handle_option): If -static-libgfortran is
2001         passed and isn't supported on this configuration, error out.
2002
2003 2007-06-27  Daniel Franke  <franke.daniel@gmail.com>
2004
2005         PR fortran/32467
2006         * openmp.c (resolve_omp_clauses): Emit error on allocatable
2007         components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
2008         clauses.
2009
2010 2007-06-25  Paul Thomas  <pault@gcc.gnu.org>
2011
2012         PR fortran/32464
2013         * resolve.c (check_host_association): Return if the old symbol
2014         is use associated.  Introduce retval to reduce the number of
2015         evaluations of the first-order return value.
2016
2017         PR fortran/31494
2018         * match.c (gfc_match_call): If a host associated symbol is not
2019         a subroutine, build a new symtree/symbol in the current name
2020         space.
2021
2022 2007-06-24  Tobias Burnus  <burnus@net-de>
2023
2024         PR fortran/32460
2025         * interface.c (gfc_compare_derived_types): Add access check.
2026         * symbol.c (gfc_find_component): Ditto.
2027         (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
2028         * dump-parse-tree.c (gfc_show_components): Dump access state.
2029         * gfortran.h (struct gfc_component): Add gfc_access.
2030         * module.c (mio_component): Add access state.
2031         * (gfc_match_structure_constructor): Check for private access state.
2032
2033 2007-06-24  Paul Thomas  <pault@gcc.gnu.org>
2034
2035         PR fortran/32298
2036         PR fortran/31726
2037         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
2038         the offset between the loop counter and the position as
2039         defined. Add the offset within the loop so that the mask acts
2040         correctly.  Do not advance the location on the basis that it
2041         is zero.
2042
2043 2007-06-22  Daniel Franke  <franke.daniel@gmail.com>
2044
2045         PR fortran/31473
2046         * symbol.c (gfc_copy_attr): Emit errors for duplicate 
2047         EXTERNAL/INTRINSIC statements.
2048
2049 2007-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2050
2051         PR fortran/32360
2052         * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
2053         check to see if the lvalue has attribute pointer and data.  
2054
2055 2007-06-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2056
2057         PR fortran/31162
2058         * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
2059         gfc_notify_standard. (gfc_resolve_iterator): Remove check.
2060         (resolve_branch): Change "Obsolete" to "Deleted feature".
2061         * io.c (resolve_tag): Ditto.
2062         * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
2063
2064 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2065
2066         PR fortran/32361
2067         * match.c (gfc_match_common): If the symbol value expression type is
2068         NULL_EXPR, don't error if previously initialized.
2069
2070 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2071
2072         PR fortran/25061
2073         * decl.c (get_proc_name) Check symbol for generic interface
2074         and issue an error.
2075
2076 2007-06-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2077         Richard Guenther  <rguenther@suse.de>
2078
2079         PR fortran/32140
2080         * trans.c (gfc_build_addr_expr): Use the correct types.
2081
2082 2007-06-19  Paul Thomas  <pault@gcc.gnu.org>
2083
2084         PR fortran/20863
2085         PR fortran/20882
2086         * resolve.c (resolve_code): Use gfc_impure_variable as a
2087         condition for rejecting derived types with pointers, in pure
2088         procedures.
2089         (gfc_impure_variable): Add test for dummy arguments of pure
2090         procedures; any for functions and INTENT_IN for subroutines.
2091
2092         PR fortran/32236
2093         * data.c (gfc_assign_data_value): Change the ICE on an array
2094         reference initializer not being an array into an error and
2095         clear init to prevent a repetition of the error.
2096
2097 2007-06-17  Janne Blomqvist  <jb@gcc.gnu.org>
2098
2099         * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
2100         environment variables. Fix documentation for
2101         GFORTRAN_UNBUFFERED_ALL environment variable.
2102
2103 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2104
2105         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2106         POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
2107         * trans-expr.c (gfc_trans_string_copy): Create
2108         POINTER_PLUS_EXPR instead of a PLUS_EXPR
2109         for pointer types.
2110
2111 2007-06-14  Paul Thomas  <pault@gcc.gnu.org>
2112
2113         PR fortran/32302
2114         * trans-common.c (build_common_decl): If resizing of common
2115         decl is needed, update the TREE_TYPE.
2116
2117 2007-06-13  Tobias Burnus  <burnus@net-b.de>
2118
2119         PR fortran/32323
2120         * interface.c (has_vector_section): New.
2121         (compare_actual_formal): Check for array sections with vector subscript.
2122
2123 2007-06-12  Dirk Mueller  <dmueller@suse.de>
2124
2125         * trans-stmt.c (gfc_trans_call): fix gcc_assert to
2126         a comparison, not an assignment.
2127
2128 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
2129
2130         * trans-common.c (create_common): Initialize 'field_init'.
2131
2132 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
2133
2134         PR fortran/29786
2135         PR fortran/30875
2136         * trans-common.c (get_init_field): New function.
2137         (create_common): Call get_init_field for overlapping
2138         initializers in equivalence blocks.
2139         * resolve.c (resolve_equivalence_derived, resolve_equivalence):
2140         Remove constraints on initializers in equivalence blocks.
2141         * target-memory.c (expr_to_char, gfc_merge_initializers):
2142         New functions.
2143         (encode_derived): Add the bit offset to the byte offset to get
2144         the total offset to the field.
2145         * target-memory.h : Add prototype for gfc_merge_initializers.
2146
2147 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
2148
2149         * trans-types.c (gfc_signed_type): Remove.
2150         * trans-types.h (gfc_signed_type): Remove.
2151         * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
2152
2153 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2154
2155         * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
2156
2157 2007-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
2158             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2159
2160         PR fortran/32223
2161         * match.c (gfc_match_special_char): New function.  Match special char.
2162         Add handling '\0'.
2163         * match.h: Add prototype.
2164         * io.c (next_char): Use it.
2165         * primary.c (next_string_char): Ditto.
2166
2167 2007-06-06  Steven G. Kargl  <kargl@gcc.gnu.org>
2168
2169         * decl.c: Miscellaneous whitespace fixes.
2170         * expr.c: Likewise.
2171         * gfortran.h: Likewise.
2172         * interface.c : Likewise.
2173         * io.c: Likewise.
2174         * match.c: Likewise.
2175         * match.h: Likewise.
2176         * module.c: Likewise.
2177         * parse.c: Likewise.
2178         * resolve.c: Likewise.
2179         * symbol.c: Likewise.
2180         * trans-array.c: Likewise.
2181         * trans-common.c: Likewise.
2182         * trans-decl.c: Likewise.
2183         * trans-intrinsic.c: Likewise.
2184         * trans-io.c: Likewise.
2185         * trans-stmt.c: Likewise.
2186         * trans-types.c: Likewise.
2187
2188 2007-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2189
2190         PR fortran/18923
2191         * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
2192         for ST_FUNCTION since it is called in reject_statement.
2193         (parse_contained): If error, loop back after reject_statement and try
2194         again.  Free the namespace if an error occured.
2195
2196 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
2197
2198         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2199         to operate on a stack allocated array for the intrinsic arguments
2200         instead of creating a TREE_LIST. Add two new parameters for the
2201         array and the number of elements. Update all callers to allocate
2202         an array of the correct length to pass in. Update comment.
2203         (gfc_intrinsic_argument_list_length): New function.
2204         (gfc_conv_intrinsic_mnimax): Call it.
2205         (gfc_conv_intrinsic_merge): Likewise.
2206         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2207         constructors.
2208         (gfc_conv_intrinsic_cmplx): Likewise.
2209         (gfc_conv_intrinsic_ctime): Likewise.
2210         (gfc_covn_intrinsic_fdate): Likewise.
2211         (gfc_conv_intrinsic_ttynam): Likewise.
2212         (gfc_conv_intrinsic_ishftc): Likewise.
2213         (gfc_conv_intrinsic_index): Likewise.
2214         (gfc_conv_intrinsic_scan): Likewise.
2215         (gfc_conv_intrinsic_verify): Likewise.
2216         (gfc_conv_intrinsic_trim): Likewise.
2217         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2218         (gfc_conv_intrinsic_exponent): Likewise.
2219         (gfc_conv_intrinsic_bound): Likewise.
2220         (gfc_conv_intrinsic_abs): Likewise.
2221         (gfc_conv_intrinsic_mod): Likewise.
2222         (gfc_conv_intrinsic_sign): Likewise.
2223         (gfc_conv_intrinsic_len): Likewise.
2224         (gfc_conv_intrinsic_adjust): Likewise.
2225         (gfc_conv_intrinsic_si_kind): Likewise.
2226
2227 2007-06-04  Steve Ellcey  <sje@cup.hp.com>
2228
2229         * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
2230
2231 2007-05-31  Richard Guenther  <rguenther@suse.de>
2232
2233         * trans-expr.c (gfc_conv_expr_op): Use zero constant
2234         that matches the lse type.
2235         (gfc_trans_string_copy): Use sizetype zero constant.
2236         * intrinsic.c (add_functions): The sizeof intrinsic has
2237         index type result.
2238         * trans-types.c (gfc_get_dtype): Convert size to index
2239         type before shifting.
2240         * trans-array.c (gfc_trans_array_constructor_value): Use
2241         index type for offset computation.
2242         * trans-intrinsic.c (gfc_conv_associated): Use correct type
2243         for zero constant.
2244
2245 2007-05-31  Paul Thomas  <pault@gcc.gnu.org>
2246
2247         PR fortran/32156
2248         * trans-array.c (gfc_trans_array_constructor): Treat the case
2249         where the ss expression charlen is missing.
2250
2251 22007-05-31  Paul Thomas  <pault@gcc.gnu.org>
2252
2253         PR fortran/32103
2254         * module.c (mio_symtree_ref): If an equivalence group member
2255         is not used, give it a hidden symbol and set the pointer_info.
2256         (load_equiv): Only free the equivalence if none of the members
2257         are used.
2258
2259 2007-05-29  Daniel Franke  <franke.daniel@gmail.com>
2260
2261         * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
2262         added missing GFC_ISYM_* enumerators, ordered alphabetically.
2263         (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
2264         (gfc_find_subroutine): New prototype.
2265         * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
2266         (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.  
2267         * dependency.c: Changed usage of isym->generic_id to isym->id.  
2268         * openmp.c: Likewise.  
2269         * resolve.c: Likewise.  
2270         * trans-array.c: Likewise.  
2271         * trans-expr.c: Likewise.  
2272         * trans-intrinsic.c: Likewise.  
2273         * trans-openmp.c: Likewise.
2274
2275 2007-05-28  Tobias Schlüter  <tobi@gcc.gnu.org>
2276
2277         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
2278         * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
2279         * intrinsic.h (gfc_check_sizeof): Add prototype of ...
2280         * check.c (gfc_check_sizeof): .. new function.
2281         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
2282         (gfc_conv_intrinsic_strcmp): Whitespace fix.
2283         (gfc_conv_intrinsic_array_transfer): Remove double initialization,
2284         use fold_build. where appropriate.
2285         (gfc_conv_intrinsic_function): Add case for SIZEOF.
2286         * intrinsic.texi: Add documentation for SIZEOF.
2287
2288 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
2289
2290         * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
2291
2292 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
2293
2294         PR fortran/31972
2295         * target-memory.c (gfc_target_expr_size): Add handling
2296         for size of BT_HOLLERITH variables.
2297         * check.c (gfc_check_transfer): Reject BT_HOLLERITH
2298         variables in MOLD argument of TRANSFER.
2299
2300 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
2301
2302         * gfortran.h (gfc_expr): Remove from_H, add "representation"
2303         struct.
2304         * primary.c (match_hollerith_constant): Store the representation
2305         of the Hollerith in representation, not in value.character.
2306         * arith.c: Add dependency on target-memory.h.
2307         (eval_intrinsic): Remove check for from_H.
2308         (hollerith2representation): New function.
2309         (gfc_hollerith2int): Determine value of the new constant.
2310         (gfc_hollerith2real): Likewise.
2311         (gfc_hollerith2complex): Likewise.
2312         (gfc_hollerith2logical): Likewise.
2313         (gfc_hollerith2character): Point both representation.string and
2314         value.character.string at the value string.
2315         * data.c (create_character_initializer): For BT_HOLLERITH
2316         rvalues, get the value from the representation rather than
2317         value.character.
2318         * expr.c (free_expr0): Update handling of BT_HOLLERITH values
2319         and values with representation.string.
2320         (gfc_copy_expr): Likewise.
2321         * intrinsic.c (do_simplify): Remove special treatement of
2322         variables resulting from Hollerith constants.
2323         * dump-parse-trees.c (gfc_show_expr): Update handling of
2324         Holleriths.
2325         * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
2326         check with check for representation.string; get Hollerith
2327         representation from representation.string, not value.character.
2328         * trans-expr.c (is_zero_initializer_p): Replace from_H check
2329         with check for representation.string.
2330         * trans-stmt.c (gfc_trans_integer_select): Use
2331         gfc_conv_mpz_to_tree for case values, so as to avoid picking up
2332         the memory representation if the case is given by a transfer
2333         expression.
2334         * target-memory.c (gfc_target_encode_expr): Use the known memory
2335         representation rather than the value, if it exists.
2336         (gfc_target_interpret_expr): Store the memory representation of
2337         the interpreted expression as well as its value.
2338         (interpret_integer): Move to gfc_interpret_integer, make
2339         non-static.
2340         (interpret_float): Move to gfc_interpret_float, make non-static.
2341         (interpret_complex): Move to gfc_interpret_complex, make
2342         non-static.
2343         (interpret_logical): Move to gfc_interpret_logical, make
2344         non-static.
2345         (interpret_character): Move to gfc_interpret_character, make
2346         non-static.
2347         (interpret_derived): Move to gfc_interpret_derived, make
2348         non-static.
2349         * target-memory.h: Add prototypes for newly-exported
2350         gfc_interpret_* functions.
2351
2352 2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2353
2354         PR fortran/31812
2355         * parse.c (next_statement): Warn for truncated lines if source is free
2356         form.
2357
2358 2007-05-27 Paul Thomas  <pault@gcc.gnu.org>
2359            Tobias Burnus  <burnus@net-b.de>
2360
2361         PR fortran/32088
2362         * symbol.c (gfc_check_function_type): Copy dimensions of
2363           result variable.
2364         * resolve.c (resolve_contained_fntype): Improve symbol output in
2365           the error message.
2366
2367 2007-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2368
2369         PR fortran/31813
2370         * io.c (check_format): Add warning for H specifier in format.
2371         
2372 2007-05-26  Tobias Burnus  <burnus@net-b.de>
2373
2374         * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
2375         GFORTRAN_ERROR_BACKTRACE environment variables.
2376
2377 2007-05-26  Paul Thomas  <pault@gcc.gnu.org>
2378
2379         PR fortran/31219
2380         * trans.h : Add no_function_call bitfield to gfc_se structure.
2381         Add stmtblock_t argument to prototype of get_array_ctor_strlen.
2382         * trans-array.c (get_array_ctor_all_strlen): New function.
2383         (get_array_ctor_strlen): Add new stmtblock_t argument and call
2384         new function for character elements that are not constants,
2385         arrays or variables.
2386         (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
2387         good string length.
2388         * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
2389         to call of get_array_ctor_strlen.
2390
2391 2007-05-25  Kazu Hirata  <kazu@codesourcery.com>
2392
2393         * intrinsic.texi: Fix typos.
2394
2395 2007-05-25  Paul Thomas  <pault@gcc.gnu.org>
2396
2397         PR fortran/32047
2398         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
2399         order in logic under EXPR_FUNCTION to handle functions with
2400         no arguments.
2401
2402 2007-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2403
2404         PR fortran/31716
2405         * array.c (spec_dimen_size): Test for correct BT_INTEGER type. 
2406
2407 2007-05-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2408
2409         PR fortran/32046
2410         * trans-expr.c (gfc_trans_zero_assign): Convert the result of
2411         TYPE_SIZE_UNIT into a signed type.
2412         (gfc_trans_array_copy):  Likewise.
2413         (gfc_trans_array_constructor_copy): Likewise.
2414         * trans-array.c (gfc_trans_create_temp_array): Likewise.
2415         (gfc_grow_array): Likewise.
2416         (gfc_array_init_size): Likewise.
2417         (gfc_duplicate_allocatable): Likewise.
2418         * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
2419
2420 2007-05-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2421
2422         PR fortran/18923
2423         * resolve.c (resolve_function): Don't call resolve_global_procedure if
2424         there is no name. Delete duplicated statement in ELSE clause.
2425
2426 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2427
2428         PR fortran/31627
2429         * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
2430         indicate whether we should check the upper bound in that dimension.
2431         (gfc_conv_array_index_offset): Check only the lower bound of the
2432         last dimension for assumed-size arrays.
2433         (gfc_conv_array_ref): Likewise.
2434         (gfc_conv_ss_startstride): Likewise.
2435
2436 2007-05-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2437             Daniel Franke  <franke.daniel@gmail.com>
2438
2439         PR fortran/32002
2440         * resolve.c (resolve_actual_arglist): Resolve actual argument after
2441         being identified as variable.
2442
2443 2007-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2444
2445         PR fortran/32027
2446         * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
2447         when the loop ends.
2448
2449 2007-05-21  H.J. Lu  <hongjiu.lu@intel.com>
2450
2451         * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
2452
2453 2007-05-21  Paul Thomas  <pault@gcc.gnu.org>
2454
2455         PR fortran/31867
2456         PR fortran/31994
2457         * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
2458         offset for non-descriptor, source arrays and correct for stride
2459         not equal to one before writing to field of output descriptor.
2460
2461 2007-05-20  Daniel Franke  <franke.daniel@gmail.com>
2462
2463         PR fortran/32001
2464         * check.c (check_rest): Improved argument conformance check and 
2465         fixed error message generation.
2466
2467 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2468
2469         PR fortran/30820
2470         * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
2471         simplify.o and trans-common.o.
2472
2473 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2474
2475         PR fortran/31974
2476         * trans-array.c (gfc_trans_auto_array_allocation): Avoid
2477         multiplication of mismatched types.
2478
2479 2007-05-18  Daniel Franke  <franke.daniel@gmail.com>
2480
2481         PR fortran/24633
2482         * symbol.c (gfc_add_flavor): Add the NAME to error message if
2483         available.
2484
2485 2007-05-15  Daniel Franke  <franke.daniel@gmail.com>
2486
2487         PR fortran/31919
2488         PR fortran/31929
2489         PR fortran/31930
2490         * intrinsic.c (check_specific): Check elemental intrinsics for
2491         rank and shape.
2492         (add_functions): Fixed dummy argument names of BESJN and BESYN.
2493         Fixed elemental status of MCLOCK and MCLOCK8.
2494         * check.c (check_rest): Added check for array conformance.
2495         (gfc_check_merge): Removed check for array conformance.
2496         (gfc_check_besn): Removed check for scalarity.
2497         * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
2498         (BESJN, BESYN): Clarified documentation.
2499
2500 2007-05-17  Tobias Burnus  <burnus@net-b.de>
2501
2502         * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
2503
2504 2007-05-16  Brooks Moses  <brooks.moses@codesourcery.com>
2505
2506         PR fortran/18769
2507         PR fortran/30881
2508         PR fortran/31194
2509         PR fortran/31216
2510         PR fortran/31427
2511         * target-memory.c: New file.
2512         * target-memory.h: New file.
2513         * simplify.c: Add #include "target-memory.h".
2514         (gfc_simplify_transfer): Implement constant-
2515         folding for TRANSFER intrinsic.
2516         * Make-lang.in: Add dependencies on new target-memory.* files.
2517
2518 2007-05-15  Paul Brook  <paul@codesourcery.com>
2519
2520         * trans-types.c (gfc_type_for_size): Handle signed TImode.
2521
2522 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2523
2524         PR fortran/30723
2525         * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
2526         gfor_fndecl_internal_free): Remove prototypes.
2527         (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
2528         * trans.c (gfc_call_malloc, gfc_call_free): New functions.
2529         * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
2530         and __builtin_malloc builtins.
2531         * trans-decl.c (gfor_fndecl_internal_malloc,
2532         gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
2533         (gfor_fndecl_os_error): Add.
2534         (gfc_build_builtin_function_decls): Don't create internal_malloc,
2535         internal_malloc64 and internal_free library function declaration.
2536         Create os_error library call function declaration.
2537         * trans-array.c (gfc_trans_allocate_array_storage,
2538         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2539         gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
2540         gfc_call_malloc and gfc_call_free instead of building calls to
2541         internal_malloc and internal_free.
2542         * trans-expr.c (gfc_conv_string_tmp): Likewise.
2543         * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
2544         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
2545         gfc_trans_where_2: Likewise.
2546         * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
2547         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
2548         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
2549
2550 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2551
2552         PR fortran/31725
2553         * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
2554         only once.
2555
2556 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
2557
2558         * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
2559         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
2560         instead of gfc_unsigned_type.
2561         * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
2562         gfc_unsigned_type.
2563         * trans-types.c (gfc_unsigned_type): Remove.
2564         * trans-types.h (gfc_unsigned_type): Remove.
2565
2566 2007-05-12  Paul Thomas  <pault@gcc.gnu.org>
2567
2568         PR fortran/30746
2569         * resolve.c (check_host_association): New function that detects
2570         incorrect host association and corrects it.
2571         (gfc_resolve_expr): Call the new function for variables and
2572         functions.
2573         * match.h : Remove prototype for gfc_match_rvalue.
2574         * gfortran.h : Add prototype for gfc_match_rvalue.
2575
2576 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2577
2578         PR fortran/30876
2579         * trans-expr.c (gfc_conv_function_call): Reduce indirection for
2580         direct assignments of recursive array valued functions.
2581         * primary.c (gfc_match_rvalue): Correct error for recursive
2582         function calls such that directly recursive calls of scalar
2583         function without an explicit result are disallowed.
2584
2585 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
2586
2587         PR fortran/30878
2588         * resolve.c (resolve_fl_namelist): It is not an error if the
2589         namelist element is the result variable of the enclosing
2590         function.  Search for the symbol in current and all parent
2591         namespaces for a potential conflict.
2592         * symbol.c (check_conflict): Remove the conflict between
2593         'in_namelist' and 'FL_PROCEDURE' because the symbol info
2594         is not available to exclude function result variables.
2595         * trans-io.c (nml_get_addr_expr): Use the fake result decl
2596         if the symbol is an implicit result variable.
2597
2598 2007-05-11  Paul Thomas  <pault@gcc.gnu.org>
2599
2600         PR fortran/31474
2601         * decl.c (get_proc_name): If an entry has already been declared
2602         as a module procedure, pick up the symbol and the symtree and
2603         use them for the entry.
2604
2605 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
2606
2607         PR fortran/31630
2608         * resolve.c (resolve_symbol): Remove the flagging mechanism from the
2609         formal namespace resolution and instead check that the formal
2610         namespace is not the current namespace.
2611
2612 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
2613
2614         PR fortran/31692
2615         * trans-array.c (gfc_conv_array_parameter): Convert full array
2616         references to the result of the procedure enclusing the call.
2617
2618 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
2619
2620         PR fortran/29397
2621         PR fortran/29400
2622         * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2623         for a parameter array into an array expression with the right
2624         shape.
2625         * array.c (spec_dimen_size): Remove static attribute.
2626         * gfortran.h : Prototype for spec_dimen_size.
2627
2628 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2629
2630         PR fortran/31399
2631         * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2632
2633 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2634
2635         PR fortran/31764
2636         * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2637         even for non constant arguments.
2638
2639 2007-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2640             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2641
2642         PR fortran/31201
2643         * gfortran.h: Add runtime error codes from libgfortran.h. Define
2644         MAX_UNIT_NUMBER.
2645         * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2646         messages to match library runtime errors.  Use call to new library
2647         function runtime_error_at().
2648         * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2649         Add declaration for library functions runtime_error_at and
2650         generate_error.
2651         * trans_io.c (gfc_trans_io_runtime_check): New function.
2652         (set_parameter_value): Add error checking for UNIT numbers.
2653         (set_parameter_ref): Initialize the users variable to zero. 
2654         (gfc_trans_open): Move setting of unit number to after setting of common
2655         flags so that runtime error trapping can be detected.
2656         (gfc_trans_close): Likewise. (build_filepos): Likewise.
2657         (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2658         * trans-decl.c: Add declarations for runtime_error_at and
2659         generate_error. (gfc_build_builtin_function_decls): Build function
2660         declarations for runtime_error_at and generate_error.
2661
2662 2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
2663
2664         PR fortran/31540
2665         * resolve.c (resolve_fl_procedure): Resolve constant character
2666         lengths.
2667
2668 2007-05-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2669
2670         PR fortran/31251
2671         * decl.c (match_char_spec): Add check for invalid character lengths.
2672
2673 2007-05-04  Brooks Moses  <brooks.moses@codesourcery.com>
2674
2675         * intrinsic.texi (CMPLX): Document result kind.
2676         (COMPLEX): Add documentation.
2677
2678 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
2679
2680         PR fortran/31760
2681         * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2682         by gfc_check_fn_r to avoid checks for scalarity.
2683         * check.c (gfc_check_besn): Removed check for scalarity.
2684         (gfc_check_g77_math1): Removed.
2685         * intrinsic.h (gfc_check_g77_math1): Removed.
2686
2687 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
2688
2689         * check.c (gfc_check_fseek_sub): Fixed typo.
2690
2691 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
2692
2693         PR fortran/22359
2694         * intrinsic.c (add_subroutines): Added FSEEK.
2695         * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2696         * iresolve.c (gfc_resolve_fseek_sub): New.
2697         * check.c (gfc_check_fseek_sub): New.
2698         * intrinsic.texi (FSEEK): Updated.
2699
2700 2007-05-04  Tobias Burnus  <burnus@net-b.de>
2701
2702         PR fortran/31803
2703         * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2704
2705 2007-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2706
2707         PR fortran/31251
2708         * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2709
2710 2007-05-04  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2711
2712         PR fortran/31781
2713         * simplify.c (gfc_simplify_repeat): Don't put function call with
2714         side effect in a gcc_assert().
2715
2716 2007-05-04  Tobias Burnus  <burnus@net-b.de>
2717
2718         PR fortran/25071
2719         * interface.c (compare_actual_formal): Check character length.
2720
2721 2007-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
2722
2723         PR fortran/31732
2724         * dependency.c (gfc_full_array_ref_p):  If the reference is
2725         to a single element, check that the array has a single
2726         element and that the correct element is referenced.
2727
2728 2007-05-01  Daniel Franke  <franke.daniel@gmail.com>
2729
2730         * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2731         (add_subroutines): Replaced magic numbers in function calls by
2732         ELEMENTAL and NOT_ELEMENTAL respectively.
2733         * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2734         (RANDOM_NUMBER): Changed class to subroutine.
2735         (HUGE, TINY): Changed class to inquiry function.
2736
2737 2007-04-30  Brooks Moses  <brooks.moses@codesourcery.com>
2738
2739         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2740         (gfc_conv_tree_to_mpz): New function.
2741         (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2742         (gfc_conv_tree_to_mpfr): New function.
2743         * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2744         (gfc_conv_tree_to_mpfr): New prototype.
2745
2746 2007-04-30  Daniel Franke  <franke.daniel@gmail.com>
2747
2748         * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2749         (LOG10): Removed COMPLEX as accepted argument type.
2750         (NEW_LINE): Changed class from elemental to inquiry function.
2751         (SIGN): Removed requirement of scalar arguments.
2752         (SNGL): Changed class to elemental function.
2753
2754 2007-04-29  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2755
2756         PR fortran/31591
2757         * simplify.c (simplify_bound_dim): New function.
2758         (simplify_bound): Use the above. Perform simplification of LBOUND
2759         and UBOUND when DIM argument is not present.
2760
2761 2007-04-29  Daniel Franke  <franke.daniel@gmail.com>
2762
2763         * gfortran.texi: Cleaned up keyword index.
2764         * invoke.texi: Likewise.
2765         * intrinsic.texi: Likewise.
2766                         
2767 2007-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2768
2769         PR fortran/31645
2770         * scanner.c (load_file): Discard the byte order mark if one is
2771         found on the first non-preprocessor line of a file.
2772
2773 2007-04-29  Paul Thomas  <pault@gcc.gnu.org>
2774
2775         PR fortran/31711
2776         * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2777         whenever a dependency is found.
2778
2779 2007-04-28  Tobias Schlüter  <tobi@gcc.gnu.org>
2780
2781         * options.c (gfc_handle_option): Ensure requested free form line
2782         length is not too small.
2783
2784 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
2785
2786         * intrinsic.texi (Transfer): Improve documentation.
2787
2788 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
2789
2790         * gfortran.texi (Option Index): Add @samp as needed.
2791
2792 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2793
2794         * gfortran.texi: Added node and menu entry for an option index.
2795         * invoke.texi: Moved command line option related entries of the concept 
2796         index to the option index.
2797
2798 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2799
2800         * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2801         XOR): Fixed examples.
2802
2803 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2804
2805         * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM, 
2806         SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2807         (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2808
2809 2007-04-26  Daniel Franke  <franke.daniel@gmail.com>
2810
2811         * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE, 
2812         SIZE, TRANSPOSE, TRIM, VERIFY): New.
2813         (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2814         (INT, INT2, INT8, LONG): Enabled section header.
2815
2816 2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
2817
2818         * module.c (module_char): Replace fgetc() with
2819         getc(). 
2820         (write_char): Replace fputc() with putc().
2821         * scanner.c (load_line): Replace fgetc() with getc().
2822         (gfc_read_orig_filename): Likewise.
2823
2824 2007-04-25  Tobias Burnus  <burnus@net-b.de>
2825
2826         PR fortran/31668
2827         * error.c (error_print): Fix %% support.
2828         * intrinsic.c (sort_actual): Improve error message.
2829         * resolve.c (resolve_actual_arglist): Allow %VAL for
2830         interfaces defined in the module declaration part.
2831
2832 2007-04-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2833
2834         PR libfortran/31299
2835         * intrinsic.texi (GETLOG): Update documentation to reflect
2836         library changes.
2837
2838 2007-04-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2839
2840         PR fortran/31587
2841         * module.c (write_char): Add character to the MD5 buffer.
2842         (read_md5_from_module_file): New function.
2843         (gfc_dump_module): Compute MD5 for new module file. Call
2844         read_md5_from_module_file. Only overwrite old module file
2845         if the new MD5 is different.
2846
2847 2007-04-23  Paul Thomas  <pault@gcc.gnu.org>
2848
2849         PR fortran/31630
2850         * resolve.c (resolve_symbol): Allow resolution of formal
2851         namespaces nested within formal namespaces coming from modules.
2852
2853         PR fortran/31620
2854         * trans-expr.c (gfc_trans_assignment): Make the call to
2855         gfc_trans_zero_assign conditional on the lhs array ref being
2856         the only reference.
2857
2858 2007-04-23  Tobias Burnus  <burnus@net-b.de>
2859
2860         * primary.c (match_integer_constant): Mention -fno-range-check
2861         in the error message.
2862
2863 2007-04-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2864
2865         PR fortran/31495
2866         * scanner.c (load_line):  Remove check for comment after ampersand and
2867         adjust tracking of ampersand.
2868
2869 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2870
2871         * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2872         instead of checking GIMPLE_STMT_P in chain_next.
2873
2874 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
2875
2876         * trans-types.h (gfc_packed): New enum.
2877         (gfc_get_nodesc_array_type): Change prototype to use new enum.
2878         * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2879         argument packed.  Adapt all references to values accordingly.
2880         (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2881         (gfc_get_derived_type): Likewise.
2882         * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2883         * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2884         argument to type gfc_packed.
2885         (gfc_add_interface_mapping): Use enum values in call to
2886         gfc_get_interface_mapping.
2887         * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2888         values when determining packing.
2889
2890         * trans-decl.c (gfc_finish_decl): Remove unused second argument
2891         'init'.  Simplify code accordingly.  Remove calls to
2892         gfc_fatal_error in favor of gcc_assert.
2893         (create_function_arglist): Remove second argument from calls to
2894         gfc_finish-decl.
2895         (gfc_trans_dummy_character): Likewise.
2896
2897         * arith.h: Update copyright years.
2898         * dependency.h: Likewise.
2899         * gfortran.h: Likewise.
2900         * lang-specs.h: Likewise.
2901         * parse.h: Likewise.
2902         * symbol.c: Likewise.
2903         * trans.h: Likewise.
2904         * trans.c: Likewise.
2905         * trans-array.c: Likewise.
2906         * trans-common.c: Likewise.
2907         * trans-const.h: Likewise.
2908         * trans-const.c: Likewise.
2909         * trans-decl.c: Likewise.
2910         * trans-expr.c: Likewise.
2911         * trans-io.c: Likewise.
2912         * trans-openmp.c: Likewise.
2913         * trans-types.h: Likewise.
2914         * types.def: Likewise.
2915
2916 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
2917
2918         PR fortran/31144
2919         * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2920         mangling.
2921         (gfc_sym_mangled_function_id): Likewise.
2922
2923 2007-04-15  Paul Thomas  <pault@gcc.gnu.org>
2924
2925         PR fortran/31204
2926         * primary.c (check_for_implicit_index): New function to check
2927         that a host associated variable is not an undeclared implied
2928         do loop index.
2929         (gfc_match_rvalue, match_variable): Use it and reset the
2930         implied_index attribute.
2931         * gfortran.h : Add the implied_index field to symbol_attribute.
2932         * match.c (gfc_match_iterator): Mark the iterator variable
2933         with the new attribute.
2934         * decl.c (build_sym): Reset the new attribute.
2935
2936 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
2937
2938         * gfc-internals.texi: Fix typos.
2939         * simplify.c: Fix a comment typo.
2940
2941 2007-04-14  Bernhard Fischer  <aldot@gcc.gnu.org>
2942
2943         * primary.c: Commentary typo fix; Add question about redundant (?)
2944         set.
2945
2946 2007-04-14  Paul Thomas  <pault@gcc.gnu.org>
2947
2948         PR fortran/29507
2949         PR fortran/31404
2950         * expr.c (scalarize_intrinsic_call): New function to
2951         scalarize elemental intrinsic functions in initialization
2952         expressions.
2953         (check_init_expr): Detect elemental intrinsic functions
2954         in initalization expressions and call previous.
2955
2956 2007-04-13  Tobias Burnus  <burnus@net-b.de>
2957
2958         PR fortran/31559
2959         * primary.c (match_variable): External functions
2960         are no variables.
2961
2962 2007-04-13  Paul Thomas  <pault@gcc.gnu.org>
2963
2964         PR fortran/31550
2965         * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2966         derived type components.
2967
2968 2007-04-13  Tobias Schlüter  <tobi@gcc.gnu.org>
2969
2970         PR fortran/18937
2971         * resolve.c: Include obstack.h and bitmap.h.  New variable
2972         labels_obstack.
2973         (code_stack): Add tail and reachable_labels fields.
2974         (reachable_labels): New function.
2975         (resolve_branch): Rework to use new fields in code_stack.
2976         (resolve_code): Call reachable_labels.
2977         (resolve_codes): Allocate and free labels_obstack.
2978
2979 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
2980
2981         PR fortran/31250
2982         * decl.c (match_char_spec): Move check for negative CHARACTER
2983         length ...
2984         * resolve.c (resolve_charlen): ... here.
2985         (resolve_types): Resolve CHARACTER lengths earlier.
2986
2987 2007-04-12  Daniel Franke  <franke.daniel@gmail.com>
2988
2989         PR fortran/31234
2990         * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2991
2992 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
2993
2994         PR fortran/31266
2995         * primary.c (gfc_variable_attr): Don't copy string length if it
2996         doesn't make sense.
2997         * resolve.c (resolve_code): Clarify error message.
2998
2999         PR fortran/31471
3000         * decl.c (gfc_match_end): Also check for construct name in END
3001         FORALL and END WERE statements.
3002         * match.c (match_case_eos): Use uppercase for statement name in
3003         error message.
3004         (match_elsewhere): Construct name may appear iff construct has a
3005         name.
3006
3007         * trans-types.c: Update copyright years.  Reformat long comment
3008         explaining array descriptor format.  Remove obsolete mention of
3009         TYPE_SET.
3010
3011         * arith.c (gfc_arith_uplus): Rename to ...
3012         (gfc_arith_identity): ... this.
3013         (gfc_parentheses): New function.
3014         (gfc_uplus): Adapt to renamed function.
3015         * arith.h (gfc_parentheses): Add prototype.
3016         * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
3017         (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
3018         INTRINSIC_PARENTHESES.
3019
3020 2007-04-12  Tobias Burnus  <burnus@net-b.de>
3021
3022         PR fortran/31472
3023         * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
3024         attribute in type definitions.
3025         (gfc_match_private): Allow PRIVATE statement only
3026         in specification part of modules.
3027         (gfc_match_public): Ditto for PUBLIC.
3028         (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
3029         specificification part of modules.
3030
3031 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3032
3033         PR fortran/31257
3034         * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
3035         * intrinsic.h : Add prototype for gfc_resolve_achar.
3036         * iresolve.c (gfc_resolve_achar): New function.
3037
3038 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3039
3040         PR fortran/30880
3041         * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
3042         arrays.  Make condition for automatic array error explicit.
3043         If a dummy, no error on an INTENT(OUT) derived type.
3044
3045 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3046
3047         PR fortran/30872
3048         * expr.c (find_array_element): Correct arithmetic for rank > 1.
3049
3050 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3051
3052         PR fortran/31222
3053         * check.c (numeric_check): If an expresson has not got a type,
3054         see if it is a symbol for which a default type applies.
3055
3056 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3057
3058         PR fortran/31214
3059         * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
3060         associated symbols.
3061
3062 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
3063
3064         PR fortran/31293
3065         * symbol.c (gfc_check_function_type): New function.
3066         * gfortran.h : Add prototype for previous.
3067         * parse.c (parse_progunit): Call it after parsing specification
3068         statements.
3069
3070 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
3071
3072         PR fortran/31483
3073         * trans-expr.c (gfc_conv_function_call): Give a dummy
3074         procedure the correct type if it has alternate returns.
3075
3076 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
3077
3078         PR fortran/31292
3079         * decl.c (gfc_match_modproc): Go up to the top of the namespace
3080         tree to find the module namespace for gfc_get_symbol.
3081
3082 2007-04-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3083
3084         PR fortran/31304
3085         * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
3086         * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
3087         (gfc_init_types): Define gfc_charlen_int_kind. 
3088         * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
3089         * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
3090         (gfc_build_intrinsic_function_decls): Don't set
3091         gfor_fndecl_string_repeat.
3092         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
3093         so that we don't have to call a library function.
3094         * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
3095         checks on the NCOPIES argument, and work with arbitrary size
3096         arguments.
3097
3098 2007-03-31  Tobias Burnus  <burnus@net-b.de>
3099
3100         * intrinsic.c (add_functions): Fix name of dummy argument
3101           for new_line and exit intrinsic.
3102
3103 2007-03-31  Paul Thomas  <pault@gcc.gnu.org>
3104
3105         PR fortran/31160
3106         * gfortran.texi: Add a section for the %VAL, %REF and %LOC
3107         extensions.
3108
3109 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
3110
3111         * trans-types.c (gfc_signed_or_unsigned_type): Remove.
3112         (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
3113         gfc_signed_or_unsigned_type.
3114         (gfc_signed_type): Ditto.
3115         * trans-types.h (gfc_signed_or_unsigned_type): Remove.
3116         * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3117
3118 2007-03-30  Tobias Schlüter  <tobi@gcc.gnu.org>
3119
3120         * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
3121         descend into all branches.
3122
3123 2007-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
3124
3125         * intrinsic.c (conv_name): Let gfc_get_string handle the format.
3126         (find_conv): Compare pointers instead of calling strcmp.
3127         (find_sym): Likewise, but ensure that the compared pointer is in
3128         the global string table.
3129
3130 2007-03-28  Tobias Schlüter  <tobi@gcc.gnu.org>
3131
3132         * gfc-internals.texi: Fix output filename.  Merge type index into
3133         concept index.  Start documentation of gfc_code structure.
3134
3135 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
3136
3137         * gfc-internals.texi: New file,
3138         * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
3139
3140 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
3141  
3142         * error.c (show_locus): Remove always-false test.
3143
3144 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
3145
3146         * lang.opt: Minor edits to descriptions.
3147
3148 2007-03-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3149
3150         PR fortran/30877
3151         * fortran/interface.c (check_operator_interface): Implement
3152         the standard checks on user operators extending intrinsic operators.
3153         * fortran/resolve.c (resolve_operator): If the ranks of operators
3154         don't match, don't error out but try the user-defined ones first.
3155
3156 2007-03-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3157
3158         PR fortran/30655
3159         * expr.c (check_dimension): Fix logic of comparisons.
3160
3161 2007-03-24  Paul Thomas  <pault@gcc.gnu.org>
3162
3163         PR fortran/31215
3164         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
3165         int result that is non-zero if the expression is the function
3166         result.  Only the characteristics of the result expression
3167         can be used in a procedure interface, so simplify LEN in situ
3168         using its character length.
3169
3170         PR fortran/31209
3171         PR fortran/31200
3172         * trans-expr.c (gfc_conv_function_call): Do not use
3173         gfc_conv_expr_reference for actual pointer function with formal
3174         target because a temporary is created that does not transfer
3175         the reference correctly.  Do not indirect formal pointer
3176         functions since it is the function reference that is needed.
3177
3178 2007-03-24  Brooks Moses  <brooks.moses@codesourcery.com>
3179
3180         * gfortran.h: Edit comments on GFC_STD_*.
3181
3182 2007-03-23  Brooks Moses  <brooks.moses@codesourcery.com>
3183
3184         * invoke.texi: Misc. small typo fixes.
3185         (-Wcharacter-truncation): Add.
3186         (-Wnonstd-intrinsics): Correct spelling.
3187         (-std=): Edit.
3188         (-fintrinsic-modules-path): Add.
3189
3190 2007-03-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3191
3192         PR fortran/30834
3193         * arith.c (complex_pow): Rewrite to handle large power.
3194         (gfc_arith_power): Handle large power in the real and integer
3195         cases.
3196
3197 2007-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3198
3199         PR fortran/31262
3200         * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
3201         larger than twice the width of a HOST_WIDE_INT.
3202
3203 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
3204
3205         PR fortran/31193
3206         * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
3207         (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
3208         Explicitly extract TREE_TYPEs for source and mold.  Use these
3209         to calculate length of source and mold, except for characters,
3210         where the se string_length is used.  For mold, the TREE_TYPE is
3211         recalculated using gfc_get_character_type_len so that the
3212         result is correctly cast for character literals and substrings.
3213         Do not use gfc_typenode_for_spec for the final cast.
3214
3215 2007-03-22  Tobias Schlüter  <tobi@gcc.gnu.org>
3216
3217         PR fortran/20897
3218         * decl.c (gfc_match_derived_decl): Reliably reject
3219         'doubleprecision' and 'doublecomplex' as type names.
3220
3221 2007-03-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3222
3223         PR fortran/31203
3224         * trans-expr.c (gfc_trans_init_string_length): Length should
3225         never be negative.
3226         (gfc_conv_function_call): Likewise.
3227
3228 2007-03-18  Paul Thomas  <pault@gcc.gnu.org>
3229
3230         PR fortran/30531
3231         PR fortran/31086
3232         * symbo.c : Add gfc_derived_types.
3233         (gfc_free_dt_list): Free derived type list gfc_derived_types.
3234         (gfc_free_namespace): Remove call to gfc_free_dt_list.
3235         (gfc_symbol_done_2): Call  gfc_free_dt_list.
3236         * gfortran.h : Declare gfc_derived_types to be external. Remove
3237         derived types field from gfc_namespace.
3238         * resolve.c (resolve_fl_derived): Refer to gfc_derived types
3239         rather than namespace derived_types.
3240         (resolve_fntype): Remove special treatment for module
3241         derived type functions.
3242         * trans-types.c (gfc_get_derived_type): Remove search for like
3243         derived types.  Finish by copying back end declaration to like
3244         derived types in the derived type list gfc_derived_types.
3245
3246         2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3247
3248         PR fortran/31120
3249         * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
3250         (gfc_conv_cst_int_power): Handle integer exponent with care,
3251         since it might be too large for us.
3252
3253 2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3254
3255         PR fortran/31184
3256         * invoke.texi: Fix typo.
3257
3258 2007-03-16  Tobias Burnus  <burnus@net-b.de>
3259
3260         * trans-decl.c (gfc_generate_function_code): Use all arguments of
3261           set_std.
3262
3263 2007-03-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3264
3265         * gfortran.h (gfc_option_t): Add flag_backtrace field.
3266         * lang.opt: Add -fbacktrace option.
3267         * invoke.texi: Document the new option.
3268         * trans-decl.c (gfc_build_builtin_function_decls): Add new
3269         option to the call to set_std.
3270         * options.c (gfc_init_options, gfc_handle_option): Handle the
3271         new option.
3272
3273 2007-03-15  Tobias Burnus  <burnus@gcc.gnu.org>
3274             Paul Thomas  <pault@gcc.gnu.org>
3275
3276         PR fortran/30922
3277         * decl.c (gfc_match_import): If the parent of the current name-
3278         space is null, try looking for an imported symbol in the parent
3279         of the proc_name interface.
3280         * resolve.c (resolve_fl_variable): Do not check for blocking of
3281         host association by a same symbol, if the symbol is in an
3282         interface body.
3283
3284 2007-03-15  Paul Thomas  <pault@gcc.gnu.org>
3285
3286         PR fortran/30879
3287         * decl.c (match_data_constant): Before going on to try to match
3288         a name, try to match a structure component.
3289
3290
3291         PR fortran/30870
3292         * resolve.c (resolve_actual_arglist): Do not reject a generic
3293         actual argument if it has a same name specific interface.
3294
3295         PR fortran/31163
3296         * trans-array.c (parse_interface): Do not nullify allocatable
3297         components if the symbol has the saved attribute.
3298
3299 2007-03-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3300
3301         * trans-array.c (gfc_trans_auto_array_allocation): Replace
3302         fold(convert()) by fold_convert().
3303         (gfc_duplicate_allocatable): Likewise.
3304         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
3305         build_int_cst instead of converting an integer_zero_node
3306         to the final type.
3307
3308 2007-03-14  Jakub Jelinek  <jakub@redhat.com>
3309
3310         * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
3311
3312 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
3313
3314         PR fortran/30933
3315         PR fortran/30948
3316         PR fortran/30953
3317         * intrinsics.texi (CHDIR): Fix argument names, note
3318         that STATUS must be a default integer.
3319         (CTIME): Fix argument names, note that RESULT must
3320         be a default integer.
3321         (EXIT): Note that STATUS must be a default integer.
3322
3323 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
3324
3325         PR fortran/28068
3326         * intrinsic.texi: General whitespace cleanup, remove
3327         comment about missing intrinsics.
3328         (menu): Add lines for new entries listed below.
3329         (ACOSH): Mention specific function DACOSH, correct
3330         description phrasing.
3331         (ASINH): Mention specific function DASINH, correct
3332         description phrasing.
3333         (ATANH): Mention specific function DATANH, correct
3334         description phrasing.
3335         (COS): Add index entry for CCOS.
3336         (CPU_TIME): Correct "REAL" to "REAL(*)".
3337         (EXP): Add index entry for CEXP.
3338         (INT): Correct argument name to "A".
3339         (INT2): New entry.
3340         (INT8): New entry.
3341         (LONG): New entry.
3342         (MAX): Add index entries for specific variants.
3343         (MCLOCK): New entry.
3344         (MCLOCK8): New entry.
3345         (SECNDS): Adjust to a more standard form.
3346         (SECOND): New entry.
3347         (TIME): Add cross-reference to MCLOCK.
3348         (TIME8): Add cross-reference to MCLOCK8.
3349
3350 2007-03-11  Paul Thomas  <pault@gcc.gnu.org>
3351
3352         PR fortran/30883
3353         * parse.c (parse_interface): Use the default types from the
3354         formal namespace if a function or its result do not have a type
3355         after parsing the specification statements.
3356
3357 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
3358
3359         * intrinsic.texi: (ICHAR) Improve internal I/O note.
3360         (ACHAR): Reference it.
3361         (CHAR): Reference it.
3362         (IACHAR): Reference it.
3363
3364 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
3365
3366         * intrinsic.texi: (LINK) Document function form.
3367         (RENAME): Likewise.
3368         (SYMLNK): Likewise.
3369         (SYSTEM): Likewise.
3370         (UNLINK): Likewise.
3371
3372 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
3373
3374         * intrinsic.texi: minor typo fixes, removed prologue.
3375         (FSEEK): moved to correct place in alphabetical order.
3376
3377 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
3378
3379         PR fortran/30947
3380         * check.c (gfc_check_alarm_sub): Added check for default integer 
3381         kind of status argument.
3382         * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of 
3383         status argument.
3384         * intrinsic.texi (ALARM): Extended documentation.
3385
3386 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
3387
3388         * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
3389         (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
3390         * intrinsic.c (add_subroutines): Adjusted dummy argument names 
3391         of GERROR and TTYNAM.
3392
3393 2007-07-08  Tobias Burnus  <burnus@net-b.de>
3394
3395         * module.c (gfc_match_use): Support renaming of operators
3396         in USE statements.
3397         * gfortran.texi (Fortran 2003 Status): Document support of
3398         renaming of operators.
3399
3400 2007-07-08  Tobias Burnus  <burnus@net-b.de>
3401
3402         PR fortran/30973
3403         * module.c (read_module): Always import module name as symbol.
3404         (gfc_match_use): Disallow module name in the only clause of
3405         a use statement.
3406
3407 2007-03-08  Paul Thomas  <pault@gcc.gnu.org>
3408
3409         PR fortran/31011
3410         * expr.c (find_array_section): Correct arithmetic for section
3411         size.
3412
3413 2007-03-07  Brooks Moses  <brooks.moses@codesourcery.com>
3414
3415         * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
3416
3417 2007-03-06  Daniel Franke  <franke.daniel@gmail.com>
3418
3419         PR documentation/30950
3420         * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
3421         (FREE): Fix call syntax.
3422
3423 2007-03-06  Brooks Moses  <brooks.moses@codesourcery.com>
3424
3425         * intrinsic.texi: Limit column widths to a total of .85.
3426
3427 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
3428
3429         * gfortran.texi (GFortran and G77): Rewrite completely.
3430
3431 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
3432
3433         * match.c (gfc_match_name): Expanded comment.
3434
3435 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
3436
3437         * gfortran.texi (Old-style kind specifications): Document
3438         special handling of old-style kind specifiers for COMPLEX.
3439         * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
3440         assumptions for COMPLEX in comment.
3441
3442 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
3443
3444         PR 31050
3445         * gfortranspec.c (lang_specific_driver): Update program
3446         name and copyright date.
3447
3448 2007-03-03  Paul Thomas  <pault@gcc.gnu.org>
3449
3450         PR fortran/30882
3451         * check.c (dim_rank_check): The shape of subsections of
3452         assumed-size arrays is known.
3453
3454 2007-03-02  Paul Thomas  <pault@gcc.gnu.org>
3455             Tobias Burnus  <burnus@net-b.de>
3456
3457         PR fortran/30873
3458         * decl.c (gfc_match_entry): Remove erroneous entry result check.
3459
3460 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3461
3462         * Make-lang.in: Add install-pdf target as copied from
3463         automake v1.10 rules.
3464
3465 2007-03-01  Tobias Burnus  <burnus@net-b.de>
3466
3467         PR fortran/30865
3468         * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
3469
3470 2007-02-28  Tobias Burnus  <burnus@net-b.de>
3471             Paul Thomas  <pault@gcc.gnu.org>
3472
3473         PR fortran/30888
3474         PR fortran/30887
3475         * resolve.c (resolve_actual_arglist): Allow by-value
3476         arguments and non-default-kind for %VAL().
3477         * trans-expr.c (conv_arglist_function): Allow
3478         non-default-kind for %VAL().
3479
3480 2007-02-28  Tobias Burnus  <burnus@net-b.de>
3481
3482         PR fortran/30968
3483         * primary.c (next_string_char): Correct reading a character
3484         after the delimiter.
3485         (match_string_constant): Print warning message only once.
3486
3487 2007-02-27  Richard Guenther  <rguenther@suse.de>
3488
3489         * trans-array.c (structure_alloc_comps): Use correct type
3490         for null pointer constant.
3491
3492 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
3493
3494         * gfortran.texi: Standardize title page, remove version number
3495         from copyright page.
3496
3497 2007-02-26  Thomas Koenig  <Thomas.Koenig@online.de>
3498             Paul Thomas  <pault@gcc.gnu.org>
3499
3500         PR fortran/30865
3501         * trans-intrinsic.c (gfc_conv_intrinsic_size):
3502         If dim is an optional argument, check for its
3503         presence and call size0 or size1, respectively.
3504
3505 2007-02-23  Paul Thomas <pault@gcc.gnu.org>
3506
3507         PR fortran/30660
3508         * resolve.c (has_default_initializer): New function.
3509         (resolve_fl_variable): Call has_default_initializer to determine if
3510         the derived type has a default initializer to its ultimate
3511         components.
3512
3513
3514 2007-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3515
3516         * options.c (set_default_std_flags): New function to consolidate
3517         setting the flags.
3518         (gfc_init_options): Use new function.
3519         (gfc_handle_option): Use new function.
3520
3521 2007-02-22  Brooks Moses  <brooks.moses@codesourcery.com>
3522
3523         * gfortran.texi (Old-style kind specifications): Document
3524         special handling of old-style kind specifiers for COMPLEX.
3525         * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
3526         assumptions in comment.
3527
3528 2007-02-21  Bernhard Fischer  <aldot@gcc.gnu.org>
3529
3530         * parse.c (next_free): Gooble spaces after OpenMP sentinel.
3531
3532 2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>
3533
3534         PR fortran/30869
3535         * match.c (gfc_match_iterator): Remove conflict between
3536         loop variable and pointer.
3537
3538 2007-02-20  Tobias Burnus  <burnus@net-b.de>
3539
3540         PR fortran/30522
3541         * symbol.c (gfc_add_volatile): Allow to set VOLATILE
3542           attribute for host-associated variables.
3543         * gfortran.h (symbol_attribute): Save namespace
3544           where VOLATILE has been set.
3545         * trans-decl.c (gfc_finish_var_decl): Move variable
3546           declaration to the top.
3547
3548 2007-02-20  Tobias Burnus  <burnus@net-b.de>
3549
3550         PR fortran/30783
3551         * resolve.c (resolve_symbol): Add character dummy VALUE check.
3552
3553 2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
3554
3555         PR libfortran/30533
3556         * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
3557         argument to default integer.
3558         (gfc_resolve_minloc): Likewise.
3559
3560 2007-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3561
3562         PR fortran/30681
3563         * options.c (gfc_init_options): Relax warning level for obsolescent.
3564         * match.c (match_arithmetic_if): Change to obsolescent from deleted.
3565         (gfc_match_if): Same.
3566
3567 2007-02-18  Roger Sayle  <roger@eyesopen.com>
3568
3569         * trans-array.c (gfc_build_constant_array_constructor): When the
3570         shape of the constructor is known, use that to construct the
3571         gfc_array_spec.
3572         (gfc_trans_constant_array_constructor): Initialize the "info"
3573         information for all of the dimensions of the array constructor.
3574         (constant_array_constructor_loop_size): New function.
3575         (gfc_trans_array_constructor): Use it to determine whether a
3576         loop is suitable for "constant array constructor" optimization.
3577
3578         * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
3579         instead of build2, to avoid conditions like "(a != b) != 0".
3580
3581 2007-02-18  Roger Sayle  <roger@eyesopen.com>
3582             Paul Thomas <pault@gcc.gnu.org>
3583
3584         PR fortran/30400
3585         * match.c (match_forall_iterator): Use gfc_match_expr instead
3586         of gfc_match_variable to match the iterator variable.  Return
3587         MATCH_NO if not a variable.  Remove the reset of the symbol's
3588         flavor in cleanup.
3589
3590 2007-02-16  Tobias Burnus  <burnus@net-b.de>
3591
3592         PR fortran/30793
3593         * trans-decl.c (gfc_generate_function_code): Do not initialize
3594         pointers to derived components.
3595
3596 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
3597             Brooks Moses  <brooks.moses@codesourcery.com>
3598             Lee Millward  <lee.millward@codesourcery.com>
3599
3600         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
3601         (gfc_conv_string_tmp): Likewise.
3602         (gfc_conv_concat_op): Likewise.
3603         (gfc_build_compare_string): Likewise.
3604         (gfc_conv_function_call): Use build_call_list instead of build3.
3605
3606         * trans-array.c (gfc_trans_allocate_array_storage): Use
3607         build_call_expr.
3608         (gfc_grow_array): Likewise.
3609         (gfc_trans_array_ctor_element): Likewise.
3610         (gfc_trans_array_constructor_value): Likewise.
3611         (gfc_array_allocate): Likewise.
3612         (gfc_array_deallocate): Likewise.
3613         (gfc_trans_auto_array_allocation): Likewise.
3614         (gfc_trans_dummy_array_bias): Likewise.
3615         (gfc_conv_array_parameter): Likewise.
3616         (gfc_trans_dealloc_allocated): Likewise.
3617         (gfc_duplicate_allocatable): Likewise.
3618
3619         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3620         (gfc_trans_omp_flush): Likewise.
3621
3622         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3623         (gfc_trans_pause): Likewise.
3624         (gfc_trans_stop): Likewise.
3625         (gfc_trans_character_select): Likewise.
3626         (gfc_do_allocate): Likewise.
3627         (gfc_trans_assign_need_temp): Likewise.
3628         (gfc_trans_pointer_assign_need_temp): Likewise.
3629         (gfc_trans_forall_1): Likewise.
3630         (gfc_trans_where_2): Likewise.
3631         (gfc_trans_allocate): Likewise.
3632         (gfc_trans_deallocate): Likewise.
3633
3634         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3635
3636         * trans-io.c (gfc_trans_open): Use build_call_expr.
3637         (gfc_trans_close): Likewise.
3638         (build_filepos): Likewise.
3639         (gfc_trans_inquire): Likewise.
3640         (NML_FIRST_ARG): Delete.
3641         (NML_ADD_ARG): Delete.
3642         (transfer_namelist_element): Use build_call_expr.
3643         (build_dt): Likewise.
3644         (gfc_trans_dt_end): Likewise.
3645         (transfer_expr): Likewise.
3646         (transfer_array-desc): Likewise.
3647
3648         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3649         (gfc_generate_constructors): Likewise.
3650
3651         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3652         (gfc_conv_intrinsic_fdate): Likewise.
3653         (gfc_conv_intrinsic_ttynam): Likewise.
3654         (gfc_conv_intrinsic_array_transfer): Likewise.
3655         (gfc_conv_associated): Likewise.
3656         (gfc_conv_intrinsic_si_kind): Likewise.
3657         (gfc_conv_intrinsic_trim): Likewise.
3658         (gfc_conv_intrinsic_repeat: Likewise.
3659         (gfc_conv_intrinsic_iargc): Likewise.
3660
3661 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3662
3663         PR fortran/30779
3664         * scanner.c (gfc_next_char_literal): Add check for end of file after
3665         call to advance_line.
3666
3667 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
3668
3669         PR fortran/30799
3670         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3671         kind.
3672
3673 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
3674
3675         * misc.c (gfc_typename): Fix potential buffer overflow.
3676
3677 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
3678
3679         PR fortran/30554
3680         * module.c (read_module): Set pointer_info to referenced if the
3681         symbol has no namespace.
3682
3683 2007-02-12  Nick Clifton  <nickc@redhat.com>
3684
3685         * lang.opt: Add Warning attribute to warning options.
3686
3687 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
3688
3689         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3690         (SLEEP): Added section and documentation.
3691
3692 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
3693
3694         PR fortran/30478
3695         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3696         (variable_decl): Likewise.  Rewrap comment.
3697         (match_attr_spec): Remove ENUM specific code.
3698         (gfc_match_enum): Fix typo in error message.
3699         (enumerator_decl): New function.
3700         (gfc_match_enumerator_def): Use enumerator_decl instead of
3701         variable_decl.  Adapt code accordingly.
3702
3703 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
3704
3705         PR fortran/30554
3706         * module.c (find_symtree_for_symbol): New function to return
3707         a symtree that is not a "unique symtree" given a symbol.
3708         (read_module): Do not automatically set pointer_info to
3709         referenced because this inhibits the generation of a unique
3710         symtree.  Recycle the existing symtree if possible by calling
3711         find_symtree_for_symbol.
3712
3713         PR fortran/30319
3714         * decl.c (add_init_expr_to_sym): Make new charlen for an array
3715         constructor initializer.
3716
3717 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
3718
3719         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3720         and __emutls_register_common.
3721         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3722         * trans-common.c (build_common_decl): Don't check have_tls.
3723         * trans-decl.c (gfc_finish_var_decl): Likewise.
3724         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3725         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3726
3727 2007-02-09  Tobias Burnus  <burnus@net-b.de>
3728
3729         PR fortran/30512
3730         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3731           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3732
3733 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3734
3735         PR fortran/30720
3736         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3737         function argument. Always generate code for negative extent.
3738         Simplify said code.
3739         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3740         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3741         of gfc_trans_create_temp_array.
3742         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3743         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3744
3745 2007-02-08  Roger Sayle  <roger@eyesopen.com>
3746
3747         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3748         mask expression is a compile-time constant (".true." or ".false.").
3749
3750 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3751
3752         PR fortran/30611
3753         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3754         arguments only once. Generate check that NCOPIES argument is not
3755         negative.
3756
3757 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
3758
3759         PR fortran/30605
3760         * fortran/invoke.texi: Update documentation.
3761         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3762         and -pedantic.
3763
3764 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
3765
3766         * trans-array.c: Fix a comment typo.
3767
3768 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
3769
3770         PR fortran/30514
3771         * array.c (match_array_element_spec): If the length of an array is
3772         negative, adjust the upper limit to make it zero length.
3773
3774         PR fortran/30660
3775         * resolve.c (pure_function, resolve_function): Initialize name to
3776         null to clear up build warnings.
3777         (resolve_fl_variable): Look at components explicitly to check for
3778         default initializer, rather than using gfc_default_initializer.
3779
3780 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
3781
3782         PR fortran/30683
3783         * resolve.c (resolve_generic_f): Check for non-NULL sym.
3784
3785 2007-02-02  Roger Sayle  <roger@eyesopen.com>
3786
3787         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3788         NON_LVALUE_EXPR nodes and useless type conversions.
3789
3790 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
3791
3792         PR fortran/30284
3793         PR fortran/30626
3794         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3795         from function and make sure that substring lengths are
3796         translated.
3797         (is_aliased_array): Remove static attribute.
3798         * trans.c : Add prototypes for gfc_conv_aliased_arg and
3799         is_aliased_array.
3800         * trans-io.c (set_internal_unit): Add the post block to the
3801         arguments of the function.  Use is_aliased_array to check if
3802         temporary is needed; if so call gfc_conv_aliased_arg.
3803         (build_dt): Pass the post block to set_internal_unit and
3804         add to the block after all io activiy is done.
3805
3806 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3807
3808         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3809         a temporary array to pass a constant non-character array constructor.
3810         Generalize the descriptor generation code to handle scalarizer
3811         "info" without an array reference.
3812
3813 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3814
3815         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3816         dependency checking for array constructors.
3817
3818 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3819
3820         * trans-stmt.c (compute_overall_iter_number): Document function
3821         arguments.  Generalize "unconditional forall nest with constant
3822         bounds" optimization to eliminate unconditional inner loops with
3823         constant bounds.
3824
3825 2007-01-31  Tobias Burnus  <burnus@net-b.de>
3826
3827         PR fortran/30520
3828         * interface.c (compare_actual_formal): Check conformance between
3829           actual and VOLATILE dummy arguments.
3830         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3831           multiple times in different scopes.
3832         * decl.c (gfc_match_volatile): Search symbol in host association.
3833
3834 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
3835
3836         * simplify.c, trans-array.c: Fix comment typos.
3837
3838 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3839
3840         * invoke.texi (Code Gen Options): Fix abbreviation typo.
3841         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3842
3843 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
3844
3845         PR fortran/30432
3846         * trans-types.c (gfc_get_function_type): Do not add void_type_node
3847         to empty arg list.
3848         * trans-decl.c (create_function_arglist): Change assert.
3849
3850 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
3851
3852         PR fortran/30554
3853         * module.c (read_module): If a symbol is excluded by an ONLY
3854         clause, check to see if there is a symtree already loaded. If
3855         so, attach the symtree to the pointer_info.
3856
3857 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
3858
3859         PR libfortran/30389
3860         * gfortran.h: Remove gfc_simplify_init_1.
3861         * arith.h: Remove third argument from gfc_compare_string.
3862         * arith.c (gfc_compare_expression): Remove third argument
3863         from call to gfc_compare_string.
3864         (gfc_compare_string): Remove third argument xcoll_table.
3865         Remove use of xcoll_table.
3866         * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3867         * simplify.c (ascii_table): Remove.
3868         (xascii_table): Likewise.
3869         (gfc_simplify_achar): ICE if extract_int fails.  Remove use of
3870         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
3871         (gfc_simplify_char): ICE if extract_int fails. Error if
3872         value < 0 or value > 255.
3873         (gfc_simplify_iachar): Remove use of xascii_table.
3874         Char values outside of 0..255 are an ICE.
3875         (gfc_simplify_lge): Remove use of xascii_table.
3876         (gfc_simplify_lgt): Likewise.
3877         (gfc_simplify_lle): Likewise.
3878         (gfc_simplify_llt): Likewise.
3879         (invert_table): Remove.
3880         (gfc_simplify_init_1): Remove.
3881
3882 2007-01-27  Roger Sayle  <roger@eyesopen.com>
3883
3884         * trans-stmt.c (forall_info): Replace the next_nest and outer
3885         fields that previously implemented a doubly-linked list with a
3886         single prev_nest field (singly-linked list).
3887         (gfc_trans_nested_forall_loop): The nested_forall_info argument
3888         now denotes the innermost FORALL in the loop nest.
3889         (compute_overall_iter_number): Use prev_nest instead of next_nest.
3890         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3891         nested_forall_info linked list.  Free the current "info" when done.
3892
3893 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
3894
3895         PR fortran/30407
3896         * trans-expr.c (gfc_conv_operator_assign): New function.
3897         * trans.h : Add prototype for gfc_conv_operator_assign.
3898         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3899         a potential operator assignment subroutine.  If it is non-NULL
3900         call gfc_conv_operator_assign instead of the first assignment.
3901         ( gfc_trans_where_2): In the case of an operator assignment,
3902         extract the argument expressions from the code for the
3903         subroutine call and pass the symbol to gfc_trans_where_assign.
3904         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
3905         gfc_resolve_forall_body): Resolve the subroutine call for
3906         operator assignments.
3907
3908 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
3909             Steven G. Kargl <kargl@gcc.gnu.org>
3910
3911         PR fortran/30278
3912         * fortran/io.c (next_char): Deal with backslash escaped characters.
3913         Issue warnings in non -std=gnu cases.
3914         * fortran/primary.c (next_string_char): Issue warnings in non
3915
3916 2007-01-26  Tobias Burnus  <burnus@net-b.de>
3917
3918         * lang-specs.h: Add support for .f03 and .F03 extensions.
3919         * gfortran.texi: Document .f03 extension.
3920         * options.c (form_from_filename): Recognize .f03.
3921
3922 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3923
3924         PR fortran/30437
3925         * lang.opt (Wall): Remove RejectNegative.
3926         * options.c (gfc_handle_option): Wall can be disabled.
3927         (set_Wall): Add a parameter for disabling Wall.
3928         
3929 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3930
3931         PR fortran/30532
3932         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
3933         
3934 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
3935
3936         PR fortran/30481
3937         * match.c (gfc_match_namelist): Add check for assumed size character
3938         in namelist and provide error if found.
3939
3940 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
3941
3942         * intrinsic.texi (ACHAR): Added cross-references.
3943         (CHAR): Put cross-references in alphabetical order.
3944         (IACHAR): Added cross-references.
3945         (ICHAR): Added cross-references.
3946
3947 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
3948
3949         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
3950         (MAXVAL): Corrected description of result characteristics.
3951         (MINVAL): Same.
3952         (UMASK): Added documentation.
3953
3954 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
3955
3956         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
3957         parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
3958         in the massive whitespace patch.
3959
3960 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3961
3962         * module.c (mio_array_ref): The dimen_type fields of an array ref
3963         are an enumerated type and can't be read/written directly with a
3964         call to mio_integer.  Instead loop over and cast each element.
3965
3966 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3967
3968         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
3969         i.e. that the ARRAY_REF doesn't mention components.
3970         * trans-array.c (gfc_constant_array_constructor_p): Export external
3971         function renamed from constant_array_constructor_p.
3972         (gfc_build_constant_array_constructor): Export.
3973         (gfc_trans_array_constructor): Update call to the renamed function
3974         constant_array_constructor_p.
3975         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
3976         (gfc_build_constant_array_constructor): Likewise.
3977         * trans-expr.c (gfc_build_memcpy_call): New helper function split
3978         out from gfc_trans_array_copy.
3979         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
3980         (gfc_trans_array_constructor_copy): New function to optimize
3981         assigning an entire array from a constant array constructor.
3982         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
3983         when appropriate.
3984
3985 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3986
3987         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
3988         implementation for the SIGN intrinsic with integral operands.
3989         (gfc_conv_intrinsic_minmax): Fix whitespace.
3990
3991 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3992
3993         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
3994         * lang.opt: Add -fallow-leading-underscore.
3995         * match.c (gfc_match_name): Allow leading underscore in symbol
3996         name if -fallow-leading-underscore is used.
3997         * symbol.c (gfc_get_default_type): Add special case for symbol
3998         names beginning with an underscore.
3999         * trans-decl.c (gfc_get_extern_function_decl,
4000         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
4001         library symbols selected_int_kind, selected_real_kind and 
4002         all specifics.
4003         * options.c (gfc_init_options, gfc_handle_option): Handle the
4004         new -fallow-leading-underscore option.
4005
4006 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4007
4008         PR fortran/30446
4009         * options.c (gfc_handle_module_path_options): Path used in -J
4010         option is now added to the module search path.
4011
4012 2007-01-20  Richard Guenther  <rguenther@suse.de>
4013
4014         PR fortran/30223
4015         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
4016         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
4017         sincos builtins if the target has sincos.
4018
4019 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
4020
4021         * intrinsic.texi (MATMUL): Corrected a typo.
4022         (MAX): Separated @var arguments.
4023         (MIN): Separated @var arguments.
4024
4025 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
4026
4027         * intrinsic.texi: general whitespace cleanup.
4028         (menu): Added TIME8, removed UNMASK.
4029         (AINT): Clarified argument requirement.
4030         (ANINT): Clarified argument requirement.
4031         (CEILING): Clarified argument requirement.
4032         (CHAR): Clarified argument requirement.
4033         (CMPLX): Clarified argument requirement.
4034         (DCMPLX): Clarified argument requirement.
4035         (FGET): Line rewrapping.
4036         (FLOOR): Clarified argument requirement.
4037         (GMTIME): Added documentation.
4038         (IAND): Added cross-reference.
4039         (IBCLR): Added cross-reference.
4040         (IBSET): Added cross-reference.
4041         (IEOR): Added cross-reference.
4042         (INT): Collapsed examples, clarified argument requirement.
4043         (IOR): Added cross-references.
4044         (LEN_TRIM): Corrected result kind.
4045         (LINK): Added cross-reference.
4046         (LLT): Removed "documentation pending".
4047         (LOGICAL): Added documentation.
4048         (LSHIFT): Added documentation.
4049         (LTIME): Added documentation.
4050         (MATMUL): Added documentation.
4051         (MAX): Added documentation.
4052         (MAXLOC): Added documentation.
4053         (MAXVAL): Added documentation.
4054         (MERGE): Added documentation.
4055         (MIN): Added documentation.
4056         (MINLOC): Added documentation.
4057         (MINVAL): Added documentation.
4058         (MVBITS): Moved to correct place, added documentation.
4059         (NOT): Added documentation.
4060         (PERROR): Added documentation.
4061         (RAN): Moved to correct place, added documentation.
4062         (REAL): Clarified argument requirement.
4063         (RENAME): Added documentation.
4064         (RSHIFT): Clarified argument requirement.
4065         (SIGN): Corrected table specification.
4066         (SYMLNK): Added documentation.
4067         (SYSTEM): Added documentation.
4068         (TIME): Added documentation.
4069         (TIME8): Added section and documentation.
4070         (UNMASK): Removed erroneous section.
4071
4072 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
4073
4074         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
4075
4076 2007-01-18  Roger Sayle  <roger@eyesopen.com>
4077
4078         * trans-expr.c (copyable_array_p): Consider user derived types without
4079         allocatable components to be copyable.
4080
4081 2007-01-18  Roger Sayle  <roger@eyesopen.com>
4082
4083         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
4084         the number of interations in unconditional FORALL nests with constant
4085         bounds.
4086
4087 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4088             Tobias Burnus  <burnus@net-b.de>
4089
4090         PR libfortran/29649
4091         * gfortran.h (gfc_option_t): Add flag_dump_core.
4092         * lang.opt: Add -fdump-core option.
4093         * invoke.texi: Document the new options.
4094         * trans-decl.c (gfc_build_builtin_function_decls): Add new
4095           options to the call to set_std.
4096         * options.c (gfc_init_options, gfc_handle_option): Set the
4097           new options.
4098
4099 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
4100
4101         PR fortran/30476
4102         * module.c (load_generic_interfaces): Make the marking of the
4103         symbol as ambiguous conditional on the module names being
4104         different.
4105         (write_generic): Ensure that the generic interface has a
4106         non-NULL module field.
4107
4108 2007-01-16  Roger Sayle  <roger@eyesopen.com>
4109
4110         PR fortran/30404
4111         * trans-stmt.c (forall_info): Remove pmask field.
4112         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
4113         NVAR covers all the interation variables in the current forall_info.
4114         Add an extra OUTER parameter, which specified the loop header in
4115         which to place mask index initializations.
4116         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
4117         Change the semantics of MASK_FLAG to only control the mask in the
4118         innermost loop.
4119         (compute_overall_iter_number): Optimize the trivial case of a
4120         top-level loop having a constant number of iterations.  Update
4121         call to gfc_trans_nested_forall_loop.  Calculate the number of
4122         times the inner loop will be executed, not to size of the 
4123         iteration space.
4124         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
4125         sizeof(type) == 1.  Tidy up.
4126         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
4127         to gfc_trans_nested_forall_loop.
4128         (gfc_trans_pointer_assign_need_temp): Likewise.
4129         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
4130         LENVAR local variables.  Split mask allocation into a separate
4131         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
4132         to allocate the FORALL mask with the correct size.  Update calls
4133         to gfc_trans_nested_forall_loop.
4134         (gfc_evaluate_where_mask): Update call to
4135         gfc_trans_nested_forall_loop.
4136         (gfc_trans_where_2): Likewise.
4137
4138 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
4139
4140         PR fortran/28172
4141         * trans-stmt.c (gfc_trans_call): If it does not have one, get
4142         a backend_decl for an alternate return.
4143
4144         PR fortran/29389
4145         * resolve.c (pure_function): Statement functions are pure. Note
4146         that this will have to recurse to comply fully with F95.
4147
4148         PR fortran/29712
4149         * resolve.c (resolve_function): Only a reference to the final
4150         dimension of an assumed size array is an error in an inquiry
4151         function.
4152
4153         PR fortran/30283
4154         * resolve.c (resolve_function): Make sure that the function
4155         expression has a type.
4156
4157 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
4158
4159         PR fortran/30410
4160         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
4161         symbols must not have the module name prepended.
4162
4163 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
4164
4165         PR libfortran/30415
4166         * iresolve.c (gfc_resolve_maxloc): If the rank
4167         of the return array is nonzero and we process an
4168         integer array smaller than default kind, coerce
4169         the array to default integer.
4170         * iresolve.c (gfc_resolve_minloc): Likewise.
4171
4172 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
4173
4174         * simplify.c: Update copyright to 2007.
4175         * scanner.c: Same.
4176
4177 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4178
4179         PR fortran/30430
4180         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
4181         only once!
4182
4183 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
4184
4185         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
4186         (gfc_simplify_ibset): Same.
4187
4188 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
4189
4190         PR 30381
4191         PR 30420
4192         * simplify.c (convert_mpz_to_unsigned): New function.
4193         (convert_mpz_to_signed): New function, largely based on
4194         twos_complement().
4195         (twos_complement): Removed.
4196         (gfc_simplify_ibclr): Add conversions to and from an
4197         unsigned representation before bit-twiddling.
4198         (gfc_simplify_ibset): Same.
4199         (gfc_simplify_ishftc): Add checks for overly large
4200         constant arguments, only check the third argument if
4201         it's present, carry over high bits into the result as
4202         appropriate, and perform the final conversion back to
4203         a signed representation using the correct sign bit.
4204         (gfc_simplify_not): Removed unnecessary masking.
4205
4206 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
4207
4208         PR fortran/30408
4209         * resolve.c (resolve_code): Use the code->expr character length
4210         directly to set length of llen.
4211
4212 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4213
4214         PR fortran/30408
4215         * lang.opt: Add Wcharacter_truncation option.
4216         * options.c (gfc_init_options): Initialize
4217         gfc_option.warn_character_truncation to zero.
4218         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
4219
4220 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
4221
4222         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
4223         iresolve.c, match.c: Update Copyright years.  Whitespace.
4224
4225 2007-01-08  Richard Guenther  <rguenther@suse.de>
4226
4227         * trans-io.c (transfer_array_desc): Use build_int_cst instead
4228         of build_int_cstu.
4229
4230 2007-01-08  Roger Sayle  <roger@eyesopen.com>
4231
4232         * trans-array.c (constant_array_constructor_p): New function to
4233         determine whether an array constructor consists only of constant
4234         elements, and if so return it's size.
4235         (gfc_build_constant_array_constructor): Construct a statically
4236         initialized gfortran array for a given EXPR_ARRAY.
4237         (gfc_trans_constant_array_constructor): Efficiently scalarize
4238         a constant array constructor.
4239         (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
4240         Special case scalarization of constant array constructors, all of
4241         whose elements are specified, using constant_array_constructor_p 
4242         and gfc_trans_constant_array_constructor.
4243         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
4244         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
4245
4246 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
4247
4248         gfortran.texi: Fix typos.
4249
4250 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
4251
4252         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
4253         convert.c: Update Copyright dates.  Fix whitespace.
4254
4255 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
4256
4257         * data.c (gfc_assign_data_value): Fix whitespace.
4258
4259 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
4260
4261         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
4262         Commentary typo fix.
4263
4264 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
4265
4266         PR fortran/27698
4267         * match.c (gfc_match_name): Print diagnostics for invalid
4268         character in names.
4269
4270 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
4271
4272         * array.c: Fix whitespace in comment table.
4273
4274 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
4275
4276         * array.c, bbt.c, check.c: Update copyright years.  Whitespace.
4277
4278 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
4279
4280         * arith.c: Update copyright years.  Whitespace.
4281
4282 2007-01-05  Roger Sayle  <roger@eyesopen.com>
4283
4284         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
4285         array assignments split out from gfc_trans_assignment.
4286         (gfc_trans_array_copy): New function to implement array to array
4287         copies via calls to __builtin_memcpy.
4288         (copyable_array_p): New helper function to identify an array of
4289         simple/POD types, that may be copied/assigned using memcpy.
4290         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
4291         whole array assignments considered suitable by copyable_array_p.
4292         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
4293
4294 2007-01-05  Roger Sayle  <roger@eyesopen.com>
4295
4296         * trans-array.c (gfc_trans_array_constructor_value): Make the
4297         static const "data" array as TREE_READONLY.
4298         * trans-stmt.c (gfc_trans_character_select): Likewise.
4299
4300 2007-01-05  Roger Sayle  <roger@eyesopen.com>
4301
4302         * trans-array.c (gfc_conv_loop_setup): Test whether the loop
4303         stride is one, to avoid fold_build2 introducing a useless
4304         NON_LVALUE_EXPR node.
4305
4306 2007-01-05  Tobias Burnus  <burnus@net-b.de>
4307
4308         * symbol.c (check_conflict): Fix error message.
4309
4310 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
4311
4312         PR fortran/23232
4313         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
4314         functions to signal that a DATA statement is being matched.
4315         (gfc_match_data): Call gfc_set_in_match_data on entry and on
4316         exit.
4317         * gfortran.h : Add prototypes for above.
4318         * expr.c (check_init_expr): Avoid check on parameter or
4319         variable if gfc_in_match_data is true.
4320         (gfc_match_init_expr): Do not call error on non-reduction of
4321         expression if gfc_in_match_data is true.
4322
4323         PR fortran/27996
4324         PR fortran/27998
4325         * decl.c (gfc_set_constant_character_len): Add boolean arg to
4326         flag array constructor resolution.  Warn if string is being
4327         truncated.  Standard dependent error if string is padded. Set
4328         new arg to false for all three calls to
4329         gfc_set_constant_character_len.
4330         * match.h : Add boolean arg to prototype for
4331         gfc_set_constant_character_len.
4332         * gfortran.h : Add warn_character_truncation to gfc_options.
4333         * options.c (set_Wall): Set warn_character_truncation if -Wall
4334         is set.
4335         * resolve.c (resolve_code): Warn if rhs string in character
4336         assignment has to be truncated.
4337         * array.c (gfc_resolve_character_array_constructor): Set new
4338         argument to true for call to gfc_set_constant_character_len.
4339
4340 2007-01-05  Tobias Burnus  <burnus@net-b.de>
4341
4342         PR fortran/29624
4343         * interface.c (compare_parameter_intent): New function.
4344           (check_intents): Support pointer intents.
4345         * symbol.c (check_conflict): Support pointer intents,
4346           better conflict_std message.
4347         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
4348           Support pointer intents.
4349         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
4350           Support pointer intents.
4351
4352 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4353
4354         PR 30371
4355         * check.c (gfc_check_kill_sub): Add checks for non-scalar
4356         arguments.
4357
4358 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4359
4360         * intrinsic.texi: Minor cleanup, reflowing overlong
4361         paragraphs, and correcting whitespace.
4362
4363 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4364
4365         * intrinsic.texi (LBOUND): Add documentation.
4366         (LGE): Add documentation.
4367         (LGT): Add documentation.
4368         (LINK): Add documentation.
4369         (LLE): Add documentation.
4370         (LLT): Add documentation.
4371         (LNBLNK): Add documentation.
4372         (UBOUND): Add documentation.
4373         (UNLINK): Add documentation.
4374
4375 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4376
4377         * intrinsic.texi (IAND): Clarify argument specifications.
4378         (IBCLR): Add documentation.
4379         (IBITS): Add documentation.
4380         (IBSET): Add documentation.
4381         (IEOR): Add documentation.
4382         (IERRNO): Add documentation.
4383         (INDEX): Add documentation.
4384         (IOR): Add documentation.
4385         (ISHFT): Add documentation.
4386         (ISHFTC): Add documentation.
4387         (KILL): Add documentation.
4388         (LEN_TRIM): Add documentation.
4389
4390 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4391
4392         PR 30235
4393         * interface.c (compare_actual_formal): check for
4394         alternate returns when iterating over non-present
4395         arguments.
4396
4397 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4398
4399         * invoke.texi: Update manpage copyright to include 2007.
4400
4401 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
4402
4403         * gfortran.texi: Update copyright to include 2007.
4404         * intrinsic.texi: Update copyright to include 2007.
4405         * invoke.texi: Update copyright to include 2007.
4406
4407 2007-01-02  Tobias Burnus  <burnus@net-b.de>
4408             Jakub Jelinek  <jakub@redhat.com>
4409
4410         PR fortran/30276
4411         * scanner.c (open_included_file): Revert patch.
4412           (gfc_open_included_file): Support absolute pathnames.
4413           (gfc_open_intrinsic_module): Support absolute pathnames.
4414
4415 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4416
4417         * gfortran.texi (GNU Fortran and GCC): Rewrite
4418
4419 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4420
4421         * gfortran.texi (Introduction): Lower "Part I:
4422         Introduction" to a chapter, renumber Parts II and III to
4423         Parts I and II.
4424         * intrinsic.texi (Introduction): Rename to "Introduction
4425         to Intrinsics" to avoid conflict with the new chapter.
4426
4427 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4428
4429         * intrinsic.texi (Introduction): Rewrite first paragraph.
4430
4431 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4432
4433         * invoke.texi (OpenMP): Added index entry.
4434         * gfortran.texi (title page): Removed erroneous '*'.
4435
4436 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4437
4438         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
4439         to description.
4440         (Extensions): Miscellaneous minor rewriting and copyediting.
4441         (BOZ-literal constants): Renamed from Hexadecimal constants.
4442         (Hollerith constants support): Added explanation and 
4443         suggestions for standard-conforming modern equivalents.
4444
4445 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4446
4447         * intrinsic.texi: Improvements to index entries; change
4448         @findex entries to @cindex entries.
4449         * invoke.texi: Standardize and improve index entries.
4450         * gfortran.texi: Fix @code in one index entry.
4451
4452 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4453
4454         * invoke.texi: Change @code-type macros to appropriate
4455         variants (@command, @option, etc.)
4456         * gfortran.texi: Same.
4457
4458 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
4459
4460         * intrinsic.texi: Various minor cleanups.
4461
4462 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
4463
4464         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
4465         build_int_cst.
4466
4467 2007-01-02  Tobias Burnus  <burnus@net-b.de>
4468
4469         PR fortran/30276
4470         * scanner.c (open_included_file): Support full-path filenames.
4471
4472 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
4473
4474         PR fortran/20896
4475         * interface.c (check_sym_interfaces): Remove call to
4476         resolve_global_procedure.
4477         gfortran.h : Remove prototype for resolve_global_procedure.
4478         resolve.c (resolve_global_procedure): Add static attribute
4479         to function declaration.
4480
4481 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
4482
4483         * ChangeLog: Copy to ...
4484         * ChangeLog-2006: here.