Check in tree-dce enh to trunk
[official-gcc.git] / gcc / fortran / ChangeLog-2007
blob8b92ad1aa3188f34d2a7fd3e2046b4fee574d790
1 2007-12-31  Paul Thomas  <pault@gcc.gnu.org>
3         PR fortran/34558
4         * interface.c (gfc_compare_types): Prevent linked lists from
5         putting this function into an endless recursive loop.
7 2007-12-26  Daniel Franke  <franke.daniel@gmail.com>
9         PR fortran/34532
10         * gfortran.texi: Fixed section about implicit conversion of
11         logical and integer variables.
13 2007-12-25  Tobias Burnus  <burnus@net-b.de>
15         PR fortran/34514
16         * decl.c (attr_decl1): Reject specifying the DIMENSION for
17         already initialized variable.
18         (do_parm): Reject PARAMETER for already initialized variable.
20 2007-12-25  Daniel Franke  <franke.daniel@gmail.com>
22         PR fortran/34533
23         * intrinsic.h (gfc_check_etime): Renamed to ...
24         (gfc_check_dtime_etime): ... this.
25         (gfc_check_etime_sub): Renamed to ...
26         (gfc_check_dtime_etime_sub): ... this.
27         (gfc_resolve_dtime_sub): New prototype.
28         * check.c (gfc_check_etime): Renamed to ...
29         (gfc_check_dtime_etime): ... this.
30         (gfc_check_etime_sub): Renamed to ...
31         (gfc_check_dtime_etime_sub): ... this.
32         * iresolve.c (gfc_resolve_dtime_sub): New implementation.
33         * intrinsic.c (add_functions): Removed alias from ETIME to DTIME,
34         added stand-alone intrinsic DTIME.
35         (add_subroutines): Adjusted check and resolve function names for
36         DTIME and ETIME.
37         * trans-intrinsic.c (gfc_conv_intrinsic_function): Added DTIME
38         to known functions in switch.
39         * intrinsic.texi (DTIME): Added paragraph about thread-safety,
40         fixed return value section.
41         (CPU_TIME): Clarified intent and added implementation notes.
43 2007-12-23  Tobias Burnus  <burnus@net-b.de>
45         PR fortran/34421
46         * resolve.c (resolve_entries): Add standard error for functions
47         returning characters with different length.
49 2007-12-23  Daniel Franke  <franke.daniel@gmail.com>
51         PR fortran/34536 
52         * matchexp.c (match_ext_mult_operand): Print warning for unary 
53         operators following arithmetic ones by default.
54         (match_ext_add_operand): Likewise.
56 2007-12-22  Daniel Franke  <franke.daniel@gmail.com>
58         PR fortran/34559
59         * simplify.c (gfc_simplify_repeat): Added safeguard for empty
60         string literals.
62 2007-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
64         PR fortran/34549
65         * check.c (gfc_check_cshift):  Add check that shift is
66         type INTEGER.
68 2007-12-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
70         PR fortran/34540
71         * iresolve.c (gfc_resolve_cshift): Take optional dim path
72         only if the argument is an optional itself.
73         * iresolve.c (gfc_resolve_eoshift): Same.
75 2007-12-21  Paul Thomas  <pault@gcc.gnu.org>
77         PR fortran/34438
78         * trans-decl.c (gfc_finish_var_decl): Do not mark derived types
79         with default initializers as TREE_STATIC unless they are in the
80         main program scope.
81         (gfc_get_symbol_decl): Pass derived types with a default
82         initializer to gfc_defer_symbol_init.
83         (init_default_dt): Apply default initializer to a derived type.
84         (init_intent_out_dt): Call init_default_dt.
85         (gfc_trans_deferred_vars): Ditto.
87         * module.c (read_module): Check sym->module is there before
88         using it in a string comparison.
90 >>>>>>> .r131138
91 2007-12-20  Tobias Burnus  <burnus@net-b.de>
93         PR fortran/34482
94         * gfortran.texi (BOZ): Document behavior for complex
95         numbers.
96         * target-memory.h (gfc_convert_boz): Update prototype.
97         * target-memory.c (gfc_convert_boz): Add error check
98         and convert BOZ to smallest possible bit size.
99         * resolve.c (resolve_ordinary_assign): Check return value.
100         * expr.c (gfc_check_assign): Ditto.
101         * simplify.c (simplify_cmplx, gfc_simplify_dble,
102         gfc_simplify_float, gfc_simplify_real): Ditto.
104 2007-12-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
106         PR fortran/34325
107         * match.h: New function declaration.
108         * match.c (gfc_match_parens): New function to look for mismatched
109         parenthesis. (gfc_match_if): Use new function to catch missing '('.
111 2007-12-19  Daniel Franke  <franke.daniel@gmail.com>
113         PR fortran/34495
114         * expr.c (check_init_expr): Check whether variables with flavor
115         FL_PARAMETER do have a value assigned. Added error messages where
116         appropriate.
117         * simplify.c (gfc_simplify_transfer): Added check if the MOLD
118         argument is a constant if working with initialization
119         expressions.
121 2007-12-17  Tobias Burnus  <burnus@net-b.de>
123         * intrinsic.c (add_functions): Undo change; mark float and
124         sngl as STD_F77.
125         * intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later.
126         * gfortran.texi (BOZ): Make note about FLOAT etc. clearer.
128 2007-12-16  Tobias Burnus  <burnus@net-b.de>
130         PR fortran/34495
131         * intrinsic.c (add_functions): Mark float and sngl as STD_GNU.
132         (gfc_intrinsic_func_interface): Reject REAL, DBLE and CMPLX
133         in initialization expressions for -std=f95.
135 2007-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
137         PR fortran/34305
138         * resolve.c (compare_bound):  If either of the types of
139         the arguments isn't INTEGER, return CMP_UNKNOWN.
141 2007-12-16  Tobias Burnus  <burnus@net-b.de>
143         PR fortran/34246
144         * trans-types.c (gfc_init_types): Change build_type_variant
145         to build_qualified_type.
146         (gfc_sym_type): Return gfc_character1_type_node for
147         character-returning bind(C) functions.
148         * trans-expr.c (gfc_conv_function_call): Do not set
149         se->string_length for character-returning bind(c) functions.
150         (gfc_trans_string_copy,gfc_trans_scalar_assign):
151         Support also single characters.
153 2007-12-16  Bernhard Fischer  <aldot@gcc.gnu.org>
155         * errors.c (gfc_notify_std): As originally stated but improperly
156         changed, disregard warnings_are_errors for deciding which buffer
157         to use for warnings.
159 2007-12-16  Paul Thomas  <pault@gcc.gnu.org>
161         PR fortran/31213
162         PR fortran/33888
163         PR fortran/33998
164         * trans-array.c (gfc_trans_array_constructor_value): If the
165         iterator variable does not have a backend_decl, use a local
166         temporary.
167         (get_elemental_fcn_charlen): New function to map the character
168         length of an elemental function onto its actual arglist.
169         (gfc_conv_expr_descriptor): Call the above so that the size of
170         the temporary can be evaluated.
171         * trans-expr.c : Include arith.h and change prototype of
172         gfc_apply_interface_mapping_to_expr to return void.  Change all
173         references to gfc_apply_interface_mapping_to_expr accordingly.
174         (gfc_free_interface_mapping): Free the 'expr' field.
175         (gfc_add_interface_mapping): Add an argument for the actual
176         argument expression. This is copied to the 'expr' field of the
177         mapping.  Only stabilize the backend_decl if the se is present.
178         Copy the character length expression and only add it's backend
179         declaration if se is present.  Return without working on the
180         backend declaration for the new symbol if se is not present.
181         (gfc_map_intrinsic_function) : To simplify intrinsics 'len',
182         'size', 'ubound' and 'lbound' and then to map the result.
183         (gfc_map_fcn_formal_to_actual): Performs the formal to actual
184         mapping for the case of a function found in a specification
185         expression in the interface being mapped.
186         (gfc_apply_interface_mapping_to_ref): Remove seen_result and
187         all its references. Remove the inline simplification of LEN
188         and call gfc_map_intrinsic_function instead.  Change the
189         order of mapping of the actual arguments and simplifying
190         intrinsic functions.  Finally, if a function maps to an
191         actual argument, call gfc_map_fcn_formal_to_actual.
192         (gfc_conv_function_call): Add 'e' to the call to
193         gfc_add_interface_mapping.
194         * dump-parse-tree.c (gfc_show_symbol_n): New function for
195         diagnostic purposes.
196         * gfortran.h : Add prototype for gfc_show_symbol_n.
197         * trans.h : Add 'expr' field to gfc_add_interface_mapping.
198         Add 'expr' to prototype for gfc_show_symbol_n.
199         * resolve.c (resolve_generic_f0): Set specific function as
200         referenced.
202 2007-12-14  Tobias Burnus  <burnus@net-b.de>
204         PR fortran/34438
205         * resolve.c (resolve_symbol): Do not emit public-variable-
206         of-private-derived-type error for non-module variables.
208 2007-12-14  Tobias Burnus  <burnus@net-b.de>
210         PR fortran/34398
211         * expr.c (gfc_check_assign): Add range checks for assignments of BOZs.
212         * resolve.c (resolve_ordinary_assign): Ditto.
213         * arith.c (gfc_range_check): Fix return value for complex numbers.
215 2007-12-14  Daniel Franke  <franke.daniel@gmail.com>
217         PR fortran/34324
218         * module.c (parse_atom): Fixed parsing of modules files whose
219         lines are terminated by CRLF.
221 2007-12-13  Anton Korobeynikov  <asl@math.spbu.ru>
223         * trans-decl.c (gfc_build_builtin_function_decls): Correct decl
224         construction for select_string() and internal_unpack()
226 2007-12-13  Duncan Sands  <baldrick@free.fr>
227             Anton Korobeynikov  <asl@math.spbu.ru>
229         * trans-expr.c (gfc_conv_structure): Make sure record constructors
230         for static variables are marked constant.
232 2007-12-12  Tobias Burnus  <burnus@net-b.de>
234         PR fortran/34254
235         * decl.c (match_char_kind): Support use-associated/imported
236         kind parameters.
237         (gfc_match_kind_spec): Support als BT_CHARACTER, when
238         re-scanning kind spec.
240 2007-12-11  Aldy Hernandez  <aldyh@redhat.com>
242         * decl.c (add_global_entry): Make type unsigned.
244 2007-12-11  Bernhard Fischer  <aldot@gcc.gnu.org>
246         * decl.c (match_prefix): Make seen_type a boolean.
247         (add_global_entry): Cache type distinction.
248         * trans-decl.c: Whitespace cleanup.
250 2007-12-10  Tobias Burnus  <burnus@net-b.de>
252         PR fortran/34425
253         * interface.c (get_expr_storage_size): Use signed integer when
254         obtaining the bounds.
256 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
258         PR fortran/22244
259         * trans.h (struct array_descr_info): Forward declaration.
260         (gfc_get_array_descr_info): New prototype.
261         (enum gfc_array_kind): New type.
262         (struct lang_type): Add akind field.
263         (GFC_TYPE_ARRAY_AKIND): Define.
264         * trans-types.c: Include dwarf2out.h.
265         (gfc_build_array_type): Add akind argument.  Adjust
266         gfc_get_array_type_bounds call.
267         (gfc_get_nodesc_array_type): Include proper debug info even for
268         assumed-size arrays.
269         (gfc_get_array_type_bounds): Add akind argument, set
270         GFC_TYPE_ARRAY_AKIND to it.
271         (gfc_sym_type, gfc_get_derived_type): Adjust gfc_build_array_type
272         callers.
273         (gfc_get_array_descr_info): New function.
274         * trans-array.c (gfc_trans_create_temp_array,
275         gfc_conv_expr_descriptor): Adjust gfc_get_array_type_bounds
276         callers.
277         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Likewise.
278         * trans-types.h (gfc_get_array_type_bounds): Adjust prototype.
279         * Make-lang.in (fortran/trans-types.o): Depend on dwarf2out.h.
280         * f95-lang.c (LANG_HOOKS_GET_ARRAY_DESCR_INFO): Define.
282 2007-12-09  Paul Thomas  <pault@gcc.gnu.org>
284         PR fortran/32129
285         * dump-parse-tree.c (gfc_show_expr_n): New function for
286         debugging.
287         * gfortran.h : Add prototype for gfc_show_expr_n.
288         * expr.c (simplify_constructor): Copy the constructor
289         expression and try to simplify that.  If success, replace the
290         original.  Otherwise discard the copy, keep going through
291         the structure and return success.
293         PR fortran/31487
294         * decl.c (build_struct): Pad out default initializers with
295         spaces to the component character length.
297 2007-12-08  Tobias Burnus  <burnus@net-b.de>
299         PR fortran/34342
300         PR fortran/34345
301         PR fortran/18026
302         PR fortran/29471
303         * gfortran.texi (BOZ literal constants): Improve documentation
304         and adapt for BOZ changes.
305         * Make-lang.ini (resolve.o): Add target-memory.h dependency.
306         * gfortran.h (gfc_expr): Add is_boz flag.
307         * expr.c: Include target-memory.h.
308         (gfc_check_assign): Support transferring BOZ for real/cmlx.
309         * resolve.c: Include target-memory.h
310         (resolve_ordinary_assign): Support transferring BOZ for real/cmlx.
311         * target-memory.c (gfc_convert_boz): New function.
312         * target-memory.c (gfc_convert_boz): Add prototype.
313         * primary.c (match_boz_constant): Set is_boz, enable F95 error
314         also without -pedantic, and allow for Fortran 2003 BOZ.
315         (match_real_constant): Fix comment.
316         * simplify.c (simplify_cmplx,gfc_simplify_dble,gfc_simplify_float,
317         gfc_simplify_real): Support Fortran 2003 BOZ.
319 2007-12-08  Jakub Jelinek  <jakub@redhat.com>
321         PR fortran/34359
322         * gfortran.h (gfc_file): Remove sibling and down fields.
323         * scanner.c (file_changes, file_changes_cur, file_changes_count,
324         file_changes_allocated): New variables.
325         (add_file_change, report_file_change): New functions.
326         (change_file): Remove.
327         (gfc_start_source_files, gfc_end_source_files): Call
328         report_file_change instead of change_file.
329         (gfc_advance_line): Call report_file_change instead of change_file,
330         call it even if lb->file == lb->next->file.
331         (get_file): Revert last changes.
332         (preprocessor_line): Call add_file_change when entering or leaving
333         a file.
334         (load_file): Likewise.  Set file_change[...].lb for all newly added
335         file changes.
337 2007-12-06  Tobias Burnus  <burnus@net-b.de>
339         PR fortran/34333
340         * primary.c (match_boz_constant): Add gfc_notify_std diagnostics.
342 2007-12-06  Paul Thomas  <pault@gcc.gnu.org>
344         PR fortran/34335
345         * module.c (find_symbol): Do not return symtrees with unique
346         names, which shows that they are private.
348 2007-12-05  Jakub Jelinek  <jakub@redhat.com>
350         PR debug/33739
351         * gfortran.h (gfc_file): Remove included_by field, add sibling and
352         down.
353         (gfc_start_source_files, gfc_end_source_files): New prototypes.
354         * parse.c (gfc_parse_file): Call gfc_start_source_files and
355         gfc_end_source_files instead of calling the debugging hooks directly.
356         * error.c (show_locus): Use up field instead of included_by.
357         * scanner.c (change_file, gfc_start_source_files,
358         gfc_end_source_files): New functions.
359         (gfc_advance_line): Call change_file instead of calling debug hooks
360         directly.
361         (get_file): Set up rather than included_by.  Initialize down and
362         sibling.
363         (preprocessor_line, load_file): Don't set up field here.
365 2007-12-05  Tobias Burnus  <burnus@net-b.de>
367         PR fortran/34333
368         * arith.h (gfc_compare_expr): Add operator argument, needed
369         for compare_real.
370         * arith.c (gfc_arith_init_1): Use mpfr_min instead of mpfr_cmp/set
371         to account for NaN.
372         (compare_real): New function, as mpfr_cmp but takes NaN into account.
373         (gfc_compare_expr): Use compare_real.
374         (compare_complex): Take NaN into account.
375         (gfc_arith_eq,gfc_arith_ne,gfc_arith_gt,gfc_arith_ge,gfc_arith_lt,
376         gfc_arith_le): Pass operator to gfc_compare_expr.
377         * resolve.c (compare_cases,resolve_select): Pass operator
378         to gfc_compare_expr.
379         * simplify.c (simplify_min_max): Take NaN into account.
381 2007-12-04  Tobias Burnus  <burnus@net-b.de>
383         PR fortran/34318
384         * module.c (mio_gmp_real): Properly write NaN and Infinity.
386 2007-12-02  Tobias Burnus  <burnus@net-b.de>
388         PR fortran/34186
389         * symbol.c (generate_isocbinding_symbol): Fix setting string length.
391 2007-11-30  Tobias Burnus  <burnus@net-b.de>
393         PR fortran/34133
394         * match.h: Add bool allow_binding_name to gfc_match_bind_c.
395         * decl.c (match_attr_spec,gfc_match_bind_c_stmt,gfc_match_entry):
396         Adjust accordingly.
397         (gfc_match_bind_c): Add allow_binding_name argument, reject
398         binding name for dummy arguments.
399         (gfc_match_suffix,gfc_match_subroutine): Make use of
400         allow_binding_name.
402 2007-11-30  Tobias Burnus  <burnus@net-b.de>
404         PR fortran/34186
405         * symbol.c (generate_isocbinding_symbol): Set string length.
406         * dump-parse-tree.c (gfc_show_attr): Show BIND(C) attribute.
407         * misc.c (gfc_basic_typename): Handle BT_VOID.
409 2007-11-29  Steven G. Kargl  <kargls@comcast.net>
411         PR fortran/34230
412         * fortran/arith.c (gfc_check_real_range): Set intermediate values
413         to +-Inf and 0 when -fno-range-check is in effect.
414         * fortran/invoke.texi: Improve -fno-range-check description.
416         PR fortran/34203
417         * fortran/invoke.texi: Document the C escaped characters activated
418         by -fbackslash.
420 2007-11-29  Tobias Burnus  <burnus@net-b.de>
422         PR fortran/34248
423         * trans-decl.c (generate_dependency_declarations): Check
424         for NULL pointers before accessing the string length.
426 2007-11-29  Tobias Burnus  <burnus@net-b.de>
428         PR fortran/34262
429         * intrinsic.c (gfc_get_intrinsic_sub_symbol): Add comment.
430         (gfc_intrinsic_sub_interface): Copy elemental state if needed.
431         * iresolve.c (gfc_resolve_mvbits): Mark procedure as elemental.
433 2007-11-28  Jakub Jelinek  <jakub@redhat.com>
435         * trans-expr.c (gfc_trans_string_copy): Convert both dest and
436         src to void *.
438         PR fortran/34247
439         * trans-openmp.c (gfc_omp_privatize_by_reference): For REFERENCE_TYPE
440         pass by reference only PARM_DECLs or non-artificial decls.
442 2007-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
444         PR fortran/32928
445         * decl.c (match_data_constant): Use gfc_match_init_expr to match the
446         array spec and set the initializer expression.
448 2007-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
450         PR fortran/34227
451         * match.c (gfc_match_common): Add additional check for BLOCK DATA.
453 2007-11-27  Paul Thomas  <pault@gcc.gnu.org>
455         PR fortran/29389
456         *resolve.c (resolve_ordinary_assign): Use find_sym_in_expr to
457         test if a temporary should be written for a vector subscript
458         on the lhs.
460         PR fortran/33850
461         * restore.c (pure_stmt_function): Add prototype and new
462         function. Calls impure_stmt_fcn.
463         (pure_function): Call it.
464         (impure_stmt_fcn): New function.
466         * expr.c (gfc_traverse_expr): Call *func for all expression
467         types, not just variables. Add traversal of character lengths,
468         iterators and component character lengths and arrayspecs.
469         (expr_set_symbols_referenced): Return false if not a variable.
470         * trans-stmt.c (forall_replace, forall_restore): Ditto.
471         * resolve.c (forall_index): Ditto.
472         (sym_in_expr): New function.
473         (find_sym_in_expr): Rewrite to traverse expression calling
474         sym_in_expr.
475         *trans-decl.c (expr_decls): New function.
476         (generate_expr_decls): Rewrite to traverse expression calling
477         expr_decls.
478         *match.c (check_stmt_fcn): New function.
479         (recursive_stmt_fcn): Rewrite to traverse expression calling
480         check_stmt_fcn.
482 2007-11-27  Paul Thomas  <pault@gcc.gnu.org>
484         PR fortran/33541
485         *interface.c (compare_actual_formal): Exclude assumed size
486         arrays from the possibility of scalar to array mapping.
487         * decl.c (get_proc_name): Fix whitespace problem.
489         PR fortran/34231
490         * gfortran.h : Add 'use_rename' bit to symbol_attribute.
491         * module.c : Add 'renamed' field to pointer_info.u.rsym.
492         (load_generic_interfaces): Add 'renamed' that is set after the
493         number_use_names is called.  This is used to set the attribute
494         use_rename, which, in its turn identifies those symbols that
495         have not been renamed.
496         (load_needed): If pointer_info.u.rsym->renamed is set, then
497         set the use_rename attribute of the symbol.
498         (read_module): Correct an erroneous use of use_flag. Use the
499         renamed flag and the use_rename attribute to determine which
500         symbols are not renamed.
502 2007-11-26  Steven G. Kargl  <kargls@comcast.net>
504         PR fortran/34203
505         * options.c:  Change default behavior of backslash processing.
506         * invoke.texi: Update documentation.
508 2007-11-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
510         PR fortran/33152
511         * decl.c (add_init_expr_to_sym): Remove error message.
512         * resolve.c (check_data_variable): Add new check for a data variable
513         that has an array spec, but no ref and issue an error.
514         * match.c (gfc_match_common): Remove error message.
516 2007-11-25  Tobias Burnus  <burnus@net-b.de>
518         PR fortran/34079
519         * trans-types.c (gfc_return_by_reference,
520         gfc_get_function_type): Do not return result of
521         character-returning bind(C) functions as argument.
522         * trans-expr.c (gfc_conv_function_call): Ditto.
524 2007-11-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
526         PR fortran/34175
527         * gfortran.texi: Document default forms assumed for various file
528         extensions.
530 2007-11-25  Paul Thomas  <pault@gcc.gnu.org>
532         PR fortran/33499
533         * decl.c (get_proc_name): If ENTRY statement occurs before type
534         specification, set the symbol untyped and ensure that it is in
535         the procedure namespace.
537 2007-11-24  Paul Thomas  <pault@gcc.gnu.org>
539         PR fortran/33541
540         * module.c (find_symtree_for_symbol): Move to new location.
541         (find_symbol): New function.
542         (load_generic_interfaces): Rework completely so that symtrees
543         have the local name and symbols have the use name.  Renamed
544         generic interfaces exclude the use of the interface without an
545         ONLY clause (11.3.2).
546         (read_module): Implement 11.3.2 in the same way as for generic
547         interfaces.
549 2007-11-23 Christopher D. Rickett <crickett@lanl.gov>
551         * trans-common.c (build_common_decl): Fix the alignment for
552         BIND(C) common blocks.
554 2007-11-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
556         PR fortran/34209
557         * iresolve.c (gfc_resolve_nearest): If sign variable kind does not match
558         kind of input variable, convert it to match.
560         PR fortran/33317
561         * trans.h: Modify prototype for gfc_conv_missing_dummy.
562         * trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind
563         parameter in.  Set the type of the dummy to the kind given.
564         (gfc_conv_function_call): Pass representation.length to
565         gfc_conv_missing_dummy.
566         * iresolve.c (gfc_resolve_cshift): Determine the correct kind to use and
567         if appropriate set representation.length to this kind value.
568         (gfc_resolve_eoshift): Likewise.
569         * check.c (gfc_check_cshift): Enable dim_check to allow DIM as an
570         optional argument. (gfc_check_eoshift): Likewise.
571         * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to
572         gfc_conv_missing_dummy.
574 2007-11-23  Tobias Burnus  <burnus@net-b.de>
576         PR fortran/34187
577         * module.c (load_needed): Ensure binding_label is not lost.
579         * decl.c (set_binding_label,gfc_match_bind_c): Replace
580         strncpy by strcpy.
582 2007-11-23  Tobias Burnus  <burnus@net-b.de>
583             Steven G. Kargl  <kargl@gcc.gnu.org>
585         PR fortran/34192
586         * simplify.c (gfc_simplify_nearest): Fix NEAREST for
587         subnormal numbers.
589 2007-11-23  Aldy Hernandez  <aldyh@redhat.com>
591         * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
592         memset.
593                 
594 2007-11-22  Tobias Burnus  <burnus@net-b.de>
596         * primary.c (gfc_match_structure_constructor): Allow
597         constructor for types without components.
599 2007-11-22  Tobias Burnus  <burnus@net-b.de>
601         PR fortran/34079
602         * trans-expr.c (gfc_conv_function_call): Do not append
603         string length arguments when calling bind(c) procedures.
604         * trans-decl.c (create_function_arglist): Do not append
605         string length arguments when declaring bind(c) procedures.
607 2007-11-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
609         PR fortran/34083
610         * resolve.c (resolve_structure_cons): Also check for zero rank.
612 2007-11-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
614         PR fortran/33317
615         * trans-expr.c (gfc_conv_missing_dummy): Revert.
616         * iresolve.c (gfc_resolve_cshift): Revert.
617         (gfc_resolve_eoshift): Likewise.
618         * check.c (gfc_check_cshift): Revert.
619         (gfc_check_eoshift): Likewise.
621 2007-11-19  Tobias Burnus  <burnus@net-b.de>
623         PR fortran/34079
624         * decl.c (gfc_match_entry): Support BIND(C).
625         (gfc_match_subroutine): Fix comment typo.
627 2007-11-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
629         PR fortran/33317
630         * trans-expr.c (gfc_conv_missing_dummy): Set the type of the dummy
631         argument to default integer if flagged to do so. Fix typo in comment.
632         * resolve.c (gfc_resolve_dim_arg): Whitespace cleanup.
633         * iresolve.c (gfc_resolve_cshift): Do not convert type, mark attribute
634         for converting the DIM type appropriately in trans-expr.c.
635         (gfc_resolve_eoshift): Likewise.
636         * check.c (dim_check): Remove pre-existing dead code.
637         (gfc_check_cshift): Enable dim_check to allow DIM as an optional.
638         (gfc_check_eoshift): Likewise.
639         * trans_intrinsic.c (gfc_conv_intrinsic_function_args): Fix whitespace.
641 2007-11-18  Paul Thomas  <pault@gcc.gnu.org>
643         PR fortran/31608
644         * trans-array.c (gfc_conv_expr_descriptor): Remove exception
645         for indirect references in the call to gfc_trans_scalar_assign.
646         * trans-expr.c (gfc_conv_string_parameter): Instead of asserting
647         that the expression is not an indirect reference, cast it to a
648         pointer type of the length given by se->string_length.
650 2007-11-18  Tobias Burnus  <burnus@net-b.de>
652         PR fortran/34137
653         * primary.c (match_variable): Reject non-result entry symbols.
654         * resolve.c (resolve_contained_fntype): Do not check entry master
655         functions.
657 2007-11-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
659         * trans-types.c (gfc_init_types): Use wider buffer.
661 2007-11-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
663         * trans-types.c (gfc_init_types): Use Fortran-90-style type
664         names, with kinds.
666 2007-11-17  Tobias Burnus  <burnus@net-b.de>
668         PR fortran/34133
669         * decl.c (gfc_match_suffix,gfc_match_subroutine): Disallow
670         bind(c) attribute for internal procedures.
672 2007-11-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
674         PR fortran/25252
675         * interface.c (gfc_current_interface_head,
676         gfc_set_current_interface_head): New functions.
677         * decl.c (gfc_match_modproc): Move check for syntax error earlier.
678         On syntax error, restore previous state of the interface.
679         * gfortran.h (gfc_current_interface_head,
680         gfc_set_current_interface_head): New prototypes.
682 2007-11-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
684         PR fortran/30285
685         * module.c (struct written_common, written_commons): New structure.
686         (compare_written_commons, free_written_common, write_common_0):
687         New functions.
688         (write_common): Call recursive function write_common_0.
690 2007-11-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
692         PR fortran/34108
693         * io.c (check_format_string): Only check character expressions.
694         (match_dt_format): Return MATCH_ERROR if that is what
695         gfc_match_st_label said.
697 2007-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
699         PR fortran/33957
700         * expr.c (check_inquiry): Don't call gfc_error now.
702 2007-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
704         PR fortran/33739
705         PR fortran/34084
706         * scanner.c (start_source_file, end_source_file,
707         exit_remaining_files, gfc_advance_line): Revert rev. 130016.
709 2007-11-16  Paul Thomas  <pault@gcc.gnu.org>
711         PR fortran/34008
712         * trans-stmt.c (gfc_conv_elemental_dependencies): Add check for
713         INTENT_INOUT as well as INTENT_OUT.
714         (gfc_trans_call): Remove redundant gcc_asserts in dependency
715         check.
717 2007-11-16  Paul Thomas  <pault@gcc.gnu.org>
719         PR fortran/33986
720         * trans-array.c (gfc_conv_array_parameter ): Allow allocatable
721         function results.
723 2007-11-15  Tobias Burnus  <burnus@net-b.de>
725         PR fortran/33917
726         * decl.c (match_procedure_decl): Pre-resolve interface.
727         * resolve.c (resolve_symbol): Reject interfaces later
728         declared in procedure statements.
730 2007-11-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
732         PR fortran/33162
733         * decl.c (match_procedure_decl): Remove TODO and allow intrinsics in
734         PROCEDURE declarations.  Set attr.untyped to allow the interface to be
735         resolved later where the symbol type will be set.
736         * interface.c (compare_intr_interfaces): Remove static from pointer
737         declarations.  Add type and kind checks for dummy function arguments.
738         (compare_actual_formal_intr): New function to compare an actual
739         argument with an intrinsic function. (gfc_procedures_use): Add check for
740         interface that points to an intrinsic function, use the new function.
741         * resolve.c (resolve_specific_f0): Resolve the intrinsic interface.
742         (resolve_specific_s0): Ditto.
744 2007-11-13  Paul Thomas  <pault@gcc.gnu.org>
746         PR fortran/34080
747         * iresolve.c (gfc_resolve_transfer): Do not try to convert
748         to a constant MOLD expression, if it is an assumed size
749         dummy.
751 2007-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
753         * trans-common.c: Remove prototype for gfc_get_common.
755 2007-11-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
757         PR fortran/33592
758         * trans.c (gfc_call_realloc): Fix the logic and rename variables.
760 2007-11-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
762         PR fortran/33739
763         * scanner.c (start_source_file, end_source_file,
764         exit_remaining_files): New functions.
765         (gfc_advance_line): Use the new functions.
767 2007-11-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
769         PR fortran/34028
770         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
772 2007-11-08  Tobias Burnus  <burnus@net-b.de>
774         PR fortran/33917
775         * interface.c (check_sym_interfaces): Disallow PROCEDURE-declared
776         procedures for MODULE PROCEDURE.
777         * decl.c (match_procedure_in_interface): Do not mark as procedure.
779 2007-11-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
781         PR fortran/33881
782         * trans-array.c (gfc_conv_array_parameter): Evaluate
783         se->string_length instead of the expr->ts.cl->backend_decl.
785 2007-11-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
787         * gfortran.h: Shorten comment.
788         * trans-types.c (gfc_get_function_type): Allow argument to have
789         flavor FL_PROGRAM.
790         * trans-decl.c (gfc_sym_mangled_function_id): Mangle main program
791         name into MAIN__.
792         (build_function_decl): Fix comment.
793         * parse.c (main_program_symbol): Give the main program its proper
794         name, if any. Set its flavor to FL_PROGRAM.
795         (gfc_parse_file): Likewise.
797 2007-11-02  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
799         * intrinsic.texi (ALLOCATED): Fix typo.
801 2007-10-31  Tobias Burnus  <burnus@net-b.de>
803         PR fortran/33941
804         * modules.c (intrinsics): Use only alphabetic names for
805         intrinsic operators.
807 2007-10-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
809         PR fortran/33162
810         * interface.c (compare_intr_interfaces): New function to check intrinsic
811         function arguments against formal arguments. (compare_interfaces): Fix
812         logic in comparison of function and subroutine attributes.
813         (compare_parameter): Use new function for intrinsic as argument.
814         * resolve.c (resolve_actual_arglist): Allow an intrinsic without
815         function attribute to be checked further.  Set function attribute if
816         intrinsic symbol is found, return FAILURE if not.
818 2007-10-31  Paul Thomas  <pault@gcc.gnu.org>
820         PR fortran/33897
821         * decl.c (gfc_match_entry): Do not make ENTRY name
822         global for contained procedures.
823         * parse.c (gfc_fixup_sibling_symbols): Fix code for
824         determining whether a procedure is external.
826 2007-10-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
828         PR fortran/33596
829         * trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
830         from the result of build_call_expr.
832 2007-10-29  Paul Thomas  <pault@gcc.gnu.org>
834         PR fortran/31217
835         PR fortran/33811
836         PR fortran/33686
838         * trans-array.c (gfc_conv_loop_setup): Send a complete type to
839         gfc_trans_create_temp_array if the temporary is character.
840         * trans-stmt.c (gfc_trans_assign_need_temp): Do likewise for
841         allocate_temp_for_forall_nest.
842         (forall_replace): New function.
843         (forall_replace_symtree): New function.
844         (forall_restore): New function.
845         (forall_restore_symtree): New function.
846         (forall_make_variable_temp): New function.
847         (check_forall_dependencies): New function.
848         (cleanup_forall_symtrees): New function.
849         gfc_trans_forall_1): Add and initialize pre and post blocks.
850         Call check_forall_dependencies to check for all dependencies
851         and either trigger second forall block to copy temporary or
852         copy lval, outside the forall construct and replace all
853         dependent references. After assignment clean-up and coalesce
854         the blocks at the end of the function.
855         * gfortran.h : Add prototypes for gfc_traverse_expr and
856         find_forall_index.
857         expr.c (gfc_traverse_expr): New function to traverse expression
858         and visit all subexpressions, under control of a logical flag,
859         a symbol and an integer pointer. The slave function is caller
860         defined and is only called on EXPR_VARIABLE.
861         (expr_set_symbols_referenced): Called by above to set symbols
862         referenced.
863         (gfc_expr_set_symbols_referenced): Rework of this function to
864         use two new functions above.
865         * resolve.c (find_forall_index): Rework with gfc_traverse_expr,
866         using forall_index.
867         (forall_index): New function used by previous.
868         * dependency.c (gfc_check_dependency): Use gfc_dep_resolver for
869         all references, not just REF_ARRAY.
870         (gfc_dep_resolver): Correct the logic for substrings so that
871         overlapping arrays are handled correctly.
873 2007-10-28  Tobias Schlüter  <tobi@gcc.gnu.org>
875         PR fortran/32147
876         * module.c (write_symbol): Fix whitespace.
877         (write_symbol0): Walk symtree from left-to-right instead
878         breadth-first.
879         (write_symbol1): Similarly change walk of pointer info tree.
880         (write_module): Insert linebreak.
881         * symbol.c (gfc_traverse_symtree): Change to left-to-right order.
882         (traverse_ns): Likewise.
884 2007-10-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
886         PR fortran/31306
887         * decl.c (char_len_param_value): Add check for conflicting attributes of
888         function argument.
890 2007-10-27  Tobias Burnus  <burnus@net-b.de>
892         PR fortran/33862
893         * lang-specs.h: Support .ftn and .FTN extension, use CPP for .FOR.
894         * options.c (form_from_filename): Support .ftn extension.
895         * gfortran.texi: Document support of .for and .ftn file extension.
897 2007-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
899         PR fortran/33162
900         * intrinsic.h: Add prototypes for four new functions, gfc_check_datan2,
901         gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd.
902         * intrinsic.c (add_functions): Add double precision checks for dabs,
903         dacos, dacosh, dasin, dasinh, datan, datanh, datan2, dbesj0, dbesj1,
904         dbesy0, dbesy1, dcos, dcosh, ddim, derf, derfc, dexp, dgamma,
905         dlgama, dlog, dlog10, dmod, dsign, dsin, dsinh, dsqrt, dtan, and dtanh.
906         Add real check dprod.
907         * check.c (gfc_check_datan2): New function to check for double precision
908         argumants. (gfc_check_dprod, gfc_check_fn_d, and gfc_check_x_yd): Ditto.
910 2007-10-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
912         * invoke.texi: Fix typo in -fmax-errors=.
914 2007-10-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
916         PR fortran/29784
917         * gfortran.texi: Document that there is no logical/integer
918         conversion performed during I/O operations.
920 2007-10-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
922         PR fortran/33849
923         * resolve.c (resolve_actual_arglist): Fix error message text.
925 2007-10-22  Steven G. Kargl  <kargl@gcc.gnu.org>
927         PR fortran/31244
928         * gfortran.h (gfc_data_value): Change repeat from unsigned int
929         to mpz_t.
930         * decl.c(top_val_list): Remove msg variable.  Use mpz_t for
931         repeat count.
932         * resolve.c (values):  Change left from unsigned int to mpz_t.
933         (next_data_value): Change for mpz_t.
934         (check_data_variable): Change ??? to FIXME in a comment.  Use
935         "mpz_t left".
936         (resolve_data ): Use "mpz_t left".
938 2007-10-21  Paul Thomas  <pault@gcc.gnu.org>
940         PR fortran/33749
941         * resolve.c (resolve_ordinary_assign): New function that takes
942         the code to resolve an assignment from resolve_code. In
943         addition, it makes a temporary of any vector index, on the
944         lhs, using gfc_get_parentheses.
945         (resolve_code): On EXEC_ASSIGN call the new function.
947 2007-10-20  Tobias Burnus  <burnus@net-b.de>
949         PR fortran/33818
950         * resolve.c (resolve_variable): Check that symbol is in the same
951         namespace as the entry function.
953 2007-10-20  Paul Thomas  <pault@gcc.gnu.org>
954             FX Coudert <fxcoudert@gcc.gnu.org>
956         PR fortran/31608
957         * trans-array.c (gfc_conv_expr_descriptor): For all except
958         indirect references, use gfc_trans_scalar_assign instead of
959         gfc_add_modify_expr.
960         * iresolve.c (check_charlen_present): Separate creation of cl
961         if necessary and add code to treat an EXPR_ARRAY.
962         (gfc_resolve_char_achar): New function.
963         (gfc_resolve_achar, gfc_resolve_char): Call it.
964         (gfc_resolve_transfer): If the MOLD expression does not have a
965         character length expression, get it from a constant length.
967 2007-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
969         PR fortran/33544
970         * simplify.c (gfc_simplify_transfer): Only warn for short transfer when
971         -Wsurprising is given.
972         * invoke.texi: Document revised behavior.
974 2007-10-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
976         PR fortran/33795
977         * gfortran.texi: Document GFORTRAN_UNBUFFERED_PRECONNECTED
978         environment variable.  Delete mention of environment variable
979         GFORTRAN_UNBUFFERED_n.
981 2007-10-18  Paul Thomas  <pault@gcc.gnu.org>
983         PR fortran/33233
984         * resolve.c (check_host_association): Check singly contained
985         namespaces and start search for symbol in current namespace.
987 2007-10-18  Paul Thomas  <pault@gcc.gnu.org>
988             Dominique d'Humieres  <dominiq@lps.ens.fr>
990         PR fortran/33733
991         * simplify.c (gfc_simplify_transfer): Return null if the source
992         expression is EXPR_FUNCTION.
994 2007-10-17 Christopher D. Rickett <crickett@lanl.gov>
996         PR fortran/33760
997         * symbol.c (gen_special_c_interop_ptr): Remove code to create
998         constructor for c_null_ptr and c_null_funptr with value of 0.
999         * expr.c (check_init_expr): Prevent check on constructors for
1000         iso_c_binding derived types.
1001         * resolve.c (resolve_structure_cons): Verify that the user isn't
1002         trying to invoke a structure constructor for one of the
1003         iso_c_binding derived types.
1005 2007-10-15 Christopher D. Rickett <crickett@lanl.gov>
1007         PR fortran/32600
1008         * trans-expr.c (gfc_conv_function_call): Generate code to inline
1009         c_associated.
1010         * symbol.c (get_iso_c_sym): Preserve from_intmod and intmod_sym_id
1011         attributes in the resolved symbol.
1012         * resolve.c (gfc_iso_c_sub_interface): Remove dead code.
1014 2007-10-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1016         PR fortran/33055
1017         * trans-io.c (create_dummy_iostat): New function to create a unique
1018         dummy variable expression to use with IOSTAT.
1019         (gfc_trans_inquire): Use the new function to pass unit number error info
1020         to run-time library if a regular IOSTAT variable was not given.
1022 2007-10-14  Tobias Burnus  <burnus@net-b.de>
1024         PR fortran/33745
1025         * trans-array.c (gfc_conv_ss_startstride): Fix dimension check.
1026         (gfc_trans_array_bound_check, gfc_conv_array_ref,
1027         gfc_conv_ss_startstride): Simplify error message.
1028         * resolve.c (check_dimension): Fix dimension-type switch;
1029         improve error message.
1031 2007-10-13  Tobias Schlüter  <tobi@gcc.gnu.org>
1032             Paul Thomas  <pault@gcc.gnu.org>
1034         PR fortran/33254
1035         PR fortran/33727
1036         * trans-array.c (get_array_ctor_var_strlen): Check upper bound for
1037         constness instead of lower bound.
1038         (get_array_ctor_strlen): Add bounds-checking code.
1040 2007-10-12  Paul Thomas  <pault@gcc.gnu.org>
1042         PR fortran/33542
1043         * resolve.c (resolve_actual_arglist): If the actual argument is
1044         ambiguous, then there is an error.
1046 2007-10-12  Paul Thomas  <pault@gcc.gnu.org>
1048         PR fortran/33664
1049         * expr.c (gfc_specification_expr): If a function is not
1050         external, intrinsic or pure is an error.  Set the symbol pure
1051         to prevent repeat errors.
1053 2007-10-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1055         PR fortran/33636
1056         * expr.c (find_array_section): Check for constructor constantness.
1058 2007-10-08  Tobias Schlüter  <tobi@gcc.gnu.org>
1060         PR fortran/33689
1061         * resolve.c (gfc_resolve_expr): Fix indentation.
1062         (resolve_fl_variable_derived): Rename argument.
1063         (resolve_fl_variable): Fix case in message.  Clarify logic.
1064         Correctly simplify array bounds.
1066 2007-10-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1068         PR libfortran/33683
1069         * mathbuiltins.def (GAMMA):  Change function name to
1070         "tgamma" instad of "gamma".
1072 2007-10-07  Tobias Schlüter  <tobi@gcc.gnu.org>
1074         PR fortran/20851
1075         * expr.c (check_inquiry): Typo fix in error message.
1076         (check_init_expr): Same * 3.
1077         (check_restricted): Verify that no dummy arguments appear in
1078         restricted expressions in ELEMENTAL procedures.
1079         * resolve.c (resolve_fl_variable): Exchange order of checks to
1080         avoid side-effect.
1082 2007-10-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1084         PR fortran/33609
1085         * simplify.c (range_check): Return gfc_bad_expr if incoming expression 
1086         is NULL.
1088 2007-10-06  Tobias Schlüter  <tobi@gcc.gnu.org>
1090         * simplify.c (gfc_simplify_size): Fix typo.
1092 2007-10-06  Tobias Schlüter  <tobi@gcc.gnu.org>
1094         PR fortran/25076
1095         * resolve.c (gfc_find_forall_index): Move towards top,
1096         renaming to ...
1097         (find_forall_index): ... this.  Add check for NULL expr.
1098         (resolve_forall_iterators): Verify additional constraint.
1099         (resolve_forall): Remove checks obsoleted by new code in
1100         resolve_forall_iterators.
1102 2007-10-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1104         * gfortran.h (gfc_get_data_variable, gfc_get_data_value,
1105         gfc_get_data): Move to decl.c.
1106         (global_used): Rename into gfc_global_used.
1107         (gfc_formalize_init_value, gfc_get_section_index,
1108         gfc_assign_data_value, gfc_assign_data_value_range,
1109         gfc_advance_section): Move to data.h.
1110         (gfc_set_in_match_data): Remove.
1111         * decl.c (gfc_get_data_variable, gfc_get_data_value,
1112         gfc_get_data): Move here.
1113         (gfc_set_in_match_data): Rename into set_in_match_data.
1114         (gfc_match_data): Likewise.
1115         (add_global_entry): Rename global_used into gfc_global_used.
1116         * data.c: Include data.h.
1117         * trans.h (gfc_todo_error): Remove.
1118         * trans-array.c (gfc_trans_array_constructor,
1119         gfc_conv_ss_startstride, gfc_conv_loop_setup): Change
1120         gfc_todo_error into assertions.
1121         * resolve.c (resolve_global_procedure): Rename global_used into
1122         gfc_global_used.
1123         * parse.c (gfc_global_used, parse_module, add_global_procedure,
1124         add_global_program): Likewise.
1125         * trans-intrinsic.c (gfc_walk_intrinsic_function): Rename
1126         global_used into gfc_global_used.
1127         * Make-lang.in: Add dependencies on fortran/data.h.
1128         * data.h: New file.
1130 2007-10-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1132         PR fortran/33529
1133         * decl.c (match_char_kind): New function.
1134         (match_char_spec): Use match_char_kind.
1136 2007-10-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1138         PR fortran/33502
1139         * scanner.c (gfc_advance_line): Call debug_hooks->end_source_file
1140         and debug_hooks->start_source_file when appropriate, and set
1141         dbg_emitted.
1142         (gfc_define_undef_line): New function.
1143         (load_file): Don't error out on #define and #undef lines.
1144         * parse.c (next_statement): Call gfc_define_undef_line.
1145         (gfc_parse_file): Call debug_hooks->start_source_file and
1146         debug_hooks->end_source_file for the main source file if
1147         required.
1148         * gfortran.h (gfc_linebuf): Add dbg_emitted field.
1149         (gfc_define_undef_line): New prototype.
1151 2007-10-04  Tobias Schlüter  <tobi@gcc.gnu.org>
1153         PR fortran/33626
1154         * resolve.c (resolve_operator): Always copy the type for
1155         expressions in parentheses.
1157 2007-10-04  Paul Thomas  <pault@gcc.gnu.org>
1159         PR fortran/33646
1160         PR fortran/33542
1161         * interface.c (check_interface1): Revert patch of 10-02.
1163 2007-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1165         PR fortran/26682
1166         * trans-decl.c (build_function_decl): Set "externally_visible"
1167         attribute on the MAIN program decl.
1169 2007-10-03  Tobias Schlüter  <tobi@gcc.gnu.org>
1171         PR fortran/33198
1172         * resolve.c (has_default_initializer): Move to top.  Make bool.
1173         (resolve_common_blocks): Simplify logic.  Add case for derived
1174         type initialization.
1175         (resolve_fl_variable_derived): Split out from ...
1176         (resolve_fl_variable): ... here, while adapting to new h_d_i
1177         interface.
1179 2007-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1181         PR fortran/26682
1182         * options.c (gfc_post_options): Issue an error when
1183         -fwhole-program is used.
1185 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
1187         PR fortran/33542
1188         * interface.c (check_interface1): Specific procedures are
1189         always ambiguous if they have the same name.
1191 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
1193         PR fortran/33566
1194         * primary.c (gfc_match_rvalue): Make all expressions with array
1195         references to structure parameters into variable expressions.
1197 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
1199         PR fortran/33554
1200         * trans-decl.c (init_intent_out_dt): New function.
1201         (gfc_trans_deferred_vars): Remove the code for default
1202         initialization of INTENT(OUT) derived types and put it
1203         in the new function.  Call it earlier than before, so
1204         that array offsets and lower bounds are available.
1206 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
1208         PR fortran/33550
1209         * decl.c (get_proc_name): Return rc if rc is non-zero; ie. if
1210         the name is a reference to an ambiguous symbol.
1212 2007-10-02  Paul Thomas  <pault@gcc.gnu.org>
1214         PR fortran/31154
1215         PR fortran/31229
1216         PR fortran/33334
1217         * decl.c : Declare gfc_function_kind_locs and
1218         gfc_function_type_locus.
1219         (gfc_match_kind_spec): Add second argument kind_expr_only.
1220         Store locus before trying to match the expression. If the
1221         current state corresponds to a function declaration and there
1222         is no match to the expression, read to the parenthesis, return
1223         kind = -1, dump the expression and return.
1224         (gfc_match_type_spec): Renamed from match_type_spec and all
1225         references changed.  If an interface or an external function,
1226         store the locus, set kind = -1 and return.  Otherwise, if kind
1227         is already = -1, use gfc_find_symbol to try to find a use
1228         associated or imported type.
1229         match.h : Prototype for gfc_match_type_spec.
1230         * parse.c (match_deferred_characteristics): New function.
1231         (parse_spec): If in a function, statement is USE or IMPORT
1232         or DERIVED_DECL and the function kind=-1, call
1233         match_deferred_characteristics.  If kind=-1 at the end of the
1234         specification expressions, this is an error.
1235         * parse.h : Declare external gfc_function_kind_locs and
1236         gfc_function_type_locus.
1238 2007-09-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1240         * module.c (mio_expr): Avoid -Wcast-qual warning.
1242 2007-09-27  Tobias Schlüter  <tobi@gcc.gnu.org>
1244         * arith.c (reduce_binary_aa): Fix capitalization.
1245         * check.c (gfc_check_dot_product): Likewise.
1246         (gfc_check_matmul): Likewise.
1247         * expr.c (gfc_check_conformance): Likewise.
1248         (gfc_check_assign): Likewise.
1249         (gfc_default_initializer): Simplify logic.
1250         * trans.c (gfc_msg_bounds): Make const.
1251         (gfc_msg_fault): Likewise.
1252         (gfc_msg_wrong_return): Likewise.
1253         * trans.h: Add const to corresponding extern declarations.
1255 2007-09-27  Paul Thomas  <pault@gcc.gnu.org>
1257         PR fortran/33568
1258         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the 
1259         possibility of the optional KIND argument by making arg
1260         an array, counting the number of arguments and using arg[0].
1262 2007-09-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1264         PR fortran/30780
1265         * invoke.texi: Add note to -ffpe-trap option. Fix typos.
1267 2007-09-23  Tobias Schlüter  <tobi@gcc.gnu.org>
1269         PR fortran/33269
1270         * io.c (check_format_string): Move NULL and constant checks into
1271         this function.
1272         (check_io_constraints): Call gfc_simplify_expr() before calling
1273         check_format_string().  Remove NULL and constant checks.
1275 2007-09-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1277         PR fortran/33538
1278         * scanner.c, parse.c, gfortran.h: Revert revision 128671.
1280 2007-09-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1282         PR fortran/33528
1283         * scanner.c (preprocessor_line): Call linemap_add when exiting
1284         a file.
1285         (gfc_new_file): Adjust debug code for USE_MAPPED_LOCATION.
1287 2007-09-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1289         PR fortran/33522
1290         * trans-types.c (gfc_get_desc_dim_type): Mark artificial
1291         variables with TREE_NO_WARNING.
1292         (gfc_get_array_descriptor_base): Likewise.
1294 2007-09-22  Paul Thomas  <pault@gcc.gnu.org>
1296         PR fortran/33337
1297         PR fortran/33376
1298         * trans-decl.c (gfc_create_module_variable): Output
1299         derived type parameters.
1300         * arith.c (gfc_parentheses): Return the argument if
1301         it is a constant expression.
1302         * primary.c (gfc_match_rvalue): Remove the clearing of
1303         the module name and the use_assoc attribute for derived
1304         type parameter expressions.
1306 2007-09-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1308         PR fortran/33502
1309         * scanner.c (gfc_advance_line): Call debug_hooks->start_source_file
1310         and debug_hooks->end_source_file when entering and exiting
1311         included files.
1312         (gfc_define_undef_line): New function.
1313         (load_file): Ignore #define and #undef preprocessor lines
1314         while reading source files.
1315         * parse.c (next_statement): Handle #define and #undef
1316         preprocessor lines.
1317         (gfc_parse_file): Call debug_hooks->start_source_file and
1318         debug_hooks->end_source_file for the main source file if
1319         requested by the debug format.
1320         * gfortran.h (gfc_define_undef_line): Add prototype.
1322 2007-09-22  Tobias Burnus  <burnus@net-b.de>
1324         PR fortran/33445
1325         * scanner.c (skip_free_comments): Warn if !$OMP& is used
1326         if no OpenMP directive is to be continued.
1328 2007-09-21  Paul Thomas  <pault@gcc.gnu.org>
1330         *trans-expr.c (gfc_trans_pointer_assignment): Convert array
1331         descriptor for subref pointer assignements, rather than using
1332         the loop info version.
1334 2007-09-21  Tobias Burnus  <burnus@net-b.de>
1336         PR fortran/33037
1337         * simplify.c (gfc_simplify_transfer): Warn if source size
1338         is smaller than result size.
1340 2007-09-20  Asher Langton  <langton2@llnl.gov>
1342         PR fortran/20441
1343         * gfortran.h : Add init_local_* enums and init_flag_* flags to
1344         gfc_option_t.
1345         * lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
1346         -finit-character, and -finit-logical flags.
1347         * invoke.texi: Document new options.
1348         * resolve.c (build_init_assign): New function.
1349         (apply_init_assign): Move part of function into build_init_assign.
1350         (build_default_init_expr): Build local initializer (-finit-*).
1351         (apply_default_init_local): Apply local initializer (-finit-*).
1352         (resolve_fl_variable): Try to add local initializer (-finit-*).
1353         * options.c (gfc_init_options, gfc_handle_option,
1354         gfc_post_options): Handle -finit-local-zero, -finit-real,
1355         -finit-integer, -finit-character, and -finit-logical flags.
1357 2007-09-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1359         PR fortran/33221
1360         * gfortran.h (symbol_attribute): Add zero_comp field.
1361         * symbol.c (gfc_use_derived): Handle case of emtpy derived types.
1362         * decl.c (gfc_match_data_decl): Likewise.
1363         (gfc_match_derived_decl): Likewise.
1364         * module.c (ab_attribute, attr_bits): Add AB_ZERO_COMP member.
1365         (mio_symbol_attribute): Write and read AB_ZERO_COMP.
1366         * resolve.c (resolve_symbol): Handle case of emtpy derived types.
1367         * parse.c (parse_derived): Likewise.
1369 2007-09-20  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1371         PR fortran/33288
1372         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
1373         reduce_binary_aa): Call ourselves recursively if an element of
1374         the constructor is itself a constant array.
1376 2007-09-20  Tobias Schlüter  <tobi@gcc.gnu.org>
1378         * io.c (resolve_tag_format): New function using code split out
1379         and simplified from ...
1380         (resolve_tag): ... this function.  Simplify logic.  Unify
1381         IOSTAT, IOLENGTH and SIZE handling.
1383 2007-09-20  Christopher D. Rickett  <crickett@lanl.gov>
1385         PR fortran/33497
1386         * resolve.c (gfc_iso_c_func_interface): Use information from
1387         subcomponent if applicable.
1389 2007-09-20  Tobias Burnus  <burnus@net-b.de>
1391         PR fortran/33325
1392         * intrinsic.text: Add documentation of the intrinsic modules.
1393         * gfortran.texi: Link to intrinsic-modules section and to
1394         the GOMP manual.
1396 2007-09-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1398         PR fortran/31119
1399         * trans-array.c (gfc_conv_ss_startstride): Only perform bounds
1400         checking for optional args when they are present.
1402 2007-09-18  Tobias Burnus  <burnus@net-b.de>
1404         PR fortran/33231
1405         * resolve.c (resolve_elemental_actual): Check for conformance
1406         of intent out/inout dummies.
1408 2007-09-17  Tobias Burnus  <burnus@net-b.de>
1410         PR fortran/33106
1411         * resolve.c (resolve_symbol): Reject public variable of
1412         private derived-types for Fortran 95.
1414 2007-09-17  Tobias Burnus  <burnus@net-b.de>
1416         * resolve.c (resolve_fl_procedure): Allow private dummies
1417         for Fortran 2003.
1419 2007-09-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1421         * trans-types.c (gfc_get_desc_dim_type): Do not to try
1422         emit debug info.
1423         (gfc_get_array_descriptor_base): Likewise.
1424         (gfc_get_mixed_entry_union): Likewise
1425         (gfc_get_derived_type): Set decl location for fields and
1426         derived type itself.
1428 2007-09-16  Paul Thomas  <pault@gcc.gnu.org>
1430         PR fortran/29396
1431         PR fortran/29606
1432         PR fortran/30625
1433         PR fortran/30871
1434         * trans.h : Add extra argument to gfc_build_array_ref. Rename
1435         gfc_conv_aliased_arg to gfc_conv_subref_array_arg.  Move
1436         prototype of is_aliased_array to gfortran.h and rename it
1437         gfc_is_subref_array.  Add field span to lang_decl, add a new
1438         decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
1439         and a new type flag GFC_DECL_SUBREF_ARRAY_P.
1440         * trans.c (gfc_build_array_ref): Add the new argument, decl.
1441         If this is a subreference array pointer, use the lang_decl
1442         field 'span' to calculate the offset in bytes and use pointer
1443         arithmetic to address the element.
1444         * trans-array.c (gfc_conv_scalarized_array_ref,
1445         gfc_conv_array_ref): Add the backend declaration as the third
1446         field, if it is likely to be a subreference array pointer.
1447         (gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
1448         gfc_trans_array_constructor_element, structure_alloc_comps,
1449         gfc_conv_array_index_offset): For all other references to
1450         gfc_build_array_ref, set the third argument to NULL.
1451         (gfc_get_dataptr_offset): New function.
1452         (gfc_conv_expr_descriptor): If the rhs of a pointer assignment
1453         is a subreference array, then calculate the offset to the
1454         subreference of the first element and set the descriptor data
1455         pointer to this, using gfc_get_dataptr_offset.
1456         trans-expr.c (gfc_get_expr_charlen): Use the expression for the
1457         character length for a character subreference.
1458         (gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
1459         third argument in call to gfc_build_array_ref.
1460         (gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
1461         (is_aliased_array): Remove.
1462         (gfc_conv_function_call): Change reference to is_aliased_array
1463         to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
1464         gfc_conv_subref_array_arg.
1465         (gfc_trans_pointer_assignment): Add the array element length to
1466         the lang_decl 'span' field.
1467         * gfortran.h : Add subref_array_pointer to symbol_attribute and
1468         add the prototype for gfc_is_subref_array.
1469         * trans-stmt.c : Add NULL for third argument in all references
1470         to gfc_build_array_ref.
1471         * expr.c (gfc_is_subref_array): Renamed is_aliased_array.
1472         If this is a subreference array pointer, return true.
1473         (gfc_check_pointer_assign): If the rhs is a subreference array,
1474         set the lhs subreference_array_pointer attribute.
1475         * trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
1476         field if the symbol is a subreference array pointer and set an
1477         initial value of zero for the 'span' field.
1478         * trans-io.c (set_internal_unit): Refer to is_subref_array and
1479         gfc_conv_subref_array_arg.
1480         (nml_get_addr_expr): Add NULL third argument to
1481         gfc_build_array_ref. 
1482         (gfc_trans_transfer): Use the scalarizer for a subreference
1483         array.
1485 2007-09-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
1487         * iresolve.c (resolve_mask_arg): If a mask is an array
1488         expression, convert it to kind=1.
1490 2007-09-13  Tobias Burnus  <burnus@net-b.de>
1492         PR fortran/33343
1493         * expr.c (gfc_check_conformance): Print ranks in the error message.
1494         * resolve.c (resolve_elemental_actual): Check also conformance of
1495         the actual arguments for elemental functions.
1497 2007-09-13  Tobias Burnus  <burnus@net-b.de>
1499         * symbol.c (gfc_add_elemental,gfc_add_pure,gfc_add_recursive):
1500         Allow prefixes only to be specified once.
1502 2007-09-13  Tobias Burnus  <burnus@net-b.de>
1504         PR fortran/33412
1505         * symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).
1507 2007-09-12  Tobias Burnus  <burnus@net-b.de>
1509         PR fortran/33297
1510         * check.c (scalar_check): Move up in the file.
1511         (kind_check): Call scalar_check.
1512         (dim_check): If optional, do not call nonoptional_check; use
1513         bool for optional.
1514         (gfc_check_all_any,gfc_check_count,gfc_check_cshift,gfc_check_eoshift,
1515         gfc_check_lbound,gfc_check_minloc_maxloc,check_reduction,
1516         gfc_check_spread,gfc_check_ubound): Use true/false instead of 0/1
1517         for dim_check; honor changed meaning of optional.
1518         (gfc_check_int): Replace checks by kind_check.
1519         (gfc_check_size): Replace checks by dim_check.
1521 2007-09-12  Tobias Burnus  <burnus@net-b.de>
1523         PR fortran/33284
1524         PR fortran/33310
1525         * symbol.c (check_conflict): Add conflict between INTRINSIC and ENTRY
1526         and between BIND(C) and PARAMETER.
1528 2007-09-12  Tobias Burnus  <burnus@net-b.de>
1530         * trans-expr.c (gfc_conv_initializer): Fix expr == NULL check.
1532 2007-09-12  Jan Hubicka  <jh@suse.cz>
1534         * f95-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1536 2007-09-12  Christopher D. Rickett  <crickett@lanl.gov>
1538         PR fortran/33395
1539         * trans-expr.c (gfc_conv_initializer): Remove unnecessary test for
1540         intmod_sym_id and use derived symbol to set new kind of C_NULL_PTR
1541         and C_NULL_FUNPTR expressions.
1543 2007-09-11  Christopher D. Rickett  <crickett@lanl.gov>
1545         PR fortran/33040
1546         * trans-expr.c (gfc_trans_structure_assign): Convert component
1547         C_NULL_PTR and C_NULL_FUNPTR component initializers to (void *).
1548         * trans-types.c (gfc_get_derived_type): Create a backend_decl for
1549         the c_address field of C_PTR and C_FUNPTR and ensure initializer
1550         is of proper type/kind for (void *).
1552 2007-09-11  Jan Hubicka <jh@suse.cz>
1554         * f95-lang.c (gfc_expand_function): Kill.
1555         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1557 2007-09-08  Tobias Burnus  <burnus@net-b.de>
1559         PR fortran/31547
1560         * gfortran.texi: Document when CPP is called.
1562         * intrinsic.texi (IOR): Fix typos.
1564 2007-09-10  Paul Thomas  <pault@gcc.gnu.org>
1566         PR fortran/33370
1567         * trans-expr.c (copyable_array_p):  Add tests that expression
1568         is a variable, that it has no subreferences and that it is a
1569         full array.
1570         (gfc_trans_assignment): Change conditions to suit modifications
1571         to copyable_array_p.
1573 2007-09-06  Tom Tromey  <tromey@redhat.com>
1575         * scanner.c (get_file): Update.
1576         (load_file): Update.
1577         (gfc_next_char_literal): Use gfc_linebuf_linenum.
1578         * f95-lang.c (gfc_init): Update.
1579         * gfortran.h (gfc_linebuf_linenum): New macro.
1581 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1583         * trans-decl.c (build_entry_thunks): Use set_cfun.
1584         (gfc_generate_function_code): Likewise.
1586 2007-09-05  Paul Thomas  <pault@gcc.gnu.org>
1588         PR fortran/31564
1589         * primary.c (gfc_match_rvalue): Make expressions that refer
1590         to derived type parameters that have array references into
1591         variable expressions.  Remove references to use association
1592         from the symbol.
1594         PR fortran/33241
1595         * decl.c (add_init_expr_to_sym): Provide assumed character
1596         length parameters with the length of the initialization
1597         expression, if a constant, or that of the first element of
1598         an array.
1600 2007-09-04  Janus Weil  <jaydub66@gmail.com>
1601             Paul Thomas  <pault@gcc.gnu.org>
1603         * decl.c (match_procedure_decl,match_procedure_in_interface,
1604         gfc_match_procedure): Handle PROCEDURE statements.
1605         * gfortran.h (struct gfc_symbol): New member "gfc_symbol *interface".
1606         (enum gfc_statement): New element "ST_PROCEDURE".
1607         (strcut symbol_attribute): New member "unsigned procedure".
1608         * interface.c (check_interface0): Extended error checking.
1609         * match.h: Add gfc_match_procedure prototype.
1610         * parse.c (decode_statement,next_statement,gfc_ascii_statement,
1611         parse_derived,parse_interface): Implement PROCEDURE statements.
1612         * resolve.c (resolve_symbol): Ditto.
1613         * symbol.c (check_conflict): Ditto.
1614         (gfc_add_proc): New function for setting the procedure attribute.
1615         (copy_formal_args): New function for copying formal argument lists.
1617 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1619         * Make-lang.in (gfortranspec.o): Remove SHLIB_MULTILIB.
1621 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1623         * gfortranspec.c (lang_specific_driver): Use CONST_CAST2.
1624         * options.c (gfc_post_options): Supply a TYPE for CONST_CAST.
1625         * parse.c (parse_omp_structured_block): Likewise,
1626         * st.c (gfc_free_statement): Likewise,
1628 2007-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1630         PR fortran/31675
1631         * libgfortran.h: New file.
1632         * iso-fortran-env.def: Use macros in the new header instead of
1633         hardcoded integer constants.
1634         * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1635         fortran/libgfortran.h.
1636         * gfortran.h (GFC_STD_*, GFC_FPE_*, options_convert,
1637         ioerror_codes): Remove.
1638         * trans.c (ERROR_ALLOCATION): Remove.
1639         (gfc_call_malloc, gfc_allocate_with_status,
1640         gfc_allocate_array_with_status): Use LIBERROR_ALLOCATION.
1641         * trans-types.h (GFC_DTYPE_*): Remove.
1642         * trans-decl.c (gfc_generate_function_code): Use
1643         GFC_CONVERT_NATIVE instead of CONVERT_NATIVE.
1644         * trans-io.c (set_parameter_value, set_parameter_ref): Use
1645         LIBERROR_* macros instead of IOERROR_ macros.
1646         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use
1647         LIBERROR_END and LIBERROR_EOR instead of hardcoded constants.
1648         * options.c (gfc_init_options): Use GFC_CONVERT_NATIVE instead of
1649         CONVERT_NATIVE.
1650         (gfc_handle_option): Use GFC_CONVERT_* macros instead of CONVERT_*.
1652 2007-09-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1654         * invoke.texi: Fix the -frange-checking option entry.
1656 2007-09-02  Roger Sayle  <roger@eyesopen.com>
1658         * decl.c (match_string_p): New helper function to explicitly match
1659         a string of characters.
1660         (match_attr_spec): Remove no longer needed DECL_COLON from decl_types.
1661         Delete decls array and peek_char.  Rewrite decl attribute parser to
1662         avoid calling gfc_match_strings.
1663         * match.c (gfc_match_strings): Delete unused function.
1664         * match.h (gfc_match_strings): Delete prototype.
1666 2007-09-02  Tobias Schlüuter  <tobi@gcc.gnu.org>
1668         * dump-parse-tree.c (show_char_const): New function.
1669         (gfc_show_expr): Use it.
1670         * expr.c (find_substring_ref): Rework to not keep characters
1671         dangling beyond end of string.
1673 2007-09-02  H.J. Lu  <hongjiu.lu@intel.com>
1675         PR fortran/33276
1676         * array.c (expand_iterator): Initialize frame.prev.
1678 2007-08-31  Tobias Burnus  <burnus@net-b.de>
1680         PR fortran/33232
1681         * io.c (match_io): Also diagnose extra comma for READ.
1683 2007-08-31  Joseph Myers  <joseph@codesourcery.com>
1685         * intrinsic.texi (LGAMMA): Remove empty @cindex line.
1687 2007-08-31  Paul Thomas  <pault@gcc.gnu.org>
1689         PR fortran/31879
1690         PR fortran/31197
1691         PR fortran/31258
1692         PR fortran/32703
1693         * gfortran.h : Add prototype for gfc_resolve_substring_charlen.
1694         * resolve.c (gfc_resolve_substring_charlen): New function.
1695         (resolve_ref): Call gfc_resolve_substring_charlen.
1696         (gfc_resolve_character_operator): New function.
1697         (gfc_resolve_expr): Call the new functions in cases where the
1698         character length is missing.
1699         * iresolve.c (cshift, eoshift, merge, pack, reshape, spread,
1700         transpose, unpack): Call gfc_resolve_substring_charlen for
1701         source expressions that are character and have a reference.
1702         * trans.h (gfc_trans_init_string_length) Change name to
1703         gfc_conv_string_length; modify references in trans-expr.c,
1704         trans-array.c and trans-decl.c.
1705         * trans-expr.c (gfc_trans_string_length): Handle case of no
1706         backend_decl.
1707         (gfc_conv_aliased_arg): Remove code for treating substrings
1708         and replace with call to gfc_trans_string_length.
1709         * trans-array.c (gfc_conv_expr_descriptor): Remove code for
1710         treating strings and call gfc_trans_string_length instead.
1712 2007-08-30  Tobias Burnus  <burnus@net-b.de>
1714         PR fortran/33228
1715         * interface.c (check_interface0): Improve error for external procs.
1716         (check_sym_interfaces): Fix checking of module procedures.
1718 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1720         PR fortran/32989
1721         * iresolve.c (gfc_resolve_getarg): Handle non-default integer
1722         kinds.
1723         * check.c (gfc_check_getarg): New function
1724         * intrinsic.h: Add prototype for gfc_check_getarg.
1725         * intrinsic.c (add_subroutines): Add reference to gfc_check_getarg.
1726         * intrinsic.texi (GETARG): Adjust documentation.
1728 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1729             Tobias Burnus  <burnus@gcc.gnu.org>
1731         PR fortran/33105
1732         * intrinsic.c (add_functions): Add IS_IOSTAT_END and
1733         IS_IOSTAT_EOR intrinsics.
1734         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_IOSTAT_END and
1735         GFC_ISYM_IS_IOSTAT_EOR.
1736         * trans-intrinsic.c (gfc_conv_has_intvalue): New function.
1737         (gfc_conv_intrinsic_function): Call gfc_conv_has_intvalue for
1738         GFC_ISYM_IS_IOSTAT_END and GFC_ISYM_IS_IOSTAT_EOR.
1739         * intrinsic.texi: Add IS_IOSTAT_END and IS_IOSTAT_EOR.
1741 2007-08-28  Christopher D. Rickett  <crickett@lanl.gov>
1743         PR fortran/33215
1744         * decl.c (build_sym): Pass number of identifiers on line to
1745         set_binding_label.
1746         (set_binding_label): Verify that only one identifier given if
1747         NAME= specified, even if the given binding label has zero length.
1748         (gfc_match_bind_c): Remove declaration for has_name_equals because
1749         it hides the static global one that is needed.
1751 2007-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1753         * trans-array.c (gfc_grow_array): Use gfc_call_realloc.
1754         (gfc_array_allocate): Use gfc_allocate_with_status and
1755         gfc_allocate_array_with_status.
1756         (gfc_array_deallocate): Use gfc_deallocate_with_status.
1757         (gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
1758         * trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
1759         (gfc_trans_deallocate): Use gfc_deallocate_with_status.
1760         * trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
1761         gfc_deallocate_with_status, gfc_call_realloc): New functions.
1762         * trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
1763         gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
1764         (gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
1765         gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
1766         * f95-lang.c (gfc_init_builtin_functions): Create decl for
1767         BUILT_IN_REALLOC.
1768         * trans-decl.c (gfor_fndecl_internal_realloc,
1769         gfor_fndecl_allocate, gfor_fndecl_allocate_array,
1770         gfor_fndecl_deallocate): Remove function decls.
1771         (gfc_build_builtin_function_decls): Likewise.
1773 2007-08-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1775         PR fortran/33055
1776         Revert previous patch.
1778 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
1780         PR fortran/22244
1781         * Make-lang.in (fortran/trans-types.o): Depend on $(FLAGS_H).
1782         * trans-types.c: Include flags.h.
1783         (gfc_get_nodesc_array_type): Add TYPE_DECL TYPE_NAME with
1784         correct bounds and dimensions for packed arrays.
1786 2007-08-27  Tobias Burnus  <burnus@net-b.de>
1788         * simplify.c (gfc_simplify_lgamma): Fix mpfr_lgamma call.
1790 2007-08-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1792         PR fortran/33055
1793         * trans-io.c (create_dummy_iostat): New function to create a unique
1794         dummy variable expression to use with IOSTAT.
1795         (gfc_trans_inquire): Use the new function to pass unit number error info
1796         to run-time library if a regular IOSTAT variable was not given.
1798 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
1800         * gfortran.h (gfc_isym_id): Add GFC_ISYM_GAMMA and
1801         GFC_ISYM_LGAMMA.
1803 2007-08-26  Asher Langton  <langton2@llnl.gov>
1804             Tobias Burnus  <burnus@net-b.de>
1806         * gfortran.h (gfc_option_t): Add flag_recursive.
1807         * lang.opt: Add -frecursive option and update -fopenmp.
1808         * invoke.texi (-frecursive): Document new option.
1809         (-fopenmp,-fno-automatic,-fmax-stack-var-size): Update.
1810         * options.c (gfc_init_options, gfc_post_options,
1811         gfc_handle_option): Add -frecursive and modify -fopenmp.
1812         (gfc_post_options): Add warning for conflicting flags.
1814 2007-08-26  Tobias Burnus  <burnus@net-b.de>
1816         PR fortran/31298
1817         * module.c (mio_symbol_ref,mio_interface_rest):  Return pointer_info.
1818         (load_operator_interfaces): Support multible loading of an operator.
1820 2007-08-26  Tobias Burnus  <burnus@net-b.de>
1822         PR fortran/32985
1823         * match.c (gfc_match_common): Remove SEQUENCE diagnostics.
1824         * resolve.c (resolve_common_blocks): Add SEQUENCE diagnostics;
1825         fix walking through the tree.
1827 2007-08-26  Tobias Burnus  <burnus@net-b.de>
1829         PR fortran/32980
1830         * intrinsic.h (gfc_simplify_gamma,gfc_simplify_lgamma,
1831         gfc_resolve_gamma,gfc_resolve_lgamma): New function declations.
1832         * mathbuiltins.def: Define GAMMA and LGAMMA.
1833         * intrinsic.c (add_functions): Add GAMMA, DGAMMA, LGAMMA, ALGAMA
1834         and DLGAMA.
1835         * simplify.c (gfc_simplify_gamma,gfc_simplify_lgamma): New functions.
1836         * iresolve.c (gfc_resolve_gamma,gfc_resolve_lgamma): New functions.
1837         * intrinsic.texi: Add documentation for GAMMA and LGAMMA.
1839 2007-08-26  Tobias Burnus  <burnus@net-b.de>
1841         PR fortran/33188
1842         * parse.c (parse_derived): Support empty derived type
1843         definitions for Fortran 2003.
1845 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1847         * trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
1848         * trans.h (gfc_omp_privatize_by_reference): Likewise.
1850 2007-08-24  Tobias Burnus  <burnus@net-b.de>
1852         PR fortran/33178
1853         * intrinsic.c (gfc_intrinsic_func_interface): Fix initialization
1854         expression check.
1856 2007-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1858         PR fortran/32972
1859         * iresolve.c:  Don't convert array masks.
1861 2007-08-24  Tobias Burnus  <burnus@net-b.de>
1863         PR fortran/33139
1864         * trans-array.c (gfc_conv_expr_descriptor): Copy bounds for
1865         whole-array pointer assignments.
1867 2007-08-23  Jakub Jelinek  <jakub@redhat.com>
1869         * decl.c (variable_decl): Don't share charlen structs if
1870         length == NULL.
1871         * trans-decl.c (create_function_arglist): Assert
1872         f->sym->ts.cl->backend_decl is NULL instead of unsharing
1873         charlen struct here.
1875 2007-08-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1877         PR fortran/33095
1878         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Remove
1879         runtime error checking.
1881 2007-08-22  Roger Sayle  <roger@eyesopen.com>
1882             Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1884         * match.c (intrinsic_operators): Delete.
1885         (gfc_match_intrinsic_op): Rewrite matcher to avoid calling
1886         gfc_match_strings.
1888 2007-08-22  Christopher D. Rickett  <crickett@lanl.gov>
1890         PR fortran/33020
1891         * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and
1892         kind for optional SHAPE parameter of C_F_POINTER.
1894 2007-08-22  Janus Weil  <jaydub66@gmail.com>
1896         * decl.c (match_attr_spec): Pass on errors from gfc_match_bind_c.
1897         (gfc_match_bind_c): Bugfix in check for NAME= with abstract interfaces.
1898         (gfc_match_mopdproc): Bugfix to reject module procedures in
1899         abstract interfaces.
1901 2007-08-22  Kai Tietz  <kai.tietz@onevision.com>
1903         * f95-lang.c: (gfc_init_decl_processing): Choose sizetype by using
1904         Pmode.
1906 2007-08-21  Paul Brook  <paul@codesourcery.com>
1907             Nathan Sidwell  <nathan@codesourcery.com>
1908             Mark Mitchell  <mark@codesourcery.com>
1909             Joseph Myers  <joseph@codesourcery.com>
1911         * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
1912         * Make-lang.in (gfortran.pod): Define BUGURL.
1913         * invoke.texi: Use BUGURL for bug-reporting instructions.
1915 2007-08-19  Roger Sayle  <roger@eyesopen.com>
1917         * match.c (intrinsic_operators): Make static.
1918         (gfc_op2string): New function for converting a gfc_intrinsic_op to
1919         to a "const char*", replacing the macro of the same name.
1920         * gfortran.h (intrinsic_operators): Delete prototype.
1921         (gfc_op2string): Replace macro with function prototype.
1923 2007-08-18  Tobias Burnus  <burnus@net-b.de>
1925         * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
1926         * symbol.c (gfc_is_intrinsic_typename): New function.
1927         * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
1928         (parse_interface): Use gfc_is_intrinsic_typename.
1929         * decl.c (gfc_match_derived_decl): Ditto.
1930         * module.c (gfc_match_use): Use gcc_unreachable() for
1931         INTERFACE_ABSTRACT in switch().
1933 2007-08-18  Roger Sayle  <roger@eyesopen.com>
1935         * primary.c (match_logical_constant_string): New function to match
1936         a ".true." or a ".false.".
1937         (match_logical_constant): Use it instead of gfc_match_strings.
1939 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
1940             Janus Weil  <jaydub66@gmail.com>
1942         * interface.c (gfc_match_interface,gfc_match_abstract_interface,
1943         gfc_match_end_interface,gfc_add_interface): Add abstract interface.
1944         * dump-parse-tree.c (gfc_show_attr): Ditto.
1945         * gfortran.h (interface_type,symbol_attribute): Ditto.
1946         * module.c (gfc_match_use,ab_attribute,attr_bits,
1947         mio_symbol_attribute): Ditto.
1948         * resolve.c (resolve_function): Ditto.
1949         * match.h: Ditto.
1950         * parse.c (decode_statement): Ditto.
1951         (parse_interface): Ditto, check for C1203 (name of abstract interface
1952         cannot be the same as an intrinsic type).
1953         * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
1954         (access_attr_decl): Handle Abstract interfaces.
1956 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
1958         PR fortran/32881
1959         * expr.c (gfc_check_pointer_assign): If the rhs is the
1960         initialization expression for the rhs, there is no error.
1962 2007-08-18  Paul Thomas  <pault@gcc.gnu.org>
1964         PR fortran/32875
1965         * trans-array.c (get_array_ctor_strlen): Set the character
1966         length of a zero length array to zero.
1968 2007-08-16  Tobias Burnus  <burnus@net-b.de>
1970         PR fortran/33072
1971         * module.c (gfc_match_use): Mark user operators as such.
1972         (find_use_name_n): Distinguish between operators and other symbols.
1973         (find_use_name,number_use_names,mio_namelist,
1974          load_operator_interfaces,load_generic_interfaces,read_module,
1975          write_generic): Update find_use_name_n calls.
1977 2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1979         PR fortran/29459
1980         * trans.c (gfc_create_var_np): Do not emit warnings for
1981         anonymous variables.
1983 2007-08-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1985         PR fortran/33066
1986         * decl.c (gfc_get_type_attr_spec): Fix whitespace.
1987         (gfc_match_derived_decl): Fix logic.
1989 2007-08-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1991         PR fortran/33073
1992         * trans-intrinsic.c (build_fixbound_expr): Convert to result type
1993         in all cases.
1995 2007-08-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1997         PR fortran/32594
1998         * trans-expr.c (gfc_conv_substring_expr): Only call
1999         gfc_conv_substring if expr->ref is not NULL.
2000         * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
2001         expression might be a constant.
2002         (gfc_simplify_expr): Handle missing start and end, as well as
2003         missing ref.
2005 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
2007         PR fortran/32926
2008         * match.c (gfc_match_call): Do not create a new symtree in the
2009         case where the existing symbol is external and not referenced.
2011 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
2013         PR fortran/32827
2014         * decl.c (variable_decl): Check for an imported symbol
2015         by looking for its symtree and testing for the imported
2016         attribute.
2017         (gfc_match_import): Remove change of symbol's namespace
2018         and set the attribute imported instead.
2019         * symbol.c (gfc_get_sym_tree): It is not an error if a
2020         symbol is imported.
2021         * gfortran.h : Add the 'imported' to symbol_attribute.
2023 2007-08-13  Paul Thomas  <pault@gcc.gnu.org>
2025         PR fortran/32962
2026         * trans-array.c (gfc_conv_array_transpose): Set the offset
2027         of the destination to zero if the loop is zero based.
2029 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2031         PR fortran/29600
2032         * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
2033         * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
2034         * check.c (gfc_check_achar): Check for the optional KIND argument.
2035         * simplify.c (gfc_simplify_achar): Use KIND argument.
2036         * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
2037         gfc_resolve_achar): Adjust prototypes.
2039 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2041         PR fortran/30964
2042         PR fortran/33054
2043         * trans-expr.c (gfc_conv_function_call): When no formal argument
2044         list is available, we still substitute missing optional arguments.
2045         * check.c (gfc_check_random_seed): Correct the check on the
2046         number of arguments to RANDOM_SEED.
2047         * intrinsic.c (add_subroutines): Add a resolution function to
2048         RANDOM_SEED.
2049         * iresolve.c (gfc_resolve_random_seed): New function.
2050         * intrinsic.h (gfc_resolve_random_seed): New prototype.
2052 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2054         PR fortran/32860
2055         * error.c (error_uinteger): New function.
2056         (error_integer): Call error_uinteger.
2057         (error_print): Handle %u, %lu, %li and %ld format specifiers.
2058         * interface.c (compare_actual_formal): Use the new %lu specifier.
2060 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2062         PR fortran/31629
2063         * lang.opt (-fmodule-private): New option.
2064         * gfortran.h (gfc_option_t): Add flag_module_private member.
2065         * invoke.texi (-fmodule-private): Document the new option.
2066         * module.c (gfc_check_access): Allow the -fmodule-private option
2067         to modify the default behaviour.
2068         * options.c (gfc_init_options): Initialize flag_module_private.
2069         (gfc_handle_option): Handle -fmodule-private.
2071 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2073         PR fortran/29600
2074         * intrinsic.c (add_functions): Add KIND arguments to COUNT,
2075         IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
2076         and VERIFY.
2077         * iresolve.c (gfc_resolve_count): Add kind argument.
2078         (gfc_resolve_iachar): New function.
2079         (gfc_resolve_ichar): Add kind argument.
2080         (gfc_resolve_index_func): Likewise.
2081         (gfc_resolve_lbound): Likewise.
2082         (gfc_resolve_len): Likewise.
2083         (gfc_resolve_len_trim): Likewise.
2084         (gfc_resolve_scan): Likewise.
2085         (gfc_resolve_size): New function.
2086         (gfc_resolve_ubound): Add kind argument.
2087         (gfc_resolve_verify): Likewise.
2088         * trans-decl.c (gfc_get_extern_function_decl): Allow specific
2089         intrinsics to have 4 arguments.
2090         * check.c (gfc_check_count): Add kind argument.
2091         (gfc_check_ichar_iachar): Likewise.
2092         (gfc_check_index): Likewise.
2093         (gfc_check_lbound): Likewise.
2094         (gfc_check_len_lentrim): New function.
2095         (gfc_check_scan): Add kind argument.
2096         (gfc_check_size): Likewise.
2097         (gfc_check_ubound): Likewise.
2098         (gfc_check_verify): Likewise.
2099         * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
2100         INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
2101         * simplify.c (get_kind): Whitespace fix.
2102         (int_expr_with_kind): New function.
2103         (gfc_simplify_iachar): Add kind argument.
2104         (gfc_simplify_iachar): Likewise.
2105         (gfc_simplify_ichar): Likewise.
2106         (gfc_simplify_index): Likewise.
2107         (simplify_bound_dim): Likewise.
2108         (simplify_bound): Likewise.
2109         (gfc_simplify_lbound): Likewise.
2110         (gfc_simplify_len): Likewise.
2111         (gfc_simplify_len_trim): Likewise.
2112         (gfc_simplify_scan): Likewise.
2113         (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
2114         (gfc_simplify_size): Add kind argument.
2115         (gfc_simplify_ubound): Likewise.
2116         (gfc_simplify_verify): Likewise.
2117         * intrinsic.h: Update prototypes and add new ones.
2118         * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
2119         gfc_conv_intrinsic_index_scan_verify.
2120         (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
2121         (gfc_conv_intrinsic_function): Call
2122         gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
2123         SCAN and VERIFY intrinsics.
2125 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2127         PR fortran/31189
2128         * invoke.texi (-fbacktrace): Document the new behaviour.
2130 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2132         PR fortran/32937
2133         * trans-array.c (gfc_conv_expr_descriptor): Use
2134         gfc_conv_const_charlen to generate backend_decl of right type.
2135         * trans-expr.c (gfc_conv_expr_op): Use correct return type.
2136         (gfc_build_compare_string): Use int type instead of default
2137         integer kind for single character comparison.
2138         (gfc_conv_aliased_arg): Give backend_decl the right type.
2139         * trans-decl.c (gfc_build_intrinsic_function_decls): Make
2140         compare_string return an int.
2142 2007-08-11  Ian Lance Taylor  <iant@google.com>
2144         * f95-lang.c (gfc_get_alias_set): Change return type to
2145         alias_set_type.
2147 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2149         PR fortran/31270
2150         * trans.c (gfc_trans_runtime_check): Reorder arguments and
2151         add extra variable arguments. Hand them to the library function.
2152         * trans.h (gfc_trans_runtime_check): Update prototype.
2153         * trans-array.c (gfc_trans_array_bound_check): Issue more
2154         detailled error messages.
2155         (gfc_conv_array_ref): Likewise.
2156         (gfc_conv_ss_startstride): Likewise.
2157         (gfc_trans_dummy_array_bias): Reorder arguments to
2158         gfc_trans_runtime_check.
2159         * trans-expr.c (gfc_conv_substring): Issue more detailled
2160         error messages.
2161         (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
2162         * trans-stmt.c (gfc_trans_goto): Likewise.
2163         * trans-io.c (set_string): Reorder arguments to
2164         gfc_trans_runtime_check and issue a more detailled error message.
2165         * trans-decl.c (gfc_build_builtin_function_decls): Make
2166         runtime_error and runtime_error_at handle a variable number of
2167         arguments.
2168         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
2169         to gfc_trans_runtime_check.
2170         (gfc_conv_intrinsic_minmax): Likewise.
2171         (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
2173 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2175         * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
2176         * options.c (gfc_post_options): Likewise.
2177         * parse.c (parse_omp_structured_block): Likewise.
2178         * st.c (gfc_free_statement): Likewise.
2180 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2182         PR fortran/32933
2183         * trans-decl.c (gfc_build_builtin_function_decls): Change
2184         prototype for associated.
2185         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
2186         result of __builtin_isnan into a boolean.
2187         (gfc_conv_intrinsic_strcmp): Cleanup.
2188         (gfc_conv_associated): Convert the result of the associated
2189         function into a boolean.
2191 2007-08-09  Tobias Burnus  <burnus@net-b.de>
2193         PR fortran/32987
2194         * io.c (format_token): Add FMT_ERROR.
2195         (next_char_not_space): Print error/warning when
2196         '\t' are used in format specifications.
2197         (format_lex): Propagate error.
2198         (check_format): Ditto.
2200 2007-08-09  Tobias Burnus  <burnus@net-b.de>
2202         PR fortran/33001
2203         * arith.c (arith_error): Point in the error message
2204         to -fno-range-check.
2206 2007-08-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2208         PR fortran/32902
2209         * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
2211 2007-08-06  Christopher D. Rickett  <crickett@lanl.gov>
2213         PR fortran/32732
2214         * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
2215         actual arg expressions for scalar characters passed by-value to
2216         bind(c) routines.
2217         (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
2218         * trans.h: Add prototype for gfc_conv_scalar_char_value.
2219         * trans-decl.c (generate_local_decl): Convert by-value character
2220         dummy args of bind(c) procedures using
2221         gfc_conv_scalar_char_value.
2223 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2225         PR fortran/30947
2226         * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
2227         with the kind of the STATUS argument.
2229 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2231         PR fortran/30948
2232         * intrinsic.c (add_functions): Fix name of argument to CHDIR.
2234 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2236         PR fortran/30933
2237         * iresolve.c (gfc_resolve_exit): Convert argument to default
2238         integer kind.
2240 2007-08-06  Daniel Franke  <franke.daniel@gmail.com>
2242         * resolve.c (derived_pointer): Removed, replaced callers by access 
2243         to appropiate attribute bit.
2244         (derived_inaccessable): Shortcut recursion depth.
2245         (resolve_fl_namelist): Fixed checks for private components in namelists.
2247 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2249         PR fortran/29828
2250         * trans.h (gfor_fndecl_string_minmax): New prototype.
2251         * trans-decl.c (gfor_fndecl_string_minmax): New variable.
2252         (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
2253         * check.c (gfc_check_min_max): Allow for character arguments.
2254         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
2255         (gfc_conv_intrinsic_function): Add special case for MIN and MAX
2256         intrinsics with character arguments.
2257         * simplify.c (simplify_min_max): Add simplification for character
2258         arguments.
2260 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2262         PR fortran/31612
2263         * invoke.texi: Adjust documentation for option -fsyntax-only.
2265 2007-08-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2266             Tobias Burnus  <burnus@gcc.gnu.org>
2268         PR fortran/32979
2269         * intrinsic.h (gfc_check_isnan): Add prototype.
2270         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
2271         * intrinsic.c (add_functions): Add ISNAN intrinsic.
2272         * check.c (gfc_check_isnan): New function.
2273         * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
2274         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
2275         to translate ISNAN.
2276         * intrinsic.texi: Document ISNAN.
2278 2007-08-04  Paul Thomas  <pault@gcc.gnu.org>
2280         PR fortran/31214
2281         * symbol.c (get_unique_symtree): Moved from module.c.
2282         * module.c (get_unique_symtree): Moved to symbol.c.
2283         * decl.c (get_proc_name): Transfer the typespec from the local
2284         symbol to the module symbol, in the case that an entry is also
2285         a module procedure.  Ensure the local symbol is cleaned up by
2286         pointing to it with a unique symtree.
2288         * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
2290 2008-08-04  Steven G. Kargl  <kargl@gcc.gnu.org>
2292         PR fortran/32969
2293         * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
2294         expected KIND.
2295         (gfc_resolve_scale): Ditto.
2296         (gfc_resolve_set_exponent): Ditto.
2297         (gfc_resolve_spacing): Ditto.
2299         PR fortran/32968
2300         * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
2301         gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
2302         expected KIND, and fold the result to the expected KIND.
2304 2007-08-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2306         PR fortran/31202
2307         * f95-lang.c (gfc_init_builtin_functions): Defin builtins for 
2308         lround{f,,l} and llround{f,,l}.
2309         * trans-intrinsic.c (build_fix_expr): Generate calls to the
2310         {l,}round{f,,l} functions.
2312 2007-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
2314         PR libfortran/32954
2315         * intrinsic.c (resolve_mask_arg):  New function.
2316         (gfc_resolve_maxloc):  Use resolve_mask_arg for mask resolution.
2317         (gfc_resolve_maxval):  Likewise.
2318         (gfc_resolve_minloc):  Likewise.
2319         (gfc_resolve_minval):  Likewise.
2320         (gfc_resolve_pack):  Likewise.
2321         (gfc_resolve_product):  Likewise.
2322         (gfc_resolve_sum):  Likewise.
2323         (gfc_resolve_unpack):  Likewise.
2325 2007-08-01  Tobias Burnus  <burnus@net-b.de>
2327         PR fortran/32936
2328         * match.c (gfc_match_allocate): Better check that STAT is
2329         a variable.
2331         * check.c (gfc_check_allocated): Reorder checks to improve
2332         error message.
2334 2007-08-01  Nick Clifton  <nickc@redhat.com>
2336         * arith.c: Change copyright header to refer to version 3 of the
2337         GNU General Public License and to point readers at the COPYING3
2338         file and the FSF's license web page.
2339         * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
2340         symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
2341         matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
2342         Make-lang.in, trans-openmp.c, gfortran.h, error.c,
2343         iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
2344         expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
2345         trans-types.c, trans.h, gfortranspec.c, trans-types.h,
2346         lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
2347         iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
2348         match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
2349         parse.h, types.def, convert.c, dependency.h, primary.c,
2350         trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
2352 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
2354         * trans-decl.c (generate_local_decl): Emit warning on unused parameter
2355         on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
2356         messages that start with lower case to upper case.
2357         * invoke.texi (-Wparameter-unused): Document differences between gcc
2358         and gfortran regarding this option.
2360 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
2362         PR fortran/32945
2363         * expr.c (check_specification_function): Skip check if no symtree 
2364         is available.
2366 2007-08-01  Paul Thomas  <pault@gcc.gnu.org>
2368         PR fortran/31609
2369         * resolve.c (resolve_entries): Entries declared to be module
2370         procedures must point to the function namespace.
2372 2007-07-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2374         PR fortran/32938
2375         * trans-stmt.c (gfc_trans_return): Convert to correct type.
2377 2007-07-31  Steven G. Kargl  <kargl@gcc.gnu.org>
2379         PR fortran/32942
2380         * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
2381         type.
2383 2007-07-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2385         * invoke.texi: Document -fsign-zero flag.
2387 2007-07-29  Paul Thomas  <pault@gcc.gnu.org>
2389         PR fortran/31211
2390         * trans-expr.c (gfc_conv_expr_reference): Add block for case of
2391         scalar pointer functions so that NULL result is correctly
2392         handled.
2394         PR fortran/32682
2395         * trans-array.c (gfc_trans_array_constructor): On detecting a
2396         multi-dimensional parameter array, set the loop limits.
2398 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
2400         PR fortran/32906
2401         * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
2402         adjusted error message.
2404 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
2406         * invoke.texi: Removed -w from option summary.
2408 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
2410         PR fortran/32879
2411         * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
2412         used for random number generator.
2414 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
2416         * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
2417         typos.
2418         * intrinsic.texi, invoke.texi: Fix typos.
2420 2007-07-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2422         PR fortran/31609
2423         * resolve.c (generic_sym): Check for a same symbol and if so, return to
2424         avoid infinite recursion.
2426 2007-07-28  Daniel Franke  <franke.daniel@gmail.com>
2428         PR fortran/31818
2429         PR fortran/32876
2430         PR fortran/32905
2431         * gfortran.h (symbol_attribute): Added bits for pointer_comp, 
2432         private_comp.
2433         * parse.c (parse_derived): Set pointer_comp/private_comp bits if 
2434         the derived type ultimately contains pointer components or private 
2435         components.
2436         * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
2437         (attr_bits): Added names for new ab_attributes.
2438         (mio_symbol_attribute): Save/restore new attribute bits in modules.
2439         * match.c (gfc_match_namelist): Removed check for namelist objects
2440         of assumed shape.
2441         * resolve.c (resolve_fl_namelist): Added check for pointer or
2442         private components in nested types. Added check for namelist objects
2443         of assumed shape.
2445 2007-07-28  Paul Thomas  <pault@gcc.gnu.org>
2447         PR fortran/32880
2448         * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
2449         for lse and rse pre expressions, for derived types with
2450         allocatable components.  Instead, assign the lhs to a temporary
2451         and deallocate after the assignment.
2453 2007-07-28  Janne Blomqvist  <jb@gcc.gnu.org>
2455         PR fortran/32909
2456         * trans-stmt.c (gfc_trans_character_select): Replace occurrences
2457         of gfc_c_int_type_node with integer_type_node.
2458         * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
2459         (gfc_build_builtin_function_decls): Likewise.
2460         (gfc_generate_function_code): Likewise.
2461         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2463 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
2465         * trans-decl.c (gfc_build_builtin_function_decls): Use existing
2466         gfc_array_index_type rather than creating another typenode for
2467         gfc_index_integer_kind.
2469 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
2471         * trans-io.c (gfc_build_io_library_fndecls): Change to use
2472         gfc_array_index_type for array descriptor triplets instead of
2473         gfc_int4_type_node.
2475 2007-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2477         PR fortran/32899
2478         * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
2480 2007-07-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2481             Daniel Franke  <franke.daniel@gmail.com>
2483         PR fortran/32760
2484         * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
2485         attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
2487 2007-07-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2489         PR fortran/32035
2490         * trans-stmt.c (gfc_trans_character_select): Replace the
2491         mechanism with labels by a SWITCH_EXPR.
2492         * trans-decl.c (gfc_build_builtin_function_decls): Change
2493         return type for select_string.
2495 2007-07-27  Paul Thomas  <pault@gcc.gnu.org>
2497         PR fortran/32903
2498         * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
2499         derived types as referenced, if they have the the default
2500         initializer set.
2502 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2504         * gfortran.h (generate_isocbinding_symbol): Constify.
2505         * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
2506         generate_isocbinding_symbol): Likewise.
2508 2007-07-24  Paul Thomas  <pault@gcc.gnu.org>
2510         PR fortran/31205
2511         PR fortran/32842
2512         * trans-expr.c (gfc_conv_function_call): Remove the default
2513         initialization of intent(out) derived types.
2514         * symbol.c (gfc_lval_expr_from_sym): New function.
2515         * matchexp.c (gfc_get_parentheses): Return argument, if it is
2516         character and posseses a ref.
2517         * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
2518         * resolve.c (has_default_initializer): Move higher up in file.
2519         (resolve_code): On detecting an interface assignment, check
2520         if the rhs and the lhs are the same symbol.  If this is so,
2521         enclose the rhs in parenetheses to generate a temporary and
2522         prevent any possible aliasing.
2523         (apply_default_init): Remove code making the lval and call
2524         gfc_lval_expr_from_sym instead.
2525         (resolve_operator): Give a parentheses expression a type-
2526         spec if it has no type.
2527         * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
2528         initializer, if any, to an intent(out) derived type, using
2529         gfc_lval_expr_from_sym and gfc_trans_assignment.  Check if
2530         the dummy is present.
2532 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
2534         PR fortran/32867
2535         * expr.c (check_init_expr): Simplify matched functions.
2537 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
2539         PR fortran/32778
2540         * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
2541         of the selected standard.
2542         (make generic): Likewise.
2543         (make alias): Likewise, set standard the alias belongs to.
2544         (add_subroutines): Call make_noreturn unconditionally.
2545         (check_intrinsic_standard): Change return value to try.
2546         (gfc_intrinsic_func_interface): Check return value of above function.
2547         (gfc_intrinsic_sub_interface): Likewise.
2549 2007-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
2551         PR fortran/30814
2552         * trans-decl.c (generate_function_code):  Add argument
2553         for flag_bounds_check to the array for set_options.
2554         * invoke.texi (-fbounds-check): Document new libarary run-time
2555         behaviour.
2557 2007-07-23  Daniel Franke  <franke.daniel@gmail.com>
2559         PR fortran/25104
2560         PR fortran/31639
2561         * expr.c (check_transformational): Reject valid transformational
2562         intrinsics to avoid ICE.
2563         (check_inquiry): Report error for assumed character lengths for
2564         all supported standards.
2565         (check_init_expr): Whitespace fix.
2567 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
2569         PR fortran/32797
2570         PR fortran/32800
2571         * decl.c (verify_bind_c_sym): Use the result symbol for functions
2572         with a result clause.  Warn if implicitly typed.  Verify the type
2573         and rank of the SHAPE argument, if given.
2574         * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
2575         check the actual args against the formal, sorting them if
2576         necessary.
2577         * symbol.c (gen_shape_param): Initialize type of SHAPE param to
2578         BT_VOID.
2580 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
2582         PR fortran/32732
2583         * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
2584         value character dummy args of BIND(C) procedures.
2585         * trans-expr.c (gfc_conv_variable): Do not build address
2586         expression for BT_CHARACTER dummy args.
2588 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
2589             Tobias Burnus  <burnus@net-b.de>
2591         PR fortran/32600
2592         * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
2593         * trans-types.c: Add pfunc_type_node.
2594         (gfc_init_types,gfc_typenode_for_spec): Use it.
2595         * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
2596         improve error message.
2598 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
2600         PR fortran/32710
2601         * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
2602         the current is a namelist.
2604 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
2606         PR fortran/29962
2607         PR fortran/31253
2608         PR fortran/31265
2609         PR fortran/31639
2610         * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
2611         generic, specific, actual_ok, noreturn into bits of a bitfield, 
2612         added bits for inquiry, transformational, conversion.
2613         * check.c (non_init_transformational): Removed, removed all callers.
2614         * intrinsic.c (enum class): New.
2615         (add_sym*): Replaced argument elemetal by enum class. Changed all
2616         callers.
2617         (add_functions): Assign appropriate classes to intrinsic functions.
2618         (add_subroutines): Assign appropriate classes to intrinsic subroutines.
2619         (add_conv): Set conversion attribute.
2620         (gfc_init_expr_extensions): Removed, removed all callers.
2621         (gfc_intrinsic_func_interface): Reimplemented check for non-standard
2622         initializatione expressions.
2623         * expr.c (check_specification_function): New.
2624         (gfc_is_constant_expr): Added check for specification functions.
2625         (check_init_expr_arguments): New.
2626         (check_inquiry): Changed return value to MATCH, added checks for
2627         inquiry functions defined by F2003.
2628         (check_transformational): New.
2629         (check_null): New.
2630         (check_elemental): New.
2631         (check_conversion): New.
2632         (check_init_expr): Call new check functions, add more specific error
2633         messages.
2635 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
2637         PR fortran/32627
2638         * resolve.c (set_name_and_label): Set kind number for character
2639         version of c_f_pointer.
2640         (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
2641         that of the actual SHAPE arg.
2642         * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
2644 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
2646         PR fortran/32801
2647         * symbol.c (generate_isocbinding_symbol): Remove unnecessary
2648         conditional.
2650         PR fortran/32804
2651         * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
2652         deferred-shape arrays as args to C_LOC.  Fix bug in testing
2653         character args to C_LOC.
2655 2007-07-21  Lee Millward  <lee.millward@gmail.com>
2657         PR fortran/32823
2658         * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
2659         arguments passed, not just the first one. Adjust code to 
2660         refer to "args[0]" instead of "arg" as a result.
2661         
2662 2007-07-19  Christopher D. Rickett  <crickett@lanl.gov>
2664         PR fortran/32600
2665         * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
2667 2007-07-18  Christopher D. Rickett  <crickett@lanl.gov>
2669         PR fortran/32801
2670         * symbol.c (generate_isocbinding_symbol): Fix bug where
2671         ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
2672         ISOCBINDING_PTR.
2674 2007-07-17  Janus Weil  <jaydub66@gmail.com> 
2676         PR fortran/32535
2677         * resolve.c (resolve_fl_namelist): Check for namelist private 
2678         components in contained subprograms.
2680 2007-07-17  Paul Thomas  <pault@gcc.gnu.org>
2682         PR fortran/31320
2683         PR fortran/32665
2684         * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
2685         renormalization unity base is done independently of existing
2686         lbound value.
2687         (gfc_trans_scalar_assign): If rhs is not a variable, put
2688         lse->pre after rse->pre to ensure that de-allocation of lhs
2689         occurs after evaluation of rhs.
2691 2007-07-16  Lee Millward  <lee.millward@gmail.com>
2693         PR fortran/32222
2694         PR fortran/32238
2695         PR fortran/32242        
2696         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
2697         to operate on a stack allocated array for the intrinsic arguments
2698         instead of creating a TREE_LIST. Add two new parameters for the
2699         array and the number of elements. Update all callers to allocate
2700         an array of the correct length to pass in. Update comment.
2701         (gfc_intrinsic_argument_list_length): New function.
2702         (gfc_conv_intrinsic_conversion): Call it.
2703         (gfc_conv_intrinsic_mnimax): Likewise.
2704         (gfc_conv_intrinsic_merge): Likewise.
2705         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
2706         constructors.
2707         (gfc_conv_intrinsic_cmplx): Likewise.
2708         (gfc_conv_intrinsic_ctime): Likewise.
2709         (gfc_covn_intrinsic_fdate): Likewise.
2710         (gfc_conv_intrinsic_ttynam): Likewise.
2711         (gfc_conv_intrinsic_ishftc): Likewise.
2712         (gfc_conv_intrinsic_index): Likewise.
2713         (gfc_conv_intrinsic_scan): Likewise.
2714         (gfc_conv_intrinsic_verify): Likewise.
2715         (gfc_conv_intrinsic_trim): Likewise.
2716         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
2717         (gfc_conv_intrinsic_exponent): Likewise.
2718         (gfc_conv_intrinsic_bound): Likewise.
2719         (gfc_conv_intrinsic_abs): Likewise.
2720         (gfc_conv_intrinsic_mod): Likewise.
2721         (gfc_conv_intrinsic_sign): Likewise.
2722         (gfc_conv_intrinsic_len): Likewise.
2723         (gfc_conv_intrinsic_adjust): Likewise.
2724         (gfc_conv_intrinsic_si_kind): Likewise. 
2725         
2726 2007-07-16  Janne Blomqvist  <jb@gcc.gnu.org>
2728         PR fortran/32748
2729         * trans-decl.c (gfc_build_builtin_function_decls): Remove
2730         DECL_IS_MALLOC attribute from internal_realloc, thus reverting
2731         part of my 2007-07-03 patch.
2733 2007-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2734             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2736         PR fortran/32611
2737         * gfortran.h (gfc_option_t): Add flag_sign_zero field.
2738         * lang.opt (-fsign-zero): New option.
2739         * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
2740         * trans-decl.c (gfc_build_builtin_function_decls): Build the function
2741         declaration to pass an array containing the options to be used by the
2742         runtime library. (gfc_generate_function_code): Build an array that
2743         contains option values to be passed to the runtime library and the call
2744         to the function. 
2745         * options.c (gfc_init_options): Initialize the flag_sign_zero field.
2746         (gfc_handle_option): Handle the -fsign-zero option.
2748 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2750         PR fortran/32036
2751         * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
2753 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2755         PR fortran/32357
2756         * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
2757         to C int.
2759 2007-07-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2761         PR libfortran/32731
2762         * iresolve.c(gfc_resolve_pack):  A scalar mask has
2763         to be kind=4, an array mask with kind<4 is converted
2764         to gfc_default_logical_kind automatically.
2765         (gfc_resolve_unpack):  Convert mask to gfc_default_lotical_kind
2766         if it has a kind<4.
2768 2007-07-14  Paul Thomas  <pault@gcc.gnu.org>
2770         PR fortran/32724
2771         * parse.c (parse_spec): Emit error on unexpected statement
2772         function.
2774 2007-07-13  Daniel Franke  <franke.daniel@gmail.com>
2776         * invoke.texi: Unified upper- and lower-case in menus.
2777         (-w, -W): Removed, documented by gcc.
2778         * intrinsic.texi: Unified Class-section entries, added
2779         subroutine/function warning where appropiate.
2781 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
2783         PR fortran/31639
2784         * decl.c (gfc_match_suffix): Removed surplus general error that hides
2785         a more specific message.
2786         * resolve.c (resolve_fl_variable): Reject illegal initializiers only
2787         if not already done.
2788         (resolve_fl_procedure): Added check for initializers of functions.
2790 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
2792         PR fortran/32704
2793         * invoke.texi (-static-libgfortran): Document new option.
2795 2007-07-12  Paul Thomas  <pault@gcc.gnu.org>
2797         PR fortran/32634
2798         PR fortran/32727
2799         * module.c (write_generic): Restore patch of 2007-07-10 and use
2800         symbol name if there are no use names. 
2802 2007-07-12  Christopher D. Rickett  <crickett@lanl.gov>
2804         PR fortran/32599
2805         * decl.c (verify_c_interop_param): Require character string dummy
2806         args to BIND(C) procedures to have length 1.
2807         * resolve.c (resolve_fl_procedure): Modify parameter checking for
2808         BIND(C) procedures.
2810         PR fortran/32601
2811         * resolve.c (gfc_iso_c_func_interface): Verify that a valid
2812         expression is given as an argument to C_LOC and C_ASSOCIATED.
2813         * trans-io.c (transfer_expr): Add argument for code block.  Add
2814         standards check to determine if an error message should be
2815         reported for printing C_PTR or C_FUNPTR.
2816         (transfer_array_component): Update arguments to transfer_expr.
2817         (gfc_trans_transfer): Ditto.
2819         * symbol.c (gen_cptr_param): Fix whitespace.
2821 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
2823         PR fortran/32550
2824         * trans.h (GFC_POINTER_TYPE_P): Define.
2825         * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
2826         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2827         if GFC_POINTER_TYPE_P is set on the type.
2829 2007-07-12  Richard Guenther  <rguenther@suse.de>
2831         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
2832         arguments to gfc_charlen_type_node.
2833         * trans-io.c (gfc_convert_array_to_string): Convert type
2834         size to gfc_array_index_type.
2836 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
2838         PR fortran/32634
2839         PR fortran/32727
2840         * module.c: Reverted Paul's patch from 2007-07-10.
2842 2007-07-11  Richard Guenther  <rguenther@suse.de>
2844         * trans-array.c (gfc_conv_array_parameter): Use correct
2845         types for comparison.
2846         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
2847         correct types for POINTER_PLUS_EXPR.
2848         * trans-stmt.c (gfc_trans_forall_loop): Use correct type
2849         for integer one constant.
2851 2007-07-10  Paul Thomas  <pault@gcc.gnu.org>
2853         PR fortran/32157
2854         * resolve.c (is_external_proc): New function.  Adds test that
2855         the symbol is not an intrinsic procedure.
2856         * (resolve_function, resolve_call): Replace logical statements
2857         with call to is_external_proc.
2859         PR fortran/32689
2860         * simplify.c (gfc_simplify_transfer): If mold has rank, the
2861         result is an array.
2863         PR fortran/32634
2864         * module.c (write_generic): Write the local name of the
2865         interface. 
2867 2007-07-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2869         PR fortran/29459
2870         * trans-array.c (gfc_trans_array_constructor): Mark offset field
2871         with TREE_NO_WARNING.
2872         * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
2873         stride and size variables with TREE_NO_WARNING.
2875 2007-07-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2877         * trans-decl.c (set_tree_decl_type_code): Remove function.
2878         (generate_local_decl): Remove reference to set_tree_decl_type_code.
2880 2007-07-09  Daniel Franke  <franke.daniel@gmail.com>
2882         PR fortran/31129
2883         * trans-decl.c (generate_local_decl) Emit a warning if an unused
2884         parameter is found.
2886 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
2888         PR fortran/29876
2889         * module.c (gfc_match_use): Do not set an non-existant 
2890         intrinsic operator if a user-defined operator is found.
2892 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
2894         PR fortran/24784
2895         PR fortran/28004
2896         * trans-decl.c (generate_local_decl): Adjusted warning on unused 
2897         dummy arguments, tell middle-end not to emit additional warnings.
2899 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
2900             Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2902         PR fortran/17711
2903         * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
2904         INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS, 
2905         INTRINSIC_LT_OS and INTRINSIC_LE_OS.
2906         * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
2907         * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
2908         Added gfc_intrinsic_op as third argument type.
2909         * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
2910         * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
2911         * interface.c (check_operator_interface): Likewise.
2912         (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and 
2913         Fortran 90 style operators using new enum values.
2914         (gfc_extend_expr): Likewise.
2915         (gfc_add_interface): Likewise.
2916         * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
2917         operators from Fortran 90 style operators using new enum values.
2918         * matchexp.c (match_level_4): Account for new enum values.
2919         * module.c (mio_expr): Likewise.
2920         * resolve.c (resolve_operator): Deal with new enum values, fix
2921         inconsistent error messages.
2922         * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
2924 2007-07-08  Tobias Burnus  <burnus@net-b.de>
2926         PR fortran/32669
2927         * interface.c (get_expr_storage_size): Properly obtain lower bound.
2928         (compare_actual_formal): Add space before parenthesis.
2930 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
2932         PR fortran/25094
2933         * resolve.c (resolve_fl_procedure): Added check for PRIVATE types 
2934         in PUBLIC interfaces.
2936 2007-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2938         PR fortran/32644
2939         * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
2940         gfc_match_bind_c does not return MATCH_YES.
2942 2007-07-07  Kazu Hirata  <kazu@codesourcery.com>
2944         * decl.c, gfortran.h, interface.c, module.c, resolve.c,
2945         trans-array.c, trans-decl.c: Fix comment typos.  Follow
2946         spelling conventions.
2947         * intrinsic.texi: Fix typos.  Follow spelling conventions.
2949 2007-05-06  Daniel Franke  <franke.daniel@gmail.com>
2951         PR fortran/32633
2952         * symbol.c (save_status): New.
2953         * gfortran.h (save_status): Added external declaration.
2954         (check_conflict): Check for conflicting explicite SAVE statements
2955         only.
2956         (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
2957         * module.c (ab_attribute, attr_bits): Removed enumerator value 
2958         AB_SAVE for save attribute.
2959         (mio_symbol_attribute): Import/export the full SAVE status, 
2960         removed usage of AB_SAVE.
2961         * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
2962         * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
2963         already explicit.
2965 2007-07-05  Daniel Franke  <franke.daniel@gmail.com>
2966             Tobias Burnus  <burnus@net-b.de>
2968         PR fortran/32359
2969         * gfortran.h (symbol_attribute): Change save attribute into an enum.
2970         * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
2971         * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
2972         * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
2973         (resolve_symbol): Allow OMP threadprivate with
2974         initialization SAVEd and save_all variable.
2975         * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
2977 2007-07-05  Paul Thomas  <pault@gcc.gnu.org>
2979         PR fortran/32526
2980         * match.c (gfc_match_call): Check, in all cases, that a symbol
2981         is neither generic nor a subroutine before trying to add it as
2982         a subroutine.
2984         PR fortran/32613
2985         * match.c (gfc_match_do): Reset the implied_index attribute.
2987 2007-07-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2989         PR fortran/31198
2990         * trans-intrinsic.c (trans-intrinsic.c): Handle optional
2991         arguments correctly for MIN and MAX intrinsics.
2993 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2995         PR fortran/32545
2996         * io.c (check_format): Always call gfc_error for errors.
2997         (check_format_string): Change type of this function to try and
2998         return the result of check_format.
2999         (check_io_constraints): Return MATCH_ERROR if check_format_string
3000         returns FAILURE.
3002 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3004         PR fortran/32612
3005         * decl.c (get_proc_name): Include attr->mod_proc in check for error.
3007 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3009         PR fortran/32432
3010         * gfortran.h: Change type of gfc_assign_data_value from void to try.
3011         * data.c (gfc_assign_data_value): Return FAILURE if error found.
3012         * resolve.c (check_data_variable): If gfc_assign_data_value returns
3013         failure, break out of loop and return failure.
3015 2007-07-03  Christopher D. Rickett  <crickett@lanl.gov>
3017         PR fortran/32579
3018         * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
3019         (build_formal_args): Pass intrinsic module symbol id to
3020         gen_cptr_param.
3022 2007-07-03  Tobias Burnus  <burnus@net-b.de>
3024         PR fortran/25062
3025         * resolve.c (resolve_common_blocks): New check function.
3026         (resolve_types): Use it.
3028 2007-07-03  Tobias Burnus  <burnus@net-b.de>
3030         PR fortran/30940
3031         * interface.c (get_sym_storage_size): New function.
3032         (get_sym_storage_size): New function.
3033         (compare_actual_formal): Enhance sequence association
3034         support and improve checking.
3036 2007-07-03  Janne Blomqvist  <jb@gcc.gnu.org>
3038         * trans-decl.c (gfc_build_builtin_function_decls): Mark
3039         internal_realloc as a malloc function.
3041 2007-07-03  Tobias Burnus  <burnus@net-b.de>
3043         PR fortran/20888
3044         * resolve.c (resolve_operator): Check for NULL as operand.
3046 2007-07-02  Tobias Burnus  <burnus@net-b.de>
3048         * gfortran.texi (Fortran 2003): Add ISO Bind C.
3049         * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
3050         C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
3052 2007-07-01  Christopher D. Rickett  <crickett@lanl.gov>
3054         * interface.c (gfc_compare_derived_types): Special case for comparing
3055         derived types across namespaces.
3056         (gfc_compare_types): Deal with BT_VOID.
3057         (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
3058         * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
3059         to SCALAR
3060         (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and 
3061         NULL_FUNPTR.
3062         (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
3063         * symbol.c (gfc_set_default_type): BIND(C) variables should not be
3064         Implicitly declared.
3065         (check_conflict): Add BIND(C) and check for conflicts.
3066         (gfc_add_explicit_interface): Whitespace.       
3067         (gfc_add_is_bind_c): New function.  
3068         (gfc_copy_attr): Use it.
3069         (gfc_new_symbol): Initialize ISO C Binding objects.
3070         (get_iso_c_binding_dt):  New function.
3071         (verify_bind_c_derived_type): Ditto.
3072         (gen_special_c_interop_ptr): Ditto.
3073         (add_formal_arg): Ditto.
3074         (gen_cptr_param): Ditto.
3075         (gen_fptr_param): Ditto.
3076         (gen_shape_param): Ditto.
3077         (add_proc_interface): Ditto.
3078         (build_formal_args): Ditto.
3079         (generate_isocbinding_symbol):  Ditto.
3080         (get_iso_c_sym):  Ditto.
3081         * decl.c (num_idents_on_line, has_name_equals): New variables.
3082         (verify_c_interop_param): New function.
3083         (build_sym): Finish binding labels and deal with COMMON blocks.
3084         (add_init_expr_to_sym): Check if the initialized expression is
3085         an iso_c_binding named constants
3086         (variable_decl): Set ISO C Binding type_spec components.
3087         (gfc_match_kind_spec): Check match for C interoperable kind.
3088         (match_char_spec): Fix comment. Chnage gfc_match_small_int
3089         to gfc_match_small_int_expr.  Check for C interoperable kind.
3090         (match_type_spec): Clear the current binding label.
3091         (match_attr_spec): Add DECL_IS_BIND_C.  If BIND(C) is found, use it
3092         to set attributes.
3093         (set_binding_label): New function.
3094         (set_com_block_bind_c): Ditto.
3095         (verify_c_interop): Ditto.
3096         (verify_com_block_vars_c_interop): Ditto.
3097         (verify_bind_c_sym): Ditto.
3098         (set_verify_bind_c_sym): Ditto.
3099         (set_verify_bind_c_com_block): Ditto.
3100         (get_bind_c_idents): Ditto.
3101         (gfc_match_bind_c_stmt): Ditto.
3102         (gfc_match_data_decl): Use num_idents_on_line.
3103         (match_result): Deal with right paren in BIND(C).
3104         (gfc_match_suffix): New function.
3105         (gfc_match_function_decl): Use it.  Code is re-arranged to deal with
3106         ISO C Binding result clauses.
3107         (gfc_match_subroutine):  Deal with BIND(C).
3108         (gfc_match_bind_c): New function.
3109         (gfc_get_type_attr_spec): New function.  Code is re-arranged in and
3110         taken from gfc_match_derived_decl.
3111         (gfc_match_derived_decl): Add check for BIND(C).
3112         * trans-common.c: Forward declare gfc_get_common.
3113         (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
3114         'gfc_common_head *com'.  Check for ISO C Binding of the common block.
3115         (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
3116         * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
3117         (bt): Add BT_VOID
3118         (sym_flavor): Add FL_VOID.
3119         (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
3120         (CInteropKind_t): New struct.
3121         (c_interop_kinds_table): Use it.  Declare an array of structs.
3122         (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
3123         bitfields.
3124         (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
3125         (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
3126         common_block members.
3127         (gfc_common_head): Add binding_label and is_bind_c members.
3128         (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
3129         Add prototypes for get_c_kind, gfc_validate_c_kind, 
3130         gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
3131         verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
3132         verify_bind_c_derived_type, verify_com_block_vars_c_interop,
3133         generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
3134         * iso-c-binding.def: New file. This file contains the definitions
3135         of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
3136         module.
3137         * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
3138          or C_NULL_FUNPTR expressions.
3139         * expr.c (gfc_copy_expr): Add BT_VOID case.  For BT_CHARACTER, the
3140         ISO C Binding requires a minimum string length of 1 for '\0'.  
3141         * module.c (intmod_sym): New struct.
3142         (pointer_info): Add binding_label member.
3143         (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
3144         (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
3145         (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
3146         (mio_symbol_attribute): Deal with ISO C Binding attributes.
3147         (bt_types): Add "VOID".
3148         (mio_typespec): Deal with ISO C Binding components.
3149         (mio_namespace_ref): Add intmod variable. 
3150         (mio_symbol): Check for symbols from an intrinsic module.
3151         (load_commons): Check for BIND(C) common block.
3152         (read_module): Read binding_label and use it.
3153         (write_common): Add label.  Write BIND(C) info.
3154         (write_blank_common): Blank commons are not BIND(C).  Explicitly
3155         set is_bind_c=0.
3156         (write_symbol): Deal with binding_label.
3157         (sort_iso_c_rename_list): New function.
3158         (import_iso_c_binding_module): Ditto.
3159         (create_int_parameter): Add to args.
3160         (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
3161         intrinsic module.
3162         * trans-types.c (c_interop_kinds_table): new array of structs. 
3163         (gfc_validate_c_kind): New function.
3164         (gfc_check_any_c_kind): Ditto.
3165         (get_real_kind_from_node): Ditto.
3166         (get_int_kind_from_node): Ditto.
3167         (get_int_kind_from_width): Ditto.
3168         (get_int_kind_from_minimal_width): Ditto.
3169         (init_c_interop_kinds): Ditto.
3170         (gfc_init_kinds): call init_c_interop_kinds.
3171         (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
3172         Adjust handling of BT_DERIVED.
3173         (gfc_sym_type): Whitespace.
3174         (gfc_get_derived_type):  Account for iso_c_binding derived types
3175         * resolve.c (is_scalar_expr_ptr): New function.
3176         (gfc_iso_c_func_interface): Ditto.
3177         (resolve_function): Use gfc_iso_c_func_interface. 
3178         (set_name_and_label): New function.
3179         (gfc_iso_c_sub_interface): Ditto.
3180         (resolve_specific_s0): Use gfc_iso_c_sub_interface.
3181         (resolve_bind_c_comms): New function.
3182         (resolve_bind_c_derived_types): Ditto.
3183         (gfc_verify_binding_labels): Ditto.
3184         (resolve_fl_procedure): Check for ISO C interoperability.
3185         (resolve_symbol): Check C interoperability.
3186         (resolve_types): Walk the namespace.  Check COMMON blocks.
3187         * trans-decl.c (gfc_sym_mangled_identifier):  Prevent the mangling
3188         of identifiers that have an assigned binding label.
3189         (gfc_sym_mangled_function_id): Use the binding label rather than
3190         the mangled name.
3191         (gfc_finish_var_decl): Put variables that are BIND(C) into a common
3192         segment of the object file, because this is what C would do.
3193         (gfc_create_module_variable): Conver to proper types
3194         (set_tree_decl_type_code): New function.
3195         (generate_local_decl): Check dummy variables and derived types for
3196         ISO C Binding attributes.
3197         * match.c (gfc_match_small_int_expr): New function.
3198         (gfc_match_name_C): Ditto.
3199         (match_common_name): Deal with ISO C Binding in COMMON blocks
3200         * trans-io.c (transfer_expr):  Deal with C_NULL_PTR or C_NULL_FUNPTR
3201         expressions
3202         * match.h: Add prototypes for gfc_match_small_int_expr,
3203         gfc_match_name_C, match_common_name, set_com_block_bind_c,
3204         set_binding_label, set_verify_bind_c_sym,
3205         set_verify_bind_c_com_block, get_bind_c_idents,
3206         gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
3207         gfc_get_type_attr_spec
3208         * parse.c (decode_statement): Use gfc_match_bind_c_stmt
3209         (parse_derived): Init *derived_sym = NULL, and gfc_current_block
3210         later for valiadation.
3211         * primary.c (got_delim): Set ISO C Binding components of ts.
3212         (match_logical_constant): Ditto.
3213         (match_complex_constant): Ditto.
3214         (match_complex_constant): Ditto.
3215         (gfc_match_rvalue): Check for existence of at least one arg for
3216         C_LOC, C_FUNLOC, and C_ASSOCIATED.
3217         * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
3218         (get_c_kind): New function.
3220 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
3222         PR fortran/32239
3223         * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
3224         real**int4 powers.
3225         * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
3226         builtins table.
3228 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
3230         * trans.h: Remove decls for 64-bit allocation functions.
3231         * trans-array.c (gfc_grow_array): Always pick the standard realloc
3232         function decl.
3233         (gfc_array_allocate): Likewise.
3234         * trans-decl.c: Remove trees for 64-bit allocation functions.
3235         (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
3236         allocations functions, use index_int_type for normal allocation
3237         functions.
3239 2007-06-30  Daniel Franke  <franke.daniel@gmail.com>
3241         PR fortran/20373
3242         * intrinsic.c (add_functions): Additional function types.
3243         (gfc_convert_type_warn): Remove intrinsic-flag from
3244         conversion functions.
3245         * resolve.c (resolve_symbol): Added type checks to 
3246         explicitly defined intrinsics.
3248 2007-06-30  Tobias Burnus  <burnus@net-b.de>
3250         PR fortran/32555
3251         * io.c (check_format): Allow zero to precede the
3252         P edit descriptor.
3254 2007-06-30  Paul Thomas  <pault@gcc.gnu.org>
3256         PR fortran/32472
3257         * simplify.c (gfc_simplify_repeat): Add handling of character
3258         literal for first argument.
3260 2007-06-29  Daniel Franke  <franke.daniel@gmail.com>
3262         * resolve.c (resolve_operator): Added check whether a user
3263         defined operator is available.
3265 2007-06-29  Daniel Franke <franke.daniel@gmail.com>
3267         * openmp.c (resolve_omp_clauses): Adjust error message to
3268         better reflect the actual requirement.
3270 2007-06-29  Tobias Burnus  <burnus@net-b.de>
3272         PR fortran/32483
3273         * io.c (format_lex): Fix FMT_ZERO.
3274         (check_format,check_format_string,gfc_match_format,
3275         check_io_constraints) Additional checking for READ.
3277 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3279         PR other/31400
3280         * lang.opt (static-libgfortran): New option.
3281         * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
3282         (Option): Add OPTION_static and OPTION_static_libgfortran.
3283         (lookup_option): Handle the new -static-libgfortran option.
3284         (lang_specific_driver): Check whether -static is passed.
3285         Handle the new -static-libgfortran option.
3286         * options.c (gfc_handle_option): If -static-libgfortran is
3287         passed and isn't supported on this configuration, error out.
3289 2007-06-27  Daniel Franke  <franke.daniel@gmail.com>
3291         PR fortran/32467
3292         * openmp.c (resolve_omp_clauses): Emit error on allocatable
3293         components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
3294         clauses.
3296 2007-06-25  Paul Thomas  <pault@gcc.gnu.org>
3298         PR fortran/32464
3299         * resolve.c (check_host_association): Return if the old symbol
3300         is use associated.  Introduce retval to reduce the number of
3301         evaluations of the first-order return value.
3303         PR fortran/31494
3304         * match.c (gfc_match_call): If a host associated symbol is not
3305         a subroutine, build a new symtree/symbol in the current name
3306         space.
3308 2007-06-24  Tobias Burnus  <burnus@net-de>
3310         PR fortran/32460
3311         * interface.c (gfc_compare_derived_types): Add access check.
3312         * symbol.c (gfc_find_component): Ditto.
3313         (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
3314         * dump-parse-tree.c (gfc_show_components): Dump access state.
3315         * gfortran.h (struct gfc_component): Add gfc_access.
3316         * module.c (mio_component): Add access state.
3317         * (gfc_match_structure_constructor): Check for private access state.
3319 2007-06-24  Paul Thomas  <pault@gcc.gnu.org>
3321         PR fortran/32298
3322         PR fortran/31726
3323         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
3324         the offset between the loop counter and the position as
3325         defined. Add the offset within the loop so that the mask acts
3326         correctly.  Do not advance the location on the basis that it
3327         is zero.
3329 2007-06-22  Daniel Franke  <franke.daniel@gmail.com>
3331         PR fortran/31473
3332         * symbol.c (gfc_copy_attr): Emit errors for duplicate 
3333         EXTERNAL/INTRINSIC statements.
3335 2007-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3337         PR fortran/32360
3338         * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
3339         check to see if the lvalue has attribute pointer and data.  
3341 2007-06-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3343         PR fortran/31162
3344         * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
3345         gfc_notify_standard. (gfc_resolve_iterator): Remove check.
3346         (resolve_branch): Change "Obsolete" to "Deleted feature".
3347         * io.c (resolve_tag): Ditto.
3348         * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
3350 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3352         PR fortran/32361
3353         * match.c (gfc_match_common): If the symbol value expression type is
3354         NULL_EXPR, don't error if previously initialized.
3356 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3358         PR fortran/25061
3359         * decl.c (get_proc_name) Check symbol for generic interface
3360         and issue an error.
3362 2007-06-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3363         Richard Guenther  <rguenther@suse.de>
3365         PR fortran/32140
3366         * trans.c (gfc_build_addr_expr): Use the correct types.
3368 2007-06-19  Paul Thomas  <pault@gcc.gnu.org>
3370         PR fortran/20863
3371         PR fortran/20882
3372         * resolve.c (resolve_code): Use gfc_impure_variable as a
3373         condition for rejecting derived types with pointers, in pure
3374         procedures.
3375         (gfc_impure_variable): Add test for dummy arguments of pure
3376         procedures; any for functions and INTENT_IN for subroutines.
3378         PR fortran/32236
3379         * data.c (gfc_assign_data_value): Change the ICE on an array
3380         reference initializer not being an array into an error and
3381         clear init to prevent a repetition of the error.
3383 2007-06-17  Janne Blomqvist  <jb@gcc.gnu.org>
3385         * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
3386         environment variables. Fix documentation for
3387         GFORTRAN_UNBUFFERED_ALL environment variable.
3389 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3391         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
3392         POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
3393         * trans-expr.c (gfc_trans_string_copy): Create
3394         POINTER_PLUS_EXPR instead of a PLUS_EXPR
3395         for pointer types.
3397 2007-06-14  Paul Thomas  <pault@gcc.gnu.org>
3399         PR fortran/32302
3400         * trans-common.c (build_common_decl): If resizing of common
3401         decl is needed, update the TREE_TYPE.
3403 2007-06-13  Tobias Burnus  <burnus@net-b.de>
3405         PR fortran/32323
3406         * interface.c (has_vector_section): New.
3407         (compare_actual_formal): Check for array sections with vector subscript.
3409 2007-06-12  Dirk Mueller  <dmueller@suse.de>
3411         * trans-stmt.c (gfc_trans_call): fix gcc_assert to
3412         a comparison, not an assignment.
3414 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
3416         * trans-common.c (create_common): Initialize 'field_init'.
3418 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
3420         PR fortran/29786
3421         PR fortran/30875
3422         * trans-common.c (get_init_field): New function.
3423         (create_common): Call get_init_field for overlapping
3424         initializers in equivalence blocks.
3425         * resolve.c (resolve_equivalence_derived, resolve_equivalence):
3426         Remove constraints on initializers in equivalence blocks.
3427         * target-memory.c (expr_to_char, gfc_merge_initializers):
3428         New functions.
3429         (encode_derived): Add the bit offset to the byte offset to get
3430         the total offset to the field.
3431         * target-memory.h : Add prototype for gfc_merge_initializers.
3433 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
3435         * trans-types.c (gfc_signed_type): Remove.
3436         * trans-types.h (gfc_signed_type): Remove.
3437         * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
3439 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3441         * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
3443 2007-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
3444             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3446         PR fortran/32223
3447         * match.c (gfc_match_special_char): New function.  Match special char.
3448         Add handling '\0'.
3449         * match.h: Add prototype.
3450         * io.c (next_char): Use it.
3451         * primary.c (next_string_char): Ditto.
3453 2007-06-06  Steven G. Kargl  <kargl@gcc.gnu.org>
3455         * decl.c: Miscellaneous whitespace fixes.
3456         * expr.c: Likewise.
3457         * gfortran.h: Likewise.
3458         * interface.c : Likewise.
3459         * io.c: Likewise.
3460         * match.c: Likewise.
3461         * match.h: Likewise.
3462         * module.c: Likewise.
3463         * parse.c: Likewise.
3464         * resolve.c: Likewise.
3465         * symbol.c: Likewise.
3466         * trans-array.c: Likewise.
3467         * trans-common.c: Likewise.
3468         * trans-decl.c: Likewise.
3469         * trans-intrinsic.c: Likewise.
3470         * trans-io.c: Likewise.
3471         * trans-stmt.c: Likewise.
3472         * trans-types.c: Likewise.
3474 2007-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3476         PR fortran/18923
3477         * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
3478         for ST_FUNCTION since it is called in reject_statement.
3479         (parse_contained): If error, loop back after reject_statement and try
3480         again.  Free the namespace if an error occured.
3482 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
3484         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
3485         to operate on a stack allocated array for the intrinsic arguments
3486         instead of creating a TREE_LIST. Add two new parameters for the
3487         array and the number of elements. Update all callers to allocate
3488         an array of the correct length to pass in. Update comment.
3489         (gfc_intrinsic_argument_list_length): New function.
3490         (gfc_conv_intrinsic_mnimax): Call it.
3491         (gfc_conv_intrinsic_merge): Likewise.
3492         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
3493         constructors.
3494         (gfc_conv_intrinsic_cmplx): Likewise.
3495         (gfc_conv_intrinsic_ctime): Likewise.
3496         (gfc_covn_intrinsic_fdate): Likewise.
3497         (gfc_conv_intrinsic_ttynam): Likewise.
3498         (gfc_conv_intrinsic_ishftc): Likewise.
3499         (gfc_conv_intrinsic_index): Likewise.
3500         (gfc_conv_intrinsic_scan): Likewise.
3501         (gfc_conv_intrinsic_verify): Likewise.
3502         (gfc_conv_intrinsic_trim): Likewise.
3503         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
3504         (gfc_conv_intrinsic_exponent): Likewise.
3505         (gfc_conv_intrinsic_bound): Likewise.
3506         (gfc_conv_intrinsic_abs): Likewise.
3507         (gfc_conv_intrinsic_mod): Likewise.
3508         (gfc_conv_intrinsic_sign): Likewise.
3509         (gfc_conv_intrinsic_len): Likewise.
3510         (gfc_conv_intrinsic_adjust): Likewise.
3511         (gfc_conv_intrinsic_si_kind): Likewise.
3513 2007-06-04  Steve Ellcey  <sje@cup.hp.com>
3515         * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
3517 2007-05-31  Richard Guenther  <rguenther@suse.de>
3519         * trans-expr.c (gfc_conv_expr_op): Use zero constant
3520         that matches the lse type.
3521         (gfc_trans_string_copy): Use sizetype zero constant.
3522         * intrinsic.c (add_functions): The sizeof intrinsic has
3523         index type result.
3524         * trans-types.c (gfc_get_dtype): Convert size to index
3525         type before shifting.
3526         * trans-array.c (gfc_trans_array_constructor_value): Use
3527         index type for offset computation.
3528         * trans-intrinsic.c (gfc_conv_associated): Use correct type
3529         for zero constant.
3531 2007-05-31  Paul Thomas  <pault@gcc.gnu.org>
3533         PR fortran/32156
3534         * trans-array.c (gfc_trans_array_constructor): Treat the case
3535         where the ss expression charlen is missing.
3537 22007-05-31  Paul Thomas  <pault@gcc.gnu.org>
3539         PR fortran/32103
3540         * module.c (mio_symtree_ref): If an equivalence group member
3541         is not used, give it a hidden symbol and set the pointer_info.
3542         (load_equiv): Only free the equivalence if none of the members
3543         are used.
3545 2007-05-29  Daniel Franke  <franke.daniel@gmail.com>
3547         * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
3548         added missing GFC_ISYM_* enumerators, ordered alphabetically.
3549         (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
3550         (gfc_find_subroutine): New prototype.
3551         * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
3552         (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.  
3553         * dependency.c: Changed usage of isym->generic_id to isym->id.  
3554         * openmp.c: Likewise.  
3555         * resolve.c: Likewise.  
3556         * trans-array.c: Likewise.  
3557         * trans-expr.c: Likewise.  
3558         * trans-intrinsic.c: Likewise.  
3559         * trans-openmp.c: Likewise.
3561 2007-05-28  Tobias Schlüter  <tobi@gcc.gnu.org>
3563         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
3564         * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
3565         * intrinsic.h (gfc_check_sizeof): Add prototype of ...
3566         * check.c (gfc_check_sizeof): .. new function.
3567         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
3568         (gfc_conv_intrinsic_strcmp): Whitespace fix.
3569         (gfc_conv_intrinsic_array_transfer): Remove double initialization,
3570         use fold_build. where appropriate.
3571         (gfc_conv_intrinsic_function): Add case for SIZEOF.
3572         * intrinsic.texi: Add documentation for SIZEOF.
3574 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
3576         * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
3578 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
3580         PR fortran/31972
3581         * target-memory.c (gfc_target_expr_size): Add handling
3582         for size of BT_HOLLERITH variables.
3583         * check.c (gfc_check_transfer): Reject BT_HOLLERITH
3584         variables in MOLD argument of TRANSFER.
3586 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
3588         * gfortran.h (gfc_expr): Remove from_H, add "representation"
3589         struct.
3590         * primary.c (match_hollerith_constant): Store the representation
3591         of the Hollerith in representation, not in value.character.
3592         * arith.c: Add dependency on target-memory.h.
3593         (eval_intrinsic): Remove check for from_H.
3594         (hollerith2representation): New function.
3595         (gfc_hollerith2int): Determine value of the new constant.
3596         (gfc_hollerith2real): Likewise.
3597         (gfc_hollerith2complex): Likewise.
3598         (gfc_hollerith2logical): Likewise.
3599         (gfc_hollerith2character): Point both representation.string and
3600         value.character.string at the value string.
3601         * data.c (create_character_initializer): For BT_HOLLERITH
3602         rvalues, get the value from the representation rather than
3603         value.character.
3604         * expr.c (free_expr0): Update handling of BT_HOLLERITH values
3605         and values with representation.string.
3606         (gfc_copy_expr): Likewise.
3607         * intrinsic.c (do_simplify): Remove special treatement of
3608         variables resulting from Hollerith constants.
3609         * dump-parse-trees.c (gfc_show_expr): Update handling of
3610         Holleriths.
3611         * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
3612         check with check for representation.string; get Hollerith
3613         representation from representation.string, not value.character.
3614         * trans-expr.c (is_zero_initializer_p): Replace from_H check
3615         with check for representation.string.
3616         * trans-stmt.c (gfc_trans_integer_select): Use
3617         gfc_conv_mpz_to_tree for case values, so as to avoid picking up
3618         the memory representation if the case is given by a transfer
3619         expression.
3620         * target-memory.c (gfc_target_encode_expr): Use the known memory
3621         representation rather than the value, if it exists.
3622         (gfc_target_interpret_expr): Store the memory representation of
3623         the interpreted expression as well as its value.
3624         (interpret_integer): Move to gfc_interpret_integer, make
3625         non-static.
3626         (interpret_float): Move to gfc_interpret_float, make non-static.
3627         (interpret_complex): Move to gfc_interpret_complex, make
3628         non-static.
3629         (interpret_logical): Move to gfc_interpret_logical, make
3630         non-static.
3631         (interpret_character): Move to gfc_interpret_character, make
3632         non-static.
3633         (interpret_derived): Move to gfc_interpret_derived, make
3634         non-static.
3635         * target-memory.h: Add prototypes for newly-exported
3636         gfc_interpret_* functions.
3638 2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3640         PR fortran/31812
3641         * parse.c (next_statement): Warn for truncated lines if source is free
3642         form.
3644 2007-05-27 Paul Thomas  <pault@gcc.gnu.org>
3645            Tobias Burnus  <burnus@net-b.de>
3647         PR fortran/32088
3648         * symbol.c (gfc_check_function_type): Copy dimensions of
3649           result variable.
3650         * resolve.c (resolve_contained_fntype): Improve symbol output in
3651           the error message.
3653 2007-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3655         PR fortran/31813
3656         * io.c (check_format): Add warning for H specifier in format.
3657         
3658 2007-05-26  Tobias Burnus  <burnus@net-b.de>
3660         * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
3661         GFORTRAN_ERROR_BACKTRACE environment variables.
3663 2007-05-26  Paul Thomas  <pault@gcc.gnu.org>
3665         PR fortran/31219
3666         * trans.h : Add no_function_call bitfield to gfc_se structure.
3667         Add stmtblock_t argument to prototype of get_array_ctor_strlen.
3668         * trans-array.c (get_array_ctor_all_strlen): New function.
3669         (get_array_ctor_strlen): Add new stmtblock_t argument and call
3670         new function for character elements that are not constants,
3671         arrays or variables.
3672         (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
3673         good string length.
3674         * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
3675         to call of get_array_ctor_strlen.
3677 2007-05-25  Kazu Hirata  <kazu@codesourcery.com>
3679         * intrinsic.texi: Fix typos.
3681 2007-05-25  Paul Thomas  <pault@gcc.gnu.org>
3683         PR fortran/32047
3684         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
3685         order in logic under EXPR_FUNCTION to handle functions with
3686         no arguments.
3688 2007-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3690         PR fortran/31716
3691         * array.c (spec_dimen_size): Test for correct BT_INTEGER type. 
3693 2007-05-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3695         PR fortran/32046
3696         * trans-expr.c (gfc_trans_zero_assign): Convert the result of
3697         TYPE_SIZE_UNIT into a signed type.
3698         (gfc_trans_array_copy):  Likewise.
3699         (gfc_trans_array_constructor_copy): Likewise.
3700         * trans-array.c (gfc_trans_create_temp_array): Likewise.
3701         (gfc_grow_array): Likewise.
3702         (gfc_array_init_size): Likewise.
3703         (gfc_duplicate_allocatable): Likewise.
3704         * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
3706 2007-05-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3708         PR fortran/18923
3709         * resolve.c (resolve_function): Don't call resolve_global_procedure if
3710         there is no name. Delete duplicated statement in ELSE clause.
3712 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3714         PR fortran/31627
3715         * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
3716         indicate whether we should check the upper bound in that dimension.
3717         (gfc_conv_array_index_offset): Check only the lower bound of the
3718         last dimension for assumed-size arrays.
3719         (gfc_conv_array_ref): Likewise.
3720         (gfc_conv_ss_startstride): Likewise.
3722 2007-05-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3723             Daniel Franke  <franke.daniel@gmail.com>
3725         PR fortran/32002
3726         * resolve.c (resolve_actual_arglist): Resolve actual argument after
3727         being identified as variable.
3729 2007-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3731         PR fortran/32027
3732         * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
3733         when the loop ends.
3735 2007-05-21  H.J. Lu  <hongjiu.lu@intel.com>
3737         * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
3739 2007-05-21  Paul Thomas  <pault@gcc.gnu.org>
3741         PR fortran/31867
3742         PR fortran/31994
3743         * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
3744         offset for non-descriptor, source arrays and correct for stride
3745         not equal to one before writing to field of output descriptor.
3747 2007-05-20  Daniel Franke  <franke.daniel@gmail.com>
3749         PR fortran/32001
3750         * check.c (check_rest): Improved argument conformance check and 
3751         fixed error message generation.
3753 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3755         PR fortran/30820
3756         * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
3757         simplify.o and trans-common.o.
3759 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3761         PR fortran/31974
3762         * trans-array.c (gfc_trans_auto_array_allocation): Avoid
3763         multiplication of mismatched types.
3765 2007-05-18  Daniel Franke  <franke.daniel@gmail.com>
3767         PR fortran/24633
3768         * symbol.c (gfc_add_flavor): Add the NAME to error message if
3769         available.
3771 2007-05-15  Daniel Franke  <franke.daniel@gmail.com>
3773         PR fortran/31919
3774         PR fortran/31929
3775         PR fortran/31930
3776         * intrinsic.c (check_specific): Check elemental intrinsics for
3777         rank and shape.
3778         (add_functions): Fixed dummy argument names of BESJN and BESYN.
3779         Fixed elemental status of MCLOCK and MCLOCK8.
3780         * check.c (check_rest): Added check for array conformance.
3781         (gfc_check_merge): Removed check for array conformance.
3782         (gfc_check_besn): Removed check for scalarity.
3783         * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
3784         (BESJN, BESYN): Clarified documentation.
3786 2007-05-17  Tobias Burnus  <burnus@net-b.de>
3788         * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
3790 2007-05-16  Brooks Moses  <brooks.moses@codesourcery.com>
3792         PR fortran/18769
3793         PR fortran/30881
3794         PR fortran/31194
3795         PR fortran/31216
3796         PR fortran/31427
3797         * target-memory.c: New file.
3798         * target-memory.h: New file.
3799         * simplify.c: Add #include "target-memory.h".
3800         (gfc_simplify_transfer): Implement constant-
3801         folding for TRANSFER intrinsic.
3802         * Make-lang.in: Add dependencies on new target-memory.* files.
3804 2007-05-15  Paul Brook  <paul@codesourcery.com>
3806         * trans-types.c (gfc_type_for_size): Handle signed TImode.
3808 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3810         PR fortran/30723
3811         * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
3812         gfor_fndecl_internal_free): Remove prototypes.
3813         (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
3814         * trans.c (gfc_call_malloc, gfc_call_free): New functions.
3815         * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
3816         and __builtin_malloc builtins.
3817         * trans-decl.c (gfor_fndecl_internal_malloc,
3818         gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
3819         (gfor_fndecl_os_error): Add.
3820         (gfc_build_builtin_function_decls): Don't create internal_malloc,
3821         internal_malloc64 and internal_free library function declaration.
3822         Create os_error library call function declaration.
3823         * trans-array.c (gfc_trans_allocate_array_storage,
3824         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3825         gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
3826         gfc_call_malloc and gfc_call_free instead of building calls to
3827         internal_malloc and internal_free.
3828         * trans-expr.c (gfc_conv_string_tmp): Likewise.
3829         * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
3830         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3831         gfc_trans_where_2: Likewise.
3832         * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
3833         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
3834         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
3836 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3838         PR fortran/31725
3839         * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
3840         only once.
3842 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
3844         * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
3845         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
3846         instead of gfc_unsigned_type.
3847         * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
3848         gfc_unsigned_type.
3849         * trans-types.c (gfc_unsigned_type): Remove.
3850         * trans-types.h (gfc_unsigned_type): Remove.
3852 2007-05-12  Paul Thomas  <pault@gcc.gnu.org>
3854         PR fortran/30746
3855         * resolve.c (check_host_association): New function that detects
3856         incorrect host association and corrects it.
3857         (gfc_resolve_expr): Call the new function for variables and
3858         functions.
3859         * match.h : Remove prototype for gfc_match_rvalue.
3860         * gfortran.h : Add prototype for gfc_match_rvalue.
3862 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3864         PR fortran/30876
3865         * trans-expr.c (gfc_conv_function_call): Reduce indirection for
3866         direct assignments of recursive array valued functions.
3867         * primary.c (gfc_match_rvalue): Correct error for recursive
3868         function calls such that directly recursive calls of scalar
3869         function without an explicit result are disallowed.
3871 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
3873         PR fortran/30878
3874         * resolve.c (resolve_fl_namelist): It is not an error if the
3875         namelist element is the result variable of the enclosing
3876         function.  Search for the symbol in current and all parent
3877         namespaces for a potential conflict.
3878         * symbol.c (check_conflict): Remove the conflict between
3879         'in_namelist' and 'FL_PROCEDURE' because the symbol info
3880         is not available to exclude function result variables.
3881         * trans-io.c (nml_get_addr_expr): Use the fake result decl
3882         if the symbol is an implicit result variable.
3884 2007-05-11  Paul Thomas  <pault@gcc.gnu.org>
3886         PR fortran/31474
3887         * decl.c (get_proc_name): If an entry has already been declared
3888         as a module procedure, pick up the symbol and the symtree and
3889         use them for the entry.
3891 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
3893         PR fortran/31630
3894         * resolve.c (resolve_symbol): Remove the flagging mechanism from the
3895         formal namespace resolution and instead check that the formal
3896         namespace is not the current namespace.
3898 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
3900         PR fortran/31692
3901         * trans-array.c (gfc_conv_array_parameter): Convert full array
3902         references to the result of the procedure enclusing the call.
3904 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
3906         PR fortran/29397
3907         PR fortran/29400
3908         * decl.c (add_init_expr_to_sym): Expand a scalar initializer
3909         for a parameter array into an array expression with the right
3910         shape.
3911         * array.c (spec_dimen_size): Remove static attribute.
3912         * gfortran.h : Prototype for spec_dimen_size.
3914 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3916         PR fortran/31399
3917         * trans-stmt.c (gfc_trans_do): Handle large loop counts.
3919 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3921         PR fortran/31764
3922         * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
3923         even for non constant arguments.
3925 2007-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3926             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3928         PR fortran/31201
3929         * gfortran.h: Add runtime error codes from libgfortran.h. Define
3930         MAX_UNIT_NUMBER.
3931         * trans.c (gfc_trans_runtime_check): Update the format of runtime error
3932         messages to match library runtime errors.  Use call to new library
3933         function runtime_error_at().
3934         * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
3935         Add declaration for library functions runtime_error_at and
3936         generate_error.
3937         * trans_io.c (gfc_trans_io_runtime_check): New function.
3938         (set_parameter_value): Add error checking for UNIT numbers.
3939         (set_parameter_ref): Initialize the users variable to zero. 
3940         (gfc_trans_open): Move setting of unit number to after setting of common
3941         flags so that runtime error trapping can be detected.
3942         (gfc_trans_close): Likewise. (build_filepos): Likewise.
3943         (gfc_trans_inquire): Likewise. (build_dt): Likewise.
3944         * trans-decl.c: Add declarations for runtime_error_at and
3945         generate_error. (gfc_build_builtin_function_decls): Build function
3946         declarations for runtime_error_at and generate_error.
3948 2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
3950         PR fortran/31540
3951         * resolve.c (resolve_fl_procedure): Resolve constant character
3952         lengths.
3954 2007-05-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3956         PR fortran/31251
3957         * decl.c (match_char_spec): Add check for invalid character lengths.
3959 2007-05-04  Brooks Moses  <brooks.moses@codesourcery.com>
3961         * intrinsic.texi (CMPLX): Document result kind.
3962         (COMPLEX): Add documentation.
3964 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
3966         PR fortran/31760
3967         * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
3968         by gfc_check_fn_r to avoid checks for scalarity.
3969         * check.c (gfc_check_besn): Removed check for scalarity.
3970         (gfc_check_g77_math1): Removed.
3971         * intrinsic.h (gfc_check_g77_math1): Removed.
3973 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
3975         * check.c (gfc_check_fseek_sub): Fixed typo.
3977 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
3979         PR fortran/22359
3980         * intrinsic.c (add_subroutines): Added FSEEK.
3981         * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
3982         * iresolve.c (gfc_resolve_fseek_sub): New.
3983         * check.c (gfc_check_fseek_sub): New.
3984         * intrinsic.texi (FSEEK): Updated.
3986 2007-05-04  Tobias Burnus  <burnus@net-b.de>
3988         PR fortran/31803
3989         * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
3991 2007-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3993         PR fortran/31251
3994         * simplify.c (gfc_simplify_len): Only simplify integer lengths.
3996 2007-05-04  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3998         PR fortran/31781
3999         * simplify.c (gfc_simplify_repeat): Don't put function call with
4000         side effect in a gcc_assert().
4002 2007-05-04  Tobias Burnus  <burnus@net-b.de>
4004         PR fortran/25071
4005         * interface.c (compare_actual_formal): Check character length.
4007 2007-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
4009         PR fortran/31732
4010         * dependency.c (gfc_full_array_ref_p):  If the reference is
4011         to a single element, check that the array has a single
4012         element and that the correct element is referenced.
4014 2007-05-01  Daniel Franke  <franke.daniel@gmail.com>
4016         * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
4017         (add_subroutines): Replaced magic numbers in function calls by
4018         ELEMENTAL and NOT_ELEMENTAL respectively.
4019         * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
4020         (RANDOM_NUMBER): Changed class to subroutine.
4021         (HUGE, TINY): Changed class to inquiry function.
4023 2007-04-30  Brooks Moses  <brooks.moses@codesourcery.com>
4025         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
4026         (gfc_conv_tree_to_mpz): New function.
4027         (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
4028         (gfc_conv_tree_to_mpfr): New function.
4029         * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
4030         (gfc_conv_tree_to_mpfr): New prototype.
4032 2007-04-30  Daniel Franke  <franke.daniel@gmail.com>
4034         * intrinsic.texi (IERRNO): Changed class to non-elemental function.
4035         (LOG10): Removed COMPLEX as accepted argument type.
4036         (NEW_LINE): Changed class from elemental to inquiry function.
4037         (SIGN): Removed requirement of scalar arguments.
4038         (SNGL): Changed class to elemental function.
4040 2007-04-29  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4042         PR fortran/31591
4043         * simplify.c (simplify_bound_dim): New function.
4044         (simplify_bound): Use the above. Perform simplification of LBOUND
4045         and UBOUND when DIM argument is not present.
4047 2007-04-29  Daniel Franke  <franke.daniel@gmail.com>
4049         * gfortran.texi: Cleaned up keyword index.
4050         * invoke.texi: Likewise.
4051         * intrinsic.texi: Likewise.
4052                         
4053 2007-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4055         PR fortran/31645
4056         * scanner.c (load_file): Discard the byte order mark if one is
4057         found on the first non-preprocessor line of a file.
4059 2007-04-29  Paul Thomas  <pault@gcc.gnu.org>
4061         PR fortran/31711
4062         * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
4063         whenever a dependency is found.
4065 2007-04-28  Tobias Schlüter  <tobi@gcc.gnu.org>
4067         * options.c (gfc_handle_option): Ensure requested free form line
4068         length is not too small.
4070 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
4072         * intrinsic.texi (Transfer): Improve documentation.
4074 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
4076         * gfortran.texi (Option Index): Add @samp as needed.
4078 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
4080         * gfortran.texi: Added node and menu entry for an option index.
4081         * invoke.texi: Moved command line option related entries of the concept 
4082         index to the option index.
4084 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
4086         * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
4087         XOR): Fixed examples.
4089 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
4091         * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM, 
4092         SYSTEM_CLOCK, TRANSFER, UNPACK): New.
4093         (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
4095 2007-04-26  Daniel Franke  <franke.daniel@gmail.com>
4097         * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE, 
4098         SIZE, TRANSPOSE, TRIM, VERIFY): New.
4099         (ADJUSTL, ADJUSTR, INDEX): Added cross references.
4100         (INT, INT2, INT8, LONG): Enabled section header.
4102 2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
4104         * module.c (module_char): Replace fgetc() with
4105         getc(). 
4106         (write_char): Replace fputc() with putc().
4107         * scanner.c (load_line): Replace fgetc() with getc().
4108         (gfc_read_orig_filename): Likewise.
4110 2007-04-25  Tobias Burnus  <burnus@net-b.de>
4112         PR fortran/31668
4113         * error.c (error_print): Fix %% support.
4114         * intrinsic.c (sort_actual): Improve error message.
4115         * resolve.c (resolve_actual_arglist): Allow %VAL for
4116         interfaces defined in the module declaration part.
4118 2007-04-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4120         PR libfortran/31299
4121         * intrinsic.texi (GETLOG): Update documentation to reflect
4122         library changes.
4124 2007-04-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4126         PR fortran/31587
4127         * module.c (write_char): Add character to the MD5 buffer.
4128         (read_md5_from_module_file): New function.
4129         (gfc_dump_module): Compute MD5 for new module file. Call
4130         read_md5_from_module_file. Only overwrite old module file
4131         if the new MD5 is different.
4133 2007-04-23  Paul Thomas  <pault@gcc.gnu.org>
4135         PR fortran/31630
4136         * resolve.c (resolve_symbol): Allow resolution of formal
4137         namespaces nested within formal namespaces coming from modules.
4139         PR fortran/31620
4140         * trans-expr.c (gfc_trans_assignment): Make the call to
4141         gfc_trans_zero_assign conditional on the lhs array ref being
4142         the only reference.
4144 2007-04-23  Tobias Burnus  <burnus@net-b.de>
4146         * primary.c (match_integer_constant): Mention -fno-range-check
4147         in the error message.
4149 2007-04-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4151         PR fortran/31495
4152         * scanner.c (load_line):  Remove check for comment after ampersand and
4153         adjust tracking of ampersand.
4155 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
4157         * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
4158         instead of checking GIMPLE_STMT_P in chain_next.
4160 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
4162         * trans-types.h (gfc_packed): New enum.
4163         (gfc_get_nodesc_array_type): Change prototype to use new enum.
4164         * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
4165         argument packed.  Adapt all references to values accordingly.
4166         (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
4167         (gfc_get_derived_type): Likewise.
4168         * trans-array.c (gfc_build_constant_array_constructor): Likewise.
4169         * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
4170         argument to type gfc_packed.
4171         (gfc_add_interface_mapping): Use enum values in call to
4172         gfc_get_interface_mapping.
4173         * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
4174         values when determining packing.
4176         * trans-decl.c (gfc_finish_decl): Remove unused second argument
4177         'init'.  Simplify code accordingly.  Remove calls to
4178         gfc_fatal_error in favor of gcc_assert.
4179         (create_function_arglist): Remove second argument from calls to
4180         gfc_finish-decl.
4181         (gfc_trans_dummy_character): Likewise.
4183         * arith.h: Update copyright years.
4184         * dependency.h: Likewise.
4185         * gfortran.h: Likewise.
4186         * lang-specs.h: Likewise.
4187         * parse.h: Likewise.
4188         * symbol.c: Likewise.
4189         * trans.h: Likewise.
4190         * trans.c: Likewise.
4191         * trans-array.c: Likewise.
4192         * trans-common.c: Likewise.
4193         * trans-const.h: Likewise.
4194         * trans-const.c: Likewise.
4195         * trans-decl.c: Likewise.
4196         * trans-expr.c: Likewise.
4197         * trans-io.c: Likewise.
4198         * trans-openmp.c: Likewise.
4199         * trans-types.h: Likewise.
4200         * types.def: Likewise.
4202 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
4204         PR fortran/31144
4205         * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
4206         mangling.
4207         (gfc_sym_mangled_function_id): Likewise.
4209 2007-04-15  Paul Thomas  <pault@gcc.gnu.org>
4211         PR fortran/31204
4212         * primary.c (check_for_implicit_index): New function to check
4213         that a host associated variable is not an undeclared implied
4214         do loop index.
4215         (gfc_match_rvalue, match_variable): Use it and reset the
4216         implied_index attribute.
4217         * gfortran.h : Add the implied_index field to symbol_attribute.
4218         * match.c (gfc_match_iterator): Mark the iterator variable
4219         with the new attribute.
4220         * decl.c (build_sym): Reset the new attribute.
4222 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
4224         * gfc-internals.texi: Fix typos.
4225         * simplify.c: Fix a comment typo.
4227 2007-04-14  Bernhard Fischer  <aldot@gcc.gnu.org>
4229         * primary.c: Commentary typo fix; Add question about redundant (?)
4230         set.
4232 2007-04-14  Paul Thomas  <pault@gcc.gnu.org>
4234         PR fortran/29507
4235         PR fortran/31404
4236         * expr.c (scalarize_intrinsic_call): New function to
4237         scalarize elemental intrinsic functions in initialization
4238         expressions.
4239         (check_init_expr): Detect elemental intrinsic functions
4240         in initalization expressions and call previous.
4242 2007-04-13  Tobias Burnus  <burnus@net-b.de>
4244         PR fortran/31559
4245         * primary.c (match_variable): External functions
4246         are no variables.
4248 2007-04-13  Paul Thomas  <pault@gcc.gnu.org>
4250         PR fortran/31550
4251         * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
4252         derived type components.
4254 2007-04-13  Tobias Schlüter  <tobi@gcc.gnu.org>
4256         PR fortran/18937
4257         * resolve.c: Include obstack.h and bitmap.h.  New variable
4258         labels_obstack.
4259         (code_stack): Add tail and reachable_labels fields.
4260         (reachable_labels): New function.
4261         (resolve_branch): Rework to use new fields in code_stack.
4262         (resolve_code): Call reachable_labels.
4263         (resolve_codes): Allocate and free labels_obstack.
4265 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
4267         PR fortran/31250
4268         * decl.c (match_char_spec): Move check for negative CHARACTER
4269         length ...
4270         * resolve.c (resolve_charlen): ... here.
4271         (resolve_types): Resolve CHARACTER lengths earlier.
4273 2007-04-12  Daniel Franke  <franke.daniel@gmail.com>
4275         PR fortran/31234
4276         * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
4278 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
4280         PR fortran/31266
4281         * primary.c (gfc_variable_attr): Don't copy string length if it
4282         doesn't make sense.
4283         * resolve.c (resolve_code): Clarify error message.
4285         PR fortran/31471
4286         * decl.c (gfc_match_end): Also check for construct name in END
4287         FORALL and END WERE statements.
4288         * match.c (match_case_eos): Use uppercase for statement name in
4289         error message.
4290         (match_elsewhere): Construct name may appear iff construct has a
4291         name.
4293         * trans-types.c: Update copyright years.  Reformat long comment
4294         explaining array descriptor format.  Remove obsolete mention of
4295         TYPE_SET.
4297         * arith.c (gfc_arith_uplus): Rename to ...
4298         (gfc_arith_identity): ... this.
4299         (gfc_parentheses): New function.
4300         (gfc_uplus): Adapt to renamed function.
4301         * arith.h (gfc_parentheses): Add prototype.
4302         * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
4303         (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
4304         INTRINSIC_PARENTHESES.
4306 2007-04-12  Tobias Burnus  <burnus@net-b.de>
4308         PR fortran/31472
4309         * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
4310         attribute in type definitions.
4311         (gfc_match_private): Allow PRIVATE statement only
4312         in specification part of modules.
4313         (gfc_match_public): Ditto for PUBLIC.
4314         (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
4315         specificification part of modules.
4317 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4319         PR fortran/31257
4320         * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
4321         * intrinsic.h : Add prototype for gfc_resolve_achar.
4322         * iresolve.c (gfc_resolve_achar): New function.
4324 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4326         PR fortran/30880
4327         * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
4328         arrays.  Make condition for automatic array error explicit.
4329         If a dummy, no error on an INTENT(OUT) derived type.
4331 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4333         PR fortran/30872
4334         * expr.c (find_array_element): Correct arithmetic for rank > 1.
4336 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4338         PR fortran/31222
4339         * check.c (numeric_check): If an expresson has not got a type,
4340         see if it is a symbol for which a default type applies.
4342 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4344         PR fortran/31214
4345         * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
4346         associated symbols.
4348 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
4350         PR fortran/31293
4351         * symbol.c (gfc_check_function_type): New function.
4352         * gfortran.h : Add prototype for previous.
4353         * parse.c (parse_progunit): Call it after parsing specification
4354         statements.
4356 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
4358         PR fortran/31483
4359         * trans-expr.c (gfc_conv_function_call): Give a dummy
4360         procedure the correct type if it has alternate returns.
4362 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
4364         PR fortran/31292
4365         * decl.c (gfc_match_modproc): Go up to the top of the namespace
4366         tree to find the module namespace for gfc_get_symbol.
4368 2007-04-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4370         PR fortran/31304
4371         * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
4372         * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
4373         (gfc_init_types): Define gfc_charlen_int_kind. 
4374         * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
4375         * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
4376         (gfc_build_intrinsic_function_decls): Don't set
4377         gfor_fndecl_string_repeat.
4378         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
4379         so that we don't have to call a library function.
4380         * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
4381         checks on the NCOPIES argument, and work with arbitrary size
4382         arguments.
4384 2007-03-31  Tobias Burnus  <burnus@net-b.de>
4386         * intrinsic.c (add_functions): Fix name of dummy argument
4387           for new_line and exit intrinsic.
4389 2007-03-31  Paul Thomas  <pault@gcc.gnu.org>
4391         PR fortran/31160
4392         * gfortran.texi: Add a section for the %VAL, %REF and %LOC
4393         extensions.
4395 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
4397         * trans-types.c (gfc_signed_or_unsigned_type): Remove.
4398         (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
4399         gfc_signed_or_unsigned_type.
4400         (gfc_signed_type): Ditto.
4401         * trans-types.h (gfc_signed_or_unsigned_type): Remove.
4402         * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4404 2007-03-30  Tobias Schlüter  <tobi@gcc.gnu.org>
4406         * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
4407         descend into all branches.
4409 2007-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
4411         * intrinsic.c (conv_name): Let gfc_get_string handle the format.
4412         (find_conv): Compare pointers instead of calling strcmp.
4413         (find_sym): Likewise, but ensure that the compared pointer is in
4414         the global string table.
4416 2007-03-28  Tobias Schlüter  <tobi@gcc.gnu.org>
4418         * gfc-internals.texi: Fix output filename.  Merge type index into
4419         concept index.  Start documentation of gfc_code structure.
4421 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
4423         * gfc-internals.texi: New file,
4424         * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
4426 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
4428         * error.c (show_locus): Remove always-false test.
4430 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
4432         * lang.opt: Minor edits to descriptions.
4434 2007-03-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4436         PR fortran/30877
4437         * fortran/interface.c (check_operator_interface): Implement
4438         the standard checks on user operators extending intrinsic operators.
4439         * fortran/resolve.c (resolve_operator): If the ranks of operators
4440         don't match, don't error out but try the user-defined ones first.
4442 2007-03-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4444         PR fortran/30655
4445         * expr.c (check_dimension): Fix logic of comparisons.
4447 2007-03-24  Paul Thomas  <pault@gcc.gnu.org>
4449         PR fortran/31215
4450         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
4451         int result that is non-zero if the expression is the function
4452         result.  Only the characteristics of the result expression
4453         can be used in a procedure interface, so simplify LEN in situ
4454         using its character length.
4456         PR fortran/31209
4457         PR fortran/31200
4458         * trans-expr.c (gfc_conv_function_call): Do not use
4459         gfc_conv_expr_reference for actual pointer function with formal
4460         target because a temporary is created that does not transfer
4461         the reference correctly.  Do not indirect formal pointer
4462         functions since it is the function reference that is needed.
4464 2007-03-24  Brooks Moses  <brooks.moses@codesourcery.com>
4466         * gfortran.h: Edit comments on GFC_STD_*.
4468 2007-03-23  Brooks Moses  <brooks.moses@codesourcery.com>
4470         * invoke.texi: Misc. small typo fixes.
4471         (-Wcharacter-truncation): Add.
4472         (-Wnonstd-intrinsics): Correct spelling.
4473         (-std=): Edit.
4474         (-fintrinsic-modules-path): Add.
4476 2007-03-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4478         PR fortran/30834
4479         * arith.c (complex_pow): Rewrite to handle large power.
4480         (gfc_arith_power): Handle large power in the real and integer
4481         cases.
4483 2007-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4485         PR fortran/31262
4486         * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
4487         larger than twice the width of a HOST_WIDE_INT.
4489 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
4491         PR fortran/31193
4492         * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
4493         (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
4494         Explicitly extract TREE_TYPEs for source and mold.  Use these
4495         to calculate length of source and mold, except for characters,
4496         where the se string_length is used.  For mold, the TREE_TYPE is
4497         recalculated using gfc_get_character_type_len so that the
4498         result is correctly cast for character literals and substrings.
4499         Do not use gfc_typenode_for_spec for the final cast.
4501 2007-03-22  Tobias Schlüter  <tobi@gcc.gnu.org>
4503         PR fortran/20897
4504         * decl.c (gfc_match_derived_decl): Reliably reject
4505         'doubleprecision' and 'doublecomplex' as type names.
4507 2007-03-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4509         PR fortran/31203
4510         * trans-expr.c (gfc_trans_init_string_length): Length should
4511         never be negative.
4512         (gfc_conv_function_call): Likewise.
4514 2007-03-18  Paul Thomas  <pault@gcc.gnu.org>
4516         PR fortran/30531
4517         PR fortran/31086
4518         * symbo.c : Add gfc_derived_types.
4519         (gfc_free_dt_list): Free derived type list gfc_derived_types.
4520         (gfc_free_namespace): Remove call to gfc_free_dt_list.
4521         (gfc_symbol_done_2): Call  gfc_free_dt_list.
4522         * gfortran.h : Declare gfc_derived_types to be external. Remove
4523         derived types field from gfc_namespace.
4524         * resolve.c (resolve_fl_derived): Refer to gfc_derived types
4525         rather than namespace derived_types.
4526         (resolve_fntype): Remove special treatment for module
4527         derived type functions.
4528         * trans-types.c (gfc_get_derived_type): Remove search for like
4529         derived types.  Finish by copying back end declaration to like
4530         derived types in the derived type list gfc_derived_types.
4532         2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4534         PR fortran/31120
4535         * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
4536         (gfc_conv_cst_int_power): Handle integer exponent with care,
4537         since it might be too large for us.
4539 2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4541         PR fortran/31184
4542         * invoke.texi: Fix typo.
4544 2007-03-16  Tobias Burnus  <burnus@net-b.de>
4546         * trans-decl.c (gfc_generate_function_code): Use all arguments of
4547           set_std.
4549 2007-03-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4551         * gfortran.h (gfc_option_t): Add flag_backtrace field.
4552         * lang.opt: Add -fbacktrace option.
4553         * invoke.texi: Document the new option.
4554         * trans-decl.c (gfc_build_builtin_function_decls): Add new
4555         option to the call to set_std.
4556         * options.c (gfc_init_options, gfc_handle_option): Handle the
4557         new option.
4559 2007-03-15  Tobias Burnus  <burnus@gcc.gnu.org>
4560             Paul Thomas  <pault@gcc.gnu.org>
4562         PR fortran/30922
4563         * decl.c (gfc_match_import): If the parent of the current name-
4564         space is null, try looking for an imported symbol in the parent
4565         of the proc_name interface.
4566         * resolve.c (resolve_fl_variable): Do not check for blocking of
4567         host association by a same symbol, if the symbol is in an
4568         interface body.
4570 2007-03-15  Paul Thomas  <pault@gcc.gnu.org>
4572         PR fortran/30879
4573         * decl.c (match_data_constant): Before going on to try to match
4574         a name, try to match a structure component.
4577         PR fortran/30870
4578         * resolve.c (resolve_actual_arglist): Do not reject a generic
4579         actual argument if it has a same name specific interface.
4581         PR fortran/31163
4582         * trans-array.c (parse_interface): Do not nullify allocatable
4583         components if the symbol has the saved attribute.
4585 2007-03-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
4587         * trans-array.c (gfc_trans_auto_array_allocation): Replace
4588         fold(convert()) by fold_convert().
4589         (gfc_duplicate_allocatable): Likewise.
4590         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
4591         build_int_cst instead of converting an integer_zero_node
4592         to the final type.
4594 2007-03-14  Jakub Jelinek  <jakub@redhat.com>
4596         * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
4598 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
4600         PR fortran/30933
4601         PR fortran/30948
4602         PR fortran/30953
4603         * intrinsics.texi (CHDIR): Fix argument names, note
4604         that STATUS must be a default integer.
4605         (CTIME): Fix argument names, note that RESULT must
4606         be a default integer.
4607         (EXIT): Note that STATUS must be a default integer.
4609 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
4611         PR fortran/28068
4612         * intrinsic.texi: General whitespace cleanup, remove
4613         comment about missing intrinsics.
4614         (menu): Add lines for new entries listed below.
4615         (ACOSH): Mention specific function DACOSH, correct
4616         description phrasing.
4617         (ASINH): Mention specific function DASINH, correct
4618         description phrasing.
4619         (ATANH): Mention specific function DATANH, correct
4620         description phrasing.
4621         (COS): Add index entry for CCOS.
4622         (CPU_TIME): Correct "REAL" to "REAL(*)".
4623         (EXP): Add index entry for CEXP.
4624         (INT): Correct argument name to "A".
4625         (INT2): New entry.
4626         (INT8): New entry.
4627         (LONG): New entry.
4628         (MAX): Add index entries for specific variants.
4629         (MCLOCK): New entry.
4630         (MCLOCK8): New entry.
4631         (SECNDS): Adjust to a more standard form.
4632         (SECOND): New entry.
4633         (TIME): Add cross-reference to MCLOCK.
4634         (TIME8): Add cross-reference to MCLOCK8.
4636 2007-03-11  Paul Thomas  <pault@gcc.gnu.org>
4638         PR fortran/30883
4639         * parse.c (parse_interface): Use the default types from the
4640         formal namespace if a function or its result do not have a type
4641         after parsing the specification statements.
4643 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
4645         * intrinsic.texi: (ICHAR) Improve internal I/O note.
4646         (ACHAR): Reference it.
4647         (CHAR): Reference it.
4648         (IACHAR): Reference it.
4650 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
4652         * intrinsic.texi: (LINK) Document function form.
4653         (RENAME): Likewise.
4654         (SYMLNK): Likewise.
4655         (SYSTEM): Likewise.
4656         (UNLINK): Likewise.
4658 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
4660         * intrinsic.texi: minor typo fixes, removed prologue.
4661         (FSEEK): moved to correct place in alphabetical order.
4663 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
4665         PR fortran/30947
4666         * check.c (gfc_check_alarm_sub): Added check for default integer 
4667         kind of status argument.
4668         * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of 
4669         status argument.
4670         * intrinsic.texi (ALARM): Extended documentation.
4672 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
4674         * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
4675         (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
4676         * intrinsic.c (add_subroutines): Adjusted dummy argument names 
4677         of GERROR and TTYNAM.
4679 2007-07-08  Tobias Burnus  <burnus@net-b.de>
4681         * module.c (gfc_match_use): Support renaming of operators
4682         in USE statements.
4683         * gfortran.texi (Fortran 2003 Status): Document support of
4684         renaming of operators.
4686 2007-07-08  Tobias Burnus  <burnus@net-b.de>
4688         PR fortran/30973
4689         * module.c (read_module): Always import module name as symbol.
4690         (gfc_match_use): Disallow module name in the only clause of
4691         a use statement.
4693 2007-03-08  Paul Thomas  <pault@gcc.gnu.org>
4695         PR fortran/31011
4696         * expr.c (find_array_section): Correct arithmetic for section
4697         size.
4699 2007-03-07  Brooks Moses  <brooks.moses@codesourcery.com>
4701         * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
4703 2007-03-06  Daniel Franke  <franke.daniel@gmail.com>
4705         PR documentation/30950
4706         * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
4707         (FREE): Fix call syntax.
4709 2007-03-06  Brooks Moses  <brooks.moses@codesourcery.com>
4711         * intrinsic.texi: Limit column widths to a total of .85.
4713 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
4715         * gfortran.texi (GFortran and G77): Rewrite completely.
4717 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
4719         * match.c (gfc_match_name): Expanded comment.
4721 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
4723         * gfortran.texi (Old-style kind specifications): Document
4724         special handling of old-style kind specifiers for COMPLEX.
4725         * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
4726         assumptions for COMPLEX in comment.
4728 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
4730         PR 31050
4731         * gfortranspec.c (lang_specific_driver): Update program
4732         name and copyright date.
4734 2007-03-03  Paul Thomas  <pault@gcc.gnu.org>
4736         PR fortran/30882
4737         * check.c (dim_rank_check): The shape of subsections of
4738         assumed-size arrays is known.
4740 2007-03-02  Paul Thomas  <pault@gcc.gnu.org>
4741             Tobias Burnus  <burnus@net-b.de>
4743         PR fortran/30873
4744         * decl.c (gfc_match_entry): Remove erroneous entry result check.
4746 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
4748         * Make-lang.in: Add install-pdf target as copied from
4749         automake v1.10 rules.
4751 2007-03-01  Tobias Burnus  <burnus@net-b.de>
4753         PR fortran/30865
4754         * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
4756 2007-02-28  Tobias Burnus  <burnus@net-b.de>
4757             Paul Thomas  <pault@gcc.gnu.org>
4759         PR fortran/30888
4760         PR fortran/30887
4761         * resolve.c (resolve_actual_arglist): Allow by-value
4762         arguments and non-default-kind for %VAL().
4763         * trans-expr.c (conv_arglist_function): Allow
4764         non-default-kind for %VAL().
4766 2007-02-28  Tobias Burnus  <burnus@net-b.de>
4768         PR fortran/30968
4769         * primary.c (next_string_char): Correct reading a character
4770         after the delimiter.
4771         (match_string_constant): Print warning message only once.
4773 2007-02-27  Richard Guenther  <rguenther@suse.de>
4775         * trans-array.c (structure_alloc_comps): Use correct type
4776         for null pointer constant.
4778 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
4780         * gfortran.texi: Standardize title page, remove version number
4781         from copyright page.
4783 2007-02-26  Thomas Koenig  <Thomas.Koenig@online.de>
4784             Paul Thomas  <pault@gcc.gnu.org>
4786         PR fortran/30865
4787         * trans-intrinsic.c (gfc_conv_intrinsic_size):
4788         If dim is an optional argument, check for its
4789         presence and call size0 or size1, respectively.
4791 2007-02-23  Paul Thomas <pault@gcc.gnu.org>
4793         PR fortran/30660
4794         * resolve.c (has_default_initializer): New function.
4795         (resolve_fl_variable): Call has_default_initializer to determine if
4796         the derived type has a default initializer to its ultimate
4797         components.
4800 2007-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4802         * options.c (set_default_std_flags): New function to consolidate
4803         setting the flags.
4804         (gfc_init_options): Use new function.
4805         (gfc_handle_option): Use new function.
4807 2007-02-22  Brooks Moses  <brooks.moses@codesourcery.com>
4809         * gfortran.texi (Old-style kind specifications): Document
4810         special handling of old-style kind specifiers for COMPLEX.
4811         * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
4812         assumptions in comment.
4814 2007-02-21  Bernhard Fischer  <aldot@gcc.gnu.org>
4816         * parse.c (next_free): Gooble spaces after OpenMP sentinel.
4818 2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>
4820         PR fortran/30869
4821         * match.c (gfc_match_iterator): Remove conflict between
4822         loop variable and pointer.
4824 2007-02-20  Tobias Burnus  <burnus@net-b.de>
4826         PR fortran/30522
4827         * symbol.c (gfc_add_volatile): Allow to set VOLATILE
4828           attribute for host-associated variables.
4829         * gfortran.h (symbol_attribute): Save namespace
4830           where VOLATILE has been set.
4831         * trans-decl.c (gfc_finish_var_decl): Move variable
4832           declaration to the top.
4834 2007-02-20  Tobias Burnus  <burnus@net-b.de>
4836         PR fortran/30783
4837         * resolve.c (resolve_symbol): Add character dummy VALUE check.
4839 2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
4841         PR libfortran/30533
4842         * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
4843         argument to default integer.
4844         (gfc_resolve_minloc): Likewise.
4846 2007-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4848         PR fortran/30681
4849         * options.c (gfc_init_options): Relax warning level for obsolescent.
4850         * match.c (match_arithmetic_if): Change to obsolescent from deleted.
4851         (gfc_match_if): Same.
4853 2007-02-18  Roger Sayle  <roger@eyesopen.com>
4855         * trans-array.c (gfc_build_constant_array_constructor): When the
4856         shape of the constructor is known, use that to construct the
4857         gfc_array_spec.
4858         (gfc_trans_constant_array_constructor): Initialize the "info"
4859         information for all of the dimensions of the array constructor.
4860         (constant_array_constructor_loop_size): New function.
4861         (gfc_trans_array_constructor): Use it to determine whether a
4862         loop is suitable for "constant array constructor" optimization.
4864         * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
4865         instead of build2, to avoid conditions like "(a != b) != 0".
4867 2007-02-18  Roger Sayle  <roger@eyesopen.com>
4868             Paul Thomas <pault@gcc.gnu.org>
4870         PR fortran/30400
4871         * match.c (match_forall_iterator): Use gfc_match_expr instead
4872         of gfc_match_variable to match the iterator variable.  Return
4873         MATCH_NO if not a variable.  Remove the reset of the symbol's
4874         flavor in cleanup.
4876 2007-02-16  Tobias Burnus  <burnus@net-b.de>
4878         PR fortran/30793
4879         * trans-decl.c (gfc_generate_function_code): Do not initialize
4880         pointers to derived components.
4882 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
4883             Brooks Moses  <brooks.moses@codesourcery.com>
4884             Lee Millward  <lee.millward@codesourcery.com>
4886         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
4887         (gfc_conv_string_tmp): Likewise.
4888         (gfc_conv_concat_op): Likewise.
4889         (gfc_build_compare_string): Likewise.
4890         (gfc_conv_function_call): Use build_call_list instead of build3.
4892         * trans-array.c (gfc_trans_allocate_array_storage): Use
4893         build_call_expr.
4894         (gfc_grow_array): Likewise.
4895         (gfc_trans_array_ctor_element): Likewise.
4896         (gfc_trans_array_constructor_value): Likewise.
4897         (gfc_array_allocate): Likewise.
4898         (gfc_array_deallocate): Likewise.
4899         (gfc_trans_auto_array_allocation): Likewise.
4900         (gfc_trans_dummy_array_bias): Likewise.
4901         (gfc_conv_array_parameter): Likewise.
4902         (gfc_trans_dealloc_allocated): Likewise.
4903         (gfc_duplicate_allocatable): Likewise.
4905         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
4906         (gfc_trans_omp_flush): Likewise.
4908         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
4909         (gfc_trans_pause): Likewise.
4910         (gfc_trans_stop): Likewise.
4911         (gfc_trans_character_select): Likewise.
4912         (gfc_do_allocate): Likewise.
4913         (gfc_trans_assign_need_temp): Likewise.
4914         (gfc_trans_pointer_assign_need_temp): Likewise.
4915         (gfc_trans_forall_1): Likewise.
4916         (gfc_trans_where_2): Likewise.
4917         (gfc_trans_allocate): Likewise.
4918         (gfc_trans_deallocate): Likewise.
4920         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
4922         * trans-io.c (gfc_trans_open): Use build_call_expr.
4923         (gfc_trans_close): Likewise.
4924         (build_filepos): Likewise.
4925         (gfc_trans_inquire): Likewise.
4926         (NML_FIRST_ARG): Delete.
4927         (NML_ADD_ARG): Delete.
4928         (transfer_namelist_element): Use build_call_expr.
4929         (build_dt): Likewise.
4930         (gfc_trans_dt_end): Likewise.
4931         (transfer_expr): Likewise.
4932         (transfer_array-desc): Likewise.
4934         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
4935         (gfc_generate_constructors): Likewise.
4937         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
4938         (gfc_conv_intrinsic_fdate): Likewise.
4939         (gfc_conv_intrinsic_ttynam): Likewise.
4940         (gfc_conv_intrinsic_array_transfer): Likewise.
4941         (gfc_conv_associated): Likewise.
4942         (gfc_conv_intrinsic_si_kind): Likewise.
4943         (gfc_conv_intrinsic_trim): Likewise.
4944         (gfc_conv_intrinsic_repeat: Likewise.
4945         (gfc_conv_intrinsic_iargc): Likewise.
4947 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4949         PR fortran/30779
4950         * scanner.c (gfc_next_char_literal): Add check for end of file after
4951         call to advance_line.
4953 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
4955         PR fortran/30799
4956         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
4957         kind.
4959 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
4961         * misc.c (gfc_typename): Fix potential buffer overflow.
4963 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
4965         PR fortran/30554
4966         * module.c (read_module): Set pointer_info to referenced if the
4967         symbol has no namespace.
4969 2007-02-12  Nick Clifton  <nickc@redhat.com>
4971         * lang.opt: Add Warning attribute to warning options.
4973 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
4975         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
4976         (SLEEP): Added section and documentation.
4978 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
4980         PR fortran/30478
4981         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
4982         (variable_decl): Likewise.  Rewrap comment.
4983         (match_attr_spec): Remove ENUM specific code.
4984         (gfc_match_enum): Fix typo in error message.
4985         (enumerator_decl): New function.
4986         (gfc_match_enumerator_def): Use enumerator_decl instead of
4987         variable_decl.  Adapt code accordingly.
4989 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
4991         PR fortran/30554
4992         * module.c (find_symtree_for_symbol): New function to return
4993         a symtree that is not a "unique symtree" given a symbol.
4994         (read_module): Do not automatically set pointer_info to
4995         referenced because this inhibits the generation of a unique
4996         symtree.  Recycle the existing symtree if possible by calling
4997         find_symtree_for_symbol.
4999         PR fortran/30319
5000         * decl.c (add_init_expr_to_sym): Make new charlen for an array
5001         constructor initializer.
5003 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
5005         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
5006         and __emutls_register_common.
5007         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
5008         * trans-common.c (build_common_decl): Don't check have_tls.
5009         * trans-decl.c (gfc_finish_var_decl): Likewise.
5010         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
5011         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
5013 2007-02-09  Tobias Burnus  <burnus@net-b.de>
5015         PR fortran/30512
5016         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
5017           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
5019 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5021         PR fortran/30720
5022         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
5023         function argument. Always generate code for negative extent.
5024         Simplify said code.
5025         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
5026         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
5027         of gfc_trans_create_temp_array.
5028         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
5029         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
5031 2007-02-08  Roger Sayle  <roger@eyesopen.com>
5033         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
5034         mask expression is a compile-time constant (".true." or ".false.").
5036 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5038         PR fortran/30611
5039         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
5040         arguments only once. Generate check that NCOPIES argument is not
5041         negative.
5043 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
5045         PR fortran/30605
5046         * fortran/invoke.texi: Update documentation.
5047         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
5048         and -pedantic.
5050 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
5052         * trans-array.c: Fix a comment typo.
5054 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
5056         PR fortran/30514
5057         * array.c (match_array_element_spec): If the length of an array is
5058         negative, adjust the upper limit to make it zero length.
5060         PR fortran/30660
5061         * resolve.c (pure_function, resolve_function): Initialize name to
5062         null to clear up build warnings.
5063         (resolve_fl_variable): Look at components explicitly to check for
5064         default initializer, rather than using gfc_default_initializer.
5066 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
5068         PR fortran/30683
5069         * resolve.c (resolve_generic_f): Check for non-NULL sym.
5071 2007-02-02  Roger Sayle  <roger@eyesopen.com>
5073         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
5074         NON_LVALUE_EXPR nodes and useless type conversions.
5076 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
5078         PR fortran/30284
5079         PR fortran/30626
5080         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
5081         from function and make sure that substring lengths are
5082         translated.
5083         (is_aliased_array): Remove static attribute.
5084         * trans.c : Add prototypes for gfc_conv_aliased_arg and
5085         is_aliased_array.
5086         * trans-io.c (set_internal_unit): Add the post block to the
5087         arguments of the function.  Use is_aliased_array to check if
5088         temporary is needed; if so call gfc_conv_aliased_arg.
5089         (build_dt): Pass the post block to set_internal_unit and
5090         add to the block after all io activiy is done.
5092 2007-02-01  Roger Sayle  <roger@eyesopen.com>
5094         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
5095         a temporary array to pass a constant non-character array constructor.
5096         Generalize the descriptor generation code to handle scalarizer
5097         "info" without an array reference.
5099 2007-02-01  Roger Sayle  <roger@eyesopen.com>
5101         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
5102         dependency checking for array constructors.
5104 2007-02-01  Roger Sayle  <roger@eyesopen.com>
5106         * trans-stmt.c (compute_overall_iter_number): Document function
5107         arguments.  Generalize "unconditional forall nest with constant
5108         bounds" optimization to eliminate unconditional inner loops with
5109         constant bounds.
5111 2007-01-31  Tobias Burnus  <burnus@net-b.de>
5113         PR fortran/30520
5114         * interface.c (compare_actual_formal): Check conformance between
5115           actual and VOLATILE dummy arguments.
5116         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
5117           multiple times in different scopes.
5118         * decl.c (gfc_match_volatile): Search symbol in host association.
5120 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
5122         * simplify.c, trans-array.c: Fix comment typos.
5124 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5126         * invoke.texi (Code Gen Options): Fix abbreviation typo.
5127         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
5129 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
5131         PR fortran/30432
5132         * trans-types.c (gfc_get_function_type): Do not add void_type_node
5133         to empty arg list.
5134         * trans-decl.c (create_function_arglist): Change assert.
5136 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
5138         PR fortran/30554
5139         * module.c (read_module): If a symbol is excluded by an ONLY
5140         clause, check to see if there is a symtree already loaded. If
5141         so, attach the symtree to the pointer_info.
5143 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
5145         PR libfortran/30389
5146         * gfortran.h: Remove gfc_simplify_init_1.
5147         * arith.h: Remove third argument from gfc_compare_string.
5148         * arith.c (gfc_compare_expression): Remove third argument
5149         from call to gfc_compare_string.
5150         (gfc_compare_string): Remove third argument xcoll_table.
5151         Remove use of xcoll_table.
5152         * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
5153         * simplify.c (ascii_table): Remove.
5154         (xascii_table): Likewise.
5155         (gfc_simplify_achar): ICE if extract_int fails.  Remove use of
5156         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
5157         (gfc_simplify_char): ICE if extract_int fails. Error if
5158         value < 0 or value > 255.
5159         (gfc_simplify_iachar): Remove use of xascii_table.
5160         Char values outside of 0..255 are an ICE.
5161         (gfc_simplify_lge): Remove use of xascii_table.
5162         (gfc_simplify_lgt): Likewise.
5163         (gfc_simplify_lle): Likewise.
5164         (gfc_simplify_llt): Likewise.
5165         (invert_table): Remove.
5166         (gfc_simplify_init_1): Remove.
5168 2007-01-27  Roger Sayle  <roger@eyesopen.com>
5170         * trans-stmt.c (forall_info): Replace the next_nest and outer
5171         fields that previously implemented a doubly-linked list with a
5172         single prev_nest field (singly-linked list).
5173         (gfc_trans_nested_forall_loop): The nested_forall_info argument
5174         now denotes the innermost FORALL in the loop nest.
5175         (compute_overall_iter_number): Use prev_nest instead of next_nest.
5176         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
5177         nested_forall_info linked list.  Free the current "info" when done.
5179 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
5181         PR fortran/30407
5182         * trans-expr.c (gfc_conv_operator_assign): New function.
5183         * trans.h : Add prototype for gfc_conv_operator_assign.
5184         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
5185         a potential operator assignment subroutine.  If it is non-NULL
5186         call gfc_conv_operator_assign instead of the first assignment.
5187         ( gfc_trans_where_2): In the case of an operator assignment,
5188         extract the argument expressions from the code for the
5189         subroutine call and pass the symbol to gfc_trans_where_assign.
5190         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
5191         gfc_resolve_forall_body): Resolve the subroutine call for
5192         operator assignments.
5194 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
5195             Steven G. Kargl <kargl@gcc.gnu.org>
5197         PR fortran/30278
5198         * fortran/io.c (next_char): Deal with backslash escaped characters.
5199         Issue warnings in non -std=gnu cases.
5200         * fortran/primary.c (next_string_char): Issue warnings in non
5202 2007-01-26  Tobias Burnus  <burnus@net-b.de>
5204         * lang-specs.h: Add support for .f03 and .F03 extensions.
5205         * gfortran.texi: Document .f03 extension.
5206         * options.c (form_from_filename): Recognize .f03.
5208 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5210         PR fortran/30437
5211         * lang.opt (Wall): Remove RejectNegative.
5212         * options.c (gfc_handle_option): Wall can be disabled.
5213         (set_Wall): Add a parameter for disabling Wall.
5214         
5215 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
5217         PR fortran/30532
5218         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
5219         
5220 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
5222         PR fortran/30481
5223         * match.c (gfc_match_namelist): Add check for assumed size character
5224         in namelist and provide error if found.
5226 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
5228         * intrinsic.texi (ACHAR): Added cross-references.
5229         (CHAR): Put cross-references in alphabetical order.
5230         (IACHAR): Added cross-references.
5231         (ICHAR): Added cross-references.
5233 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
5235         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
5236         (MAXVAL): Corrected description of result characteristics.
5237         (MINVAL): Same.
5238         (UMASK): Added documentation.
5240 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
5242         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
5243         parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
5244         in the massive whitespace patch.
5246 2007-01-20  Roger Sayle  <roger@eyesopen.com>
5248         * module.c (mio_array_ref): The dimen_type fields of an array ref
5249         are an enumerated type and can't be read/written directly with a
5250         call to mio_integer.  Instead loop over and cast each element.
5252 2007-01-20  Roger Sayle  <roger@eyesopen.com>
5254         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
5255         i.e. that the ARRAY_REF doesn't mention components.
5256         * trans-array.c (gfc_constant_array_constructor_p): Export external
5257         function renamed from constant_array_constructor_p.
5258         (gfc_build_constant_array_constructor): Export.
5259         (gfc_trans_array_constructor): Update call to the renamed function
5260         constant_array_constructor_p.
5261         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
5262         (gfc_build_constant_array_constructor): Likewise.
5263         * trans-expr.c (gfc_build_memcpy_call): New helper function split
5264         out from gfc_trans_array_copy.
5265         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
5266         (gfc_trans_array_constructor_copy): New function to optimize
5267         assigning an entire array from a constant array constructor.
5268         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
5269         when appropriate.
5271 2007-01-20  Roger Sayle  <roger@eyesopen.com>
5273         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
5274         implementation for the SIGN intrinsic with integral operands.
5275         (gfc_conv_intrinsic_minmax): Fix whitespace.
5277 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5279         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
5280         * lang.opt: Add -fallow-leading-underscore.
5281         * match.c (gfc_match_name): Allow leading underscore in symbol
5282         name if -fallow-leading-underscore is used.
5283         * symbol.c (gfc_get_default_type): Add special case for symbol
5284         names beginning with an underscore.
5285         * trans-decl.c (gfc_get_extern_function_decl,
5286         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
5287         library symbols selected_int_kind, selected_real_kind and 
5288         all specifics.
5289         * options.c (gfc_init_options, gfc_handle_option): Handle the
5290         new -fallow-leading-underscore option.
5292 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5294         PR fortran/30446
5295         * options.c (gfc_handle_module_path_options): Path used in -J
5296         option is now added to the module search path.
5298 2007-01-20  Richard Guenther  <rguenther@suse.de>
5300         PR fortran/30223
5301         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
5302         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
5303         sincos builtins if the target has sincos.
5305 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
5307         * intrinsic.texi (MATMUL): Corrected a typo.
5308         (MAX): Separated @var arguments.
5309         (MIN): Separated @var arguments.
5311 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
5313         * intrinsic.texi: general whitespace cleanup.
5314         (menu): Added TIME8, removed UNMASK.
5315         (AINT): Clarified argument requirement.
5316         (ANINT): Clarified argument requirement.
5317         (CEILING): Clarified argument requirement.
5318         (CHAR): Clarified argument requirement.
5319         (CMPLX): Clarified argument requirement.
5320         (DCMPLX): Clarified argument requirement.
5321         (FGET): Line rewrapping.
5322         (FLOOR): Clarified argument requirement.
5323         (GMTIME): Added documentation.
5324         (IAND): Added cross-reference.
5325         (IBCLR): Added cross-reference.
5326         (IBSET): Added cross-reference.
5327         (IEOR): Added cross-reference.
5328         (INT): Collapsed examples, clarified argument requirement.
5329         (IOR): Added cross-references.
5330         (LEN_TRIM): Corrected result kind.
5331         (LINK): Added cross-reference.
5332         (LLT): Removed "documentation pending".
5333         (LOGICAL): Added documentation.
5334         (LSHIFT): Added documentation.
5335         (LTIME): Added documentation.
5336         (MATMUL): Added documentation.
5337         (MAX): Added documentation.
5338         (MAXLOC): Added documentation.
5339         (MAXVAL): Added documentation.
5340         (MERGE): Added documentation.
5341         (MIN): Added documentation.
5342         (MINLOC): Added documentation.
5343         (MINVAL): Added documentation.
5344         (MVBITS): Moved to correct place, added documentation.
5345         (NOT): Added documentation.
5346         (PERROR): Added documentation.
5347         (RAN): Moved to correct place, added documentation.
5348         (REAL): Clarified argument requirement.
5349         (RENAME): Added documentation.
5350         (RSHIFT): Clarified argument requirement.
5351         (SIGN): Corrected table specification.
5352         (SYMLNK): Added documentation.
5353         (SYSTEM): Added documentation.
5354         (TIME): Added documentation.
5355         (TIME8): Added section and documentation.
5356         (UNMASK): Removed erroneous section.
5358 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
5360         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
5362 2007-01-18  Roger Sayle  <roger@eyesopen.com>
5364         * trans-expr.c (copyable_array_p): Consider user derived types without
5365         allocatable components to be copyable.
5367 2007-01-18  Roger Sayle  <roger@eyesopen.com>
5369         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
5370         the number of interations in unconditional FORALL nests with constant
5371         bounds.
5373 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5374             Tobias Burnus  <burnus@net-b.de>
5376         PR libfortran/29649
5377         * gfortran.h (gfc_option_t): Add flag_dump_core.
5378         * lang.opt: Add -fdump-core option.
5379         * invoke.texi: Document the new options.
5380         * trans-decl.c (gfc_build_builtin_function_decls): Add new
5381           options to the call to set_std.
5382         * options.c (gfc_init_options, gfc_handle_option): Set the
5383           new options.
5385 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
5387         PR fortran/30476
5388         * module.c (load_generic_interfaces): Make the marking of the
5389         symbol as ambiguous conditional on the module names being
5390         different.
5391         (write_generic): Ensure that the generic interface has a
5392         non-NULL module field.
5394 2007-01-16  Roger Sayle  <roger@eyesopen.com>
5396         PR fortran/30404
5397         * trans-stmt.c (forall_info): Remove pmask field.
5398         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
5399         NVAR covers all the interation variables in the current forall_info.
5400         Add an extra OUTER parameter, which specified the loop header in
5401         which to place mask index initializations.
5402         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
5403         Change the semantics of MASK_FLAG to only control the mask in the
5404         innermost loop.
5405         (compute_overall_iter_number): Optimize the trivial case of a
5406         top-level loop having a constant number of iterations.  Update
5407         call to gfc_trans_nested_forall_loop.  Calculate the number of
5408         times the inner loop will be executed, not to size of the 
5409         iteration space.
5410         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
5411         sizeof(type) == 1.  Tidy up.
5412         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
5413         to gfc_trans_nested_forall_loop.
5414         (gfc_trans_pointer_assign_need_temp): Likewise.
5415         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
5416         LENVAR local variables.  Split mask allocation into a separate
5417         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
5418         to allocate the FORALL mask with the correct size.  Update calls
5419         to gfc_trans_nested_forall_loop.
5420         (gfc_evaluate_where_mask): Update call to
5421         gfc_trans_nested_forall_loop.
5422         (gfc_trans_where_2): Likewise.
5424 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
5426         PR fortran/28172
5427         * trans-stmt.c (gfc_trans_call): If it does not have one, get
5428         a backend_decl for an alternate return.
5430         PR fortran/29389
5431         * resolve.c (pure_function): Statement functions are pure. Note
5432         that this will have to recurse to comply fully with F95.
5434         PR fortran/29712
5435         * resolve.c (resolve_function): Only a reference to the final
5436         dimension of an assumed size array is an error in an inquiry
5437         function.
5439         PR fortran/30283
5440         * resolve.c (resolve_function): Make sure that the function
5441         expression has a type.
5443 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
5445         PR fortran/30410
5446         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
5447         symbols must not have the module name prepended.
5449 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
5451         PR libfortran/30415
5452         * iresolve.c (gfc_resolve_maxloc): If the rank
5453         of the return array is nonzero and we process an
5454         integer array smaller than default kind, coerce
5455         the array to default integer.
5456         * iresolve.c (gfc_resolve_minloc): Likewise.
5458 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
5460         * simplify.c: Update copyright to 2007.
5461         * scanner.c: Same.
5463 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
5465         PR fortran/30430
5466         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
5467         only once!
5469 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
5471         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
5472         (gfc_simplify_ibset): Same.
5474 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
5476         PR 30381
5477         PR 30420
5478         * simplify.c (convert_mpz_to_unsigned): New function.
5479         (convert_mpz_to_signed): New function, largely based on
5480         twos_complement().
5481         (twos_complement): Removed.
5482         (gfc_simplify_ibclr): Add conversions to and from an
5483         unsigned representation before bit-twiddling.
5484         (gfc_simplify_ibset): Same.
5485         (gfc_simplify_ishftc): Add checks for overly large
5486         constant arguments, only check the third argument if
5487         it's present, carry over high bits into the result as
5488         appropriate, and perform the final conversion back to
5489         a signed representation using the correct sign bit.
5490         (gfc_simplify_not): Removed unnecessary masking.
5492 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
5494         PR fortran/30408
5495         * resolve.c (resolve_code): Use the code->expr character length
5496         directly to set length of llen.
5498 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
5500         PR fortran/30408
5501         * lang.opt: Add Wcharacter_truncation option.
5502         * options.c (gfc_init_options): Initialize
5503         gfc_option.warn_character_truncation to zero.
5504         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
5506 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
5508         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
5509         iresolve.c, match.c: Update Copyright years.  Whitespace.
5511 2007-01-08  Richard Guenther  <rguenther@suse.de>
5513         * trans-io.c (transfer_array_desc): Use build_int_cst instead
5514         of build_int_cstu.
5516 2007-01-08  Roger Sayle  <roger@eyesopen.com>
5518         * trans-array.c (constant_array_constructor_p): New function to
5519         determine whether an array constructor consists only of constant
5520         elements, and if so return it's size.
5521         (gfc_build_constant_array_constructor): Construct a statically
5522         initialized gfortran array for a given EXPR_ARRAY.
5523         (gfc_trans_constant_array_constructor): Efficiently scalarize
5524         a constant array constructor.
5525         (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
5526         Special case scalarization of constant array constructors, all of
5527         whose elements are specified, using constant_array_constructor_p 
5528         and gfc_trans_constant_array_constructor.
5529         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
5530         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
5532 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
5534         gfortran.texi: Fix typos.
5536 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
5538         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
5539         convert.c: Update Copyright dates.  Fix whitespace.
5541 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
5543         * data.c (gfc_assign_data_value): Fix whitespace.
5545 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
5547         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
5548         Commentary typo fix.
5550 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
5552         PR fortran/27698
5553         * match.c (gfc_match_name): Print diagnostics for invalid
5554         character in names.
5556 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
5558         * array.c: Fix whitespace in comment table.
5560 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
5562         * array.c, bbt.c, check.c: Update copyright years.  Whitespace.
5564 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
5566         * arith.c: Update copyright years.  Whitespace.
5568 2007-01-05  Roger Sayle  <roger@eyesopen.com>
5570         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
5571         array assignments split out from gfc_trans_assignment.
5572         (gfc_trans_array_copy): New function to implement array to array
5573         copies via calls to __builtin_memcpy.
5574         (copyable_array_p): New helper function to identify an array of
5575         simple/POD types, that may be copied/assigned using memcpy.
5576         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
5577         whole array assignments considered suitable by copyable_array_p.
5578         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
5580 2007-01-05  Roger Sayle  <roger@eyesopen.com>
5582         * trans-array.c (gfc_trans_array_constructor_value): Make the
5583         static const "data" array as TREE_READONLY.
5584         * trans-stmt.c (gfc_trans_character_select): Likewise.
5586 2007-01-05  Roger Sayle  <roger@eyesopen.com>
5588         * trans-array.c (gfc_conv_loop_setup): Test whether the loop
5589         stride is one, to avoid fold_build2 introducing a useless
5590         NON_LVALUE_EXPR node.
5592 2007-01-05  Tobias Burnus  <burnus@net-b.de>
5594         * symbol.c (check_conflict): Fix error message.
5596 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
5598         PR fortran/23232
5599         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
5600         functions to signal that a DATA statement is being matched.
5601         (gfc_match_data): Call gfc_set_in_match_data on entry and on
5602         exit.
5603         * gfortran.h : Add prototypes for above.
5604         * expr.c (check_init_expr): Avoid check on parameter or
5605         variable if gfc_in_match_data is true.
5606         (gfc_match_init_expr): Do not call error on non-reduction of
5607         expression if gfc_in_match_data is true.
5609         PR fortran/27996
5610         PR fortran/27998
5611         * decl.c (gfc_set_constant_character_len): Add boolean arg to
5612         flag array constructor resolution.  Warn if string is being
5613         truncated.  Standard dependent error if string is padded. Set
5614         new arg to false for all three calls to
5615         gfc_set_constant_character_len.
5616         * match.h : Add boolean arg to prototype for
5617         gfc_set_constant_character_len.
5618         * gfortran.h : Add warn_character_truncation to gfc_options.
5619         * options.c (set_Wall): Set warn_character_truncation if -Wall
5620         is set.
5621         * resolve.c (resolve_code): Warn if rhs string in character
5622         assignment has to be truncated.
5623         * array.c (gfc_resolve_character_array_constructor): Set new
5624         argument to true for call to gfc_set_constant_character_len.
5626 2007-01-05  Tobias Burnus  <burnus@net-b.de>
5628         PR fortran/29624
5629         * interface.c (compare_parameter_intent): New function.
5630           (check_intents): Support pointer intents.
5631         * symbol.c (check_conflict): Support pointer intents,
5632           better conflict_std message.
5633         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
5634           Support pointer intents.
5635         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
5636           Support pointer intents.
5638 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5640         PR 30371
5641         * check.c (gfc_check_kill_sub): Add checks for non-scalar
5642         arguments.
5644 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5646         * intrinsic.texi: Minor cleanup, reflowing overlong
5647         paragraphs, and correcting whitespace.
5649 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5651         * intrinsic.texi (LBOUND): Add documentation.
5652         (LGE): Add documentation.
5653         (LGT): Add documentation.
5654         (LINK): Add documentation.
5655         (LLE): Add documentation.
5656         (LLT): Add documentation.
5657         (LNBLNK): Add documentation.
5658         (UBOUND): Add documentation.
5659         (UNLINK): Add documentation.
5661 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5663         * intrinsic.texi (IAND): Clarify argument specifications.
5664         (IBCLR): Add documentation.
5665         (IBITS): Add documentation.
5666         (IBSET): Add documentation.
5667         (IEOR): Add documentation.
5668         (IERRNO): Add documentation.
5669         (INDEX): Add documentation.
5670         (IOR): Add documentation.
5671         (ISHFT): Add documentation.
5672         (ISHFTC): Add documentation.
5673         (KILL): Add documentation.
5674         (LEN_TRIM): Add documentation.
5676 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5678         PR 30235
5679         * interface.c (compare_actual_formal): check for
5680         alternate returns when iterating over non-present
5681         arguments.
5683 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5685         * invoke.texi: Update manpage copyright to include 2007.
5687 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
5689         * gfortran.texi: Update copyright to include 2007.
5690         * intrinsic.texi: Update copyright to include 2007.
5691         * invoke.texi: Update copyright to include 2007.
5693 2007-01-02  Tobias Burnus  <burnus@net-b.de>
5694             Jakub Jelinek  <jakub@redhat.com>
5696         PR fortran/30276
5697         * scanner.c (open_included_file): Revert patch.
5698           (gfc_open_included_file): Support absolute pathnames.
5699           (gfc_open_intrinsic_module): Support absolute pathnames.
5701 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5703         * gfortran.texi (GNU Fortran and GCC): Rewrite
5705 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5707         * gfortran.texi (Introduction): Lower "Part I:
5708         Introduction" to a chapter, renumber Parts II and III to
5709         Parts I and II.
5710         * intrinsic.texi (Introduction): Rename to "Introduction
5711         to Intrinsics" to avoid conflict with the new chapter.
5713 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5715         * intrinsic.texi (Introduction): Rewrite first paragraph.
5717 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5719         * invoke.texi (OpenMP): Added index entry.
5720         * gfortran.texi (title page): Removed erroneous '*'.
5722 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5724         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
5725         to description.
5726         (Extensions): Miscellaneous minor rewriting and copyediting.
5727         (BOZ-literal constants): Renamed from Hexadecimal constants.
5728         (Hollerith constants support): Added explanation and 
5729         suggestions for standard-conforming modern equivalents.
5731 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5733         * intrinsic.texi: Improvements to index entries; change
5734         @findex entries to @cindex entries.
5735         * invoke.texi: Standardize and improve index entries.
5736         * gfortran.texi: Fix @code in one index entry.
5738 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5740         * invoke.texi: Change @code-type macros to appropriate
5741         variants (@command, @option, etc.)
5742         * gfortran.texi: Same.
5744 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
5746         * intrinsic.texi: Various minor cleanups.
5748 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
5750         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
5751         build_int_cst.
5753 2007-01-02  Tobias Burnus  <burnus@net-b.de>
5755         PR fortran/30276
5756         * scanner.c (open_included_file): Support full-path filenames.
5758 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
5760         PR fortran/20896
5761         * interface.c (check_sym_interfaces): Remove call to
5762         resolve_global_procedure.
5763         gfortran.h : Remove prototype for resolve_global_procedure.
5764         resolve.c (resolve_global_procedure): Add static attribute
5765         to function declaration.
5767 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
5769         * ChangeLog: Copy to ...
5770         * ChangeLog-2006: here.