OSDN Git Service

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