OSDN Git Service

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