OSDN Git Service

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