OSDN Git Service

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