OSDN Git Service

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