OSDN Git Service

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