OSDN Git Service

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