OSDN Git Service

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