OSDN Git Service

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