OSDN Git Service

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