OSDN Git Service

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