OSDN Git Service

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