OSDN Git Service

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