OSDN Git Service

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