OSDN Git Service

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