OSDN Git Service

PR 31972/fortran
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
2
3         PR 31972/fortran
4         * target-memory.c (gfc_target_expr_size): Add handling
5         for size of BT_HOLLERITH variables.
6         * check.c (gfc_check_transfer): Reject BT_HOLLERITH
7         variables in MOLD argument of TRANSFER.
8
9 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
10
11         * gfortran.h (gfc_expr): Remove from_H, add "representation"
12         struct.
13         * primary.c (match_hollerith_constant): Store the representation
14         of the Hollerith in representation, not in value.character.
15         * arith.c: Add dependency on target-memory.h.
16         (eval_intrinsic): Remove check for from_H.
17         (hollerith2representation): New function.
18         (gfc_hollerith2int): Determine value of the new constant.
19         (gfc_hollerith2real): Likewise.
20         (gfc_hollerith2complex): Likewise.
21         (gfc_hollerith2logical): Likewise.
22         (gfc_hollerith2character): Point both representation.string and
23         value.character.string at the value string.
24         * data.c (create_character_initializer): For BT_HOLLERITH
25         rvalues, get the value from the representation rather than
26         value.character.
27         * expr.c (free_expr0): Update handling of BT_HOLLERITH values
28         and values with representation.string.
29         (gfc_copy_expr): Likewise.
30         * intrinsic.c (do_simplify): Remove special treatement of
31         variables resulting from Hollerith constants.
32         * dump-parse-trees.c (gfc_show_expr): Update handling of
33         Holleriths.
34         * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
35         check with check for representation.string; get Hollerith
36         representation from representation.string, not value.character.
37         * trans-expr.c (is_zero_initializer_p): Replace from_H check
38         with check for representation.string.
39         * trans-stmt.c (gfc_trans_integer_select): Use
40         gfc_conv_mpz_to_tree for case values, so as to avoid picking up
41         the memory representation if the case is given by a transfer
42         expression.
43         * target-memory.c (gfc_target_encode_expr): Use the known memory
44         representation rather than the value, if it exists.
45         (gfc_target_interpret_expr): Store the memory representation of
46         the interpreted expression as well as its value.
47         (interpret_integer): Move to gfc_interpret_integer, make
48         non-static.
49         (interpret_float): Move to gfc_interpret_float, make non-static.
50         (interpret_complex): Move to gfc_interpret_complex, make
51         non-static.
52         (interpret_logical): Move to gfc_interpret_logical, make
53         non-static.
54         (interpret_character): Move to gfc_interpret_character, make
55         non-static.
56         (interpret_derived): Move to gfc_interpret_derived, make
57         non-static.
58         * target-memory.h: Add prototypes for newly-exported
59         gfc_interpret_* functions.
60
61 2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
62
63         PR fortran/31812
64         * parse.c (next_statement): Warn for truncated lines if source is free
65         form.
66
67 2007-05-27 Paul Thomas  <pault@gcc.gnu.org>
68            Tobias Burnus  <burnus@net-b.de>
69
70         PR fortran/32088
71         * symbol.c (gfc_check_function_type): Copy dimensions of
72           result variable.
73         * resolve.c (resolve_contained_fntype): Improve symbol output in
74           the error message.
75
76 2007-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
77
78         PR fortran/31813
79         * io.c (check_format): Add warning for H specifier in format.
80         
81 2007-05-26  Tobias Burnus  <burnus@net-b.de>
82
83         * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
84         GFORTRAN_ERROR_BACKTRACE environment variables.
85
86 2007-05-26  Paul Thomas  <pault@gcc.gnu.org>
87
88         PR fortran/31219
89         * trans.h : Add no_function_call bitfield to gfc_se structure.
90         Add stmtblock_t argument to prototype of get_array_ctor_strlen.
91         * trans-array.c (get_array_ctor_all_strlen): New function.
92         (get_array_ctor_strlen): Add new stmtblock_t argument and call
93         new function for character elements that are not constants,
94         arrays or variables.
95         (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
96         good string length.
97         * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
98         to call of get_array_ctor_strlen.
99
100 2007-05-25  Kazu Hirata  <kazu@codesourcery.com>
101
102         * intrinsic.texi: Fix typos.
103
104 2007-05-25  Paul Thomas  <pault@gcc.gnu.org>
105
106         PR fortran/32047
107         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
108         order in logic under EXPR_FUNCTION to handle functions with
109         no arguments.
110
111 2007-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
112
113         PR fortran/31716
114         * array.c (spec_dimen_size): Test for correct BT_INTEGER type. 
115
116 2007-05-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
117
118         PR fortran/32046
119         * trans-expr.c (gfc_trans_zero_assign): Convert the result of
120         TYPE_SIZE_UNIT into a signed type.
121         (gfc_trans_array_copy):  Likewise.
122         (gfc_trans_array_constructor_copy): Likewise.
123         * trans-array.c (gfc_trans_create_temp_array): Likewise.
124         (gfc_grow_array): Likewise.
125         (gfc_array_init_size): Likewise.
126         (gfc_duplicate_allocatable): Likewise.
127         * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
128
129 2007-05-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
130
131         PR fortran/18923
132         * resolve.c (resolve_function): Don't call resolve_global_procedure if
133         there is no name. Delete duplicated statement in ELSE clause.
134
135 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
136
137         PR fortran/31627
138         * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
139         indicate whether we should check the upper bound in that dimension.
140         (gfc_conv_array_index_offset): Check only the lower bound of the
141         last dimension for assumed-size arrays.
142         (gfc_conv_array_ref): Likewise.
143         (gfc_conv_ss_startstride): Likewise.
144
145 2007-05-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
146             Daniel Franke  <franke.daniel@gmail.com>
147
148         PR fortran/32002
149         * resolve.c (resolve_actual_arglist): Resolve actual argument after
150         being identified as variable.
151
152 2007-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
153
154         PR fortran/32027
155         * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
156         when the loop ends.
157
158 2007-05-21  H.J. Lu  <hongjiu.lu@intel.com>
159
160         * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
161
162 2007-05-21  Paul Thomas  <pault@gcc.gnu.org>
163
164         PR fortran/31867
165         PR fortran/31994
166         * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
167         offset for non-descriptor, source arrays and correct for stride
168         not equal to one before writing to field of output descriptor.
169
170 2007-05-20  Daniel Franke  <franke.daniel@gmail.com>
171
172         PR fortran/32001
173         * check.c (check_rest): Improved argument conformance check and 
174         fixed error message generation.
175
176 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
177
178         PR fortran/30820
179         * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
180         simplify.o and trans-common.o.
181
182 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
183
184         PR fortran/31974
185         * trans-array.c (gfc_trans_auto_array_allocation): Avoid
186         multiplication of mismatched types.
187
188 2007-05-18  Daniel Franke  <franke.daniel@gmail.com>
189
190         PR fortran/24633
191         * symbol.c (gfc_add_flavor): Add the NAME to error message if
192         available.
193
194 2007-05-15  Daniel Franke  <franke.daniel@gmail.com>
195
196         PR fortran/31919
197         PR fortran/31929
198         PR fortran/31930
199         * intrinsic.c (check_specific): Check elemental intrinsics for
200         rank and shape.
201         (add_functions): Fixed dummy argument names of BESJN and BESYN.
202         Fixed elemental status of MCLOCK and MCLOCK8.
203         * check.c (check_rest): Added check for array conformance.
204         (gfc_check_merge): Removed check for array conformance.
205         (gfc_check_besn): Removed check for scalarity.
206         * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
207         (BESJN, BESYN): Clarified documentation.
208
209 2007-05-17  Tobias Burnus  <burnus@net-b.de>
210
211         * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
212
213 2007-05-16  Brooks Moses  <brooks.moses@codesourcery.com>
214
215         PR fortran/18769
216         PR fortran/30881
217         PR fortran/31194
218         PR fortran/31216
219         PR fortran/31427
220         * target-memory.c: New file.
221         * target-memory.h: New file.
222         * simplify.c: Add #include "target-memory.h".
223         (gfc_simplify_transfer): Implement constant-
224         folding for TRANSFER intrinsic.
225         * Make-lang.in: Add dependencies on new target-memory.* files.
226
227 2007-05-15  Paul Brook  <paul@codesourcery.com>
228
229         * trans-types.c (gfc_type_for_size): Handle signed TImode.
230
231 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
232
233         PR fortran/30723
234         * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
235         gfor_fndecl_internal_free): Remove prototypes.
236         (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
237         * trans.c (gfc_call_malloc, gfc_call_free): New functions.
238         * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
239         and __builtin_malloc builtins.
240         * trans-decl.c (gfor_fndecl_internal_malloc,
241         gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
242         (gfor_fndecl_os_error): Add.
243         (gfc_build_builtin_function_decls): Don't create internal_malloc,
244         internal_malloc64 and internal_free library function declaration.
245         Create os_error library call function declaration.
246         * trans-array.c (gfc_trans_allocate_array_storage,
247         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
248         gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
249         gfc_call_malloc and gfc_call_free instead of building calls to
250         internal_malloc and internal_free.
251         * trans-expr.c (gfc_conv_string_tmp): Likewise.
252         * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
253         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
254         gfc_trans_where_2: Likewise.
255         * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
256         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
257         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
258
259 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
260
261         PR fortran/31725
262         * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
263         only once.
264
265 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
266
267         * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
268         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
269         instead of gfc_unsigned_type.
270         * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
271         gfc_unsigned_type.
272         * trans-types.c (gfc_unsigned_type): Remove.
273         * trans-types.h (gfc_unsigned_type): Remove.
274
275 2007-05-12  Paul Thomas  <pault@gcc.gnu.org>
276
277         PR fortran/30746
278         * resolve.c (check_host_association): New function that detects
279         incorrect host association and corrects it.
280         (gfc_resolve_expr): Call the new function for variables and
281         functions.
282         * match.h : Remove prototype for gfc_match_rvalue.
283         * gfortran.h : Add prototype for gfc_match_rvalue.
284
285 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
286
287         PR fortran/30876
288         * trans-expr.c (gfc_conv_function_call): Reduce indirection for
289         direct assignments of recursive array valued functions.
290         * primary.c (gfc_match_rvalue): Correct error for recursive
291         function calls such that directly recursive calls of scalar
292         function without an explicit result are disallowed.
293
294 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
295
296         PR fortran/30878
297         * resolve.c (resolve_fl_namelist): It is not an error if the
298         namelist element is the result variable of the enclosing
299         function.  Search for the symbol in current and all parent
300         namespaces for a potential conflict.
301         * symbol.c (check_conflict): Remove the conflict between
302         'in_namelist' and 'FL_PROCEDURE' because the symbol info
303         is not available to exclude function result variables.
304         * trans-io.c (nml_get_addr_expr): Use the fake result decl
305         if the symbol is an implicit result variable.
306
307 2007-05-11  Paul Thomas  <pault@gcc.gnu.org>
308
309         PR fortran/31474
310         * decl.c (get_proc_name): If an entry has already been declared
311         as a module procedure, pick up the symbol and the symtree and
312         use them for the entry.
313
314 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
315
316         PR fortran/31630
317         * resolve.c (resolve_symbol): Remove the flagging mechanism from the
318         formal namespace resolution and instead check that the formal
319         namespace is not the current namespace.
320
321 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
322
323         PR fortran/31692
324         * trans-array.c (gfc_conv_array_parameter): Convert full array
325         references to the result of the procedure enclusing the call.
326
327 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
328
329         PR fortran/29397
330         PR fortran/29400
331         * decl.c (add_init_expr_to_sym): Expand a scalar initializer
332         for a parameter array into an array expression with the right
333         shape.
334         * array.c (spec_dimen_size): Remove static attribute.
335         * gfortran.h : Prototype for spec_dimen_size.
336
337 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
338
339         PR fortran/31399
340         * trans-stmt.c (gfc_trans_do): Handle large loop counts.
341
342 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
343
344         PR fortran/31764
345         * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
346         even for non constant arguments.
347
348 2007-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
349             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
350
351         PR fortran/31201
352         * gfortran.h: Add runtime error codes from libgfortran.h. Define
353         MAX_UNIT_NUMBER.
354         * trans.c (gfc_trans_runtime_check): Update the format of runtime error
355         messages to match library runtime errors.  Use call to new library
356         function runtime_error_at().
357         * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
358         Add declaration for library functions runtime_error_at and
359         generate_error.
360         * trans_io.c (gfc_trans_io_runtime_check): New function.
361         (set_parameter_value): Add error checking for UNIT numbers.
362         (set_parameter_ref): Initialize the users variable to zero. 
363         (gfc_trans_open): Move setting of unit number to after setting of common
364         flags so that runtime error trapping can be detected.
365         (gfc_trans_close): Likewise. (build_filepos): Likewise.
366         (gfc_trans_inquire): Likewise. (build_dt): Likewise.
367         * trans-decl.c: Add declarations for runtime_error_at and
368         generate_error. (gfc_build_builtin_function_decls): Build function
369         declarations for runtime_error_at and generate_error.
370
371 2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
372
373         PR fortran/31540
374         * resolve.c (resolve_fl_procedure): Resolve constant character
375         lengths.
376
377 2007-05-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
378
379         PR fortran/31251
380         * decl.c (match_char_spec): Add check for invalid character lengths.
381
382 2007-05-04  Brooks Moses  <brooks.moses@codesourcery.com>
383
384         * intrinsic.texi (CMPLX): Document result kind.
385         (COMPLEX): Add documentation.
386
387 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
388
389         PR fortran/31760
390         * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
391         by gfc_check_fn_r to avoid checks for scalarity.
392         * check.c (gfc_check_besn): Removed check for scalarity.
393         (gfc_check_g77_math1): Removed.
394         * intrinsic.h (gfc_check_g77_math1): Removed.
395
396 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
397
398         * check.c (gfc_check_fseek_sub): Fixed typo.
399
400 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
401
402         PR fortran/22359
403         * intrinsic.c (add_subroutines): Added FSEEK.
404         * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
405         * iresolve.c (gfc_resolve_fseek_sub): New.
406         * check.c (gfc_check_fseek_sub): New.
407         * intrinsic.texi (FSEEK): Updated.
408
409 2007-05-04  Tobias Burnus  <burnus@net-b.de>
410
411         PR fortran/31803
412         * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
413
414 2007-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
415
416         PR fortran/31251
417         * simplify.c (gfc_simplify_len): Only simplify integer lengths.
418
419 2007-05-04  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
420
421         PR fortran/31781
422         * simplify.c (gfc_simplify_repeat): Don't put function call with
423         side effect in a gcc_assert().
424
425 2007-05-04  Tobias Burnus  <burnus@net-b.de>
426
427         PR fortran/25071
428         * interface.c (compare_actual_formal): Check character length.
429
430 2007-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
431
432         PR fortran/31732
433         * dependency.c (gfc_full_array_ref_p):  If the reference is
434         to a single element, check that the array has a single
435         element and that the correct element is referenced.
436
437 2007-05-01  Daniel Franke  <franke.daniel@gmail.com>
438
439         * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
440         (add_subroutines): Replaced magic numbers in function calls by
441         ELEMENTAL and NOT_ELEMENTAL respectively.
442         * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
443         (RANDOM_NUMBER): Changed class to subroutine.
444         (HUGE, TINY): Changed class to inquiry function.
445
446 2007-04-30  Brooks Moses  <brooks.moses@codesourcery.com>
447
448         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
449         (gfc_conv_tree_to_mpz): New function.
450         (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
451         (gfc_conv_tree_to_mpfr): New function.
452         * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
453         (gfc_conv_tree_to_mpfr): New prototype.
454
455 2007-04-30  Daniel Franke  <franke.daniel@gmail.com>
456
457         * intrinsic.texi (IERRNO): Changed class to non-elemental function.
458         (LOG10): Removed COMPLEX as accepted argument type.
459         (NEW_LINE): Changed class from elemental to inquiry function.
460         (SIGN): Removed requirement of scalar arguments.
461         (SNGL): Changed class to elemental function.
462
463 2007-04-29  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
464
465         PR fortran/31591
466         * simplify.c (simplify_bound_dim): New function.
467         (simplify_bound): Use the above. Perform simplification of LBOUND
468         and UBOUND when DIM argument is not present.
469
470 2007-04-29  Daniel Franke  <franke.daniel@gmail.com>
471
472         * gfortran.texi: Cleaned up keyword index.
473         * invoke.texi: Likewise.
474         * intrinsic.texi: Likewise.
475                         
476 2007-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
477
478         PR fortran/31645
479         * scanner.c (load_file): Discard the byte order mark if one is
480         found on the first non-preprocessor line of a file.
481
482 2007-04-29  Paul Thomas  <pault@gcc.gnu.org>
483
484         PR fortran/31711
485         * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
486         whenever a dependency is found.
487
488 2007-04-28  Tobias Schlüter  <tobi@gcc.gnu.org>
489
490         * options.c (gfc_handle_option): Ensure requested free form line
491         length is not too small.
492
493 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
494
495         * intrinsic.texi (Transfer): Improve documentation.
496
497 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
498
499         * gfortran.texi (Option Index): Add @samp as needed.
500
501 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
502
503         * gfortran.texi: Added node and menu entry for an option index.
504         * invoke.texi: Moved command line option related entries of the concept 
505         index to the option index.
506
507 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
508
509         * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
510         XOR): Fixed examples.
511
512 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
513
514         * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM, 
515         SYSTEM_CLOCK, TRANSFER, UNPACK): New.
516         (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
517
518 2007-04-26  Daniel Franke  <franke.daniel@gmail.com>
519
520         * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE, 
521         SIZE, TRANSPOSE, TRIM, VERIFY): New.
522         (ADJUSTL, ADJUSTR, INDEX): Added cross references.
523         (INT, INT2, INT8, LONG): Enabled section header.
524
525 2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
526
527         * module.c (module_char): Replace fgetc() with
528         getc(). 
529         (write_char): Replace fputc() with putc().
530         * scanner.c (load_line): Replace fgetc() with getc().
531         (gfc_read_orig_filename): Likewise.
532
533 2007-04-25  Tobias Burnus  <burnus@net-b.de>
534
535         PR fortran/31668
536         * error.c (error_print): Fix %% support.
537         * intrinsic.c (sort_actual): Improve error message.
538         * resolve.c (resolve_actual_arglist): Allow %VAL for
539         interfaces defined in the module declaration part.
540
541 2007-04-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
542
543         PR libfortran/31299
544         * intrinsic.texi (GETLOG): Update documentation to reflect
545         library changes.
546
547 2007-04-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
548
549         PR fortran/31587
550         * module.c (write_char): Add character to the MD5 buffer.
551         (read_md5_from_module_file): New function.
552         (gfc_dump_module): Compute MD5 for new module file. Call
553         read_md5_from_module_file. Only overwrite old module file
554         if the new MD5 is different.
555
556 2007-04-23  Paul Thomas  <pault@gcc.gnu.org>
557
558         PR fortran/31630
559         * resolve.c (resolve_symbol): Allow resolution of formal
560         namespaces nested within formal namespaces coming from modules.
561
562         PR fortran/31620
563         * trans-expr.c (gfc_trans_assignment): Make the call to
564         gfc_trans_zero_assign conditional on the lhs array ref being
565         the only reference.
566
567 2007-04-23  Tobias Burnus  <burnus@net-b.de>
568
569         * primary.c (match_integer_constant): Mention -fno-range-check
570         in the error message.
571
572 2007-04-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
573
574         PR fortran/31495
575         * scanner.c (load_line):  Remove check for comment after ampersand and
576         adjust tracking of ampersand.
577
578 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
579
580         * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
581         instead of checking GIMPLE_STMT_P in chain_next.
582
583 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
584
585         * trans-types.h (gfc_packed): New enum.
586         (gfc_get_nodesc_array_type): Change prototype to use new enum.
587         * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
588         argument packed.  Adapt all references to values accordingly.
589         (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
590         (gfc_get_derived_type): Likewise.
591         * trans-array.c (gfc_build_constant_array_constructor): Likewise.
592         * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
593         argument to type gfc_packed.
594         (gfc_add_interface_mapping): Use enum values in call to
595         gfc_get_interface_mapping.
596         * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
597         values when determining packing.
598
599         * trans-decl.c (gfc_finish_decl): Remove unused second argument
600         'init'.  Simplify code accordingly.  Remove calls to
601         gfc_fatal_error in favor of gcc_assert.
602         (create_function_arglist): Remove second argument from calls to
603         gfc_finish-decl.
604         (gfc_trans_dummy_character): Likewise.
605
606         * arith.h: Update copyright years.
607         * dependency.h: Likewise.
608         * gfortran.h: Likewise.
609         * lang-specs.h: Likewise.
610         * parse.h: Likewise.
611         * symbol.c: Likewise.
612         * trans.h: Likewise.
613         * trans.c: Likewise.
614         * trans-array.c: Likewise.
615         * trans-common.c: Likewise.
616         * trans-const.h: Likewise.
617         * trans-const.c: Likewise.
618         * trans-decl.c: Likewise.
619         * trans-expr.c: Likewise.
620         * trans-io.c: Likewise.
621         * trans-openmp.c: Likewise.
622         * trans-types.h: Likewise.
623         * types.def: Likewise.
624
625 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
626
627         PR fortran/31144
628         * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
629         mangling.
630         (gfc_sym_mangled_function_id): Likewise.
631
632 2007-04-15  Paul Thomas  <pault@gcc.gnu.org>
633
634         PR fortran/31204
635         * primary.c (check_for_implicit_index): New function to check
636         that a host associated variable is not an undeclared implied
637         do loop index.
638         (gfc_match_rvalue, match_variable): Use it and reset the
639         implied_index attribute.
640         * gfortran.h : Add the implied_index field to symbol_attribute.
641         * match.c (gfc_match_iterator): Mark the iterator variable
642         with the new attribute.
643         * decl.c (build_sym): Reset the new attribute.
644
645 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
646
647         * gfc-internals.texi: Fix typos.
648         * simplify.c: Fix a comment typo.
649
650 2007-04-14  Bernhard Fischer  <aldot@gcc.gnu.org>
651
652         * primary.c: Commentary typo fix; Add question about redundant (?)
653         set.
654
655 2007-04-14  Paul Thomas  <pault@gcc.gnu.org>
656
657         PR fortran/29507
658         PR fortran/31404
659         * expr.c (scalarize_intrinsic_call): New function to
660         scalarize elemental intrinsic functions in initialization
661         expressions.
662         (check_init_expr): Detect elemental intrinsic functions
663         in initalization expressions and call previous.
664
665 2007-04-13  Tobias Burnus  <burnus@net-b.de>
666
667         PR fortran/31559
668         * primary.c (match_variable): External functions
669         are no variables.
670
671 2007-04-13  Paul Thomas  <pault@gcc.gnu.org>
672
673         PR fortran/31550
674         * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
675         derived type components.
676
677 2007-04-13  Tobias Schlüter  <tobi@gcc.gnu.org>
678
679         PR fortran/18937
680         * resolve.c: Include obstack.h and bitmap.h.  New variable
681         labels_obstack.
682         (code_stack): Add tail and reachable_labels fields.
683         (reachable_labels): New function.
684         (resolve_branch): Rework to use new fields in code_stack.
685         (resolve_code): Call reachable_labels.
686         (resolve_codes): Allocate and free labels_obstack.
687
688 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
689
690         PR fortran/31250
691         * decl.c (match_char_spec): Move check for negative CHARACTER
692         length ...
693         * resolve.c (resolve_charlen): ... here.
694         (resolve_types): Resolve CHARACTER lengths earlier.
695
696 2007-04-12  Daniel Franke  <franke.daniel@gmail.com>
697
698         PR fortran/31234
699         * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
700
701 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
702
703         PR fortran/31266
704         * primary.c (gfc_variable_attr): Don't copy string length if it
705         doesn't make sense.
706         * resolve.c (resolve_code): Clarify error message.
707
708         PR fortran/31471
709         * decl.c (gfc_match_end): Also check for construct name in END
710         FORALL and END WERE statements.
711         * match.c (match_case_eos): Use uppercase for statement name in
712         error message.
713         (match_elsewhere): Construct name may appear iff construct has a
714         name.
715
716         * trans-types.c: Update copyright years.  Reformat long comment
717         explaining array descriptor format.  Remove obsolete mention of
718         TYPE_SET.
719
720         * arith.c (gfc_arith_uplus): Rename to ...
721         (gfc_arith_identity): ... this.
722         (gfc_parentheses): New function.
723         (gfc_uplus): Adapt to renamed function.
724         * arith.h (gfc_parentheses): Add prototype.
725         * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
726         (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
727         INTRINSIC_PARENTHESES.
728
729 2007-04-12  Tobias Burnus  <burnus@net-b.de>
730
731         PR fortran/31472
732         * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
733         attribute in type definitions.
734         (gfc_match_private): Allow PRIVATE statement only
735         in specification part of modules.
736         (gfc_match_public): Ditto for PUBLIC.
737         (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
738         specificification part of modules.
739
740 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
741
742         PR fortran/31257
743         * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
744         * intrinsic.h : Add prototype for gfc_resolve_achar.
745         * iresolve.c (gfc_resolve_achar): New function.
746
747 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
748
749         PR fortran/30880
750         * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
751         arrays.  Make condition for automatic array error explicit.
752         If a dummy, no error on an INTENT(OUT) derived type.
753
754 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
755
756         PR fortran/30872
757         * expr.c (find_array_element): Correct arithmetic for rank > 1.
758
759 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
760
761         PR fortran/31222
762         * check.c (numeric_check): If an expresson has not got a type,
763         see if it is a symbol for which a default type applies.
764
765 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
766
767         PR fortran/31214
768         * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
769         associated symbols.
770
771 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
772
773         PR fortran/31293
774         * symbol.c (gfc_check_function_type): New function.
775         * gfortran.h : Add prototype for previous.
776         * parse.c (parse_progunit): Call it after parsing specification
777         statements.
778
779 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
780
781         PR fortran/31483
782         * trans-expr.c (gfc_conv_function_call): Give a dummy
783         procedure the correct type if it has alternate returns.
784
785 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
786
787         PR fortran/31292
788         * decl.c (gfc_match_modproc): Go up to the top of the namespace
789         tree to find the module namespace for gfc_get_symbol.
790
791 2007-04-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
792
793         PR fortran/31304
794         * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
795         * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
796         (gfc_init_types): Define gfc_charlen_int_kind. 
797         * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
798         * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
799         (gfc_build_intrinsic_function_decls): Don't set
800         gfor_fndecl_string_repeat.
801         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
802         so that we don't have to call a library function.
803         * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
804         checks on the NCOPIES argument, and work with arbitrary size
805         arguments.
806
807 2007-03-31  Tobias Burnus  <burnus@net-b.de>
808
809         * intrinsic.c (add_functions): Fix name of dummy argument
810           for new_line and exit intrinsic.
811
812 2007-03-31  Paul Thomas  <pault@gcc.gnu.org>
813
814         PR fortran/31160
815         * gfortran.texi: Add a section for the %VAL, %REF and %LOC
816         extensions.
817
818 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
819
820         * trans-types.c (gfc_signed_or_unsigned_type): Remove.
821         (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
822         gfc_signed_or_unsigned_type.
823         (gfc_signed_type): Ditto.
824         * trans-types.h (gfc_signed_or_unsigned_type): Remove.
825         * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
826
827 2007-03-30  Tobias Schlüter  <tobi@gcc.gnu.org>
828
829         * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
830         descend into all branches.
831
832 2007-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
833
834         * intrinsic.c (conv_name): Let gfc_get_string handle the format.
835         (find_conv): Compare pointers instead of calling strcmp.
836         (find_sym): Likewise, but ensure that the compared pointer is in
837         the global string table.
838
839 2007-03-28  Tobias Schlüter  <tobi@gcc.gnu.org>
840
841         * gfc-internals.texi: Fix output filename.  Merge type index into
842         concept index.  Start documentation of gfc_code structure.
843
844 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
845
846         * gfc-internals.texi: New file,
847         * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
848
849 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
850  
851         * error.c (show_locus): Remove always-false test.
852
853 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
854
855         * lang.opt: Minor edits to descriptions.
856
857 2007-03-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
858
859         PR fortran/30877
860         * fortran/interface.c (check_operator_interface): Implement
861         the standard checks on user operators extending intrinsic operators.
862         * fortran/resolve.c (resolve_operator): If the ranks of operators
863         don't match, don't error out but try the user-defined ones first.
864
865 2007-03-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
866
867         PR fortran/30655
868         * expr.c (check_dimension): Fix logic of comparisons.
869
870 2007-03-24  Paul Thomas  <pault@gcc.gnu.org>
871
872         PR fortran/31215
873         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
874         int result that is non-zero if the expression is the function
875         result.  Only the characteristics of the result expression
876         can be used in a procedure interface, so simplify LEN in situ
877         using its character length.
878
879         PR fortran/31209
880         PR fortran/31200
881         * trans-expr.c (gfc_conv_function_call): Do not use
882         gfc_conv_expr_reference for actual pointer function with formal
883         target because a temporary is created that does not transfer
884         the reference correctly.  Do not indirect formal pointer
885         functions since it is the function reference that is needed.
886
887 2007-03-24  Brooks Moses  <brooks.moses@codesourcery.com>
888
889         * gfortran.h: Edit comments on GFC_STD_*.
890
891 2007-03-23  Brooks Moses  <brooks.moses@codesourcery.com>
892
893         * invoke.texi: Misc. small typo fixes.
894         (-Wcharacter-truncation): Add.
895         (-Wnonstd-intrinsics): Correct spelling.
896         (-std=): Edit.
897         (-fintrinsic-modules-path): Add.
898
899 2007-03-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
900
901         PR fortran/30834
902         * arith.c (complex_pow): Rewrite to handle large power.
903         (gfc_arith_power): Handle large power in the real and integer
904         cases.
905
906 2007-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
907
908         PR fortran/31262
909         * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
910         larger than twice the width of a HOST_WIDE_INT.
911
912 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
913
914         PR fortran/31193
915         * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
916         (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
917         Explicitly extract TREE_TYPEs for source and mold.  Use these
918         to calculate length of source and mold, except for characters,
919         where the se string_length is used.  For mold, the TREE_TYPE is
920         recalculated using gfc_get_character_type_len so that the
921         result is correctly cast for character literals and substrings.
922         Do not use gfc_typenode_for_spec for the final cast.
923
924 2007-03-22  Tobias Schlüter  <tobi@gcc.gnu.org>
925
926         PR fortran/20897
927         * decl.c (gfc_match_derived_decl): Reliably reject
928         'doubleprecision' and 'doublecomplex' as type names.
929
930 2007-03-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
931
932         PR fortran/31203
933         * trans-expr.c (gfc_trans_init_string_length): Length should
934         never be negative.
935         (gfc_conv_function_call): Likewise.
936
937 2007-03-18  Paul Thomas  <pault@gcc.gnu.org>
938
939         PR fortran/30531
940         PR fortran/31086
941         * symbo.c : Add gfc_derived_types.
942         (gfc_free_dt_list): Free derived type list gfc_derived_types.
943         (gfc_free_namespace): Remove call to gfc_free_dt_list.
944         (gfc_symbol_done_2): Call  gfc_free_dt_list.
945         * gfortran.h : Declare gfc_derived_types to be external. Remove
946         derived types field from gfc_namespace.
947         * resolve.c (resolve_fl_derived): Refer to gfc_derived types
948         rather than namespace derived_types.
949         (resolve_fntype): Remove special treatment for module
950         derived type functions.
951         * trans-types.c (gfc_get_derived_type): Remove search for like
952         derived types.  Finish by copying back end declaration to like
953         derived types in the derived type list gfc_derived_types.
954
955         2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
956
957         PR fortran/31120
958         * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
959         (gfc_conv_cst_int_power): Handle integer exponent with care,
960         since it might be too large for us.
961
962 2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
963
964         PR fortran/31184
965         * invoke.texi: Fix typo.
966
967 2007-03-16  Tobias Burnus  <burnus@net-b.de>
968
969         * trans-decl.c (gfc_generate_function_code): Use all arguments of
970           set_std.
971
972 2007-03-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
973
974         * gfortran.h (gfc_option_t): Add flag_backtrace field.
975         * lang.opt: Add -fbacktrace option.
976         * invoke.texi: Document the new option.
977         * trans-decl.c (gfc_build_builtin_function_decls): Add new
978         option to the call to set_std.
979         * options.c (gfc_init_options, gfc_handle_option): Handle the
980         new option.
981
982 2007-03-15  Tobias Burnus  <burnus@gcc.gnu.org>
983             Paul Thomas  <pault@gcc.gnu.org>
984
985         PR fortran/30922
986         * decl.c (gfc_match_import): If the parent of the current name-
987         space is null, try looking for an imported symbol in the parent
988         of the proc_name interface.
989         * resolve.c (resolve_fl_variable): Do not check for blocking of
990         host association by a same symbol, if the symbol is in an
991         interface body.
992
993 2007-03-15  Paul Thomas  <pault@gcc.gnu.org>
994
995         PR fortran/30879
996         * decl.c (match_data_constant): Before going on to try to match
997         a name, try to match a structure component.
998
999
1000         PR fortran/30870
1001         * resolve.c (resolve_actual_arglist): Do not reject a generic
1002         actual argument if it has a same name specific interface.
1003
1004         PR fortran/31163
1005         * trans-array.c (parse_interface): Do not nullify allocatable
1006         components if the symbol has the saved attribute.
1007
1008 2007-03-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1009
1010         * trans-array.c (gfc_trans_auto_array_allocation): Replace
1011         fold(convert()) by fold_convert().
1012         (gfc_duplicate_allocatable): Likewise.
1013         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
1014         build_int_cst instead of converting an integer_zero_node
1015         to the final type.
1016
1017 2007-03-14  Jakub Jelinek  <jakub@redhat.com>
1018
1019         * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
1020
1021 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
1022
1023         PR fortran/30933
1024         PR fortran/30948
1025         PR fortran/30953
1026         * intrinsics.texi (CHDIR): Fix argument names, note
1027         that STATUS must be a default integer.
1028         (CTIME): Fix argument names, note that RESULT must
1029         be a default integer.
1030         (EXIT): Note that STATUS must be a default integer.
1031
1032 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
1033
1034         PR fortran/28068
1035         * intrinsic.texi: General whitespace cleanup, remove
1036         comment about missing intrinsics.
1037         (menu): Add lines for new entries listed below.
1038         (ACOSH): Mention specific function DACOSH, correct
1039         description phrasing.
1040         (ASINH): Mention specific function DASINH, correct
1041         description phrasing.
1042         (ATANH): Mention specific function DATANH, correct
1043         description phrasing.
1044         (COS): Add index entry for CCOS.
1045         (CPU_TIME): Correct "REAL" to "REAL(*)".
1046         (EXP): Add index entry for CEXP.
1047         (INT): Correct argument name to "A".
1048         (INT2): New entry.
1049         (INT8): New entry.
1050         (LONG): New entry.
1051         (MAX): Add index entries for specific variants.
1052         (MCLOCK): New entry.
1053         (MCLOCK8): New entry.
1054         (SECNDS): Adjust to a more standard form.
1055         (SECOND): New entry.
1056         (TIME): Add cross-reference to MCLOCK.
1057         (TIME8): Add cross-reference to MCLOCK8.
1058
1059 2007-03-11  Paul Thomas  <pault@gcc.gnu.org>
1060
1061         PR fortran/30883
1062         * parse.c (parse_interface): Use the default types from the
1063         formal namespace if a function or its result do not have a type
1064         after parsing the specification statements.
1065
1066 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
1067
1068         * intrinsic.texi: (ICHAR) Improve internal I/O note.
1069         (ACHAR): Reference it.
1070         (CHAR): Reference it.
1071         (IACHAR): Reference it.
1072
1073 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
1074
1075         * intrinsic.texi: (LINK) Document function form.
1076         (RENAME): Likewise.
1077         (SYMLNK): Likewise.
1078         (SYSTEM): Likewise.
1079         (UNLINK): Likewise.
1080
1081 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
1082
1083         * intrinsic.texi: minor typo fixes, removed prologue.
1084         (FSEEK): moved to correct place in alphabetical order.
1085
1086 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
1087
1088         PR fortran/30947
1089         * check.c (gfc_check_alarm_sub): Added check for default integer 
1090         kind of status argument.
1091         * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of 
1092         status argument.
1093         * intrinsic.texi (ALARM): Extended documentation.
1094
1095 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
1096
1097         * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
1098         (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
1099         * intrinsic.c (add_subroutines): Adjusted dummy argument names 
1100         of GERROR and TTYNAM.
1101
1102 2007-07-08  Tobias Burnus  <burnus@net-b.de>
1103
1104         * module.c (gfc_match_use): Support renaming of operators
1105         in USE statements.
1106         * gfortran.texi (Fortran 2003 Status): Document support of
1107         renaming of operators.
1108
1109 2007-07-08  Tobias Burnus  <burnus@net-b.de>
1110
1111         PR fortran/30973
1112         * module.c (read_module): Always import module name as symbol.
1113         (gfc_match_use): Disallow module name in the only clause of
1114         a use statement.
1115
1116 2007-03-08  Paul Thomas  <pault@gcc.gnu.org>
1117
1118         PR fortran/31011
1119         * expr.c (find_array_section): Correct arithmetic for section
1120         size.
1121
1122 2007-03-07  Brooks Moses  <brooks.moses@codesourcery.com>
1123
1124         * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
1125
1126 2007-03-06  Daniel Franke  <franke.daniel@gmail.com>
1127
1128         PR documentation/30950
1129         * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
1130         (FREE): Fix call syntax.
1131
1132 2007-03-06  Brooks Moses  <brooks.moses@codesourcery.com>
1133
1134         * intrinsic.texi: Limit column widths to a total of .85.
1135
1136 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
1137
1138         * gfortran.texi (GFortran and G77): Rewrite completely.
1139
1140 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
1141
1142         * match.c (gfc_match_name): Expanded comment.
1143
1144 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
1145
1146         * gfortran.texi (Old-style kind specifications): Document
1147         special handling of old-style kind specifiers for COMPLEX.
1148         * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
1149         assumptions for COMPLEX in comment.
1150
1151 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
1152
1153         PR 31050
1154         * gfortranspec.c (lang_specific_driver): Update program
1155         name and copyright date.
1156
1157 2007-03-03  Paul Thomas  <pault@gcc.gnu.org>
1158
1159         PR fortran/30882
1160         * check.c (dim_rank_check): The shape of subsections of
1161         assumed-size arrays is known.
1162
1163 2007-03-02  Paul Thomas  <pault@gcc.gnu.org>
1164             Tobias Burnus  <burnus@net-b.de>
1165
1166         PR fortran/30873
1167         * decl.c (gfc_match_entry): Remove erroneous entry result check.
1168
1169 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1170
1171         * Make-lang.in: Add install-pdf target as copied from
1172         automake v1.10 rules.
1173
1174 2007-03-01  Tobias Burnus  <burnus@net-b.de>
1175
1176         PR fortran/30865
1177         * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
1178
1179 2007-02-28  Tobias Burnus  <burnus@net-b.de>
1180             Paul Thomas  <pault@gcc.gnu.org>
1181
1182         PR fortran/30888
1183         PR fortran/30887
1184         * resolve.c (resolve_actual_arglist): Allow by-value
1185         arguments and non-default-kind for %VAL().
1186         * trans-expr.c (conv_arglist_function): Allow
1187         non-default-kind for %VAL().
1188
1189 2007-02-28  Tobias Burnus  <burnus@net-b.de>
1190
1191         PR fortran/30968
1192         * primary.c (next_string_char): Correct reading a character
1193         after the delimiter.
1194         (match_string_constant): Print warning message only once.
1195
1196 2007-02-27  Richard Guenther  <rguenther@suse.de>
1197
1198         * trans-array.c (structure_alloc_comps): Use correct type
1199         for null pointer constant.
1200
1201 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
1202
1203         * gfortran.texi: Standardize title page, remove version number
1204         from copyright page.
1205
1206 2007-02-26  Thomas Koenig  <Thomas.Koenig@online.de>
1207             Paul Thomas  <pault@gcc.gnu.org>
1208
1209         PR fortran/30865
1210         * trans-intrinsic.c (gfc_conv_intrinsic_size):
1211         If dim is an optional argument, check for its
1212         presence and call size0 or size1, respectively.
1213
1214 2007-02-23  Paul Thomas <pault@gcc.gnu.org>
1215
1216         PR fortran/30660
1217         * resolve.c (has_default_initializer): New function.
1218         (resolve_fl_variable): Call has_default_initializer to determine if
1219         the derived type has a default initializer to its ultimate
1220         components.
1221
1222
1223 2007-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1224
1225         * options.c (set_default_std_flags): New function to consolidate
1226         setting the flags.
1227         (gfc_init_options): Use new function.
1228         (gfc_handle_option): Use new function.
1229
1230 2007-02-22  Brooks Moses  <brooks.moses@codesourcery.com>
1231
1232         * gfortran.texi (Old-style kind specifications): Document
1233         special handling of old-style kind specifiers for COMPLEX.
1234         * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
1235         assumptions in comment.
1236
1237 2007-02-21  Bernhard Fischer  <aldot@gcc.gnu.org>
1238
1239         * parse.c (next_free): Gooble spaces after OpenMP sentinel.
1240
1241 2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>
1242
1243         PR fortran/30869
1244         * match.c (gfc_match_iterator): Remove conflict between
1245         loop variable and pointer.
1246
1247 2007-02-20  Tobias Burnus  <burnus@net-b.de>
1248
1249         PR fortran/30522
1250         * symbol.c (gfc_add_volatile): Allow to set VOLATILE
1251           attribute for host-associated variables.
1252         * gfortran.h (symbol_attribute): Save namespace
1253           where VOLATILE has been set.
1254         * trans-decl.c (gfc_finish_var_decl): Move variable
1255           declaration to the top.
1256
1257 2007-02-20  Tobias Burnus  <burnus@net-b.de>
1258
1259         PR fortran/30783
1260         * resolve.c (resolve_symbol): Add character dummy VALUE check.
1261
1262 2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
1263
1264         PR libfortran/30533
1265         * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
1266         argument to default integer.
1267         (gfc_resolve_minloc): Likewise.
1268
1269 2007-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1270
1271         PR fortran/30681
1272         * options.c (gfc_init_options): Relax warning level for obsolescent.
1273         * match.c (match_arithmetic_if): Change to obsolescent from deleted.
1274         (gfc_match_if): Same.
1275
1276 2007-02-18  Roger Sayle  <roger@eyesopen.com>
1277
1278         * trans-array.c (gfc_build_constant_array_constructor): When the
1279         shape of the constructor is known, use that to construct the
1280         gfc_array_spec.
1281         (gfc_trans_constant_array_constructor): Initialize the "info"
1282         information for all of the dimensions of the array constructor.
1283         (constant_array_constructor_loop_size): New function.
1284         (gfc_trans_array_constructor): Use it to determine whether a
1285         loop is suitable for "constant array constructor" optimization.
1286
1287         * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
1288         instead of build2, to avoid conditions like "(a != b) != 0".
1289
1290 2007-02-18  Roger Sayle  <roger@eyesopen.com>
1291             Paul Thomas <pault@gcc.gnu.org>
1292
1293         PR fortran/30400
1294         * match.c (match_forall_iterator): Use gfc_match_expr instead
1295         of gfc_match_variable to match the iterator variable.  Return
1296         MATCH_NO if not a variable.  Remove the reset of the symbol's
1297         flavor in cleanup.
1298
1299 2007-02-16  Tobias Burnus  <burnus@net-b.de>
1300
1301         PR fortran/30793
1302         * trans-decl.c (gfc_generate_function_code): Do not initialize
1303         pointers to derived components.
1304
1305 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1306             Brooks Moses  <brooks.moses@codesourcery.com>
1307             Lee Millward  <lee.millward@codesourcery.com>
1308
1309         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
1310         (gfc_conv_string_tmp): Likewise.
1311         (gfc_conv_concat_op): Likewise.
1312         (gfc_build_compare_string): Likewise.
1313         (gfc_conv_function_call): Use build_call_list instead of build3.
1314
1315         * trans-array.c (gfc_trans_allocate_array_storage): Use
1316         build_call_expr.
1317         (gfc_grow_array): Likewise.
1318         (gfc_trans_array_ctor_element): Likewise.
1319         (gfc_trans_array_constructor_value): Likewise.
1320         (gfc_array_allocate): Likewise.
1321         (gfc_array_deallocate): Likewise.
1322         (gfc_trans_auto_array_allocation): Likewise.
1323         (gfc_trans_dummy_array_bias): Likewise.
1324         (gfc_conv_array_parameter): Likewise.
1325         (gfc_trans_dealloc_allocated): Likewise.
1326         (gfc_duplicate_allocatable): Likewise.
1327
1328         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
1329         (gfc_trans_omp_flush): Likewise.
1330
1331         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
1332         (gfc_trans_pause): Likewise.
1333         (gfc_trans_stop): Likewise.
1334         (gfc_trans_character_select): Likewise.
1335         (gfc_do_allocate): Likewise.
1336         (gfc_trans_assign_need_temp): Likewise.
1337         (gfc_trans_pointer_assign_need_temp): Likewise.
1338         (gfc_trans_forall_1): Likewise.
1339         (gfc_trans_where_2): Likewise.
1340         (gfc_trans_allocate): Likewise.
1341         (gfc_trans_deallocate): Likewise.
1342
1343         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
1344
1345         * trans-io.c (gfc_trans_open): Use build_call_expr.
1346         (gfc_trans_close): Likewise.
1347         (build_filepos): Likewise.
1348         (gfc_trans_inquire): Likewise.
1349         (NML_FIRST_ARG): Delete.
1350         (NML_ADD_ARG): Delete.
1351         (transfer_namelist_element): Use build_call_expr.
1352         (build_dt): Likewise.
1353         (gfc_trans_dt_end): Likewise.
1354         (transfer_expr): Likewise.
1355         (transfer_array-desc): Likewise.
1356
1357         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
1358         (gfc_generate_constructors): Likewise.
1359
1360         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
1361         (gfc_conv_intrinsic_fdate): Likewise.
1362         (gfc_conv_intrinsic_ttynam): Likewise.
1363         (gfc_conv_intrinsic_array_transfer): Likewise.
1364         (gfc_conv_associated): Likewise.
1365         (gfc_conv_intrinsic_si_kind): Likewise.
1366         (gfc_conv_intrinsic_trim): Likewise.
1367         (gfc_conv_intrinsic_repeat: Likewise.
1368         (gfc_conv_intrinsic_iargc): Likewise.
1369
1370 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1371
1372         PR fortran/30779
1373         * scanner.c (gfc_next_char_literal): Add check for end of file after
1374         call to advance_line.
1375
1376 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1377
1378         PR fortran/30799
1379         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
1380         kind.
1381
1382 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1383
1384         * misc.c (gfc_typename): Fix potential buffer overflow.
1385
1386 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
1387
1388         PR fortran/30554
1389         * module.c (read_module): Set pointer_info to referenced if the
1390         symbol has no namespace.
1391
1392 2007-02-12  Nick Clifton  <nickc@redhat.com>
1393
1394         * lang.opt: Add Warning attribute to warning options.
1395
1396 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
1397
1398         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
1399         (SLEEP): Added section and documentation.
1400
1401 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
1402
1403         PR fortran/30478
1404         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
1405         (variable_decl): Likewise.  Rewrap comment.
1406         (match_attr_spec): Remove ENUM specific code.
1407         (gfc_match_enum): Fix typo in error message.
1408         (enumerator_decl): New function.
1409         (gfc_match_enumerator_def): Use enumerator_decl instead of
1410         variable_decl.  Adapt code accordingly.
1411
1412 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
1413
1414         PR fortran/30554
1415         * module.c (find_symtree_for_symbol): New function to return
1416         a symtree that is not a "unique symtree" given a symbol.
1417         (read_module): Do not automatically set pointer_info to
1418         referenced because this inhibits the generation of a unique
1419         symtree.  Recycle the existing symtree if possible by calling
1420         find_symtree_for_symbol.
1421
1422         PR fortran/30319
1423         * decl.c (add_init_expr_to_sym): Make new charlen for an array
1424         constructor initializer.
1425
1426 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
1427
1428         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
1429         and __emutls_register_common.
1430         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
1431         * trans-common.c (build_common_decl): Don't check have_tls.
1432         * trans-decl.c (gfc_finish_var_decl): Likewise.
1433         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
1434         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
1435
1436 2007-02-09  Tobias Burnus  <burnus@net-b.de>
1437
1438         PR fortran/30512
1439         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1440           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
1441
1442 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1443
1444         PR fortran/30720
1445         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
1446         function argument. Always generate code for negative extent.
1447         Simplify said code.
1448         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
1449         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
1450         of gfc_trans_create_temp_array.
1451         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
1452         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
1453
1454 2007-02-08  Roger Sayle  <roger@eyesopen.com>
1455
1456         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
1457         mask expression is a compile-time constant (".true." or ".false.").
1458
1459 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1460
1461         PR fortran/30611
1462         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
1463         arguments only once. Generate check that NCOPIES argument is not
1464         negative.
1465
1466 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
1467
1468         PR fortran/30605
1469         * fortran/invoke.texi: Update documentation.
1470         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
1471         and -pedantic.
1472
1473 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1474
1475         * trans-array.c: Fix a comment typo.
1476
1477 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
1478
1479         PR fortran/30514
1480         * array.c (match_array_element_spec): If the length of an array is
1481         negative, adjust the upper limit to make it zero length.
1482
1483         PR fortran/30660
1484         * resolve.c (pure_function, resolve_function): Initialize name to
1485         null to clear up build warnings.
1486         (resolve_fl_variable): Look at components explicitly to check for
1487         default initializer, rather than using gfc_default_initializer.
1488
1489 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
1490
1491         PR fortran/30683
1492         * resolve.c (resolve_generic_f): Check for non-NULL sym.
1493
1494 2007-02-02  Roger Sayle  <roger@eyesopen.com>
1495
1496         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
1497         NON_LVALUE_EXPR nodes and useless type conversions.
1498
1499 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
1500
1501         PR fortran/30284
1502         PR fortran/30626
1503         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
1504         from function and make sure that substring lengths are
1505         translated.
1506         (is_aliased_array): Remove static attribute.
1507         * trans.c : Add prototypes for gfc_conv_aliased_arg and
1508         is_aliased_array.
1509         * trans-io.c (set_internal_unit): Add the post block to the
1510         arguments of the function.  Use is_aliased_array to check if
1511         temporary is needed; if so call gfc_conv_aliased_arg.
1512         (build_dt): Pass the post block to set_internal_unit and
1513         add to the block after all io activiy is done.
1514
1515 2007-02-01  Roger Sayle  <roger@eyesopen.com>
1516
1517         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
1518         a temporary array to pass a constant non-character array constructor.
1519         Generalize the descriptor generation code to handle scalarizer
1520         "info" without an array reference.
1521
1522 2007-02-01  Roger Sayle  <roger@eyesopen.com>
1523
1524         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
1525         dependency checking for array constructors.
1526
1527 2007-02-01  Roger Sayle  <roger@eyesopen.com>
1528
1529         * trans-stmt.c (compute_overall_iter_number): Document function
1530         arguments.  Generalize "unconditional forall nest with constant
1531         bounds" optimization to eliminate unconditional inner loops with
1532         constant bounds.
1533
1534 2007-01-31  Tobias Burnus  <burnus@net-b.de>
1535
1536         PR fortran/30520
1537         * interface.c (compare_actual_formal): Check conformance between
1538           actual and VOLATILE dummy arguments.
1539         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
1540           multiple times in different scopes.
1541         * decl.c (gfc_match_volatile): Search symbol in host association.
1542
1543 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1544
1545         * simplify.c, trans-array.c: Fix comment typos.
1546
1547 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1548
1549         * invoke.texi (Code Gen Options): Fix abbreviation typo.
1550         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
1551
1552 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
1553
1554         PR fortran/30432
1555         * trans-types.c (gfc_get_function_type): Do not add void_type_node
1556         to empty arg list.
1557         * trans-decl.c (create_function_arglist): Change assert.
1558
1559 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
1560
1561         PR fortran/30554
1562         * module.c (read_module): If a symbol is excluded by an ONLY
1563         clause, check to see if there is a symtree already loaded. If
1564         so, attach the symtree to the pointer_info.
1565
1566 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
1567
1568         PR libfortran/30389
1569         * gfortran.h: Remove gfc_simplify_init_1.
1570         * arith.h: Remove third argument from gfc_compare_string.
1571         * arith.c (gfc_compare_expression): Remove third argument
1572         from call to gfc_compare_string.
1573         (gfc_compare_string): Remove third argument xcoll_table.
1574         Remove use of xcoll_table.
1575         * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
1576         * simplify.c (ascii_table): Remove.
1577         (xascii_table): Likewise.
1578         (gfc_simplify_achar): ICE if extract_int fails.  Remove use of
1579         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
1580         (gfc_simplify_char): ICE if extract_int fails. Error if
1581         value < 0 or value > 255.
1582         (gfc_simplify_iachar): Remove use of xascii_table.
1583         Char values outside of 0..255 are an ICE.
1584         (gfc_simplify_lge): Remove use of xascii_table.
1585         (gfc_simplify_lgt): Likewise.
1586         (gfc_simplify_lle): Likewise.
1587         (gfc_simplify_llt): Likewise.
1588         (invert_table): Remove.
1589         (gfc_simplify_init_1): Remove.
1590
1591 2007-01-27  Roger Sayle  <roger@eyesopen.com>
1592
1593         * trans-stmt.c (forall_info): Replace the next_nest and outer
1594         fields that previously implemented a doubly-linked list with a
1595         single prev_nest field (singly-linked list).
1596         (gfc_trans_nested_forall_loop): The nested_forall_info argument
1597         now denotes the innermost FORALL in the loop nest.
1598         (compute_overall_iter_number): Use prev_nest instead of next_nest.
1599         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
1600         nested_forall_info linked list.  Free the current "info" when done.
1601
1602 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
1603
1604         PR fortran/30407
1605         * trans-expr.c (gfc_conv_operator_assign): New function.
1606         * trans.h : Add prototype for gfc_conv_operator_assign.
1607         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
1608         a potential operator assignment subroutine.  If it is non-NULL
1609         call gfc_conv_operator_assign instead of the first assignment.
1610         ( gfc_trans_where_2): In the case of an operator assignment,
1611         extract the argument expressions from the code for the
1612         subroutine call and pass the symbol to gfc_trans_where_assign.
1613         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
1614         gfc_resolve_forall_body): Resolve the subroutine call for
1615         operator assignments.
1616
1617 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
1618             Steven G. Kargl <kargl@gcc.gnu.org>
1619
1620         PR fortran/30278
1621         * fortran/io.c (next_char): Deal with backslash escaped characters.
1622         Issue warnings in non -std=gnu cases.
1623         * fortran/primary.c (next_string_char): Issue warnings in non
1624
1625 2007-01-26  Tobias Burnus  <burnus@net-b.de>
1626
1627         * lang-specs.h: Add support for .f03 and .F03 extensions.
1628         * gfortran.texi: Document .f03 extension.
1629         * options.c (form_from_filename): Recognize .f03.
1630
1631 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1632
1633         PR fortran/30437
1634         * lang.opt (Wall): Remove RejectNegative.
1635         * options.c (gfc_handle_option): Wall can be disabled.
1636         (set_Wall): Add a parameter for disabling Wall.
1637         
1638 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1639
1640         PR fortran/30532
1641         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
1642         
1643 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
1644
1645         PR fortran/30481
1646         * match.c (gfc_match_namelist): Add check for assumed size character
1647         in namelist and provide error if found.
1648
1649 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
1650
1651         * intrinsic.texi (ACHAR): Added cross-references.
1652         (CHAR): Put cross-references in alphabetical order.
1653         (IACHAR): Added cross-references.
1654         (ICHAR): Added cross-references.
1655
1656 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
1657
1658         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
1659         (MAXVAL): Corrected description of result characteristics.
1660         (MINVAL): Same.
1661         (UMASK): Added documentation.
1662
1663 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1664
1665         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
1666         parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
1667         in the massive whitespace patch.
1668
1669 2007-01-20  Roger Sayle  <roger@eyesopen.com>
1670
1671         * module.c (mio_array_ref): The dimen_type fields of an array ref
1672         are an enumerated type and can't be read/written directly with a
1673         call to mio_integer.  Instead loop over and cast each element.
1674
1675 2007-01-20  Roger Sayle  <roger@eyesopen.com>
1676
1677         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
1678         i.e. that the ARRAY_REF doesn't mention components.
1679         * trans-array.c (gfc_constant_array_constructor_p): Export external
1680         function renamed from constant_array_constructor_p.
1681         (gfc_build_constant_array_constructor): Export.
1682         (gfc_trans_array_constructor): Update call to the renamed function
1683         constant_array_constructor_p.
1684         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
1685         (gfc_build_constant_array_constructor): Likewise.
1686         * trans-expr.c (gfc_build_memcpy_call): New helper function split
1687         out from gfc_trans_array_copy.
1688         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
1689         (gfc_trans_array_constructor_copy): New function to optimize
1690         assigning an entire array from a constant array constructor.
1691         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
1692         when appropriate.
1693
1694 2007-01-20  Roger Sayle  <roger@eyesopen.com>
1695
1696         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
1697         implementation for the SIGN intrinsic with integral operands.
1698         (gfc_conv_intrinsic_minmax): Fix whitespace.
1699
1700 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1701
1702         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
1703         * lang.opt: Add -fallow-leading-underscore.
1704         * match.c (gfc_match_name): Allow leading underscore in symbol
1705         name if -fallow-leading-underscore is used.
1706         * symbol.c (gfc_get_default_type): Add special case for symbol
1707         names beginning with an underscore.
1708         * trans-decl.c (gfc_get_extern_function_decl,
1709         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
1710         library symbols selected_int_kind, selected_real_kind and 
1711         all specifics.
1712         * options.c (gfc_init_options, gfc_handle_option): Handle the
1713         new -fallow-leading-underscore option.
1714
1715 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1716
1717         PR fortran/30446
1718         * options.c (gfc_handle_module_path_options): Path used in -J
1719         option is now added to the module search path.
1720
1721 2007-01-20  Richard Guenther  <rguenther@suse.de>
1722
1723         PR fortran/30223
1724         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
1725         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
1726         sincos builtins if the target has sincos.
1727
1728 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
1729
1730         * intrinsic.texi (MATMUL): Corrected a typo.
1731         (MAX): Separated @var arguments.
1732         (MIN): Separated @var arguments.
1733
1734 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
1735
1736         * intrinsic.texi: general whitespace cleanup.
1737         (menu): Added TIME8, removed UNMASK.
1738         (AINT): Clarified argument requirement.
1739         (ANINT): Clarified argument requirement.
1740         (CEILING): Clarified argument requirement.
1741         (CHAR): Clarified argument requirement.
1742         (CMPLX): Clarified argument requirement.
1743         (DCMPLX): Clarified argument requirement.
1744         (FGET): Line rewrapping.
1745         (FLOOR): Clarified argument requirement.
1746         (GMTIME): Added documentation.
1747         (IAND): Added cross-reference.
1748         (IBCLR): Added cross-reference.
1749         (IBSET): Added cross-reference.
1750         (IEOR): Added cross-reference.
1751         (INT): Collapsed examples, clarified argument requirement.
1752         (IOR): Added cross-references.
1753         (LEN_TRIM): Corrected result kind.
1754         (LINK): Added cross-reference.
1755         (LLT): Removed "documentation pending".
1756         (LOGICAL): Added documentation.
1757         (LSHIFT): Added documentation.
1758         (LTIME): Added documentation.
1759         (MATMUL): Added documentation.
1760         (MAX): Added documentation.
1761         (MAXLOC): Added documentation.
1762         (MAXVAL): Added documentation.
1763         (MERGE): Added documentation.
1764         (MIN): Added documentation.
1765         (MINLOC): Added documentation.
1766         (MINVAL): Added documentation.
1767         (MVBITS): Moved to correct place, added documentation.
1768         (NOT): Added documentation.
1769         (PERROR): Added documentation.
1770         (RAN): Moved to correct place, added documentation.
1771         (REAL): Clarified argument requirement.
1772         (RENAME): Added documentation.
1773         (RSHIFT): Clarified argument requirement.
1774         (SIGN): Corrected table specification.
1775         (SYMLNK): Added documentation.
1776         (SYSTEM): Added documentation.
1777         (TIME): Added documentation.
1778         (TIME8): Added section and documentation.
1779         (UNMASK): Removed erroneous section.
1780
1781 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
1782
1783         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
1784
1785 2007-01-18  Roger Sayle  <roger@eyesopen.com>
1786
1787         * trans-expr.c (copyable_array_p): Consider user derived types without
1788         allocatable components to be copyable.
1789
1790 2007-01-18  Roger Sayle  <roger@eyesopen.com>
1791
1792         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
1793         the number of interations in unconditional FORALL nests with constant
1794         bounds.
1795
1796 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1797             Tobias Burnus  <burnus@net-b.de>
1798
1799         PR libfortran/29649
1800         * gfortran.h (gfc_option_t): Add flag_dump_core.
1801         * lang.opt: Add -fdump-core option.
1802         * invoke.texi: Document the new options.
1803         * trans-decl.c (gfc_build_builtin_function_decls): Add new
1804           options to the call to set_std.
1805         * options.c (gfc_init_options, gfc_handle_option): Set the
1806           new options.
1807
1808 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
1809
1810         PR fortran/30476
1811         * module.c (load_generic_interfaces): Make the marking of the
1812         symbol as ambiguous conditional on the module names being
1813         different.
1814         (write_generic): Ensure that the generic interface has a
1815         non-NULL module field.
1816
1817 2007-01-16  Roger Sayle  <roger@eyesopen.com>
1818
1819         PR fortran/30404
1820         * trans-stmt.c (forall_info): Remove pmask field.
1821         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
1822         NVAR covers all the interation variables in the current forall_info.
1823         Add an extra OUTER parameter, which specified the loop header in
1824         which to place mask index initializations.
1825         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
1826         Change the semantics of MASK_FLAG to only control the mask in the
1827         innermost loop.
1828         (compute_overall_iter_number): Optimize the trivial case of a
1829         top-level loop having a constant number of iterations.  Update
1830         call to gfc_trans_nested_forall_loop.  Calculate the number of
1831         times the inner loop will be executed, not to size of the 
1832         iteration space.
1833         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
1834         sizeof(type) == 1.  Tidy up.
1835         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
1836         to gfc_trans_nested_forall_loop.
1837         (gfc_trans_pointer_assign_need_temp): Likewise.
1838         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
1839         LENVAR local variables.  Split mask allocation into a separate
1840         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
1841         to allocate the FORALL mask with the correct size.  Update calls
1842         to gfc_trans_nested_forall_loop.
1843         (gfc_evaluate_where_mask): Update call to
1844         gfc_trans_nested_forall_loop.
1845         (gfc_trans_where_2): Likewise.
1846
1847 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
1848
1849         PR fortran/28172
1850         * trans-stmt.c (gfc_trans_call): If it does not have one, get
1851         a backend_decl for an alternate return.
1852
1853         PR fortran/29389
1854         * resolve.c (pure_function): Statement functions are pure. Note
1855         that this will have to recurse to comply fully with F95.
1856
1857         PR fortran/29712
1858         * resolve.c (resolve_function): Only a reference to the final
1859         dimension of an assumed size array is an error in an inquiry
1860         function.
1861
1862         PR fortran/30283
1863         * resolve.c (resolve_function): Make sure that the function
1864         expression has a type.
1865
1866 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
1867
1868         PR fortran/30410
1869         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
1870         symbols must not have the module name prepended.
1871
1872 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
1873
1874         PR libfortran/30415
1875         * iresolve.c (gfc_resolve_maxloc): If the rank
1876         of the return array is nonzero and we process an
1877         integer array smaller than default kind, coerce
1878         the array to default integer.
1879         * iresolve.c (gfc_resolve_minloc): Likewise.
1880
1881 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
1882
1883         * simplify.c: Update copyright to 2007.
1884         * scanner.c: Same.
1885
1886 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1887
1888         PR fortran/30430
1889         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
1890         only once!
1891
1892 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
1893
1894         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
1895         (gfc_simplify_ibset): Same.
1896
1897 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
1898
1899         PR 30381
1900         PR 30420
1901         * simplify.c (convert_mpz_to_unsigned): New function.
1902         (convert_mpz_to_signed): New function, largely based on
1903         twos_complement().
1904         (twos_complement): Removed.
1905         (gfc_simplify_ibclr): Add conversions to and from an
1906         unsigned representation before bit-twiddling.
1907         (gfc_simplify_ibset): Same.
1908         (gfc_simplify_ishftc): Add checks for overly large
1909         constant arguments, only check the third argument if
1910         it's present, carry over high bits into the result as
1911         appropriate, and perform the final conversion back to
1912         a signed representation using the correct sign bit.
1913         (gfc_simplify_not): Removed unnecessary masking.
1914
1915 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
1916
1917         PR fortran/30408
1918         * resolve.c (resolve_code): Use the code->expr character length
1919         directly to set length of llen.
1920
1921 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1922
1923         PR fortran/30408
1924         * lang.opt: Add Wcharacter_truncation option.
1925         * options.c (gfc_init_options): Initialize
1926         gfc_option.warn_character_truncation to zero.
1927         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
1928
1929 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1930
1931         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
1932         iresolve.c, match.c: Update Copyright years.  Whitespace.
1933
1934 2007-01-08  Richard Guenther  <rguenther@suse.de>
1935
1936         * trans-io.c (transfer_array_desc): Use build_int_cst instead
1937         of build_int_cstu.
1938
1939 2007-01-08  Roger Sayle  <roger@eyesopen.com>
1940
1941         * trans-array.c (constant_array_constructor_p): New function to
1942         determine whether an array constructor consists only of constant
1943         elements, and if so return it's size.
1944         (gfc_build_constant_array_constructor): Construct a statically
1945         initialized gfortran array for a given EXPR_ARRAY.
1946         (gfc_trans_constant_array_constructor): Efficiently scalarize
1947         a constant array constructor.
1948         (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
1949         Special case scalarization of constant array constructors, all of
1950         whose elements are specified, using constant_array_constructor_p 
1951         and gfc_trans_constant_array_constructor.
1952         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
1953         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
1954
1955 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
1956
1957         gfortran.texi: Fix typos.
1958
1959 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1960
1961         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
1962         convert.c: Update Copyright dates.  Fix whitespace.
1963
1964 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
1965
1966         * data.c (gfc_assign_data_value): Fix whitespace.
1967
1968 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
1969
1970         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
1971         Commentary typo fix.
1972
1973 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
1974
1975         PR fortran/27698
1976         * match.c (gfc_match_name): Print diagnostics for invalid
1977         character in names.
1978
1979 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1980
1981         * array.c: Fix whitespace in comment table.
1982
1983 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1984
1985         * array.c, bbt.c, check.c: Update copyright years.  Whitespace.
1986
1987 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1988
1989         * arith.c: Update copyright years.  Whitespace.
1990
1991 2007-01-05  Roger Sayle  <roger@eyesopen.com>
1992
1993         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
1994         array assignments split out from gfc_trans_assignment.
1995         (gfc_trans_array_copy): New function to implement array to array
1996         copies via calls to __builtin_memcpy.
1997         (copyable_array_p): New helper function to identify an array of
1998         simple/POD types, that may be copied/assigned using memcpy.
1999         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
2000         whole array assignments considered suitable by copyable_array_p.
2001         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
2002
2003 2007-01-05  Roger Sayle  <roger@eyesopen.com>
2004
2005         * trans-array.c (gfc_trans_array_constructor_value): Make the
2006         static const "data" array as TREE_READONLY.
2007         * trans-stmt.c (gfc_trans_character_select): Likewise.
2008
2009 2007-01-05  Roger Sayle  <roger@eyesopen.com>
2010
2011         * trans-array.c (gfc_conv_loop_setup): Test whether the loop
2012         stride is one, to avoid fold_build2 introducing a useless
2013         NON_LVALUE_EXPR node.
2014
2015 2007-01-05  Tobias Burnus  <burnus@net-b.de>
2016
2017         * symbol.c (check_conflict): Fix error message.
2018
2019 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
2020
2021         PR fortran/23232
2022         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
2023         functions to signal that a DATA statement is being matched.
2024         (gfc_match_data): Call gfc_set_in_match_data on entry and on
2025         exit.
2026         * gfortran.h : Add prototypes for above.
2027         * expr.c (check_init_expr): Avoid check on parameter or
2028         variable if gfc_in_match_data is true.
2029         (gfc_match_init_expr): Do not call error on non-reduction of
2030         expression if gfc_in_match_data is true.
2031
2032         PR fortran/27996
2033         PR fortran/27998
2034         * decl.c (gfc_set_constant_character_len): Add boolean arg to
2035         flag array constructor resolution.  Warn if string is being
2036         truncated.  Standard dependent error if string is padded. Set
2037         new arg to false for all three calls to
2038         gfc_set_constant_character_len.
2039         * match.h : Add boolean arg to prototype for
2040         gfc_set_constant_character_len.
2041         * gfortran.h : Add warn_character_truncation to gfc_options.
2042         * options.c (set_Wall): Set warn_character_truncation if -Wall
2043         is set.
2044         * resolve.c (resolve_code): Warn if rhs string in character
2045         assignment has to be truncated.
2046         * array.c (gfc_resolve_character_array_constructor): Set new
2047         argument to true for call to gfc_set_constant_character_len.
2048
2049 2007-01-05  Tobias Burnus  <burnus@net-b.de>
2050
2051         PR fortran/29624
2052         * interface.c (compare_parameter_intent): New function.
2053           (check_intents): Support pointer intents.
2054         * symbol.c (check_conflict): Support pointer intents,
2055           better conflict_std message.
2056         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
2057           Support pointer intents.
2058         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
2059           Support pointer intents.
2060
2061 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2062
2063         PR 30371
2064         * check.c (gfc_check_kill_sub): Add checks for non-scalar
2065         arguments.
2066
2067 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2068
2069         * intrinsic.texi: Minor cleanup, reflowing overlong
2070         paragraphs, and correcting whitespace.
2071
2072 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2073
2074         * intrinsic.texi (LBOUND): Add documentation.
2075         (LGE): Add documentation.
2076         (LGT): Add documentation.
2077         (LINK): Add documentation.
2078         (LLE): Add documentation.
2079         (LLT): Add documentation.
2080         (LNBLNK): Add documentation.
2081         (UBOUND): Add documentation.
2082         (UNLINK): Add documentation.
2083
2084 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2085
2086         * intrinsic.texi (IAND): Clarify argument specifications.
2087         (IBCLR): Add documentation.
2088         (IBITS): Add documentation.
2089         (IBSET): Add documentation.
2090         (IEOR): Add documentation.
2091         (IERRNO): Add documentation.
2092         (INDEX): Add documentation.
2093         (IOR): Add documentation.
2094         (ISHFT): Add documentation.
2095         (ISHFTC): Add documentation.
2096         (KILL): Add documentation.
2097         (LEN_TRIM): Add documentation.
2098
2099 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2100
2101         PR 30235
2102         * interface.c (compare_actual_formal): check for
2103         alternate returns when iterating over non-present
2104         arguments.
2105
2106 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2107
2108         * invoke.texi: Update manpage copyright to include 2007.
2109
2110 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
2111
2112         * gfortran.texi: Update copyright to include 2007.
2113         * intrinsic.texi: Update copyright to include 2007.
2114         * invoke.texi: Update copyright to include 2007.
2115
2116 2007-01-02  Tobias Burnus  <burnus@net-b.de>
2117             Jakub Jelinek  <jakub@redhat.com>
2118
2119         PR fortran/30276
2120         * scanner.c (open_included_file): Revert patch.
2121           (gfc_open_included_file): Support absolute pathnames.
2122           (gfc_open_intrinsic_module): Support absolute pathnames.
2123
2124 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2125
2126         * gfortran.texi (GNU Fortran and GCC): Rewrite
2127
2128 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2129
2130         * gfortran.texi (Introduction): Lower "Part I:
2131         Introduction" to a chapter, renumber Parts II and III to
2132         Parts I and II.
2133         * intrinsic.texi (Introduction): Rename to "Introduction
2134         to Intrinsics" to avoid conflict with the new chapter.
2135
2136 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2137
2138         * intrinsic.texi (Introduction): Rewrite first paragraph.
2139
2140 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2141
2142         * invoke.texi (OpenMP): Added index entry.
2143         * gfortran.texi (title page): Removed erroneous '*'.
2144
2145 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2146
2147         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
2148         to description.
2149         (Extensions): Miscellaneous minor rewriting and copyediting.
2150         (BOZ-literal constants): Renamed from Hexadecimal constants.
2151         (Hollerith constants support): Added explanation and 
2152         suggestions for standard-conforming modern equivalents.
2153
2154 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2155
2156         * intrinsic.texi: Improvements to index entries; change
2157         @findex entries to @cindex entries.
2158         * invoke.texi: Standardize and improve index entries.
2159         * gfortran.texi: Fix @code in one index entry.
2160
2161 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2162
2163         * invoke.texi: Change @code-type macros to appropriate
2164         variants (@command, @option, etc.)
2165         * gfortran.texi: Same.
2166
2167 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
2168
2169         * intrinsic.texi: Various minor cleanups.
2170
2171 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
2172
2173         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
2174         build_int_cst.
2175
2176 2007-01-02  Tobias Burnus  <burnus@net-b.de>
2177
2178         PR fortran/30276
2179         * scanner.c (open_included_file): Support full-path filenames.
2180
2181 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
2182
2183         PR fortran/20896
2184         * interface.c (check_sym_interfaces): Remove call to
2185         resolve_global_procedure.
2186         gfortran.h : Remove prototype for resolve_global_procedure.
2187         resolve.c (resolve_global_procedure): Add static attribute
2188         to function declaration.
2189
2190 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
2191
2192         * ChangeLog: Copy to ...
2193         * ChangeLog-2006: here.