OSDN Git Service

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