OSDN Git Service

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