OSDN Git Service

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