OSDN Git Service

55fc753409924fd4afca2a526647a4cae1ac2f9f
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2009-12-28 Janus Weil  <janus@gcc.gnu.org>
2
3         PR fortran/42353
4         * symbol.c (gfc_find_derived_vtab): Make vtabs and vtypes private.
5
6 2009-12-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7             Daniel Kraft  <d@domob.eu>
8
9         PR fortran/22552
10         * lang.opt (Wimplicit-procedure): New option.
11         * gfortran.h (struct gfc_option_t): New member `warn_implicit_procedure'
12         * options.c (gfc_handle_option): Handle -Wimplicit-procedure.
13         * interface.c (gfc_procedure_use): Warn about procedure never
14         explicitly declared if requested by the new flag.
15         * invoke.texi: Document new flag -Wimplicit-procedure.
16
17 2009-12-17 Janus Weil  <janus@gcc.gnu.org>
18
19         PR fortran/42144
20         * trans-expr.c (select_class_proc): Skip abstract base types.
21
22 2009-12-16  Kazu Hirata  <kazu@codesourcery.com>
23
24         * gfc-internals.texi, gfortran.texi, invoke.texi: Fix typos.
25         Follow spelling conventions.
26
27 2009-12-15  Tobias Burnus  <burnus@net-b.de>
28             Daniel Franke  <franke.daniel@gmail.com>
29
30         PR fortran/41235
31         * resolve.c (resolve_global_procedure): Add check for
32         presence of an explicit interface for nonconstant,
33         nonassumed character-length functions.
34         (resolve_fl_procedure): Remove check for nonconstant
35         character-length functions.
36
37 2009-12-14  Daniel Franke  <franke.daniel@gmail.com>
38
39         PR fortran/42354
40         * expr.c (check_init_expr): Do not check for specification functions.
41
42 2009-12-11 Janus Weil  <janus@gcc.gnu.org>
43
44         PR fortran/42257
45         * module.c (write_dt_extensions): Check for accessibility.
46
47 2009-12-11  Daniel Franke  <franke.daniel@gmail.com>
48
49         PR fortran/40290
50         * expr.c (gfc_type_convert_binary): Added warn-on-conversion flag,
51         passed on to gfc_convert_type_warn() instead of gfc_convert_type();
52         enabled warnings on all callers but ...
53         * arith.c (eval_intrinsic): Disabled warnings on implicit type
54         conversion.
55         * gfortran.h gfc_type_convert_binary): Adjusted prototype.
56
57 2009-12-11 Janus Weil  <janus@gcc.gnu.org>
58
59         PR fortran/42335
60         * symbol.c (select_type_insert_tmp): Add an extra check for
61         error recovery.
62
63 2009-12-10  Daniel Franke  <franke.daniel@gmail.com>
64
65         PR fortran/40287
66         * iresolve.c (resolve_mask_arg): Disabled warning on conversion
67         to LOGICAL(1).
68
69 2009-12-10  Daniel Franke  <franke.daniel@gmail.com>
70
71         PR fortran/41369
72         * parse.c (match_deferred_characteristics): Removed check for empty
73         types in function return values.
74
75 2009-12-10  Daniel Franke  <franke.daniel@gmail.com>
76
77         PR fortran/34402
78         * expr.c (check_alloc_comp_init): New.
79         (check_init_expr): Verify that allocatable components
80         are not data-initalized.
81
82 2008-12-08  Daniel Kraft  <d@domob.eu>
83
84         PR fortran/41177
85         * gfortran.h (struct symbol_attribute): New flag `class_pointer'.
86         * symbol.c (gfc_build_class_symbol): Set the new flag.
87         * resolve.c (update_compcall_arglist): Remove wrong check for
88         non-scalar base-object.
89         (check_typebound_baseobject): Add the correct version here as well
90         as some 'not implemented' message check in the old case.
91         (resolve_typebound_procedure): Check that the passed-object dummy
92         argument is scalar, non-pointer and non-allocatable as it should be.
93
94 2009-12-08  Tobias Burnus  <burnus@net-b.de>
95
96         PR fortran/40961
97         PR fortran/40377
98         * gfortran.texi (Non-Fortran Main Program): Add
99         _gfortran_set_fpe documentation.
100         (Interoperability with C): Mention array storage order.
101
102 2009-12-07  Daniel Franke  <franke.daniel@gmail.com>
103
104         PR fortran/41940
105         * match.c (gfc_match_allocate): Improved error message for
106         allocatable scalars that are allocated with a shape.
107
108 2009-12-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
109
110         PR other/40302
111         * arith.c: Remove HAVE_mpc* checks throughout.
112         * expr.c: Likewise.
113         * gfortran.h: Likewise.
114         * resolve.c: Likewise.
115         * simplify.c: Likewise.
116         * target-memory.c: Likewise.
117         * target-memory.h: Likewise.
118
119 2009-12-06  Daniel Franke  <franke.daniel@gmail.com>
120
121         PR fortran/40904
122         * intrinsics.texi: Fixed description of COUNT.
123
124 2009-12-01  Janne Blomqvist  <jb@gcc.gnu.org>
125
126         PR fortran/42131
127         * trans-stmt.c (gfc_trans_do): Sign test using ternary operator.
128
129 2009-11-30  Janus Weil  <janus@gcc.gnu.org>
130
131         PR fortran/42053
132         * resolve.c (resolve_select_type): Check for duplicate CLASS IS blocks.
133
134 2009-11-30  Janus Weil  <janus@gcc.gnu.org>
135
136         PR fortran/41631
137         * decl.c (gfc_match_derived_decl): Set extension level.
138         * gfortran.h (symbol_attribute): Expand 'extension' bit field to 8 bit.
139         * iresolve.c (gfc_resolve_extends_type_of): Return value of
140         'is_extension_of' has kind=4.
141         * match.c (select_type_set_tmp,gfc_match_class_is): Create temporary
142         for CLASS IS blocks.
143         * module.c (MOD_VERSION): Bump module version.
144         (ab_attribute,attr_bits): Remove AB_EXTENSION.
145         (mio_symbol_attribute): Handle expanded 'extension' field.
146         * resolve.c (resolve_select_type): Implement CLASS IS blocks.
147         (resolve_fl_variable_derived): Show correct type name.
148         * symbol.c (gfc_build_class_symbol): Set extension level.
149
150 2009-11-30  Janus Weil  <janus@gcc.gnu.org>
151
152         * intrinsic.h (gfc_resolve_extends_type_of): Add prototype.
153         * intrinsic.c (add_functions): Use 'gfc_resolve_extends_type_of'.
154         * iresolve.c (gfc_resolve_extends_type_of): New function, which
155         replaces the call to EXTENDS_TYPE_OF by the library function
156         'is_extension_of' and modifies the arguments.
157         * trans-intrinsic.c (gfc_conv_extends_type_of): Removed.
158         (gfc_conv_intrinsic_function): FOR EXTENDS_TYPE_OF, don't call
159         gfc_conv_extends_type_of but gfc_conv_intrinsic_funcall.
160
161 2009-11-30  Paul Thomas  <pault@gcc.gnu.org>
162             Janus Weil  <janus@gcc.gnu.org>
163
164         * decl.c (encapsulate_class_symbol): Replaced by
165         'gfc_build_class_symbol'.
166         (build_sym,build_struct): Call 'gfc_build_class_symbol'.
167         (gfc_match_derived_decl): Replace vindex by hash_value.
168         * dump-parse-tree.c (show_symbol): Replace vindex by hash_value.
169         * gfortran.h (symbol_attribute): Add field 'vtab'.
170         (gfc_symbol): Replace vindex by hash_value.
171         (gfc_class_esym_list): Ditto.
172         (gfc_get_derived_type,gfc_build_class_symbol,gfc_find_derived_vtab):
173         New prototypes.
174         * module.c (mio_symbol): Replace vindex by hash_value.
175         * resolve.c (vindex_expr): Rename to 'hash_value_expr'.
176         (resolve_class_compcall,resolve_class_typebound_call): Renamed
177         'vindex_expr'.
178         (resolve_select_type): Replace $vindex by $vptr->$hash.
179         * symbol.c (gfc_add_save): Handle vtab symbols.
180         (gfc_type_compatible): Rewrite.
181         (gfc_build_class_symbol): New function which replaces
182         'encapsulate_class_symbol'.
183         (gfc_find_derived_vtab): New function to set up a vtab symbol for a
184         derived type.
185         * trans-decl.c (gfc_create_module_variable): Handle vtab symbols.
186         * trans-expr.c (select_class_proc): Replace vindex by hash_value.
187         (gfc_conv_derived_to_class): New function to construct a temporary
188         CLASS variable from a derived type expression.
189         (gfc_conv_procedure_call): Call 'gfc_conv_derived_to_class'.
190         (gfc_conv_structure): Initialize the $extends and $size fields of
191         vtab symbols.
192         (gfc_trans_class_assign): Replace $vindex by $vptr. Remove the $size
193         assignment.
194         * trans-intrinsic.c (gfc_conv_same_type_as): Replace $vindex by
195         $vptr->$hash, and replace vindex by hash_value.
196         * trans-stmt.c (gfc_trans_allocate): Insert $vptr references, replace
197         $vindex by $vptr. Remove the $size assignment.
198         * trans-types.c (gfc_get_derived_type): Make it non-static.
199
200 2009-11-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
201
202         PR fortran/42131
203         * trans-stmt.c (gfc_trans_do):  Calculate loop count
204         without if statements.
205
206 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
207
208         * trans-common.c (create_common): Remove unused offset variable.
209         * io.c (gfc_match_wait): Remove unused loc variable.
210         * trans-openmp.c (gfc_trans_omp_clauses): Remove unused old_clauses
211         variable.
212         (gfc_trans_omp_do): Remove unused outermost variable.
213         * iresolve.c (gfc_resolve_alarm_sub, gfc_resolve_fseek_sub): Remove
214         unused status variable.
215         * module.c (number_use_names): Remove unused c variable.
216         (load_derived_extensions): Remove unused nuse variable.
217         * trans-expr.c (gfc_conv_substring): Remove unused var variable.
218         * trans-types.c (gfc_get_array_descr_info): Remove unused offset_off
219         variable.
220         * matchexp.c (match_primary): Remove unused where variable.
221         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Remove unused cond2
222         variable.
223         (gfc_conv_intrinsic_sizeof): Remove unused source variable.
224         (gfc_conv_intrinsic_transfer): Remove unused stride variable.
225         (gfc_conv_intrinsic_function): Remove unused isym variable.
226         * arith.c (gfc_hollerith2real, gfc_hollerith2complex,
227         gfc_hollerith2logical): Remove unused len variable.
228         * parse.c (parse_derived): Remove unused derived_sym variable.
229         * decl.c (variable_decl): Remove unused old_locus variable.
230         * resolve.c (check_class_members): Remove unused tbp_sym variable.
231         (resolve_ordinary_assign): Remove unused assign_proc variable.
232         (resolve_equivalence): Remove unused value_name variable.
233         * data.c (get_array_index): Remove unused re variable.
234         * trans-array.c (gfc_conv_array_transpose): Remove unused src_info
235         variable.
236         (gfc_conv_resolve_dependencies): Remove unused aref and temp_dim
237         variables.
238         (gfc_conv_loop_setup): Remove unused dim and len variables.
239         (gfc_walk_variable_expr): Remove unused head variable.
240         * match.c (match_typebound_call): Remove unused var variable.
241         * intrinsic.c (gfc_convert_chartype): Remove unused from_ts variable.
242
243 2009-11-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
244
245         PR fortran/41807
246         * trans-const.c (gfc_conv_const): Set se->expr to a constant on error.
247
248 2009-11-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
249
250         PR fortran/41278
251         * trans-array.c (gfc_conv_array_transpose): Delete unnecessary assert.
252
253 2009-11-26  Janus Weil  <janus@gcc.gnu.org>
254
255         PR fortran/42048
256         PR fortran/42167
257         * gfortran.h (gfc_is_function_return_value): New prototype.
258         * match.c (gfc_match_call): Use new function
259         'gfc_is_function_return_value'.
260         * primary.c (gfc_is_function_return_value): New function to check if a
261         symbol is the return value of an encompassing function.
262         (match_actual_arg,gfc_match_rvalue,match_variable): Use new function
263         'gfc_is_function_return_value'.
264         * resolve.c (resolve_common_blocks,resolve_actual_arglist): Ditto.
265
266 2009-11-25  Jakub Jelinek  <jakub@redhat.com>
267
268         PR fortran/42162
269         * trans-openmp.c (gfc_trans_omp_do): When dovar isn't a VAR_DECL,
270         don't use simple loop and handle clauses properly.
271
272 2009-11-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
273
274         PR fortran/42008
275         * decl.c (variable_decl): Do not error on initialization within a
276         derived type specification of a pure procedure.
277
278 2009-11-24  Janus Weil  <janus@gcc.gnu.org>
279
280         PR fortran/42045
281         * resolve.c (resolve_actual_arglist): Make sure procedure pointer
282         actual arguments are resolved correctly.
283         (resolve_function): An EXPR_FUNCTION which is a procedure pointer
284         component, has already been resolved.
285         (resolve_fl_derived): Procedure pointer components should not be
286         implicitly typed.
287
288 2009-11-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
289
290         PR fortran/41807
291         * trans-const.c (gfc_conv_const): Fix typo in comment. Replace assert
292         with error message if not constant.
293         * resolve.c (next_data_value): Delete check for constant.
294
295 2009-11-20  Janus Weil  <janus@gcc.gnu.org>
296
297         * intrinsic.texi (C_F_PROCPOINTER): Remove obsolete comment.
298
299 2009-11-20  Paul Thomas  <pault@gcc.gnu.org>
300             Janus Weil  <janus@gcc.gnu.org>
301
302         PR fortran/42104
303         * trans-expr.c (gfc_conv_procedure_call): If procedure pointer
304         component call, use the component's 'always_explicit' attr
305         for array arguments.
306
307 2009-11-19  Janus Weil  <janus@gcc.gnu.org>
308
309         * trans-expr.c (conv_isocbinding_procedure): New function.
310         (gfc_conv_procedure_call): Move ISO_C_BINDING stuff to
311         separate function.
312
313 2009-11-19  Tobias Burnus  <burnus@net-b.de>
314
315         * gfortran.texi (Interoperable Subroutines and Functions): Fix
316         example.
317
318 2009-11-18  Janus Weil  <janus@gcc.gnu.org>
319
320         PR fortran/42072
321         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
322         dummies which are passed to C_F_PROCPOINTER.
323
324 2009-11-18  Alexandre Oliva  <aoliva@redhat.com>
325
326         * module.c (mio_f2k_derived): Initialize op.
327
328 2009-11-15  Janus Weil  <janus@gcc.gnu.org>
329
330         PR fortran/42048
331         * match.c (gfc_match_call): If we're inside a function with derived
332         type return value, allow calling a TBP of the result variable.
333
334 2009-11-12  Tobias Burnus  <burnus@net-b.de>
335
336         * intrinsic.texi (XOR): Refer also to .NEQV.
337         (ISO_FORTRAN_ENV): State which parameters are F2008.
338
339 2009-11-11  Janus Weil  <janus@gcc.gnu.org>
340
341         PR fortran/41978
342         * resolve.c (resolve_ref): Take care of procedure pointer component
343         references.
344
345 2009-11-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
346
347         PR fortran/41909
348         * resolve.c (is_illegal_recursion): Return false if sym is program.
349
350 2009-11-06  Steven G. Kargl  <kargl@gcc.gnu.org>
351
352         * resolve.c (check_typebound_override): Remove duplicate "in" in error
353         message.
354
355 2009-11-05  Steven G. Kargl  <kargl@gcc.gnu.org>
356
357         PR fortran/41918
358         * fortran/trans-decl.c: Silence intent(out) warning for derived type
359         dummy arguments with default initialization.
360
361 2009-11-05  Janus Weil  <janus@gcc.gnu.org>
362
363         PR fortran/41556
364         * interface.c (matching_typebound_op,gfc_extend_assign): Handle CLASS
365         variables.
366
367 2009-11-05  Janus Weil  <janus@gcc.gnu.org>
368
369         PR fortran/41556
370         PR fortran/41873
371         * resolve.c (resolve_function,resolve_call): Prevent abstract interfaces
372         from being called, but allow deferred type-bound procedures with
373         abstract interface.
374
375 2009-11-04  Tobias Burnus <burnus@gcc.gnu.org>
376             Janus Weil  <janus@gcc.gnu.org>
377
378         PR fortran/41556
379         PR fortran/41937
380         * interface.c (gfc_check_operator_interface): Handle CLASS arguments.
381         * resolve.c (resolve_allocate_expr): Handle allocatable components of
382         CLASS variables.
383
384 2009-11-04  Richard Guenther  <rguenther@suse.de>
385
386         * options.c (gfc_post_options): Rely on common code processing
387         LTO options.  Only enable -fwhole-file here.
388
389 2009-11-03  Tobias Burnus  <burnus@net-b.de>
390
391         PR fortran/41907
392         * trans-expr.c (gfc_conv_procedure_call): Fix presence check
393         for optional arguments.
394
395 2009-11-01  Tobias Burnus  <burnus@net-b.de>
396
397         PR fortran/41872
398         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
399         autodeallocated allocatable scalars at the end of scope.
400         (gfc_generate_function_code): Fix indention.
401         * trans-expr.c (gfc_conv_procedure_call): For allocatable
402         scalars, fix calling by reference and autodeallocating
403         of intent out variables.
404
405 2009-11-01  Tobias Burnus  <burnus@net-b.de>
406
407         PR fortran/41850
408         * trans-expr.c (gfc_conv_procedure_call): Deallocate intent-out
409         variables only when present. Remove unneccessary present check.
410
411 2009-10-29  Tobias Burnus  <burnus@net-b.de>
412
413         PR fortran/41777
414         * trans-expr.c (gfc_conv_procedure_call,gfc_conv_expr_reference):
415         Use for generic EXPR_FUNCTION the attributes of the specific
416         function.
417
418 2009-10-29  Janne Blomqvist  <jb@gcc.gnu.org>
419
420         PR fortran/41860
421         * resolve.c (apply_default_init_local): Treat -fno-automatic as if
422         var was saved.
423
424 2009-10-28  Rafael Avila de Espindola  <espindola@google.com>
425
426         * trans-common.c (create_common): Set TREE_PUBLIC to false on
427         fake variables.
428
429 2009-10-26  Janus Weil  <janus@gcc.gnu.org>
430
431         PR fortran/41714
432         * trans.c (gfc_trans_code): Remove call to
433         'tree_annotate_all_with_location'. Location should already be set.
434         * trans-openmp.c (gfc_trans_omp_workshare): Ditto.
435         * trans-stmt.c (gfc_trans_allocate): Do correct data initialization for
436         CLASS variables with SOURCE tag, plus some cleanup.
437
438 2009-10-24  Janus Weil  <janus@gcc.gnu.org>
439             Paul Thomas  <pault@gcc.gnu.org>
440
441         PR fortran/41784
442         * module.c (load_derived_extensions): Skip symbols which are not being
443         loaded.
444
445 2009-10-24  Paul Thomas  <pault@gcc.gnu.org>
446
447         PR fortran/41772
448         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Stop'extent'
449         from going negative.
450
451 2009-10-23  Janus Weil  <janus@gcc.gnu.org>
452
453         PR fortran/41800
454         * trans-expr.c (gfc_trans_scalar_assign): Handle CLASS variables.
455
456 2009-10-23  Janus Weil  <janus@gcc.gnu.org>
457
458         PR fortran/41758
459         * match.c (conformable_arrays): Move to resolve.c.
460         (gfc_match_allocate): Don't resolve SOURCE expr yet, and move some
461         checks to resolve_allocate_expr.
462         * resolve.c (conformable_arrays): Moved here from match.c.
463         (resolve_allocate_expr): Moved some checks here from gfc_match_allocate.
464         (resolve_code): Resolve SOURCE tag for ALLOCATE expressions.
465
466 2009-10-22  Janus Weil  <janus@gcc.gnu.org>
467
468         PR fortran/41781
469         * resolve.c (resolve_codes): Don't clear 'cs_base' for BLOCK constructs,
470         to make sure labels are treated correctly.
471         * symbol.c (gfc_get_st_label): Create labels in the right namespace.
472         For BLOCK constructs go into the parent namespace.
473
474 2009-10-21  Janus Weil  <janus@gcc.gnu.org>
475
476         PR fortran/41706
477         PR fortran/41766
478         * match.c (select_type_set_tmp): Set flavor for temporary.
479         * resolve.c (resolve_class_typebound_call): Correctly resolve actual
480         arguments.
481
482 2009-10-20  Paul Thomas  <pault@gcc.gnu.org>
483
484         PR fortran/41706
485         * resolve.c (resolve_arg_exprs): New function.
486         (resolve_class_compcall): Call the above.
487         (resolve_class_typebound_call): The same.
488
489 2009-10-19  Janus Weil  <janus@gcc.gnu.org>
490
491         PR fortran/41586
492         * parse.c (parse_derived): Correctly set 'alloc_comp' and 'pointer_comp'
493         for CLASS variables.
494         * trans-array.c (structure_alloc_comps): Handle deallocation and
495         nullification of allocatable scalar components.
496         * trans-decl.c (gfc_get_symbol_decl): Remember allocatable scalars for
497         automatic deallocation.
498         (gfc_trans_deferred_vars): Automatically deallocate allocatable scalars.
499
500 2009-10-19  Tobias Burnus  <burnus@net-b.de>
501             Steven G. Kargl  <kargl@gcc.gnu.org>
502
503         PR fortran/41755
504         * symbol.c (gfc_undo_symbols): Add NULL check.
505         * match.c (gfc_match_equivalence): Add check for
506         missing comma.
507
508 2009-10-19  Richard Guenther  <rguenther@suse.de>
509
510         PR fortran/41494
511         * trans-expr.c (gfc_trans_scalar_assign): Do not call
512         gfc_evaluate_now.
513
514 2009-10-17  Janus Weil  <janus@gcc.gnu.org>
515             Paul Thomas  <pault@gcc.gnu.org>
516
517         PR fortran/41608
518         * decl.c (gfc_match_data_decl): Add BT_CLASS for undefined type
519         and empty type errors.
520         * parse.c (gfc_build_block_ns): Only set recursive if parent ns
521         has a proc_name.
522
523         PR fortran/41629
524         PR fortran/41618
525         PR fortran/41587
526         * gfortran.h : Add class_ok bitfield to symbol_attr.
527         * decl.c (build_sym): Set attr.class_ok if dummy, pointer or
528         allocatable.
529         (build_struct): Use gfc_try 't' to carry errors past the call
530         to encapsulate_class_symbol.
531         (attr_decl1): For a CLASS object, apply the new attribute to
532         the data component.
533         * match.c (gfc_match_select_type): Set attr.class_ok for an
534         assigned selector.
535         * resolve.c (resolve_fl_variable_derived): Check a CLASS object
536         is dummy, pointer or allocatable by testing the class_ok and
537         the use_assoc attribute.
538
539 2009-10-16  Janus Weil  <janus@gcc.gnu.org>
540
541         PR fortran/41719
542         * resolve.c (resolve_ordinary_assign): Reject intrinsic assignments
543         to polymorphic variables.
544
545 2009-10-16  Paul Thomas  <pault@gcc.gnu.org>
546
547         PR fortran/41648
548         PR fortran/41656
549         * trans-expr.c (select_class_proc): Convert the expression for the
550         vindex, carried on the first member of the esym list.
551         * gfortran.h : Add the vindex field to the esym_list structure.
552         and eliminate the class_object field.
553         * resolve.c (check_class_members): Remove the setting of the
554         class_object field.
555         (vindex_expr): New function.
556         (get_class_from_expr): New function.
557         (resolve_class_compcall): Call the above to find the ultimate
558         class or derived component.  If derived, do not generate the
559         esym list.  Add and expression for the vindex to the esym list
560         by calling the above.
561         (resolve_class_typebound_call): The same.
562
563 2009-10-15  Steven G. Kargl  <kargl@gcc.gnu.org>
564
565         PR fortran/41712
566         * intrinsic.texi: Explicitly state that ETIME and DTIME take
567         REAL(4) arguments.  Fix nearby typographically errors where 
568         /leq was used instead of \leq.
569
570 2009-10-13  Janus Weil  <janus@gcc.gnu.org>
571
572         PR fortran/41581
573         * decl.c (encapsulate_class_symbol): Add new component '$size'.
574         * resolve.c (resolve_allocate_expr): Move CLASS handling to
575         gfc_trans_allocate.
576         (resolve_class_assign): Replaced by gfc_trans_class_assign.
577         (resolve_code): Remove calls to resolve_class_assign.
578         * trans.c (gfc_trans_code): Use new function gfc_trans_class_assign.
579         * trans-expr.c (get_proc_ptr_comp): Fix a memory leak.
580         (gfc_conv_procedure_call): For CLASS dummies, set the
581         $size component.
582         (gfc_trans_class_assign): New function, replacing resolve_class_assign.
583         * trans-stmt.h (gfc_trans_class_assign): New prototype.
584         * trans-stmt.c (gfc_trans_allocate): Use correct size when allocating
585         CLASS variables. Do proper initialization. Move some code here from
586         resolve_allocate_expr.
587
588 2009-10-11 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
589
590         PR fortran/38439
591         * io.c (check_format): Fix locus for error messages and fix a comment.
592
593 2009-10-11  Paul Thomas  <pault@gcc.gnu.org>
594
595         PR fortran/41583
596         * decl.c (hash_value): New function.
597         (gfc_match_derived_decl): Call it.
598
599 2009-10-09  Janus Weil  <janus@gcc.gnu.org>
600
601         PR fortran/41585
602         * decl.c (build_struct): Bugfix for CLASS components.
603
604 2009-10-09  Tobias Burnus  <burnus@net-b.de>
605
606         PR fortran/41582
607         * decl.c (encapsulate_class_symbol): Save attr.abstract.
608         * resolve.c (resolve_allocate_expr): Reject class allocate
609         without typespec or source=.
610         * trans-stmt.c (gfc_trans_allocate): Change gfc_warning
611         into gfc_error for "not yet implemented".
612
613 2009-10-09  Janus Weil  <janus@gcc.gnu.org>
614
615         PR fortran/41579
616         * gfortran.h (gfc_select_type_stack): New struct, to be used as a stack
617         for SELECT TYPE statements.
618         (select_type_stack): New global variable.
619         (type_selector,select_type_tmp): Removed.
620         * match.c (type_selector,type_selector): Removed.
621         (select_type_stack): New variable, serving as a stack for
622         SELECT TYPE statements.
623         (select_type_push,select_type_set_tmp): New functions.
624         (gfc_match_select_type): Call select_type_push.
625         (gfc_match_type_is): Call select_type_set_tmp.
626         * parse.c (select_type_pop): New function.
627         (parse_select_type_block): Call select_type_pop.
628         * symbol.c (select_type_insert_tmp): New function.
629         (gfc_find_sym_tree): Call select_type_insert_tmp.
630
631 2009-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
632
633         * arith.c (arith_power): Use mpc_pow_z.
634         * gfortran.h (HAVE_mpc_pow_z): Define.
635
636 2009-10-07  Daniel Kraft  <d@domob.eu>
637
638         PR fortran/41615
639         * resolve.c (resolve_contained_fntype): Clarify error message for
640         invalid assumed-length character result on module procedures.
641
642 2009-10-07  Janus Weil  <janus@gcc.gnu.org>
643
644         * expr.c (gfc_check_pointer_assign): Do the correct type checking when
645         CLASS variables are involved.
646         * match.c (gfc_match_select_type): Parse associate-name in SELECT TYPE
647         statements, and set up a local namespace for the SELECT TYPE block.
648         * parse.h (gfc_build_block_ns): New prototype.
649         * parse.c (parse_select_type_block): Return from local namespace to its
650         parent after SELECT TYPE block.
651         (gfc_build_block_ns): New function for setting up the local namespace
652         for a BLOCK construct.
653         (parse_block_construct): Use gfc_build_block_ns.
654         * resolve.c (resolve_select_type): Insert assignment for the selector
655         variable, in case an associate-name is given, and put the SELECT TYPE
656         statement inside a BLOCK.
657         (resolve_code): Call resolve_class_assign after checking the assignment.
658         * symbol.c (gfc_find_sym_tree): Moved some code here from
659         gfc_get_ha_sym_tree.
660         (gfc_get_ha_sym_tree): Moved some code to gfc_find_sym_tree.
661
662 2009-10-07  Paul Thomas <pault@gcc.gnu.org>
663
664         PR fortran/41613
665         * resolve.c (check_class_members): Reset compcall.assign.
666
667 2009-10-05  Paul Thomas  <pault@gcc.gnu.org>
668
669         * trans-expr.c (select_class_proc): New function.
670         (conv_function_val): Deal with class methods and call above.
671         * symbol.c (gfc_type_compatible): Treat case where both ts1 and
672         ts2 are BT_CLASS.
673         gfortran.h : Add structure gfc_class_esym_list and include in
674         the structure gfc_expr.
675         * module.c (load_derived_extensions): New function.
676         (read_module): Call above.
677         (write_dt_extensions): New function.
678         (write_derived_extensions): New function.
679         (write_module): Use the above.
680         * resolve.c (resolve_typebound_call): Add a function expression
681         for class methods.  This carries the chain of symbols for the
682         dynamic dispatch in select_class_proc.
683         (resolve_compcall): Add second, boolean argument to indicate if
684         a function is being handled.
685         (check_members): New function.
686         (check_class_members): New function.
687         (resolve_class_compcall): New function.
688         (resolve_class_typebound_call): New function.
689         (gfc_resolve_expr): Call above for component calls.. 
690
691 2009-10-05  Daniel Kraft  <d@domob.eu>
692
693         PR fortran/41403
694         * trans-stmt.c (gfc_trans_goto): Ignore statement list on assigned goto
695         if it is present.
696
697 2009-10-03  Richard Guenther  <rguenther@suse.de>
698
699         * options.c (gfc_post_options): Handle -flto and -fwhopr.
700
701 2009-10-02  Tobias Burnus  <burnus@net-b.de>
702
703         PR fortran/41479
704         * trans-decl.c (gfc_init_default_dt): Check for presence of
705         the argument only if it is optional or in entry master.
706         (init_intent_out_dt): Ditto; call gfc_init_default_dt
707         for all derived types with initializers.
708
709 2009-10-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
710
711         PR fortran/33197
712         * gfortran.h (HAVE_mpc_arc): Define.
713         * simplify.c (gfc_simplify_acos): Handle complex acos.
714         (gfc_simplify_acosh): Likewise for acosh.
715         (gfc_simplify_asin): Likewise for asin.
716         (gfc_simplify_asinh): Likewise for asinh.
717         (gfc_simplify_atan): Likewise for atan.
718         (gfc_simplify_atanh): Likewise for atanh.
719
720 2009-10-01  Tobias Burnus  <burnus@net-b.de>
721
722         PR fortran/41515
723         * decl.c (do_parm): Call add_init_expr_to_sym.
724
725 2009-09-30  Dennis Wassel  <dennis.wassel@gmail.com>
726
727         * gcc/fortran/trans-array.c (gfc_trans_array_bound_check): Improved
728         bounds checking error messages. (gfc_conv_array_ref): Likewise.
729         (gfc_conv_ss_startstride): Likewise.
730
731 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
732
733         * resolve.c (check_typebound_baseobject): Don't check for
734         abstract types for CLASS.
735         (resolve_class_assign): Adapt for RHS being a CLASS.
736         * trans-intrinsic.c (gfc_conv_associated): Add component ref
737         if expr is a CLASS.
738
739 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
740
741         * check.c (gfc_check_same_type_as): New function for checking
742         SAME_TYPE_AS and EXTENDS_TYPE_OF.
743         * decl.c (encapsulate_class_symbol): Set ABSTRACT attribute for class
744         container, if the contained type has it. Add an initializer for the
745         class container.
746         (add_init_expr_to_sym): Handle BT_CLASS.
747         (vindex_counter): New counter for setting vindices.
748         (gfc_match_derived_decl): Set vindex for all derived types, not only
749         those which are being extended.
750         * expr.c (gfc_check_assign_symbol): Handle NULL initialization of class
751         pointers.
752         * gfortran.h (gfc_isym_id): New values GFC_ISYM_SAME_TYPE_AS and
753         GFC_ISYM_EXTENDS_TYPE_OF.
754         (gfc_type_is_extensible): New prototype.
755         * intrinsic.h (gfc_check_same_type_as): New prototype.
756         * intrinsic.c (add_functions): Add SAME_TYPE_AS and EXTENDS_TYPE_OF.
757         * primary.c (gfc_expr_attr): Handle CLASS-valued functions.
758         * resolve.c (resolve_structure_cons): Handle BT_CLASS.
759         (type_is_extensible): Make non-static and rename to
760         'gfc_type_is_extensible.
761         (resolve_select_type): Renamed type_is_extensible.
762         (resolve_class_assign): Handle NULL pointers.
763         (resolve_fl_variable_derived): Renamed type_is_extensible.
764         (resolve_fl_derived): Ditto.
765         * trans-expr.c (gfc_trans_subcomponent_assign): Handle NULL
766         initialization of class pointer components.
767         (gfc_conv_structure): Handle BT_CLASS.
768         * trans-intrinsic.c (gfc_conv_same_type_as,gfc_conv_extends_type_of):
769         New functions.
770         (gfc_conv_intrinsic_function): Handle SAME_TYPE_AS and EXTENDS_TYPE_OF.
771
772 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
773
774         * gfortran.h (type_selector, select_type_tmp): New global variables.
775         * match.c (type_selector, select_type_tmp): New global variables,
776         used for SELECT TYPE statements.
777         (gfc_match_select_type): Better error handling. Remember selector.
778         (gfc_match_type_is): Create temporary variable.
779         * module.c (ab_attribute): New value 'AB_IS_CLASS'.
780         (attr_bits): New string.
781         (mio_symbol_attribute): Handle 'is_class'.
782         * resolve.c (resolve_select_type): Insert pointer assignment statement,
783         to assign temporary to selector.
784         * symbol.c (gfc_get_ha_sym_tree): Replace selector by a temporary
785         in SELECT TYPE statements.
786
787 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
788
789         * dump-parse-tree.c (show_code_node): Renamed 'alloc_list'.
790         * gfortran.h (gfc_code): Rename 'alloc_list'. Add member 'ts'.
791         (gfc_expr_to_initialize): New prototype.
792         * match.c (alloc_opt_list): Correctly check type compatibility.
793         Renamed 'alloc_list'.
794         (dealloc_opt_list): Renamed 'alloc_list'.
795         * resolve.c (expr_to_initialize): Rename to 'gfc_expr_to_initialize'
796         and make it non-static.
797         (resolve_allocate_expr): Set vindex for CLASS variables correctly.
798         Move initialization code to gfc_trans_allocate. Renamed 'alloc_list'.
799         (resolve_allocate_deallocate): Renamed 'alloc_list'.
800         (check_class_pointer_assign): Rename to 'resolve_class_assign'. Change
801         argument type. Adjust to work with ordinary assignments.
802         (resolve_code): Call 'resolve_class_assign' for ordinary assignments.
803         Renamed 'check_class_pointer_assign'.
804         * st.c (gfc_free_statement): Renamed 'alloc_list'.
805         * trans-stmt.c (gfc_trans_allocate): Renamed 'alloc_list'. Handle
806         size determination and initialization of CLASS variables. Bugfix for
807         ALLOCATE statements with default initialization and SOURCE block.
808         (gfc_trans_deallocate): Renamed 'alloc_list'.
809
810 2009-09-30  Paul Thomas  <pault@gcc.gnu.org>
811
812         * trans-expr.c (gfc_conv_procedure_call): Convert a derived
813         type actual to a class object if the formal argument is a
814         class.
815
816 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
817
818         PR fortran/40996
819         * decl.c (build_struct): Handle allocatable scalar components.
820         * expr.c (gfc_add_component_ref): Correctly set typespec of expression,
821         after inserting component reference.
822         * match.c (gfc_match_type_is,gfc_match_class_is): Make sure that no
823         variables are being used uninitialized.
824         * primary.c (gfc_match_varspec): Handle CLASS array components.
825         * resolve.c (resolve_select_type): Transform EXEC_SELECT_TYPE to
826         EXEC_SELECT.
827         * trans-array.c (structure_alloc_comps,gfc_trans_deferred_array):
828         Handle allocatable scalar components.
829         * trans-expr.c (gfc_conv_component_ref): Ditto.
830         * trans-types.c (gfc_get_derived_type): Ditto.
831
832 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
833
834         * decl.c (encapsulate_class_symbol): Modify names of class container
835         components by prefixing with '$'.
836         (gfc_match_end): Handle COMP_SELECT_TYPE.
837         * expr.c (gfc_add_component_ref): Modify names of class container
838         components by prefixing with '$'.
839         * gfortran.h (gfc_statement): Add ST_SELECT_TYPE, ST_TYPE_IS and
840         ST_CLASS_IS.
841         (gfc_case): New field 'ts'.
842         (gfc_exec_op): Add EXEC_SELECT_TYPE.
843         (gfc_type_is_extension_of): New prototype.
844         * match.h (gfc_match_select_type,gfc_match_type_is,gfc_match_class_is):
845         New prototypes.
846         * match.c (match_derived_type_spec): New function.
847         (match_type_spec): Use 'match_derived_type_spec'.
848         (match_case_eos): Modify error message.
849         (gfc_match_select_type): New function.
850         (gfc_match_case): Modify error message.
851         (gfc_match_type_is): New function.
852         (gfc_match_class_is): Ditto.
853         * parse.h (gfc_compile_state): Add COMP_SELECT_TYPE.
854         * parse.c (decode_statement): Handle SELECT TYPE, TYPE IS and CLASS IS
855         statements.
856         (next_statement): Handle ST_SELECT_TYPE.
857         (gfc_ascii_statement): Handle ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS.
858         (parse_select_type_block): New function.
859         (parse_executable): Handle ST_SELECT_TYPE.
860         * resolve.c (resolve_deallocate_expr): Handle BT_CLASS. Modify names of
861         class container components by prefixing with '$'.
862         (resolve_allocate_expr): Ditto.
863         (resolve_select_type): New function.
864         (gfc_resolve_blocks): Handle EXEC_SELECT_TYPE.
865         (check_class_pointer_assign): Modify names of class container
866         components by prefixing with '$'.
867         (resolve_code): Ditto.
868         * st.c (gfc_free_statement): Ditto.
869         * symbol.c (gfc_type_is_extension_of): New function.
870         (gfc_type_compatible): Use 'gfc_type_is_extension_of', plus a bugfix.
871         * trans.c (gfc_trans_code): Handel EXEC_SELECT_TYPE.
872
873 2009-09-30  Janus Weil  <janus@gcc.gnu.org>
874             Paul Thomas <pault@gcc.gnu.org> 
875
876         * check.c (gfc_check_move_alloc): Arguments don't have to be arrays.
877         The second argument needs to be type-compatible with the first (not the
878         other way around, which makes a difference for CLASS entities).
879         * decl.c (encapsulate_class_symbol): New function.
880         (build_sym,build_struct): Handle BT_CLASS, call
881         'encapsulate_class_symbol'.
882         (gfc_match_decl_type_spec): Remove warning, use BT_CLASS.
883         (gfc_match_derived_decl): Set vindex;
884         * expr.c (gfc_add_component_ref): New function.
885         (gfc_copy_expr,gfc_check_pointer_assign,gfc_check_assign_symbol):
886         Handle BT_CLASS.
887         * dump-parse-tree.c (show_symbol): Print vindex.
888         * gfortran.h (bt): New basic type BT_CLASS.
889         (symbol_attribute): New field 'is_class'.
890         (gfc_typespec): Remove field 'is_class'.
891         (gfc_symbol): New field 'vindex'.
892         (gfc_get_ultimate_derived_super_type): New prototype.
893         (gfc_add_component_ref): Ditto.
894         * interface.c (gfc_compare_derived_types): Pointer equality check
895         moved here from gfc_compare_types.
896         (gfc_compare_types): Handle BT_CLASS and use
897         gfc_type_compatible.
898         * match.c (gfc_match_allocate,gfc_match_deallocate,gfc_match_call):
899         Handle BT_CLASS.
900         * misc.c (gfc_clear_ts): Removed is_class.
901         (gfc_basic_typename,gfc_typename): Handle BT_CLASS.
902         * module.c (bt_types,mio_typespec): Handle BT_CLASS.
903         (mio_symbol): Handle vindex.
904         * primary.c (gfc_match_varspec,gfc_variable_attr): Handle BT_CLASS.
905         * resolve.c (find_array_spec,check_typebound_baseobject):
906         Handle BT_CLASS.
907         (resolve_ppc_call,resolve_expr_ppc): Don't call 'gfc_is_proc_ptr_comp'
908         inside 'gcc_assert'.
909         (resolve_deallocate_expr,resolve_allocate_expr): Handle BT_CLASS.
910         (check_class_pointer_assign): New function.
911         (resolve_code): Handle BT_CLASS, call check_class_pointer_assign.
912         (resolve_fl_var_and_proc,type_is_extensible,resolve_fl_variable_derived,
913         resolve_fl_variable): Handle BT_CLASS.
914         (check_generic_tbp_ambiguity): Add special case.
915         (resolve_typebound_procedure,resolve_fl_derived): Handle BT_CLASS.
916         * symbol.c (gfc_get_ultimate_derived_super_type): New function.
917         (gfc_type_compatible): Handle BT_CLASS.
918         * trans-expr.c (conv_parent_component_references): Handle CLASS
919         containers.
920         (gfc_conv_initializer): Handle BT_CLASS.
921         * trans-types.c (gfc_typenode_for_spec,gfc_get_derived_type):
922         Handle BT_CLASS.
923
924 2009-09-29  Daniel Kraft  <d@domob.eu>
925
926         PR fortran/39626
927         * gfortran.h (enum gfc_statement): Add ST_BLOCK and ST_END_BLOCK.
928         (struct gfc_namespace): Convert flags to bit-fields and add flag
929         `construct_entities' for use with BLOCK constructs.
930         (enum gfc_exec_code): Add EXEC_BLOCK.
931         (struct gfc_code): Add namespace field to union for EXEC_BLOCK.
932         * match.h (gfc_match_block): New prototype.
933         * parse.h (enum gfc_compile_state): Add COMP_BLOCK.
934         * trans.h (gfc_process_block_locals): New prototype.
935         (gfc_trans_deferred_vars): Made public, new prototype.
936         * trans-stmt.h (gfc_trans_block_construct): New prototype.
937         * decl.c (gfc_match_end): Handle END BLOCK correctly.
938         (gfc_match_intent): Error if inside of BLOCK.
939         (gfc_match_optional), (gfc_match_value): Ditto.
940         * match.c (gfc_match_block): New routine.
941         * parse.c (decode_statement): Handle BLOCK statement.
942         (case_exec_markers): Add ST_BLOCK.
943         (case_end): Add ST_END_BLOCK.
944         (gfc_ascii_statement): Handle ST_BLOCK and ST_END_BLOCK.
945         (parse_spec): Check for statements not allowed inside of BLOCK.
946         (parse_block_construct): New routine.
947         (parse_executable): Parse BLOCKs.
948         (parse_progunit): Disallow CONTAINS in BLOCK constructs.
949         * resolve.c (is_illegal_recursion): Find real container procedure and
950         don't get confused by BLOCK constructs.
951         (resolve_block_construct): New routine.
952         (gfc_resolve_blocks), (resolve_code): Handle EXEC_BLOCK.
953         * st.c (gfc_free_statement): Handle EXEC_BLOCK statements.
954         * trans-decl.c (saved_local_decls): New static variable.
955         (add_decl_as_local): New routine.
956         (gfc_finish_var_decl): Add variable as local if inside BLOCK.
957         (gfc_trans_deferred_vars): Make public.
958         (gfc_process_block_locals): New routine.
959         * trans-stmt.c (gfc_trans_block_construct): New routine.
960         * trans.c (gfc_trans_code): Handle EXEC_BLOCK statements.
961
962 2009-09-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
963
964         PR fortran/35862
965         * io.c (format_token): Add enumerators for rounding format specifiers.
966         (format_lex): Tokenize the rounding format specifiers.
967         (gfc_match_open): Enable rounding modes in OPEN statement.
968
969 2009-09-28  Richard Henderson  <rth@redhat.com>
970
971         * f95-lang.c (gfc_init_builtin_functions): Update call to
972         build_common_builtin_nodes.
973
974 2009-09-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
975
976         * simplify.c (gfc_simplify_acos, gfc_simplify_acosh,
977         gfc_simplify_asin, gfc_simplify_asinh, gfc_simplify_atan,
978         gfc_simplify_atanh): Fix error message.
979
980 2009-09-24  Steven G. Kargl  <kargl@gcc.gnu.org>
981
982         PR fortran/41459
983         * error.c(gfc_warning_now): Move warnings_are_errors test to 
984         after actual emitting of the warning.
985         * parse.c (next_free): Improve error locus printing.
986         (next_fixed): Change gfc_warn to gfc_warning_now, and improve
987         locus reporting.
988
989 2009-09-16  Michael Matz  <matz@suse.de>
990
991         PR fortran/41212
992         * trans.h (struct lang_type): Remove nontarget_type member.
993         * trans.c (gfc_add_modify): Don't access it.
994         * trans-decl.c (gfc_finish_var_decl): Don't allocate and set it,
995         instead set DECL_RESTRICTED_P on affected decls.
996
997 2009-09-14  Richard Henderson  <rth@redhat.com>
998
999         * f95-lang.c (gfc_init_builtin_functions): Update call to
1000         build_common_builtin_nodes.
1001         (gfc_maybe_initialize_eh): Don't call
1002         default_init_unwind_resume_libfunc.
1003
1004 2009-09-13  Richard Guenther  <rguenther@suse.de>
1005         Rafael Avila de Espindola  <espindola@google.com>
1006
1007         * f95-lang.c (gfc_maybe_initialize_eh): Do not init
1008         eh_personality_libfunc.
1009
1010 2009-09-11  Janus Weil  <janus@gcc.gnu.org>
1011
1012         PR fortran/41242
1013         * resolve.c (resolve_ordinary_assign): Don't call resolve_code,
1014         to avoid that subsequent codes are resolved more than once.
1015         (resolve_code): Make sure that type-bound assignment operators are
1016         resolved correctly.
1017
1018
1019 2009-09-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1020
1021         PR fortran/31292
1022         * fortran/decl.c(gfc_match_modproc): Check that module procedures
1023         from a module can USEd in module procedure statements in other
1024         program units.  Update locus for better error message display.
1025         Detect intrinsic procedures in module procedure statements.
1026
1027 2009-09-09  Richard Guenther  <rguenther@suse.de>
1028
1029         PR fortran/41297
1030         * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
1031         left 'tmp' unused in derived type assignment.
1032
1033 2009-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1034
1035         PR fortran/41197
1036         * resolve_c (resolve_allocate_deallocate):  Complain
1037         if stat or errmsg varaible is an array.
1038
1039 2009-09-05  Paul Thomas  <pault@gcc.gnu.org>
1040
1041         PR fortran/41258
1042         * primary.c (gfc_match_varspec): Do not look for typebound
1043         procedures unless the derived type has a f2k_derived namespace.
1044
1045 2009-09-03  Diego Novillo  <dnovillo@google.com>
1046
1047         * f95-lang.c (lang_hooks): Remove const qualifier.
1048
1049 2009-09-01  Richard Guenther  <rguenther@suse.de>
1050
1051         * f95-lang.c (gfc_mark_addressable): Remove.
1052         (LANG_HOOKS_MARK_ADDRESSABLE): Likewise.
1053
1054 2009-08-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1055
1056         PR fortran/39229
1057         * scanner.c (next_char): Fix typo in comment.
1058         (gfc_get_char_literal): Warn if truncate flag is set for both fixed and
1059         free form source, adjusting error locus as needed.
1060         * parse.c (next_fixed): Clear the truncate flag.
1061         (next_statement): Remove truncate warning.
1062
1063 2009-08-31  Janus Weil  <janus@gcc.gnu.org>
1064             Paul Thomas  <pault@gcc.gnu.org>
1065
1066         PR fortran/40940
1067         * array.c (gfc_match_array_constructor): Rename gfc_match_type_spec.
1068         * decl.c (gfc_match_type_spec): Rename to gfc_match_decl_type_spec,
1069         and reject CLASS with -std=f95.
1070         (gfc_match_implicit, gfc_match_data_decl,gfc_match_prefix,
1071         match_procedure_interface): Rename gfc_match_type_spec.
1072         * gfortran.h (gfc_type_compatible): Add prototype.
1073         * match.h (gfc_match_type_spec): Rename to gfc_match_decl_type_spec.
1074         * match.c (match_intrinsic_typespec): Rename to match_type_spec, and
1075         add handling of derived types.
1076         (gfc_match_allocate): Rename match_intrinsic_typespec and check
1077         type compatibility of derived types.
1078         * symbol.c (gfc_type_compatible): New function to check if two types
1079         are compatible.
1080
1081 2009-08-31  Janus Weil  <janus@gcc.gnu.org>
1082
1083         PR fortran/40996
1084         * check.c (gfc_check_allocated): Implement allocatable scalars.
1085         * resolve.c (resolve_allocate_expr,resolve_fl_var_and_proc): Ditto.
1086         * trans-intrinsic.c (gfc_conv_allocated): Ditto.
1087
1088 2009-08-30  Daniel Kraft  <d@domob.eu>
1089
1090         PR fortran/37425
1091         * dump-parse-tree.c (show_typebound_proc): Renamed from `show_typebound'
1092         and accept gfc_typebound_proc and name instead of the symtree, needed
1093         for intrinsic operator output.
1094         (show_typebound_symtree): New method calling `show_typebound_proc'.
1095         (show_f2k_derived): Output type-bound operators also.
1096         (show_symbol): Moved output of `Procedure bindings:' label to
1097         `show_f2k_derived'.
1098         * gfortran.texi (Fortran 2003 status): Mention support of
1099         array-constructors with explicit type specification, type-bound
1100         procedures/operators, type extension, ABSTRACT types and DEFERRED.
1101         Link to Fortran 2003 wiki page.
1102         (Fortran 2008 status): Fix typo.  Link to Fortran 2008 wiki page.
1103         * gfc-internals.texi (Type-bound Procedures): Document the new
1104         members/attributes of gfc_expr.value.compcall used for type-bound
1105         operators.
1106         (Type-bound Operators): New section documenting their internals.
1107
1108 2009-08-27  Janus Weil  <janus@gcc.gnu.org>
1109
1110         PR fortran/40869
1111         * expr.c (gfc_check_pointer_assign): Enable interface check for
1112         pointer assignments involving procedure pointer components.
1113         * gfortran.h (gfc_compare_interfaces): Modified prototype.
1114         * interface.c (gfc_compare_interfaces): Add argument 'name2', to be
1115         used instead of s2->name. Don't rely on the proc_pointer attribute,
1116         but instead on the flags handed to this function.
1117         (check_interface1,compare_parameter): Add argument for
1118         gfc_compare_interfaces.
1119         * resolve.c (check_generic_tbp_ambiguity): Ditto.
1120
1121 2009-08-27  Daniel Kraft  <d@domob.eu>
1122
1123         PR fortran/37425
1124         * gfortran.h (gfc_expr): Optionally store base-object in compcall value
1125         and add a new flag to distinguish assign-calls generated.
1126         (gfc_find_typebound_proc): Add locus argument.
1127         (gfc_find_typebound_user_op), (gfc_find_typebound_intrinsic_op): Ditto.
1128         (gfc_extend_expr): Return if failure was by a real error.
1129         * interface.c (matching_typebound_op): New routine.
1130         (build_compcall_for_operator): New routine.
1131         (gfc_extend_expr): Handle type-bound operators, some clean-up and
1132         return if failure was by a real error or just by not finding an
1133         appropriate operator definition.
1134         (gfc_extend_assign): Handle type-bound assignments.
1135         * module.c (MOD_VERSION): Incremented.
1136         (mio_intrinsic_op): New routine.
1137         (mio_full_typebound_tree): New routine to make typebound-procedures IO
1138         code reusable for type-bound user operators.
1139         (mio_f2k_derived): IO of type-bound operators.
1140         * primary.c (gfc_match_varspec): Initialize new fields in gfc_expr and
1141         pass locus to gfc_find_typebound_proc.
1142         * resolve.c (resolve_operator): Only output error about no matching
1143         interface if gfc_extend_expr did not already fail with an error.
1144         (extract_compcall_passed_object): Use specified base-object if present.
1145         (update_compcall_arglist): Handle ignore_pass field.
1146         (resolve_ordinary_assign): Update to handle extended code for
1147         type-bound assignments, too.
1148         (resolve_code): Handle EXEC_ASSIGN_CALL statement code.
1149         (resolve_tb_generic_targets): Pass locus to gfc_find_typebound_proc.
1150         (resolve_typebound_generic), (resolve_typebound_procedure): Ditto.
1151         (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): Ditto.
1152         (ensure_not_abstract_walker), (resolve_fl_derived): Ditto.
1153         (resolve_typebound_procedures): Remove not-implemented error.
1154         (resolve_typebound_call): Handle assign-call flag.
1155         * symbol.c (find_typebound_proc_uop): New argument to pass locus for
1156         error message about PRIVATE, verify that a found procedure is not marked
1157         as erraneous.
1158         (gfc_find_typebound_intrinsic_op): Ditto.
1159         (gfc_find_typebound_proc), (gfc_find_typebound_user_op): New locus arg.
1160
1161 2009-08-22  Bud Davis <bdavis9659@sbcglobal.net>
1162
1163         PR fortran/28093
1164         * io.c: reverted previous patch.
1165
1166 2009-08-25  Janne Blomqvist  <jb@gcc.gnu.org>
1167
1168         * gfortran.texi: Fix ENCODE example.
1169
1170 2009-08-25  Janus Weil  <janus@gcc.gnu.org>
1171
1172         PR fortran/41139
1173         * primary.c (gfc_match_varspec): Make sure EXPR_PPC is only used for
1174         calls to procedure pointer components, other references to procedure
1175         pointer components are EXPR_VARIABLE.
1176         * resolve.c (resolve_actual_arglist): Bugfix (there can be calls without
1177         actual arglist).
1178         * trans-expr.c (gfc_get_proc_ptr_comp): Renamed to 'get_proc_ptr_comp',
1179         removed argument 'se' and made static. Avoid inserting a temporary
1180         variable for calling the PPC.
1181         (conv_function_val): Renamed gfc_get_proc_ptr_comp.
1182         (gfc_conv_procedure_call): Distinguish functions returning a procedure
1183         pointer from calls to a procedure pointer. Distinguish calls to
1184         procedure pointer components from procedure pointer components as
1185         actual arguments.
1186         * trans-stmt.h (gfc_get_proc_ptr_comp): Make it static.
1187
1188 2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1189
1190         PR fortran/41162
1191         * io.c (check_format): Fix to not error on slash after P. Fix some
1192         error loci.
1193         
1194 2009-08-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1195
1196         PR fortran/41154
1197         * io.c (check_format): Fix to not error on right paren after P.
1198
1199 2009-08-24  Aldy Hernandez  <aldyh@redhat.com>
1200
1201         PR fortran/40660
1202         * trans-io.c (build_dt): Pass UNKNOWN_LOCATION to build_call_expr_loc.
1203         (transfer_array_desc): Same.
1204
1205 2009-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1206
1207         PR fortran/35754
1208         * io.c (check_format): Add checks for comma and the allowed
1209         format specifiers after the 'P' specifier. Fix typo in error message
1210         and adjust locus.
1211
1212 2009-08-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1213
1214         PR fortran/37446
1215         * io.c (enum format_token): Change FMT_EXT to FMT_EN and FMT_ES.
1216         (format_lex): Likewise.
1217         (token_to_string): New function.
1218         (check_format): Use the new tokens and the new function. Add
1219         check for positive width.
1220
1221 2009-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1222
1223         * fortran/decl.c: Disallow procedure pointers with -std=f95.
1224
1225 2009-08-22 Steven K. kargl  <kargl@gcc.gnu.org>
1226            Paul Thomas  <pault@gcc.gnu.org>
1227
1228         * fortran/decl.c (match_char_spec): Rename to gfc_match_char_spec,
1229         and remove static.
1230         * fortran/gfortran.h: Add *expr3 entity to gfc_code.  Add prototype
1231         for gfc_match_char_spec.
1232         * fortran/trans-stmt.c (gfc_trans_allocate): Translate the SOURCE=
1233         tag.
1234         * fortran/match.c (match_intrinsic_typespec): New function to match
1235         F2003 intrinsic-type-spec.
1236         (conformable_arrays): New function. Check SOURCE= and
1237         allocation-object are conformable.
1238         (gfc_match_allocate): Use new functions.  Match SOURCE= tag.
1239
1240 2009-08-22  Bud Davis <bdavis9659@sbcglobal.net>
1241
1242         PR fortran/28093
1243         * io.c : added variable to store original len of fmt
1244         * io.c (check_format): Consume H items using next_char
1245         in both modes to handle consecutive single quotes.
1246         Test for extra characters in fmt, issue warning.
1247
1248 2009-08-21  Janus Weil  <janus@gcc.gnu.org>
1249
1250         PR fortran/41106
1251         * primary.c (gfc_variable_attr): Make it work also on EXPR_FUNCTION.
1252         (gfc_expr_attr): Use gfc_variable_attr for procedure pointer components.
1253         * resolve.c (resolve_fl_derived): Handle CHARACTER-valued procedure
1254         pointer components.
1255         * trans-expr.c (gfc_conv_component_ref): Ditto.
1256         (gfc_conv_variable): Ditto.
1257         (gfc_conv_procedure_call): Ditto.
1258         (gfc_trans_pointer_assignment): Ditto.
1259         * trans-types.c (gfc_get_derived_type): Ditto.
1260
1261 2009-08-20  Tobias Schlüter  <tobi@gcc.gnu.org>
1262
1263         * trans-stmt.c (gfc_trans_do): Add a few missing folds.
1264
1265 2009-08-20  Michael Matz  <matz@suse.de>
1266
1267         PR fortran/41126
1268         * trans-expr.c (gfc_conv_string_tmp): Check type compatibility
1269         instead of equality.
1270
1271 2009-08-20  Janus Weil  <janus@gcc.gnu.org>
1272
1273         PR fortran/41121
1274         * resolve.c (resolve_symbol): Don't resolve formal_ns of intrinsic
1275         procedures.
1276
1277 2009-08-18  Michael Matz  <matz@suse.de>
1278
1279         * trans-expr.c (gfc_conv_substring): Don't evaluate casted decl early,
1280         change order of length calculation to (end - start) + 1.
1281         (gfc_get_interface_mapping_array): Adjust call to
1282         gfc_get_nodesc_array_type.
1283         * trans-array.c (gfc_trans_create_temp_array,
1284         gfc_build_constant_array_constructor, gfc_conv_expr_descriptor): Ditto.
1285         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1286         * trans.c (gfc_add_modify): Assignment between base type and nontarget
1287         type are equal enough.
1288         (gfc_call_malloc): Use prvoid_type_node for return value of
1289         __builtin_malloc.
1290         (gfc_allocate_with_status): Ditto.
1291         * trans-types.c (gfc_array_descriptor_base): Double size of this array.
1292         (gfc_init_types): Build prvoid_type_node.
1293         (gfc_build_array_type): New bool parameter "restricted".
1294         (gfc_get_nodesc_array_type): Ditto, build restrict qualified pointers,
1295         if it's true.
1296         (gfc_get_array_descriptor_base): Ditto.
1297         (gfc_get_array_type_bounds): Ditto.
1298         (gfc_sym_type): Use symbol attributes to feed calls to above functions.
1299         (gfc_get_derived_type): Ditto.
1300         * trans.h (struct lang_type): Add nontarget_type member.
1301         * trans-types.h (prvoid_type_node): Declare.
1302         (gfc_get_array_type_bounds, gfc_get_nodesc_array_type): Declare new
1303         parameter.
1304         * trans-decl.c (gfc_finish_var_decl): Give scalars that can't be
1305         aliased a type with a different alias set than the base type.
1306         (gfc_build_dummy_array_decl): Adjust call to gfc_get_nodesc_array_type.
1307
1308 2009-08-18  Janus Weil  <janus@gcc.gnu.org>
1309             Paul Thomas  <pault@gcc.gnu.org>
1310
1311         PR fortran/40870
1312         * trans-types.c (gfc_get_ppc_type): Include formal args in backend_decl
1313         using the interface symbol. Character types are returned by reference.
1314         (gfc_get_derived_type): Prevent infinite recursion loop
1315         if a PPC has a derived-type formal arg.
1316
1317 2008-08-17  Paul Thomas  <pault@gcc.gnu.org>
1318
1319         PR fortran/41062
1320         * trans-decl.c (gfc_trans_use_stmts):  Keep going through use
1321         list if symbol is not use associated.
1322
1323 2009-08-17  Daniel Kraft  <d@domob.eu>
1324
1325         PR fortran/37425
1326         * resolve.c (get_checked_tb_operator_target): New routine to do checks
1327         on type-bound operators in common between intrinsic and user operators.
1328         (resolve_typebound_intrinsic_op): Call it.
1329         (resolve_typebound_user_op): Ditto.
1330
1331 2009-08-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1332
1333         PR fortran/41075
1334         * scanner.c (gfc_next_char_literal): Add comment to improve 
1335         readability.
1336         * io.c (enum format_token): Add FMT_STAR. (format_lex): Add case
1337         for '*'. (check_format): Check for left paren after '*'.  Change
1338         format checks to use %L to improve format string error locus.
1339
1340 2009-08-17  Janus Weil  <janus@gcc.gnu.org>
1341
1342         PR fortran/40877
1343         * array.c (gfc_resolve_character_array_constructor): Add NULL argument
1344         to gfc_new_charlen.
1345         * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1346         gfc_match_implicit): Ditto.
1347         * expr.c (simplify_const_ref): Fix memory leak.
1348         (gfc_simplify_expr): Add NULL argument to gfc_new_charlen.
1349         * gfortran.h (gfc_new_charlen): Modified prototype.
1350         * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Add NULL
1351         argument to gfc_new_charlen.
1352         * module.c (mio_charlen): Ditto.
1353         * resolve.c (gfc_resolve_substring_charlen,
1354         gfc_resolve_character_operator,fixup_charlen): Ditto.
1355         (resolve_fl_derived,resolve_symbol): Add argument to gfc_charlen.
1356         * symbol.c (gfc_new_charlen): Add argument 'old_cl' (to make a copy of
1357         an existing charlen).
1358         (gfc_set_default_type,generate_isocbinding_symbol): Fix memory leak.
1359         (gfc_copy_formal_args_intr): Add NULL argument to gfc_new_charlen.
1360         * trans-decl.c (create_function_arglist): Fix memory leak.
1361
1362 2009-08-17  Richard Guenther  <rguenther@suse.de>
1363
1364         * trans-expr.c (gfc_trans_scalar_assign): Replace hack with
1365         more proper hack.
1366
1367 2009-08-15  Tobias Burnus  <burnus@net-b.de>
1368
1369         PR fortran/41080
1370         * gfortranspec.c (lookup_option): Remove gfortran-specific
1371         version of -dumpversion.
1372
1373 2009-08-14  Janus Weil  <janus@gcc.gnu.org>
1374
1375         PR fortran/41070
1376         * resolve.c (resolve_structure_cons): Make sure that ts.u.derived is
1377         only used if type is BT_DERIVED.
1378
1379 2009-08-13  Janus Weil  <janus@gcc.gnu.org>
1380
1381         PR fortran/40941
1382         * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union.
1383         * decl.c (build_struct): Make sure 'cl' is only used
1384         if type is BT_CHARACTER.
1385         * symbol.c (gfc_set_default_type): Ditto.
1386         * resolve.c (resolve_symbol, resolve_fl_derived): Ditto.
1387         (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived'
1388         is only used if type is BT_DERIVED.
1389         * trans-io.c (transfer_expr): Make sure 'derived' is only used if type
1390         is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR).
1391         * array.c: Mechanical replacements to accomodate union in gfc_typespec.
1392         * check.c: Ditto.
1393         * data.c: Ditto.
1394         * decl.c: Ditto.
1395         * dump-parse-tree.c: Ditto.
1396         * expr.c: Ditto.
1397         * interface.c: Ditto.
1398         * iresolve.c: Ditto.
1399         * match.c: Ditto.
1400         * misc.c: Ditto.
1401         * module.c: Ditto.
1402         * openmp.c: Ditto.
1403         * parse.c: Ditto.
1404         * primary.c: Ditto.
1405         * resolve.c: Ditto.
1406         * simplify.c: Ditto.
1407         * symbol.c: Ditto.
1408         * target-memory.c: Ditto.
1409         * trans-array.c: Ditto.
1410         * trans-common.c: Ditto.
1411         * trans-const.c: Ditto.
1412         * trans-decl.c: Ditto.
1413         * trans-expr.c: Ditto.
1414         * trans-intrinsic.c: Ditto.
1415         * trans-io.c: Ditto.
1416         * trans-stmt.c: Ditto.
1417         * trans-types.c: Ditto.
1418
1419 2009-08-13  Janus Weil  <janus@gcc.gnu.org>
1420
1421         PR fortran/40995
1422         * resolve.c (resolve_symbol): Move some checking code to
1423         resolve_intrinsic, and call this from here.
1424         (resolve_intrinsic): Some checking code moved here from resolve_symbol.
1425         Make sure each intrinsic is only resolved once.
1426
1427 2009-08-12  Tobias Burnus  <burnus@net-b.de>
1428
1429         PR fortran/41034
1430         * symbol.c (gfc_copy_attr): Merge bits instead of replace
1431         bits in gfc_copy_attr.
1432         * gfc_check_pointer_assign (gfc_check_pointer_assign):
1433         Initialize ext_attr bits by zero.
1434
1435 2009-08-11  Richard Guenther  <rguenther@suse.de>
1436
1437         * trans-types.c (gfc_get_derived_type): Do not clear TYPE_CANONICAL.
1438
1439 2009-08-11  Janus Weil  <janus@gcc.gnu.org>
1440
1441         PR fortran/41022
1442         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointer
1443         components as actual arguments.
1444
1445 2009-08-10  Daniel Kraft  <d@domob.eu>
1446
1447         PR fortran/37425
1448         * gfortran.h (struct gfc_namespace): New fields tb_uop_root and tb_op.
1449         (gfc_find_typebound_user_op): New routine.
1450         (gfc_find_typebound_intrinsic_op): Ditto.
1451         (gfc_check_operator_interface): Now public routine.
1452         * decl.c (gfc_match_generic): Match OPERATOR(X) or ASSIGNMENT(=).
1453         * interface.c (check_operator_interface): Made public, renamed to
1454         `gfc_check_operator_interface' accordingly and hand in the interface
1455         as gfc_symbol rather than gfc_interface so it is useful for type-bound
1456         operators, too.  Return boolean result.
1457         (gfc_check_interfaces): Adapt call to `check_operator_interface'.
1458         * symbol.c (gfc_get_namespace): Initialize new field `tb_op'.
1459         (gfc_free_namespace): Free `tb_uop_root'-based tree.
1460         (find_typebound_proc_uop): New helper function.
1461         (gfc_find_typebound_proc): Use it.
1462         (gfc_find_typebound_user_op): New method.
1463         (gfc_find_typebound_intrinsic_op): Ditto.
1464         * resolve.c (resolve_tb_generic_targets): New helper function.
1465         (resolve_typebound_generic): Use it.
1466         (resolve_typebound_intrinsic_op), (resolve_typebound_user_op): New.
1467         (resolve_typebound_procedures): Resolve operators, too.
1468         (check_uop_procedure): New, code from gfc_resolve_uops.
1469         (gfc_resolve_uops): Moved main code to new `check_uop_procedure'.
1470
1471 2009-08-10  Janus Weil  <janus@gcc.gnu.org>
1472
1473         PR fortran/40940
1474         * decl.c (gfc_match_type_spec): Match CLASS statement and warn about
1475         missing polymorphism.
1476         * gfortran.h (gfc_typespec): Add field 'is_class'.
1477         * misc.c (gfc_clear_ts): Initialize 'is_class' to zero.
1478         * resolve.c (type_is_extensible): New function to check if a derived
1479         type is extensible.
1480         (resolve_fl_variable_derived): Add error checks for CLASS variables.
1481         (resolve_typebound_procedure): Disallow non-polymorphic passed-object
1482         dummy arguments, turning warning into error.
1483         (resolve_fl_derived): Use 'type_is_extensible'. Disallow non-polymorphic
1484         passed-object dummy arguments for procedure pointer components,
1485         turning warning into error. Add error check for CLASS components.
1486
1487 2009-08-05  Tobias Burnus  <burnus@net-b.de>
1488
1489         PR fortran/40955
1490         * gfortran.h (ext_attr_id_t): Add typedef for this enum.
1491         (gfc_add_ext_attribute): Use it.
1492         * decl.c (gfc_match_gcc_attributes): Ditto.
1493         * expr.c (gfc_check_pointer_assign): Ditto.
1494         * symbol.c (gfc_add_ext_attribute): Ditto.
1495         (gfc_copy_attr): Copy also ext_attr.
1496         * resolve.c (resolve_fl_derived,resolve_symbol): Ditto.
1497         * module.c (mio_symbol_attribute): Save ext_attr in the mod file.
1498
1499 2009-08-05  Tobias Burnus  <burnus@net-b.de>
1500
1501         PR fortran/40969
1502         Revert:
1503         2009-08-04  Tobias Burnus  <burnus@net-b.de>
1504
1505         PR fortran/40949
1506         * trans-types.c (gfc_get_function_type): Fix typelist of
1507         functions without argument.
1508
1509 2009-08-05  Paul Thomas  <pault@gcc.gnu.org>
1510
1511         PR fortran/40847
1512         * iresolve.c (gfc_resolve_transfer): Correct error in 'mold'
1513         character length for case where length expresson is NULL.
1514
1515 2009-08-04  Tobias Burnus  <burnus@net-b.de>
1516
1517         PR fortran/40949
1518         * trans-types.c (gfc_get_function_type): Fix typelist of
1519         functions without argument.
1520
1521 2009-08-04  Paul Thomas  <pault@gcc.gnu.org>
1522
1523         PR fortran/40875
1524         * decl.c (add_init_expr_to_sym): Character symbols can only be
1525         initialized with character expressions.
1526
1527 2009-08-02  Janus Weil  <janus@gcc.gnu.org>
1528
1529         PR fortran/40881
1530         * decl.c (match_char_length): Warn about old-style character length
1531         declarations.
1532         * match.c (match_arithmetic_if,gfc_match_if): Modify warning message
1533         for arithmetic if.
1534         (gfc_match_goto): Warn about computed gotos.
1535         (gfc_match_return): Warn about alternate return.
1536         (gfc_match_st_function): Warn about statement functions.
1537         * resolve.c (resolve_fl_procedure): Modify warning message for
1538         assumed-length character functions.
1539
1540 2009-08-01  Paul Thomas  <pault@gcc.gnu.org>
1541
1542         PR fortran/40011
1543         * error.c : Add static flag 'warnings_not_errors'.
1544         (gfc_error): If 'warnings_not_errors' is set, branch to code
1545         from gfc_warning.
1546         (gfc_clear_error): Reset 'warnings_not_errors'.
1547         (gfc_errors_to_warnings): New function.
1548         * options.c (gfc_post_options): If pedantic and flag_whole_file
1549         change the latter to a value of 2.
1550         * parse.c (parse_module): Add module namespace to gsymbol.
1551         (resolve_all_program_units): New function.
1552         (clean_up_modules): New function.
1553         (translate_all_program_units): New function.
1554         (gfc_parse_file): If whole_file, do not clean up module right
1555         away and add derived types to namespace derived types. In
1556         addition, call the three new functions above.
1557         * resolve.c (not_in_recursive): New function.
1558         (not_entry_self_reference): New function.
1559         (resolve_global_procedure): Symbol must not be IFSRC_UNKNOWN,
1560         procedure must not be in the course of being resolved and
1561         must return false for the two new functions. Pack away the
1562         current derived type list before calling gfc_resolve for the
1563         gsymbol namespace.  It is unconditionally an error if the ranks
1564         of the reference and ther procedure do not match. Convert
1565         errors to warnings during call to gfc_procedure_use if not
1566         pedantic or legacy.
1567         (gfc_resolve): Set namespace resolved flag to -1 during
1568         resolution and store current cs_base.
1569         * trans-decl.c (gfc_get_symbol_decl): If whole_file compilation
1570         substitute a use associated variable, if it is available in a
1571         gsymbolnamespace.
1572         (gfc_get_extern_function_decl): If the procedure is use assoc,
1573         do not attempt to find it in a gsymbol because it could be an
1574         interface. If the symbol exists in a module namespace, return
1575         its backend_decl.
1576         * trans-expr.c (gfc_trans_scalar_assign): If a derived type
1577         assignment, set the rhs TYPE_MAIN_VARIANT to that of the rhs.
1578         * trans-types.c (copy_dt_decls_ifequal): Add 'from_gsym' as a
1579         boolean argument. Copy component backend_decls directly if the
1580         components are derived types and from_gsym is true.
1581         (gfc_get_derived_type): If whole_file copy the derived type from
1582         the module if it is use associated, otherwise, if can be found
1583         in another gsymbol namespace, use the existing derived type as
1584         the TYPE_CANONICAL and build normally.
1585         * gfortran.h : Add derived_types and resolved fields to
1586         gfc_namespace. Include prototype for gfc_errors_to_warnings.
1587
1588 2009-07-29  Tobias Burnus  <burnus@net-b.de>
1589
1590         PR fortran/40898
1591         * trans-types.c (gfc_get_function_type): Do not add hidden
1592         string-length argument for BIND(C) procedures.
1593         * trans-decl.c (create_function_arglist): Skip over nonexisting
1594         string-length arguments for BIND(C) procedures.
1595
1596 2009-07-28  Jakub Jelinek  <jakub@redhat.com>
1597
1598         PR fortran/40878
1599         * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of
1600         gfc_error to diagnose invalid COLLAPSE arguments.
1601
1602 2009-07-28  Janus Weil  <janus@gcc.gnu.org>
1603
1604         PR fortran/40882
1605         * trans-types.c (gfc_get_ppc_type): For derived types, directly use the
1606         backend_decl, instead of calling gfc_typenode_for_spec, to avoid
1607         infinte loop.
1608         (gfc_get_derived_type): Correctly handle PPCs returning derived types,
1609         avoiding infinite recursion.
1610
1611 2009-07-27  Janus Weil  <janus@gcc.gnu.org>
1612
1613         PR fortran/40848
1614         * interface.c (gfc_compare_interfaces): Call 'count_types_test' before
1615         'generic_correspondence', and only if checking a generic interface.
1616
1617 2009-07-27  Tobias Burnus  <burnus@net-b.de>
1618
1619         PR fortran/40851
1620         * resolve.c (resolve_symbol): Do not initialize pointer derived-types.
1621         * trans-decl.c (init_intent_out_dt): Ditto.
1622         (generate_local_decl): No need to set attr.referenced for DT pointers.
1623
1624 2009-07-26  Tobias Burnus  <burnus@net-b.de>
1625
1626         PR fortran/33197
1627         * intrinsic.c (make_generic): Remove assert as "atan" can be
1628         both ISYM_ATAN and ISYM_ATAN2.
1629         (add_functions): Add two-argument variant of ATAN.
1630         * intrinsic.h (gfc_check_atan_2): Add check for it.
1631         * intrinsic.texi (ATAN2): Correct and enhance description.
1632         (ATAN): Describe two-argument variant of ATAN.
1633
1634 2009-07-25  Tobias Burnus  <burnus@net-b.de>
1635             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1636
1637         PR fortran/33197
1638         * intrinsic.c (add_functions): Support complex arguments for
1639         acos,acosh,asin,asinh,atan,atanh.
1640         * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
1641         complex arguments.
1642         * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
1643         gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
1644         gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
1645         gfc_simplify_acosh,gfc_simplify_atanh): Support
1646         complex arguments.
1647
1648 2009-07-25  Richard Guenther  <rguenther@suse.de>
1649
1650         PR fortran/40005
1651         * trans-types.c (gfc_get_array_type_bounds): Use
1652         build_distinct_type_copy with a proper TYPE_CANONICAL and
1653         re-use the type-decl of the original type.
1654         * trans-decl.c (build_entry_thunks): Signal cgraph we may not
1655         garbage collect.
1656         (create_main_function): Likewise.
1657         (gfc_generate_function_code): Likewise.
1658         * trans-expr.c (gfc_trans_subcomponent_assign): Do not use
1659         fold_convert on record types.
1660
1661 2009-07-25  Janus Weil  <janus@gcc.gnu.org>
1662
1663         PR fortran/39630
1664         * decl.c (match_ppc_decl): Implement the PASS attribute for procedure
1665         pointer components.
1666         (match_binding_attributes): Ditto.
1667         * gfortran.h (gfc_component): Add member 'tb'.
1668         (gfc_typebound_proc): Add member 'ppc' and make 'pass_arg' const.
1669         * module.c (MOD_VERSION): Bump module version.
1670         (binding_ppc): New string constants.
1671         (mio_component): Only use formal args if component is a procedure
1672         pointer and add 'tb' member.
1673         (mio_typebound_proc): Include pass_arg and take care of procedure
1674         pointer components.
1675         * resolve.c (update_arglist_pass): Add argument 'name' and take care of
1676         optional arguments.
1677         (extract_ppc_passed_object): New function, analogous to
1678         extract_compcall_passed_object, but for procedure pointer components.
1679         (update_ppc_arglist): New function, analogous to
1680         update_compcall_arglist, but for procedure pointer components.
1681         (resolve_typebound_generic_call): Added argument to update_arglist_pass.
1682         (resolve_ppc_call, resolve_expr_ppc): Take care of PASS attribute.
1683         (resolve_fl_derived): Check the PASS argument for procedure pointer
1684         components.
1685         * symbol.c (verify_bind_c_derived_type): Reject procedure pointer
1686         components in BIND(C) types.
1687
1688 2009-07-24  Janus Weil  <janus@gcc.gnu.org>
1689
1690         PR fortran/40822
1691         * array.c (gfc_resolve_character_array_constructor): Use new function
1692         gfc_new_charlen.
1693         * decl.c (add_init_expr_to_sym,variable_decl,match_char_spec,
1694         gfc_match_implicit): Ditto.
1695         * expr.c (gfc_simplify_expr): Ditto.
1696         * gfortran.h (gfc_new_charlen): New prototype.
1697         * iresolve.c (check_charlen_present,gfc_resolve_char_achar): Use new
1698         function gfc_new_charlen.
1699         * module.c (mio_charlen): Ditto.
1700         * resolve.c (gfc_resolve_substring_charlen,
1701         gfc_resolve_character_operator,fixup_charlen,resolve_fl_derived,
1702         resolve_symbol): Ditto.
1703         * symbol.c (gfc_new_charlen): New function to create a new gfc_charlen
1704         structure and add it to a namespace.
1705         (gfc_copy_formal_args_intr): Make sure ts.cl is present
1706         for CHARACTER variables.
1707
1708 2009-07-24  Jakub Jelinek  <jakub@redhat.com>
1709
1710         PR fortran/40643
1711         PR fortran/31067
1712         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
1713         gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
1714         optimize.
1715         * trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
1716         * trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
1717
1718 2009-07-23  Jakub Jelinek  <jakub@redhat.com>
1719
1720         PR fortran/40839
1721         * io.c (gfc_resolve_dt): Add LOC argument.  Fail if
1722         dt->io_unit is NULL.  Return FAILURE after issuing error about
1723         negative UNIT number.
1724         (match_io_element): Don't segfault if current_dt->io_unit is NULL.
1725         * gfortran.h (gfc_resolve_dt): Adjust prototype.
1726         * resolve.c (resolve_code): Adjust caller.
1727
1728 2009-07-22  Paul Thomas  <pault@gcc.gnu.org>
1729
1730         PR fortran/40796
1731         * trans-decl.c (generate_local_decl): Unreferenced result
1732         variables with allocatable components should be treated like
1733         INTENT_OUT dummy variables.
1734
1735 2009-07-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1736
1737         * trans.h (gfc_set_decl_assembler_name): New prototype.
1738         * trans-decl.c (gfc_set_decl_assembler_name): New function.
1739         (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1740         build_function_decl): Use gfc_set_decl_assembler_name instead of
1741         SET_DECL_ASSEMBLER_NAME.
1742         * trans-common.c (build_common_decl): Use
1743         gfc_set_decl_assembler_name instead of SET_DECL_ASSEMBLER_NAME.
1744
1745 2009-07-21  Richard Guenther  <rguenther@suse.de>
1746
1747         PR fortran/40726
1748         * trans-decl.c (gfc_get_extern_function_decl): Do not set
1749         DECL_IS_MALLOC for pointer valued functions.
1750         (build_function_decl): The same.
1751
1752 2009-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1753
1754         PR fortran/40727
1755         * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that
1756         the optional second argument isn't of COMPLEX type.
1757
1758 2009-07-17  Richard Guenther  <rguenther@suse.de>
1759
1760         PR c/40401
1761         * f95-lang.c (gfc_be_parse_file): Do not finalize the CU here.
1762         * trans-decl.c (gfc_gimplify_function): Remove.
1763         (build_entry_thunks): Do not gimplify here.
1764         (create_main_function): Likewise.
1765         (gfc_generate_function_code): Likewise.
1766
1767 2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
1768             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1769
1770         PR 40435 
1771         * trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
1772         trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
1773         argument to fold_{unary,binary,ternary}, fold_build[123],
1774         build_call_expr, build_size_arg, build_fold_addr_expr,
1775         build_call_array, non_lvalue, size_diffop,
1776         fold_build1_initializer, fold_build2_initializer,
1777         fold_build3_initializer, fold_build_call_array,
1778         fold_build_call_array_initializer, fold_single_bit_test,
1779         omit_one_operand, omit_two_operands, invert_truthvalue,
1780         fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
1781         combine_comparisons, fold_builtin_*, fold_call_expr,
1782         build_range_check, maybe_fold_offset_to_address, round_up,
1783         round_down.
1784
1785 2009-07-15  Janus Weil  <janus@gcc.gnu.org>
1786
1787         PR fortran/40743
1788         * resolve.c (resolve_symbol): Don't resolve the formal namespace of a
1789         contained procedure.
1790
1791 2009-07-14  Taras Glek  <tglek@mozilla.com>
1792             Rafael Espindola  <espindola@google.com>
1793
1794         * Make-lang.in (fortran.install-plugin): New target for
1795         installing plugin headers.
1796
1797 2009-07-13  H.J. Lu  <hongjiu.lu@intel.com>
1798
1799         * module.c (mio_symbol): Remove the unused variable, formal.
1800
1801 2009-07-13  Janus Weil  <janus@gcc.gnu.org>
1802
1803         PR fortran/40646
1804         * module.c (mio_symbol): If the symbol has formal arguments,
1805         the formal namespace will be present.
1806         * resolve.c (resolve_actual_arglist): Correctly handle 'called'
1807         procedure pointer components as actual arguments.
1808         (resolve_fl_derived,resolve_symbol): Make sure the formal namespace
1809         is present.
1810         * trans-expr.c (gfc_conv_procedure_call): Correctly handle the formal
1811         arguments of procedure pointer components.
1812
1813 2009-07-12  Tobias Burnus  <burnus@net-b.de>
1814             Philippe Marguinaud <philippe.marguinaud@meteo.fr>
1815
1816         PR fortran/40588
1817         * primary.c (match_charkind_name): Fix condition for $ matching.
1818
1819         PR libfortran/22423
1820         * libgfortran.h: Typedef the GFC_DTYPE_* enum.
1821
1822 2009-07-11  Tobias Burnus  <burnus@net-b.de>
1823
1824         PR fortran/33197
1825         * check.c (gfc_check_fn_rc2008): New function.
1826         * intrinsic.h (gfc_check_fn_rc2008): New prototype.
1827         * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
1828         and tanh.
1829
1830 2009-07-10  Paul Thomas  <pault@gcc.gnu.org>
1831
1832         PR fortran/39334
1833         * primary.c (match_kind_param): Return MATCH_NO if the symbol
1834         has no value.
1835
1836 2008-07-09  Paul Thomas  <pault@gcc.gnu.org>
1837
1838         PR fortran/40629
1839         * resolve.c (check_host_association):  Use the existing
1840         accessible symtree and treat function expressions with
1841         symbols that have procedure flavor.
1842
1843 2009-07-09  Janus Weil  <janus@gcc.gnu.org>
1844
1845         PR fortran/40646
1846         * dump-parse-tree.c (show_expr): Renamed 'is_proc_ptr_comp'.
1847         * expr.c (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1848         (gfc_check_pointer_assign): Renamed 'is_proc_ptr_comp'.
1849         (replace_comp,gfc_expr_replace_comp): New functions, analogous
1850         to 'replace_symbol' and 'gfc_expr_replace_symbol', just with components
1851         instead of symbols.
1852         * gfortran.h (gfc_expr_replace_comp): New prototype.
1853         (is_proc_ptr_comp): Renamed to 'gfc_is_proc_ptr_comp'.
1854         * interface.c (compare_actual_formal): Renamed 'is_proc_ptr_comp'.
1855         * match.c (gfc_match_pointer_assignment): Ditto.
1856         * primary.c (gfc_match_varspec): Handle array-valued procedure pointers
1857         and procedure pointer components. Renamed 'is_proc_ptr_comp'.
1858         * resolve.c (resolve_fl_derived): Correctly handle interfaces with
1859         RESULT statement, and handle array-valued procedure pointer components.
1860         (resolve_actual_arglist,resolve_ppc_call,resolve_expr_ppc): Renamed
1861         'is_proc_ptr_comp'.
1862         * trans-array.c (gfc_walk_function_expr): Ditto.
1863         * trans-decl.c (gfc_get_symbol_decl): Security check for presence of
1864         ns->proc_name.
1865         * trans-expr.c (gfc_conv_procedure_call): Handle array-valued procedure
1866         pointer components. Renamed 'is_proc_ptr_comp'.
1867         (conv_function_val,gfc_trans_arrayfunc_assign): Renamed
1868         'is_proc_ptr_comp'.
1869         (gfc_get_proc_ptr_comp): Do not modify the argument 'e', but instead
1870         make a copy of it.
1871         * trans-io.c (gfc_trans_transfer): Handle array-valued procedure
1872         pointer components.
1873
1874 2009-07-09  Tobias Burnus  <burnus@net-b.de>
1875
1876         PR fortran/40604
1877         * intrinsic.c (gfc_convert_type_warn): Set sym->result.
1878         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1879         for optional arguments.
1880
1881 2009-07-08  Tobias Burnus  <burnus@net-b.de>
1882
1883         PR fortran/40675
1884         * simplify.c (gfc_simplify_sign): Handle signed zero correctly.
1885         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Support
1886         -fno-sign-zero.
1887         * invoke.texi (-fno-sign-zero): Add text regarding SIGN intrinsic.
1888
1889 2008-07-08  Paul Thomas  <pault@gcc.gnu.org>
1890
1891         PR fortran/40591
1892         * decl.c (match_procedure_interface):  Correct the association
1893         or creation of the interface procedure's symbol.
1894
1895 2009-07-04  Jakub Jelinek  <jakub@redhat.com>
1896
1897         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): For integer
1898         maxloc initialize limit to -huge-1 rather than just -huge.
1899
1900 2009-07-04  Janus Weil  <janus@gcc.gnu.org>
1901
1902         PR fortran/40593
1903         * interface.c (compare_actual_formal): Take care of proc-pointer-valued
1904         functions as actual arguments.
1905         * trans-expr.c (gfc_conv_procedure_call): Ditto.
1906         * resolve.c (resolve_specific_f0): Use the correct ts.
1907
1908 2009-07-02  Michael Matz  <matz@suse.de>
1909
1910         PR fortran/32131
1911         * trans-array.c (gfc_conv_descriptor_stride_get): Return
1912         constant one for strides in the first dimension of ALLOCATABLE
1913         arrays.
1914
1915 2009-06-30  Janus Weil  <janus@gcc.gnu.org>
1916
1917         PR fortran/40594
1918         * trans-types.c (gfc_get_derived_type): Bugfix, reverting one hunk from
1919         r147206.
1920
1921 2009-06-29  Tobias Burnus  <burnus@net-b.de>
1922
1923         PR fortran/40580
1924         * trans-expr.c  (gfc_conv_procedure_call): Add -fcheck=pointer check.
1925         * libgfortran.h: Add GFC_RTCHECK_POINTER.
1926         * invoke.texi (-fcheck): Document new pointer option.
1927         * options.c (gfc_handle_runtime_check_option): Handle pointer option.
1928
1929         * gfortran.texi (C Binding): Improve wording.
1930         * iso-c-binding.def: Remove obsolete comment.
1931
1932 2009-06-29  Paul Thomas  <pault@gcc.gnu.org>
1933
1934         PR fortran/40551
1935         * dependency.h : Add second bool* argument to prototype of
1936         gfc_full_array_ref_p.
1937         * dependency.c (gfc_full_array_ref_p): If second argument is
1938         present, return true if last dimension of reference is an
1939         element or has unity stride.
1940         * trans-array.c : Add NULL second argument to references to
1941         gfc_full_array_ref_p.
1942         * trans-expr.c : The same, except for;
1943         (gfc_trans_arrayfunc_assign): Return fail if lhs reference
1944         is not a full array or a contiguous section.
1945
1946 2009-06-28  Tobias Burnus  <burnus@net-b.de>
1947             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1948
1949         PR fortran/34112
1950         * symbol.c (gfc_add_ext_attribute): New function.
1951         (gfc_get_sym_tree): New argument allow_subroutine.
1952         (gfc_get_symbol,gfc_get_ha_sym_tree,gen_cptr_param,gen_fptr_param
1953         gen_shape_param,generate_isocbinding_symbol): Use it.
1954         * decl.c (find_special): New argument allow_subroutine.
1955         (add_init_expr_to_sym,add_hidden_procptr_result,attr_decl1,
1956         match_procedure_in_type,gfc_match_final_decl): Use it.
1957         (gfc_match_gcc_attributes): New function.
1958         * gfortran.texi (Mixed-Language Programming): New section
1959         "GNU Fortran Compiler Directives".
1960         * gfortran.h (ext_attr_t): New struct.
1961         (symbol_attributes): Use it.
1962         (gfc_add_ext_attribute): New prototype.
1963         (gfc_get_sym_tree): Update pototype.
1964         * expr.c (gfc_check_pointer_assign): Check whether call
1965         convention is the same.
1966         * module.c (import_iso_c_binding_module, create_int_parameter,
1967         use_iso_fortran_env_module): Update gfc_get_sym_tree call.
1968         * scanner.c (skip_gcc_attribute): New function.
1969         (skip_free_comments,skip_fixed_comments): Use it.
1970         (gfc_next_char_literal): Support !GCC$ lines.
1971         * resolve.c (check_host_association): Update
1972         gfc_get_sym_tree call.
1973         * match.c (gfc_match_sym_tree,gfc_match_call): Update
1974         gfc_get_sym_tree call.
1975         * trans-decl.c (add_attributes_to_decl): New function.
1976         (gfc_get_symbol_decl,get_proc_pointer_decl,
1977         gfc_get_extern_function_decl,build_function_decl: Use it.
1978         * match.h (gfc_match_gcc_attributes): Add prototype.
1979         * parse.c (decode_gcc_attribute): New function.
1980         (next_free,next_fixed): Support !GCC$ lines.
1981         * primary.c (match_actual_arg,check_for_implicit_index,
1982         gfc_match_rvalue,gfc_match_rvalue): Update
1983         gfc_get_sym_tree call.
1984
1985 2009-06-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1986
1987         * gfortran.h: Define HAVE_mpc_pow.
1988         * arith.c (complex_reciprocal, complex_pow): If HAVE_mpc_pow,
1989         don't define these functions.
1990         (arith_power): If HAVE_mpc_pow, use mpc_pow.
1991
1992 2009-06-26  Janus Weil  <janus@gcc.gnu.org>
1993
1994         PR fortran/39997
1995         PR fortran/40541
1996         * decl.c (add_hidden_procptr_result): Copy the typespec to the hidden
1997         result.
1998         * expr.c (gfc_check_pointer_assign): Enable interface check for
1999         procedure pointer assignments where the rhs is a function returning a
2000         procedure pointer.
2001         * resolve.c (resolve_symbol): If an external procedure with unspecified
2002         return type can not be implicitly typed, it must be a subroutine.
2003
2004 2009-06-24  Janus Weil  <janus@gcc.gnu.org>
2005
2006         PR fortran/40427
2007         * gfortran.h (gfc_component): New member 'formal_ns'.
2008         (gfc_copy_formal_args_ppc,void gfc_ppc_use): New.
2009         * interface.c (gfc_ppc_use): New function, analogous to
2010         gfc_procedure_use, but for procedure pointer components.
2011         * module.c (MOD_VERSION): Bump module version.
2012         (mio_component): Treat formal arguments.
2013         (mio_formal_arglist): Changed argument from gfc_symbol to
2014         gfc_formal_arglist.
2015         (mio_symbol): Changed argument of mio_formal_arglist.
2016         * resolve.c (resolve_ppc_call,resolve_expr_ppc): Call gfc_ppc_use,
2017         to check actual arguments and treat formal args correctly.
2018         (resolve_fl_derived): Copy formal args of procedure pointer components
2019         from their interface.
2020         * symbol.c (gfc_copy_formal_args_ppc): New function, analogous to
2021         gfc_copy_formal_args, but for procedure pointer components.
2022
2023 2009-06-22  Janus Weil  <janus@gcc.gnu.org>
2024
2025         PR fortran/37254
2026         PR fortran/39850
2027         * interface.c (compare_parameter): Set implicit type for function
2028         actual arguments with BT_UNKNOWN.
2029
2030 2009-06-22  Tobias Burnus  <burnus@net-b.de>
2031
2032         PR fortran/40472
2033         PR fortran/50520
2034         * simplify.c (gfc_simplify_spread): Fix the case that source=
2035         is a scalar.
2036
2037 2009-06-22  Paul Thomas  <pault@gcc.gnu.org>
2038
2039         PR fortran/40443
2040         * interface.c (gfc_search_interface): Hold back a match to an
2041         elementary procedure until all other possibilities are
2042         exhausted.
2043
2044 2009-06-22  Paul Thomas  <pault@gcc.gnu.org>
2045
2046         PR fortran/40472
2047         * simplify.c (gfc_simplify_spread): Restrict the result size to
2048         the limit for an array constructor.
2049
2050 2009-06-21  Janus Weil  <janus@gcc.gnu.org>
2051
2052         PR fortran/39850
2053         * interface.c (gfc_compare_interfaces): Take care of implicit typing
2054         when checking the function attribute. Plus another bugfix.
2055         (compare_parameter): Set attr.function and attr.subroutine according
2056         to the usage of a procedure as actual argument.
2057
2058 2009-06-20  Tobias Burnus  <burnus@net-b.de>
2059
2060         PR fortran/40452
2061         * trans-decl.c (add_argument_checking): Disable bounds check
2062         for allowed argument storage association.
2063
2064 2009-06-19  Paul Thomas  <pault@gcc.gnu.org>
2065
2066         PR fortran/40440
2067         * trans-expr.c (gfc_conv_procedure_call): Do not deallocate
2068         allocatable components if the argument is a pointer.
2069
2070 2009-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2071
2072         * gfortran.h (gfc_expr): Use mpc_t to represent complex numbers.
2073
2074         * arith.c, dump-parse-tree.c, expr.c, module.c, resolve.c,
2075         simplify.c, target-memory.c, target-memory.h, trans-const.c,
2076         trans-expr.c: Convert to mpc_t throughout.
2077
2078 2009-06-19  Ian Lance Taylor  <iant@google.com>
2079
2080         * cpp.c (struct gfc_cpp_option_data): Give this struct, used for
2081         the global variable gfc_cpp_option, a name.
2082
2083 2009-06-19  Janus Weil  <janus@gcc.gnu.org>
2084
2085         PR fortran/40450
2086         * trans-expr.c (gfc_conv_procedure_call): Only add an extra addr_expr
2087         to a procedure pointer actual argument, if it is not itself a
2088         dummy arg.
2089
2090 2009-06-18  Janus Weil  <janus@gcc.gnu.org>
2091
2092         PR fortran/40451
2093         * resolve.c (resolve_contained_fntype): Prevent implicit typing for
2094         procedures with explicit interface.
2095         * symbol.c (gfc_check_function_type): Ditto.
2096
2097 2009-06-16  Ian Lance Taylor  <iant@google.com>
2098
2099         * decl.c (build_struct): Rewrite loop over constructor elements.
2100
2101 2009-06-16  Janus Weil  <janus@gcc.gnu.org>
2102
2103         PR fortran/36947
2104         PR fortran/40039
2105         * expr.c (gfc_check_pointer_assign): Call 'gfc_compare_interfaces' with
2106         error message.
2107         * gfortran.h (gfc_compare_interfaces): Additional argument.
2108         * interface.c (operator_correspondence): Removed.
2109         (gfc_compare_interfaces): Additional argument to return error message.
2110         Directly use the code from 'operator_correspondence' instead of calling
2111         the function. Check for OPTIONAL. Some rearrangements.
2112         (check_interface1): Call 'gfc_compare_interfaces' without error message.
2113         (compare_parameter): Call 'gfc_compare_interfaces' with error message.
2114         * resolve.c (check_generic_tbp_ambiguity): Call 'gfc_compare_interfaces'
2115         without error message.
2116
2117 2009-06-16  Tobias Burnus  <burnus@net-b.de>
2118
2119         PR fortran/40383
2120         * trans-decl.c (create_function_arglist): Copy formal charlist to
2121         have a proper passed_length for -fcheck=bounds.
2122
2123 2009-06-12  Steven G. Kargl  <kargls@comcast.net>
2124
2125         * arith.c (gfc_enum_initializer): Move function ...
2126         * decl.c: ... here.  Remove gfc_ prefix and make static.
2127         (enumerator_decl): Update function call.
2128         * gfortran.h:  Remove gfc_enum_initializer prototype.
2129
2130 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
2131
2132         * trans-array.c (gfc_trans_allocate_array_storage): Pass
2133         location on down.
2134         (gfc_trans_array_constructor_value): Same.
2135         (gfc_trans_scalarized_loop_end): Same.
2136         (gfc_conv_ss_startstride): Same.
2137         (gfc_trans_g77_array): Same.
2138         (gfc_trans_dummy_array_bias): Same.
2139         (gfc_conv_array_parameter): Same.
2140         (structure_alloc_comps): Same.
2141         * trans-expr.c (gfc_conv_function_call): Same.
2142         (fill_with_spaces): Same.
2143         (gfc_trans_string_copy): Same.
2144         (gfc_trans_scalar_assign): Same.
2145         * trans-stmt.c (gfc_trans_goto): Same.
2146         (gfc_trans_if_1): Same.
2147         (gfc_trans_simple_do): Same.
2148         (gfc_trans_do): Same.
2149         (gfc_trans_do_while): Same.
2150         (gfc_trans_logical_select): Same.
2151         (gfc_trans_select): Same.
2152         (gfc_trans_forall_loop): Same.
2153         (gfc_trans_nested_forall_loop): Same.
2154         (generate_loop_for_temp_to_lhs): Same.
2155         (generate_loop_for_rhs_to_temp): Same.
2156         (gfc_trans_forall_1): Same.
2157         (gfc_trans_where_assign): Same.
2158         (gfc_trans_where_3): Same.
2159         (gfc_trans_allocate): Same.
2160         * trans.c (gfc_finish_block): Same.
2161         (gfc_trans_runtime_check): Same.
2162         (gfc_call_malloc): Same.
2163         (gfc_allocate_with_status): Same.
2164         (gfc_call_free): Same.
2165         (gfc_deallocate_with_status): Same.
2166         (gfc_call_realloc): Same.
2167         (gfc_trans_code): Same.
2168         * trans-decl.c (gfc_init_default_dt): Same.
2169         (gfc_generate_constructors): Same.
2170         * trans-io.c (gfc_trans_io_runtime_check): Same.
2171         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
2172         (gfc_conv_intrinsic_fdate): Same.
2173         (gfc_conv_intrinsic_ttynam): Same.
2174         (gfc_conv_intrinsic_minmax): Same.
2175         (gfc_conv_intrinsic_minmax_char): Same.
2176         (gfc_conv_intrinsic_anyall): Same.
2177         (gfc_conv_intrinsic_count): Same.
2178         (gfc_conv_intrinsic_arith): Same.
2179         (gfc_conv_intrinsic_minmaxloc): Same.
2180         (gfc_conv_intrinsic_minmaxval): Same.
2181         (gfc_conv_intrinsic_rrspacing): Same.
2182         (gfc_conv_intrinsic_array_transfer): Same.
2183         (gfc_conv_intrinsic_trim): Same.
2184         (gfc_conv_intrinsic_repeat): Same.
2185         
2186 2009-06-12  Janus Weil  <janus@gcc.gnu.org>
2187
2188         PR fortran/40176
2189         * resolve.c (resolve_symbol): Additional error check, preventing an
2190         infinite loop.
2191
2192 2009-06-11  Paul Thomas  <pault@gcc.gnu.org>
2193
2194         PR fortran/40402
2195         * resolve.c (next_data_value): It is an error if the value is
2196         not constant.
2197
2198 2009-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2199
2200         PR fortran/38718
2201         * intrinsic.c (add_functions): Add simplifiers for ISNAN,
2202         IS_IOSTAT_END and IS_IOSTAT_EOR.
2203         * intrinsic.h (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
2204         gfc_simplify_isnan): New prototypes.
2205         * intrinsic.c (gfc_simplify_is_iostat_end, gfc_simplify_is_iostat_eor,
2206         gfc_simplify_isnan): New functions.
2207
2208 2009-06-11  Jakub Jelinek  <jakub@redhat.com>
2209
2210         * interface.c (fold_unary): Rename to...
2211         (fold_unary_intrinsic): ... this.
2212         (gfc_extend_expr): Adjust caller.
2213         (gfc_match_generic_spec): Likewise.  Initialize *op to INTRINSIC_NONE
2214         to avoid warnings.
2215         * expr.c (gfc_simplify_expr): Initialize start and end before calling
2216         gfc_extract_int.
2217
2218 2009-06-10  Dave Korn  <dave.korn.cygwin@gmail.com>
2219
2220         * trans-decl.c (create_main_function):  Don't build main decl twice.
2221
2222 2009-06-09  Tobias Burnus  <burnus@net-b.de>
2223
2224         * trans-decl.c (gfc_generate_function_code): Use gfc_option.rtcheck
2225         instead of flag_bounds_check.
2226         * intrinsic.texi (ISO_FORTRAN_ENV): Document INT{8,16,32,64} and
2227         REAL{32,64,128}.
2228
2229 2009-06-08  Paul Thomas  <pault@gcc.gnu.org>
2230
2231         * trans-array.h : Replace prototypes for
2232         gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
2233         gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
2234         prototypes of the same names with _get or _set appended.
2235         * trans-array.c : Make the originals of the above static and
2236         new functions for the _get and _set functions. Update all the
2237         references to these descriptor access functions.
2238         * trans-expr.c : Update references to the above descriptor
2239         access functions.
2240         * trans-intrinsic.c : The same.
2241         * trans-openmp.c : The same.
2242         * trans-stmt.c : The same.
2243
2244 2009-06-08  Alexandre Oliva  <aoliva@redhat.com>
2245
2246         * options.c (gfc_post_options): Disable dump_parse_tree
2247         during -fcompare-debug-second.
2248
2249 2009-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2250
2251         PR fortran/40008
2252         * gfortran.h (gfc_open): Add newunit expression to structure.
2253         * io.c (io_tag): Add new unit tag and fix whitespace.
2254         (match_open_element): Add matching for newunit.
2255         (gfc_free_open): Free the newunit expression.
2256         (gfc_resolve_open): Add newunit to resolution and check constraints.
2257         (gfc_resolve_close): Add check for non-negative unit.
2258         (gfc_resolve_filepos): Likewise.
2259         (gfc_resolve_dt): Likewise.
2260         * trans-io.c (set_parameter_value): Build runtime checks for unit
2261         numbers within range of kind=4 integer. (gfc_trans_open) Set the
2262         newunit parameter.
2263         * ioparm.def (IOPARM): Define the newunit parameter as a pointer
2264         to GFC_INTEGER_4, pint4.
2265
2266 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
2267
2268         PR fortran/25104
2269         PR fortran/29962
2270         * array.c (gfc_append_constructor): Added NULL-check.
2271         * check.c (gfc_check_spread): Check DIM.
2272         (gfc_check_unpack): Check that the ARRAY arguments provides enough
2273         values for MASK.
2274         * intrinsic.h (gfc_simplify_spread): New prototype.
2275         (gfc_simplify_unpack): Likewise.
2276         * intrinsic.c (add_functions): Added new simplifier callbacks.
2277         * simplify.c (gfc_simplify_spread): New.
2278         (gfc_simplify_unpack): New.
2279         * expr.c (check_transformational): Allow additional transformational
2280         intrinsics in initialization expression.
2281
2282 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
2283
2284         PR fortran/25104
2285         PR fortran/29962
2286         * check.c (gfc_check_all_any): Check rank of DIM.
2287         (gfc_check_count): Likewise.
2288         * intrinsic.h (gfc_simplify_all): New prototype.
2289         (gfc_simplify_any): Likewise.
2290         (gfc_simplify_count): Likewise.
2291         (gfc_simplify_sum): Likewise.
2292         (gfc_simplify_product): Likewise.
2293         * intrinsic.c (add_functions): Added new simplifier callbacks.
2294         * simplify.c (transformational_result): New.
2295         (simplify_transformation_to_scalar): New.
2296         (simplify_transformation_to_array): New.
2297         (gfc_count): New.
2298         (gfc_simplify_all): New.
2299         (gfc_simplify_any): New.
2300         (gfc_simplify_count): New.
2301         (gfc_simplify_sum): New.
2302         (gfc_simplify_product): New.
2303         * expr.c (check_transformational): Allow additional transformational
2304         intrinsics in initialization expression.
2305
2306 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
2307
2308         * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
2309         (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
2310         (gfc_check_minloc_maxloc): Likewise.
2311         (check_reduction): Likewise.
2312         (gfc_check_size): Likewise.
2313         (gfc_check_ubound): Likewise.
2314         (gfc_check_cshift): Added missing shape-conformance checks.
2315         (gfc_check_eoshift): Likewise.
2316         * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
2317         * expr.c (gfc_check_conformance): Accept error-message chunks in 
2318         printf-style. Changed all callers.
2319
2320
2321 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
2322
2323         PR fortran/25104
2324         PR fortran/29962
2325         * intrinsic.h (gfc_simplify_dot_product): New prototype.
2326         (gfc_simplify_matmul): Likewise.
2327         (gfc_simplify_transpose): Likewise.
2328         * intrinsic.c (add_functions): Added new simplifier callbacks.
2329         * simplify.c (init_result_expr): New.
2330         (compute_dot_product): New.
2331         (gfc_simplify_dot_product): New.
2332         (gfc_simplify_matmul): New.
2333         (gfc_simplify_transpose): New.
2334         * expr.c (check_transformational): Allow transformational intrinsics
2335         with simplifier in initialization expression.
2336
2337 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
2338
2339         PR fortran/37203
2340         * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
2341         without padding.
2342
2343 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
2344
2345         PR fortran/32890
2346         * intrinsic.h (gfc_simplify_pack): New prototype.
2347         * intrinsic.c (add_functions): Added
2348         simplifier-callback to PACK.
2349         * simplify.c (is_constant_array_expr): Moved
2350         to beginning of file.
2351         (gfc_simplify_pack): New.
2352         * check.c (gfc_check_pack): Check that VECTOR has enough elements.
2353         Added safeguards for empty arrays.
2354
2355 2009-06-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2356
2357         * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
2358         instead of MPC_RE/MPC_IM.
2359
2360 2009-06-05  Alexandre Oliva  <aoliva@redhat.com>
2361
2362         * trans-decl.c (gfc_build_qualified_array): Don't skip generation
2363         of range types.
2364         * trans.h (struct lang_type): Add base_decls.
2365         (GFC_TYPE_ARRAY_BASE_DECL): New.
2366         * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
2367         proactively and excessively.
2368         (gfc_get_array_descr_info): Use existing base decls if available.
2369
2370 2009-06-04  Daniel Franke  <franke.daniel@gmail.com>
2371
2372         PR fortran/37203
2373         * check.c (gfc_check_reshape): Additional checks for the
2374         SHAPE and ORDER arguments.
2375         * simplify.c (gfc_simplify_reshape): Converted argument checks
2376         to asserts.
2377
2378 2009-06-03  Tobias Burnus  <burnus@net-b.de>
2379
2380         * gfortran.texi: Add mixed-language programming, mention
2381         varying string lengths, some clean up of introduction parts.
2382         * intrinsic.texi (instrinsic modules): Create @menu for subsections.
2383         (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
2384         * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
2385         * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
2386
2387 2009-06-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2388             Tobias Burnus  <burnus@net-b.de>
2389
2390         * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
2391         * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
2392
2393 2009-06-03  Alexandre Oliva  <aoliva@redhat.com>
2394
2395         * module.c (mio_f2k_derived): Initialize cur.
2396
2397 2009-06-01  Tobias Burnus  <burnus@net-b.de>
2398
2399         PR fortran/40309
2400         * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
2401         (create_main_function): Set main_identifier_node.
2402
2403 2009-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2404
2405         PR fortran/40019
2406         * trans-types.c (gfc_build_uint_type): Make nonstatic.
2407         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
2408         * trans-types.h (gfc_build_uint_type): Add prototype.
2409         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2410         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
2411         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
2412         gfc_conv_intrinsic_trailz): Call the right builtins or library
2413         functions, and cast arguments to unsigned types first.
2414         * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
2415
2416 2009-05-27  Ian Lance Taylor  <iant@google.com>
2417
2418         * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
2419         $(LINKER).
2420         (f951$(exeext)): Likewise.
2421
2422 2009-05-27  Tobias Burnus  <burnus@net-b.de>
2423
2424         PR fortran/40270
2425         * trans-decl.c (create_main_function): Mark MAIN__ and
2426         argc/argv as TREE_USED and push/pop function_decl context
2427         if needed.
2428
2429 2009-05-26  Tobias Burnus  <burnus@net-b.de>
2430
2431         PR fortran/39178
2432         * gfortranspec.c (lang_specific_driver): Stop linking
2433         libgfortranbegin.
2434         * trans-decl.c (gfc_build_builtin_function_decls): Stop
2435         making MAIN__ publicly visible.
2436         (gfc_build_builtin_function_decls): Add
2437         gfor_fndecl_set_args.
2438         (create_main_function) New function.
2439         (gfc_generate_function_code): Use it.
2440
2441 2009-05-26  Tobias Burnus  <burnus@net-b.de>
2442
2443         PR fortran/40246
2444         * match.c (gfc_match_nullify): NULLify freed pointer.
2445
2446 2009-05-26  Ian Lance Taylor  <iant@google.com>
2447
2448         * Make-lang.in (gfortranspec.o): Use $(COMPILER).
2449         (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
2450
2451 2009-05-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2452
2453         * gfortran.h (GFC_MPC_RND_MODE): New.
2454         * simplify.c (call_mpc_func): New helper function.
2455         (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
2456         gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
2457
2458 2009-05-25  Janus Weil  <janus@gcc.gnu.org>
2459
2460         PR fortran/40176
2461         * primary.c (gfc_match_varspec): Handle procedure pointer components
2462         with array return value.
2463         * resolve.c (resolve_expr_ppc): Ditto.
2464         (resolve_symbol): Make sure the interface of a procedure pointer has
2465         been resolved.
2466         * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
2467         components with array return value.
2468         * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
2469         gfc_trans_arrayfunc_assign): Ditto.
2470         (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
2471         where the rhs is a dummy argument.
2472         * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
2473         procedure pointer components with array return value.
2474
2475 2009-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2476             Dominique Dhumieres
2477
2478         PR fortran/35732
2479         PR fortran/39872
2480         * trans-array.c (gfc_conv_ss_startstride): Add one to index.
2481
2482 2009-05-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2483
2484         PR fortran/40195
2485         * module.c (read_md5_from_module_file): Close file before returning.
2486
2487 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
2488
2489         PR fortran/40164
2490         * primary.c (gfc_match_rvalue): Handle procedure pointer components in
2491         arrays.
2492         * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
2493         array references.
2494         (resolve_fl_derived): Procedure pointer components are not required to
2495         have constant array bounds in their return value.
2496
2497 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
2498
2499         * intrinsic.c (add_sym): Fix my last commit (r147655),
2500         which broke bootstrap.
2501
2502 2009-05-18  Richard Guenther  <rguenther@suse.de>
2503
2504         PR fortran/40168
2505         * trans-expr.c (gfc_trans_zero_assign): For local array
2506         destinations use an assignment from an empty constructor.
2507
2508 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
2509
2510         PR fortran/36947
2511         PR fortran/40039
2512         * expr.c (gfc_check_pointer_assign): Check intents when comparing
2513         interfaces.
2514         * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
2515         (gfc_compare_interfaces): Additional argument.
2516         * interface.c (operator_correspondence): Add check for equality of
2517         intents, and new argument 'intent_check'.
2518         (gfc_compare_interfaces): New argument 'intent_check', which is passed
2519         on to operator_correspondence.
2520         (check_interface1): Don't check intents when comparing interfaces.
2521         (compare_parameter): Do check intents when comparing interfaces.
2522         * intrinsic.c (add_sym): Add intents for arguments of intrinsic
2523         procedures.
2524         (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
2525         add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
2526         default.
2527         (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
2528         : New functions to add intrinsic symbols, specifying custom intents.
2529         (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
2530         (add_functions,add_subroutines): Add intents for various intrinsics.
2531         * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
2532         comparing interfaces.
2533         * symbol.c (gfc_copy_formal_args_intr): Copy intent.
2534
2535 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2536
2537         * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
2538         REAL64 and REAL128.
2539         * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
2540         gfc_get_real_kind_from_width_isofortranenv): New prototypes.
2541         * iso-c-binding.def: Update definitions for the INT*_T,
2542         INT_LEAST*_T and INT_FAST*_T named parameters.
2543         * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
2544         gfc_get_real_kind_from_width_isofortranenv): New functions.
2545
2546 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2547
2548         PR fortran/36260
2549         * intrinsic.c (add_functions, add_subroutines): Fix argument
2550         names and wrap long lines.
2551         * intrinsic.texi: Fix documentation and argument names of
2552         LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
2553         GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
2554         SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
2555         SELECTED_REAL_KIND and XOR.
2556
2557 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2558
2559         PR fortran/33197
2560         * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
2561         * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
2562         * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
2563         gfc_simplify_erfc_scaled): New functions.
2564
2565 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2566
2567         PR fortran/31243
2568         * resolve.c (resolve_substring): Don't allow too large substring
2569         indexes.
2570         (gfc_resolve_substring_charlen): Fix typo.
2571         (gfc_resolve_character_operator): Fix typo.
2572         (resolve_charlen): Catch unreasonably large string lengths.
2573         * simplify.c (gfc_simplify_len): Don't error out on LEN
2574         range checks.
2575
2576 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2577
2578         PR fortran/36031
2579         * decl.c (set_enum_kind): Use global short-enums flag.
2580         * gfortran.h (gfc_option_t): Remove short_enums flag.
2581         * lang.opt (-fshort-enums): Refer to C documentation.
2582         * options.c (gfc_init_options, gfc_handle_option): Use global
2583         short-enums flag.
2584
2585 2009-05-15  Tobias Burnus  <burnus@net-b.de>
2586
2587         PR fortran/39352
2588         * f95-lang.c: Add gfc_maybe_initialize_eh.
2589         * gfortran.h: Add gfc_maybe_initialize_eh prototype.
2590         * Make-lang.in: Add new .h dendencies for f95-lang.c
2591         * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
2592         * misc.c (gfc_free): Avoid #define trickery for free.
2593
2594 2009-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2595
2596         * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
2597         of allocate and deallocate statements.
2598
2599 2009-05-14  Ian Lance Taylor  <iant@google.com>
2600
2601         * decl.c (match_attr_spec): Change d to unsigned int.
2602         * dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
2603         * interface.c (gfc_check_interfaces): Change i to int.  Add casts.
2604         * module.c (read_module): Change i to int.  Add cast.
2605         (write_module): Change i to int.
2606         * symbol.c (gfc_get_namespace): Change in to int.
2607         (gfc_free_namespace): Change i to int.
2608         * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
2609         unsigned int.  Add cast.
2610         * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
2611         Add casts.
2612
2613 2009-05-14  Daniel Kraft  <d@domob.eu>
2614
2615         PR fortran/40045
2616         * dump-parse-tree.c (show_typebound): Fix missing adaption to new
2617         type-bound procedure storage structure.
2618
2619 2009-05-14  Janus Weil  <janus@gcc.gnu.org>
2620
2621         PR fortran/39996
2622         * decl.c (gfc_match_function_decl): Use gfc_add_type.
2623         * symbol.c (gfc_add_type): Better checking for duplicate types in
2624         function declarations. And: Always give an error for duplicte types,
2625         not just a warning with -std=gnu.
2626
2627 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
2628
2629         PR fortran/39865
2630         * io.c (resolve_tag_format): CHARACTER array in FMT= argument
2631         isn't an extension.  Reject non-CHARACTER array element of
2632         assumed shape or pointer or assumed size array.
2633         * trans-array.c (array_parameter_size): New function.
2634         (gfc_conv_array_parameter): Add size argument.  Call
2635         array_parameter_size if it is non-NULL.
2636         * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
2637         * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
2638         Adjust callers.
2639         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
2640         * trans-io.c (gfc_convert_array_to_string): Rewritten.
2641
2642 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
2643
2644         * gfortran.h (gfc_code): Rename struct member expr to expr1.
2645         * openmp.c (resolve_omp_atomic): Update expr to expr1.
2646         * interface.c (gfc_extend_assign): Ditto.
2647         * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
2648         gfc_trans_init_assign): Ditto.
2649         * dump-parse-tree.c (show_code_node): Ditto.
2650         * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
2651         * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
2652         gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
2653         gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
2654         gfc_trans_logical_select, gfc_trans_character_select
2655         forall_make_variable_temp, check_forall_dependencies
2656         gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
2657         gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
2658         * io.c (match_io_element, gfc_match_inquire): Ditto.
2659         * resolve.c (resolve_typebound_call, resolve_ppc_call,
2660         resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
2661         resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
2662         gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
2663         * st.c (gfc_free_statement): Ditto.
2664         * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
2665         match_arithmetic_if, gfc_match_if, gfc_match_elseif
2666         gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
2667         gfc_match_nullify, match_typebound_call, gfc_match_call
2668         gfc_match_select, match_simple_where, gfc_match_where
2669         gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
2670         * trans-io.c (gfc_trans_transfer): Ditto.
2671         * parse.c (parse_where_block, parse_if_block): Ditto.
2672
2673 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
2674
2675         * gfortran.h (gfc_code): Rename struct member label to label1.
2676         * dump-parse-tree.c (show_code_node): Update symbol.
2677         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
2678         gfc_trans_arithmetic_if): Ditto.
2679         * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
2680         * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
2681         gfc_match_assign, gfc_match_goto): Ditto.
2682         * parse.c (parse_do_block): Ditto.
2683
2684 2009-05-13  Tobias Burnus  <burnus@net-b.de>
2685
2686         PR fortran/34153
2687         * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
2688         * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
2689         * trans.c (gfc_trans_code): Ditto.
2690         * resolve.c (resolve_code): Ditto.
2691         * st.c (gfc_free_statement): Ditto.
2692         * parse.c (accept_statement): Ditto.
2693
2694 2009-05-12  Tobias Burnus  <burnus@net-b.de>
2695
2696         PR fortran/40110
2697         * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
2698
2699 2009-05-11  Steve Ellcey  <sje@cup.hp.com>
2700
2701         * resolve.c (check_host_association): Initialize tail.
2702
2703 2009-05-11  Janus Weil  <janus@gcc.gnu.org>
2704
2705         PR fortran/40089
2706         * resolve.c (resolve_fl_derived): Only return FAILURE if
2707         gfc_notify_std fails.
2708
2709 2009-05-10  Ian Lance Taylor  <iant@google.com>
2710
2711         * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
2712         gfc_omp_clauses.
2713         (enum gfc_omp_default_sharing): Likewise.
2714         * module.c (enum gfc_rsym_state): New enum, broken out of
2715         pointer_info.
2716         (enum gfc_wsym_state): Likewise.
2717         * parse.c (enum state_order): New enum, broken out of st_state.
2718
2719 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
2720
2721         PR fortran/40018
2722         * trans-array.c (gfc_trans_array_constructor_value): Fold
2723         convert numeric constants.
2724         (gfc_build_constant_array_constructor): The same.
2725
2726 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
2727
2728         PR fortran/38863
2729         * trans-expr.c (gfc_conv_operator_assign): Remove function.
2730         * trans.h : Remove prototype for gfc_conv_operator_assign.
2731         * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
2732         derivde types with intent(out).
2733         (gfc_trans_call): Add mask, count1 and invert arguments. Add
2734         code to use mask for WHERE assignments.
2735         (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
2736         (gfc_trans_where_assign): The gfc_symbol argument is replaced
2737         by the corresponding code. If this has a resolved_sym, then
2738         gfc_trans_call is called. The call to gfc_conv_operator_assign
2739         is removed.
2740         (gfc_trans_where_2): Change the last argument in the call to
2741         gfc_trans_where_assign.
2742         * trans-stmt.h : Modify prototype for gfc_trans_call.
2743         * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
2744
2745 2009-05-08  Janus Weil  <janus@gcc.gnu.org>
2746
2747         PR fortran/39876
2748         * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
2749         the symbol is a module procedure.
2750
2751 2009-05-08  Tobias Burnus  <burnus@net-b.de>
2752
2753         * invoke.texi: Add do/recursion to the -fcheck= summary.
2754
2755 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2756
2757         PR fortran/38830
2758         * gfortran.texi: Document that we don't support variable FORMAT
2759         expressions.
2760
2761 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2762
2763         PR fortran/39576
2764         * error.c (error_print): Add missing break statement.
2765
2766 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2767
2768         PR fortran/36382
2769         * invoke.texi: Document that -fdollar-ok does not allow $ to be
2770         used in IMPLICIT statement.
2771
2772 2009-05-06  Janus Weil  <janus@gcc.gnu.org>
2773             Paul Thomas  <pault@gcc.gnu.org>
2774
2775         PR fortran/39630
2776         * decl.c (match_procedure_interface): New function to match the
2777         interface for a PROCEDURE statement.
2778         (match_procedure_decl): Call match_procedure_interface.
2779         (match_ppc_decl): New function to match the declaration of a
2780         procedure pointer component.
2781         (gfc_match_procedure):  Call match_ppc_decl.
2782         (match_binding_attributes): Add new argument 'ppc' and handle the
2783         POINTER attribute for procedure pointer components.
2784         (match_procedure_in_type,gfc_match_generic): Added new argument to
2785         match_binding_attributes.
2786         * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
2787         procedure pointer components.
2788         * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
2789         (gfc_check_pointer_assign): Handle procedure pointer components, but no
2790         full checking yet.
2791         (is_proc_ptr_comp): New function to determine if an expression is a
2792         procedure pointer component.
2793         * gfortran.h (expr_t): Add EXPR_PPC.
2794         (symbol_attribute): Add new member 'proc_pointer_comp'.
2795         (gfc_component): Add new member 'formal'.
2796         (gfc_exec_op): Add EXEC_CALL_PPC.
2797         (gfc_get_default_type): Changed first argument.
2798         (is_proc_ptr_comp): Add prototype.
2799         (gfc_match_varspec): Add new argument.
2800         * interface.c (compare_actual_formal): Handle procedure pointer
2801         components.
2802         * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
2803         procedure pointer components.
2804         * module.c (mio_expr): Handle EXPR_PPC.
2805         * parse.c (parse_derived): Handle procedure pointer components.
2806         * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
2807         procedure pointer components.
2808         (gfc_variable_attr): Handle procedure pointer components.
2809         (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
2810         first argument of gfc_get_default_type.
2811         (match_variable): Added new argument to gfc_match_varspec.
2812         * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
2813         first argument of gfc_get_default_type.
2814         (resolve_structure_cons,resolve_actual_arglist): Handle procedure
2815         pointer components.
2816         (resolve_ppc_call): New function to resolve a call to a procedure
2817         pointer component (subroutine).
2818         (resolve_expr_ppc): New function to resolve a call to a procedure
2819         pointer component (function).
2820         (gfc_resolve_expr): Handle EXPR_PPC.
2821         (resolve_code): Handle EXEC_CALL_PPC.
2822         (resolve_fl_derived): Copy the interface for a procedure pointer
2823         component.
2824         (resolve_symbol): Fix overlong line.
2825         * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
2826         * symbol.c (gfc_get_default_type): Changed first argument.
2827         (gfc_set_default_type): Changed first argument of gfc_get_default_type.
2828         (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
2829         * trans.h (gfc_conv_function_call): Renamed.
2830         * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
2831         * trans-expr.c (gfc_conv_component_ref): Ditto.
2832         (gfc_conv_function_val): Rename to 'conv_function_val', add new
2833         argument 'expr' and handle procedure pointer components.
2834         (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
2835         (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
2836         (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
2837         argument 'expr' and handle procedure pointer components.
2838         (gfc_get_proc_ptr_comp): New function to get the backend decl for a
2839         procedure pointer component.
2840         (gfc_conv_function_expr): Renamed gfc_conv_function_call.
2841         (gfc_conv_structure): Handle procedure pointer components.
2842         * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
2843         conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
2844         * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
2845         * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
2846         * trans-types.h (gfc_get_ppc_type): Add prototype.
2847         * trans-types.c (gfc_get_ppc_type): New function to build a tree node
2848         for a procedure pointer component.
2849         (gfc_get_derived_type): Handle procedure pointer components.
2850
2851 2009-05-06  Tobias Burnus  <burnus@net-b.de>
2852
2853         PR fortran/40041
2854         * resolve.c (resolve_symbol): Print no warning for implicitly
2855         typed intrinsic functions.
2856
2857 2009-05-05  Janus Weil  <janus@gcc.gnu.org>
2858
2859         PR fortran/39998
2860         * expr.c (gfc_check_pointer_assign): Check for statement functions and
2861         internal procedures in procedure pointer assignments.
2862
2863 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
2864
2865         PR fortran/39946
2866         * resolve.c (resolve_symbol): Correctly copy the interface of a
2867         PROCEDURE statement if the interface involves a RESULT variable.
2868
2869 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
2870
2871         PR fortran/39930
2872         PR fortran/39931
2873         * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
2874         side is a pointer.
2875         * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
2876
2877 2009-04-28  Paul Thomas  <pault@gcc.gnu.org>
2878
2879         PR fortran/39879
2880         * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
2881         type parentheses argument if it is a variable with allocatable
2882         components.
2883
2884 2009-04-27  Ian Lance Taylor  <iant@google.com>
2885
2886         * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
2887         type.
2888         * trans-io.c (st_parameter_field): Add casts to enum type.
2889
2890 2009-04-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2891
2892         PR fortran/39893
2893         fortran/data.c (gfc_assign_data_value): If the lvalue is an 
2894         assumed character length entity in a data statement, then 
2895         return FAILURE to prevent segmentation fault.
2896
2897 2009-04-26  Jakub Jelinek  <jakub@redhat.com>
2898
2899         * trans-decl.c: Include pointer-set.h.
2900         (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
2901         (gfc_nonlocal_dummy_array_decl): New function.
2902         (gfc_get_symbol_decl): Call it for non-local dummy args with saved
2903         descriptor.
2904         (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
2905         (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
2906         chain it to outermost block's vars, destroy it afterwards.
2907         * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
2908
2909 2009-04-25  Janus Weil  <janus@gcc.gnu.org>
2910
2911         PR fortran/39688
2912         * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
2913         They differ if the symbol has been use-renamed.
2914
2915 2009-04-24  Ian Lance Taylor  <iant@google.com>
2916
2917         * gfortran.h (enum gfc_symbol_type): New named enum type, broken
2918         out of struct gfc_symbol.
2919         (struct gfc_symbol): Use enum gfc_symbol_type.
2920         (enum gfc_array_ref_dimen_type): New named enum type, broken out
2921         of struct gfc_array_ref).
2922         (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
2923         (mod_pointee_as): Update declaration.
2924         * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
2925         (gfc_mod_pointee_as): Change return type to "match".
2926         * module.c (mio_array_ref): Add cast to enum type.
2927         (mio_symbol): Likewise.
2928         * resolve.c (resolve_global_procedure): Change type to enum
2929         gfc_symbol_type.
2930         * trans-io.c (gfc_build_st_parameter): Change type to unsigned
2931         int.
2932
2933 2009-04-24  Daniel Kraft  <d@domob.eu>
2934
2935         * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
2936         (struct gfc_symtree): Moved "typebound" member inside union.
2937         (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
2938         type-bound procedures there.
2939         (gfc_get_tbp_symtree): New procedure.
2940         * symbol.c (tentative_tbp_list): New global.
2941         (gfc_get_namespace): NULL new "tb_sym_root" member.
2942         (gfc_new_symtree): Removed initialization of "typebound" member.
2943         (gfc_undo_symbols): Process list of tentative tbp's.
2944         (gfc_commit_symbols): Ditto.
2945         (free_tb_tree): New method.
2946         (gfc_free_namespace): Call it.
2947         (gfc_get_typebound_proc): New method.
2948         (gfc_get_tbp_symtree): New method.
2949         (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
2950         and gfc_namespace with regards to tbp's.
2951         * dump-parse-tree.c (show_typebound): Ditto.
2952         * primary.c (gfc_match_varspec): Ditto.  Don't reference tbp-symbol
2953         as it isn't a symbol any longer.
2954         * module.c (mio_typebound_symtree): Adapt to changes.
2955         (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
2956         rather than "gfc_get_sym_tree".
2957         (mio_f2k_derived): Ditto.
2958         * decl.c (match_procedure_in_type): Ditto.
2959         (gfc_match_generic): Ditto.  Don't reference tbp-symbol.
2960         * resolve.c (check_typebound_override): Adapt to changes.
2961         (resolve_typebound_generic): Ditto.
2962         (resolve_typebound_procedures): Ditto.
2963         (ensure_not_abstract_walker): Ditto.
2964         (ensure_not_abstract): Ditto.
2965         (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
2966         instance, through removed tentative ones).
2967         * gfc-internals.texi (Type-bound procedures): Document changes.
2968
2969 2009-04-24  Janus Weil  <janus@gcc.gnu.org>
2970
2971         PR fortran/39861
2972         PR fortran/39864
2973         * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
2974         for the formal arguments.
2975
2976 2009-04-21  Taras Glek <tglek@mozilla.com>
2977
2978         * f95-lang.c: Update GTY annotations to new syntax.
2979         * trans-intrinsic.c: Likewise.
2980         * trans-io.c: Likewise.
2981         * trans.h: Likewise.
2982
2983 2009-04-22  Janus Weil  <janus@gcc.gnu.org>
2984
2985         PR fortran/39735
2986         * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
2987         (match_procedure_decl): Set if_source.
2988         * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
2989         And: Check interface also for IFSRC_UNKNOWN (return type may be known).
2990         * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
2991         add documentation. Rename copy_formal_args and copy_formal_args_intr.
2992         * interface.c (gfc_compare_interfaces): Check for return types,
2993         handle IFSRC_UNKNOWN.
2994         (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
2995         (gfc_procedure_use): Modified handling of intrinsics.
2996         * intrinsic.c (add_functions): Bugfix for "dim".
2997         * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
2998         which copies the interface from isym to sym.
2999         (resolve_procedure_expression,resolve_function): Use new function
3000         'resolve_intrinsic'.
3001         (resolve_symbol): Add function attribute for externals with return type
3002         and use new function 'resolve_intrinsic'.
3003         * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
3004         (copy_formal_args): Renamed to gfc_copy_formal_args.
3005         (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
3006         * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
3007
3008 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
3009
3010         * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
3011         ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
3012         ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
3013         copyright and license notices.
3014         * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
3015         ChangeLog-2008: Correct dates.
3016
3017 2009-04-20  Tobias Burnus  <burnus@net-b.de>
3018
3019         PR fortran/39811
3020         * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
3021
3022 2009-04-20  Paul Thomas  <pault@gcc.gnu.org>
3023
3024         PR fortran/39800
3025         * resolve.c (is_sym_host_assoc): New function.
3026         (resolve_fl_derived): Call it when checking PRIVATE components
3027         of PUBLIC derived types.  Change gfc_error to a gfc_notify_std
3028         with std=f2003.
3029         (resolve_fl_namelist): Call it twice to check for host
3030         association.
3031
3032 2009-04-20  Ian Lance Taylor  <iant@google.com>
3033
3034         * module.c (import_iso_c_binding_module): Add casts to enum type.
3035         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
3036         tree_code.
3037         (gfc_conv_intrinsic_anyall): Likewise.
3038         (gfc_conv_intrinsic_arith): Likewise.
3039         (gfc_conv_intrinsic_minmaxloc): Likewise.
3040         (gfc_conv_intrinsic_minmaxval): Likewise.
3041         (gfc_conv_intrinsic_bitop): Likewise.
3042         (gfc_conv_intrinsic_singlebitop): Likewise.
3043         (gfc_conv_intrinsic_strcmp): Likewise.
3044
3045 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
3046             Jakub Jelinek  <jakub@redhat.com>
3047
3048         PR fortran/35423
3049         * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
3050         OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
3051         (ompws_flags): New extern decl.
3052         * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
3053         for the outer dimension if ompws_flags allow it.
3054         * trans.c (gfc_generate_code): Clear ompws_flags.
3055         * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
3056         array assignments inside of !$omp workshare.
3057         * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
3058         and constructs.
3059         * trans-openmp.c (ompws_flags): New variable.
3060         (gfc_trans_omp_workshare): Rewritten.
3061
3062 2009-04-11  Daniel Kraft  <d@domob.eu>
3063
3064         PR fortran/37746
3065         * gfortran.h (struct gfc_charlen): New field "passed_length" to store
3066         the actual passed string length for dummy arguments.
3067         * trans-decl.c (gfc_create_string_length): Formatting fixes and added
3068         assertion, moved a local variable into the innermost block it is needed.
3069         (create_function_arglist): Removed TODO about the check being
3070         implemented and initialize cl->passed_length here.
3071         (add_argument_checking): New method.
3072         (gfc_generate_function_code): Call the argument checking method.
3073
3074 2009-04-11  Janus Weil  <janus@gcc.gnu.org>
3075
3076         PR fortran/39692
3077         * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
3078
3079 2009-04-11  Daniel Franke  <franke.daniel@gmail.com>
3080
3081         * resolve.c (resolve_global_procedure): Enable whole-file checking for
3082         procedures that are declared later in the file.
3083         
3084 2009-04-10  Paolo Bonzini  <bonzini@gnu.org>
3085
3086         PR middle-end/39701
3087         * trans.c (gfc_allocate_with_status): Fix type mismatches
3088         on "pstat == 0".
3089
3090 2009-04-10  Daniel Franke  <franke.daniel@gmail.com>
3091
3092         PR fortran/38709
3093         * expr.c (find_array_section): Leave early on zero-sized arrays.
3094
3095 2009-04-09  Janus Weil  <janus@gcc.gnu.org>
3096
3097         PR fortran/36704
3098         * decl.c (add_hidden_procptr_result): New function for handling
3099         procedure pointer return values by adding a hidden result variable.
3100         (variable_decl,match_procedure_decl,gfc_match_function_decl,
3101         gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
3102         return values.
3103         * parse.c (parse_interface): Add EXTERNAL attribute only after
3104         FUNCTION/SUBROUTINE declaration is complete.
3105         * primary.c (replace_hidden_procptr_result): New function for replacing
3106         function symbol by hidden result variable.
3107         (gfc_match_rvalue,match_variable): Replace symbol by hidden result
3108         variable.
3109         * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
3110         resolve_symbol): Allow for procedure pointer function results.
3111         (resolve_fl_procedure): Conflict detection moved here from
3112         'check_conflict'.
3113         * symbol.c (gfc_check_function_type): Allow for procedure pointer
3114         function results.
3115         (check_conflict): Move some conflict detection to resolution stage.
3116         * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
3117         result variables.
3118
3119 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
3120
3121         * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
3122         contain TYPE_STRING_FLAG types.
3123
3124 2009-04-08  Janne Blomqvist  <jb@gcc.gnu.org>
3125
3126         PR fortran/39670
3127         * invoke.texi (fdollar-ok): Fix typo.
3128         
3129 2009-04-08  Daniel Franke  <franke.daniel@gmail.com>
3130
3131         PR fortran/39670
3132         * invoke.texi (fdollar-ok): Clarify limitations.
3133
3134 2009-04-08  Paul Thomas  <pault@gcc.gnu.org>
3135
3136         PR fortran/38863
3137         * trans-array.c (gfc_trans_deferred_array): Return if this
3138         is a result variable.
3139
3140 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
3141
3142         PR fortran/38152
3143         * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
3144         procedure pointer decls.
3145
3146 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
3147
3148         PR fortran/38290
3149         * expr.c (gfc_check_pointer_assign): Enable interface check for
3150         procedure pointers.
3151         * gfortran.h: Add copy_formal_args_intr.
3152         * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
3153         if second argument is an intrinsic.
3154         (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
3155         and ts.
3156         (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
3157         * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
3158         intrinsic interfaces here. Must happen earlier.
3159         (resolve_symbol): Resolution of intrinsic interfaces moved here from
3160         resolve_specific_..., and formal args are now copied from intrinsic
3161         interfaces.
3162         * symbol.c (copy_formal_args_intr): New function to copy the formal
3163         arguments from an intinsic procedure.
3164
3165 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
3166
3167         PR fortran/38863
3168         * dependency.c (ref_same_as_full_array): New function.
3169         (gfc_dep_resolver): Call it.
3170
3171 2009-04-06  Janus Weil  <janus@gcc.gnu.org>
3172
3173         PR fortran/39414
3174         * decl.c (match_procedure_decl): Fix double declaration problems with
3175         PROCEDURE statements.
3176         * symbol.c (gfc_add_type): Ditto.
3177
3178 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
3179
3180         PR fortran/36091
3181         * trans-array.c (gfc_conv_array_ref): If the symbol has the
3182         temporary attribute use the array_spec for the bounds.
3183         * gfortran.h : Add the temporary field to the structure
3184         'symbol_attribute'.
3185         * trans-stmt.c (forall_make_variable_temp): Set the symbol's
3186         temporary attribute.
3187
3188 2009-04-05  Daniel Franke  <franke.daniel@gmail.com>
3189
3190         PR fortran/29458
3191         * trans-array.c (gfc_trans_array_constructor_value): Shadow
3192         implied do-loop variable to avoid spurious middle-end warnings.
3193
3194 2009-04-04  Tobias Burnus  <burnus@net-b.de>
3195
3196         PR fortran/39577
3197         * trans-decl.c (gfc_generate_function_code): Move recursive
3198         check to the right position.
3199
3200 2009-04-04  Paul Thomas  <pault@gcc.gnu.org>
3201
3202         PR fortran/37614
3203         * trans-common.c (translate_common): Do not offset the whole
3204         coomon block.
3205
3206 2009-04-03  Tobias Burnus  <burnus@net-b.de>
3207
3208         PR fortran/39594
3209         * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
3210         if it is not a procedure pointer.
3211         * primary.c (match_actual_arg): Ditto.
3212
3213 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
3214
3215         PR preprocessor/15638
3216         * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
3217
3218 2009-03-30  Steven G. Kargl  <kargls@comcast.net>
3219
3220         PR fortran/38389
3221         * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
3222         (gfc_trans_deallocate): Add translation of ERRMSG.  Remove stale
3223         comments.  Minor whitespace cleanup.
3224         * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
3225         (resolve_deallocate_expr (gfc_expr *e): Update error message.
3226         (resolve_allocate_expr):  Remove dead code.  Update error message.
3227         Move error checking to ...
3228         (resolve_allocate_deallocate): ... here.  Add additional error
3229         checking for STAT, ERRMSG, and allocate-objects.
3230         * match.c(gfc_match_allocate,gfc_match_deallocate):  Parse ERRMSG.
3231         Check for redundant uses of STAT and ERRMSG.  Reword error message
3232         and add checking for pointer, allocatable, and proc_pointer attributes.
3233
3234 2009-03-30  Paul Thomas  <pault@gcc.gnu.org>
3235
3236         PR fortran/22571
3237         PR fortran/26227
3238         PR fortran/24886
3239         * symbol.c : Add gfc_global_ns_list.
3240         * decl.c (add_global_entry): Set the namespace ('ns') field.
3241         * gfortran.h : Add the resolved field to gfc_namespace. Add the
3242         namespace ('ns') field to gfc_gsymbol.  Add flag_whole_file to
3243         gfc_option_t.  Add the prototype for gfc_free_dt_list.
3244         * lang.opt : Add the whole-file option.
3245         * invoke.texi : Document the whole-file option.
3246         * resolve.c (resolve_global_procedure): If the fwhole-file
3247         option is set, reorder gsymbols to ensure that translation is
3248         in the right order.  Resolve the gsymbol's namespace if that
3249         has not occurred and then check interfaces.
3250         (resolve_function): Move call to resolve_global_procedure.
3251         (resolve_call): The same.
3252         (resolve_codes): Store the current labels_obstack.
3253         (gfc_resolve) : Return if the namespace is already resolved.
3254         trans-decl.c (gfc_get_extern_function_decl): If the whole_file
3255         option is selected, use the backend_decl of a gsymbol, if it is
3256         available.
3257         parse.c (add_global_procedure, add_global_program): If the flag
3258         whole-file is set, add the namespace to the gsymbol.
3259         (gfc_parse_file): On -fwhole-file, put procedure namespaces on
3260         the global namespace list.  Rearrange to do resolution of all
3261         the procedures in a file, followed by their translation.
3262         * options.c (gfc_init_options): Add -fwhole-file.
3263         (gfc_handle_option): The same.
3264
3265 2009-03-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
3266
3267         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
3268         family of intrinsics instead of BUILT_IN_INF family.
3269         * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
3270         BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
3271
3272 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
3273
3274         * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
3275         sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
3276
3277 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
3278
3279         PR rtl-optimization/323
3280         * options.c (gfc_post_options): Set
3281         flag_excess_precision_cmdline.  Give an error for
3282         -fexcess-precision=standard for processors where the option is
3283         significant.
3284
3285 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
3286
3287         PR preprocessor/34695
3288         * cpp.c (cb_cpp_error): New.
3289         (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
3290         Don't check cpp_errors (cpp_in).
3291         (gfc_cpp_init_0): Set cb->error.
3292
3293 2009-03-29  Steven G. Kargl  <kargl@gcc.gnu.org>
3294
3295         PR fortran/38823
3296         * gfortran.h: Add ARITH_PROHIBIT to arith enum.
3297         expr.c (gfc_match_init_expr): Add global variable init_flag to
3298         flag matching an initialization expression.
3299         (check_intrinsic_op): Move no longer reachable error message to ...
3300         * arith.c (arith_power): ... here.  Remove gfc_ prefix in
3301         gfc_arith_power.  Use init_flag.  Allow constant folding of x**y
3302         when y is REAL or COMPLEX.
3303         (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
3304         for constant folding.
3305         * gfc_power: Update gfc_arith_power to arith_power
3306
3307 2009-03-29  Daniel Kraft  <d@domob.eu>
3308
3309         PR fortran/37423
3310         * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
3311         added a comment explaining DEFERRED binding handling.
3312         * decl.c (match_binding_attributes): Really match DEFERRED attribute.
3313         (match_procedure_in_type): Really match PROCEDURE(interface) syntax
3314         and do some validity checks for DEFERRED and this construct.
3315         * module.c (binding_overriding): New string constant for DEFERRED.
3316         (mio_typebound_proc): Module-IO DEFERRED flag.
3317         * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
3318         binding is not overridden by a DEFERRED one.
3319         (resolve_typebound_procedure): Allow abstract interfaces as targets
3320         for DEFERRED bindings.
3321         (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
3322         (resolve_fl_derived): Use new "ensure_not_abstract" method for
3323         non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
3324         binding is overridden.
3325         (check_typebound_baseobject): New method.
3326         (resolve_compcall), (resolve_typebound_call): Check base-object of
3327         the type-bound procedure call.
3328         * gfc-internals.texi (Type-bound procedures): Document a little bit
3329         about internal handling of DEFERRED bindings.
3330
3331 2009-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
3332
3333         PR fortran/38507
3334         * gfortran.h (gfc_st_label): Fix comment.
3335         (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
3336         * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
3337         END SELECT with labels.
3338         (check_do_closure): Fix formatting.
3339         (parse_do_block): Fix typo in error message.
3340         * resolve.c (code_stack): Remove tail member.  Update comment to
3341         new use of reachable_labels.
3342         (reachable_labels): Rename to ...
3343         (find_reachable_labels): ... this.  Overhaul.  Update preceding
3344         comment.
3345         (resolve_branch): Fix comment preceding function.  Rewrite.
3346         (resolve_code): Update call to find_reachable_labels.  Add code to
3347         deal with EXEC_END_BLOCK.
3348         * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
3349         Add 2009 to copyright years.
3350         * trans.c (gfc_trans_code): Likewise on both counts.
3351
3352 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
3353
3354         PR fortran/38917
3355         * expr.c (gfc_check_assign): Allow pointer components when
3356         checking for NULL.
3357
3358         PR fortran/38918
3359         * resolve.c (check_data_variable): Treat pointer arrays with
3360         scalars.
3361
3362 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
3363
3364         PR fortran/38915
3365         * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
3366         have a string_length.
3367
3368 2009-03-28  Tobias Burnus  <burnus@net-b.de>
3369
3370         PR fortran/34656
3371         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
3372         Add GFC_RTCHECK_DO support.
3373         * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
3374         * invoke.texi (-fcheck): Document "do" option.
3375
3376 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
3377
3378         PR fortran/38538
3379         * trans-array.c (get_elemental_fcn_charlen): Remove.
3380         (get_array_charlen): New function to replace previous.
3381
3382 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
3383
3384         PR fortran/38765
3385         * parse.c (parse_derived): Do not break on finding pointer,
3386         allocatable or private components.
3387
3388 2009-03-28  Tobias Burnus  <burnus@net-b.de>
3389
3390         PR fortran/32626
3391         * option.c (gfc_handle_runtime_check_option): Enable recursion check.
3392         * trans-decl.c (gfc_generate_function_code): Add recursion check.
3393         * invoke.texi (-fcheck): Add recursive option.
3394
3395 2009-03-28  Tobias Burnus  <burnus@net-b.de>
3396
3397         PR fortran/38432
3398         * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
3399
3400 2009-03-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3401             Paul Thomas  <pault@gcc.gnu.org>
3402             Tobias Burnus  <burnus@net-b.de>
3403
3404         * gfortran.h (gfc_option_t): Add rtcheck.
3405         * lang.opt: New option -fcheck.
3406         * libgfortran.h: Add GFC_RTCHECK_* constants.
3407         * invoke.texi: Document -fcheck.
3408         * options.c (gfc_handle_runtime_check_option): New function.
3409         (gfc_init_options,gfc_post_options,gfc_handle_option):
3410         Add -fcheck option.
3411
3412 2009-03-27  Richard Guenther  <rguenther@suse.de>
3413
3414         * trans-array.c (gfc_conv_descriptor_data_addr): Use
3415         gfc_build_addr_expr instead of build_fold_addr_expr.
3416         (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
3417         gfc_trans_constant_array_constructor, gfc_conv_array_data,
3418         gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
3419         * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
3420         gfc_conv_function_val, gfc_conv_operator_assign,
3421         gfc_conv_subref_array_arg, gfc_conv_function_call,
3422         gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
3423         * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
3424         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3425         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
3426         gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
3427         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
3428         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3429         gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
3430         * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
3431         gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
3432         build_filepos, gfc_trans_inquire, gfc_trans_wait,
3433         nml_get_addr_expr, transfer_namelist_element, build_dt,
3434         gfc_trans_dt_end, transfer_array_component, transfer_expr,
3435         transfer_array_desc, gfc_trans_transfer): Likewise.
3436         * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
3437         * trans.c (gfc_build_addr_expr): Mark the base of the address
3438         TREE_ADDRESSABLE.
3439
3440 2009-03-27  Tobias Burnus  <burnus@net-b.de>
3441
3442         * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
3443         (gfc_expr): Add is_snan.
3444         * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
3445         (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
3446         * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
3447         * resolve.c (build_default_init_expr): Update call.
3448         * target-memory.c (encode_float): Ditto.
3449         * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
3450
3451 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3452
3453         * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
3454         and -fpreprocessed.
3455
3456 2009-03-06  Alexandre Oliva <aoliva@redhat.com>
3457
3458         * simplify.c (gfc_simplify_transfer): Zero-initialize the
3459         buffer.
3460
3461 2009-02-27  Tobias Burnus  <burnus@net-b.de>
3462
3463         PR fortran/39309
3464         * module.c (read_md5_from_module_file): Add missing quote.
3465
3466 2009-02-27  Tobias Burnus  <burnus@net-b.de>
3467
3468         PR fortran/39309
3469         * module.c (read_md5_from_module_file): Include mod version
3470         in had-changed test.
3471
3472 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
3473
3474         PR fortran/39295
3475         * interface.c (compare_type_rank_if): Return 1 if the symbols
3476         are the same and deal with external procedures where one is
3477         identified to be a function or subroutine by usage but the
3478         other is not.
3479
3480 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
3481
3482         PR fortran/39292
3483         * trans-array.c (gfc_conv_array_initializer): Convert all
3484         expressions rather than ICEing.
3485
3486 2009-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
3487
3488         PR fortran/38914
3489         * array.c (ref_dimen_size):  Rename to gfc_ref_dimen_size,
3490         make global.  Change function name in error messages.
3491         (ref_size):  Change ref_dimen_size to gfc_ref_dimen_size.
3492         (gfc_array_ref_shape):  Likewise.
3493         * gfortran.h:  Add prototype for gfc_ref_dimen_size.
3494         * simplify.c (simplify_bound_dim):  Add ref argument.
3495         If the reference isn't a full array, return one for
3496         the lower bound and the extent for the upper bound.
3497         (simplify_bound):  For array sections, take as from the
3498         argument.  Add reference to all to simplify_bound_dim.
3499
3500 2009-02-19  Daniel Franke  <franke.daniel@gmail.com>
3501
3502         * scanner.c (load_line): At end of line, skip '\r' without setting
3503         the truncation flag.
3504
3505 2009-02-18  Daniel Kraft  <d@domob.eu>
3506
3507         * gfortran.texi: New chapter about compiler characteristics.
3508         (Compiler Characteristics): Document KIND type parameters here.
3509
3510 2009-02-18  Tobias Burnus  <burnus@net-b.de>
3511
3512         * intrinsic.texi (MALLOC): Make example more portable.
3513
3514 2009-02-13  Mikael Morin  <mikael.morin@tele2.fr>
3515
3516         PR fortran/38259
3517         * module.c (gfc_dump_module,gfc_use_module): Add module
3518         version number.
3519
3520 2009-02-13  Paul Thomas  <pault@gcc.gnu.org>
3521
3522         PR fortran/36703
3523         PR fortran/36528
3524         * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
3525         function references to ensure that a valid expression is used.
3526         (gfc_conv_function_call): Pass Cray pointers to procedures.
3527
3528 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
3529
3530         * gfortranspec.c (lang_specific_driver): Update copyright notice
3531         dates.
3532
3533 2009-01-28  Paul Thomas  <pault@gcc.gnu.org>
3534
3535         PR fortran/38852
3536         PR fortran/39006
3537         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
3538         descriptor ubound for UBOUND, when the array lbound == 1.
3539
3540 2009-01-27  Daniel Kraft  <d@domob.eu>
3541
3542         PR fortran/38883
3543         * trans-stmt.c (gfc_conv_elemental_dependencies):  Create temporary
3544         for the real type needed to make it work for subcomponent-references.
3545
3546 2009-01-21  Daniel Kraft  <d@domob.eu>
3547
3548         * trans-stmt.c (gfc_conv_elemental_dependencies):  Cleaned up comment.
3549
3550 2009-01-20  Paul Thomas  <pault@gcc.gnu.org>
3551
3552         PR fortran/38907
3553         * resolve.c (check_host_association): Remove the matching to
3554         correct an incorrect host association and use manipulation of
3555         the expression instead.
3556
3557 2009-01-20  Tobias Burnus  <burnus@net-b.de>
3558
3559         * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
3560
3561 2009-01-19  Mikael Morin  <mikael.morin@tele2.fr>
3562
3563         PR fortran/38859
3564         * simplify.c (simplify_bound): Don't use array specification
3565         if variable or component has subsequent references.
3566
3567 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
3568
3569         PR fortran/38657
3570         * module.c (write_common_0): Add argument 'this_module' and
3571         check that non-use associated common blocks are written first.
3572         (write_common): Call write_common_0 twice, once with true and
3573         then with false.
3574
3575 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
3576
3577         PR fortran/34955
3578         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
3579         been absorbed into gfc_conv_intrinsic_transfer. All
3580         references to it in trans-intrinsic.c have been changed
3581         accordingly.  PR fixed by using a temporary for scalar
3582         character transfer, when the source is shorter than the
3583         destination.
3584
3585 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
3586
3587         PR fortran/38657
3588         * module.c (write_common_0): Revert patch of 2009-01-05.
3589
3590 2009-01-16  Janus Weil  <janus@gcc.gnu.org>
3591
3592         PR fortran/38152
3593         * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
3594         pointers as lvalue.
3595         * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
3596         Enable procedure pointers as module variables.
3597
3598 2009-01-14  Steven G. Kargl  <kargl@gcc.gnu.org>
3599
3600         * ChangeLog-2007: Clean out svn merge droppings.
3601
3602 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
3603
3604         PR fortran/38763
3605         * target-memory.c (encode_derived): Encode NULL.
3606
3607 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
3608
3609         PR fortran/38765
3610         * resolve.c (check_host_association): Use the symtree name to
3611         search for a potential contained procedure, since this is the
3612         name by which it would be referenced.
3613
3614 2009-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
3615
3616         PR fortran/38220
3617         * interface.c (gfc_procedure_use):  Don't warn about functions
3618         from ISO_C_BINDING.
3619         * symbol.c (generate_isocbinding_symbol):  Mark c_loc and
3620         c_funloc as pure.
3621
3622 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
3623
3624         PR fortran/38657
3625         * module.c (write_common_0): Use the name of the symtree rather
3626         than the common block, to determine if the common has been
3627         written.
3628
3629 2009-01-05  Daniel Franke  <franke.daniel@gmail.com>
3630
3631         PR fortran/37159
3632         * check.c (gfc_check_random_seed): Added size check for GET
3633         dummy argument, reworded error messages to follow common pattern.
3634
3635 2009-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
3636
3637         PR fortran/38672
3638         * trans-types.c (gfc_get_derived_type):  Check for the
3639         presence of derived->ns->proc_name before
3640         accessing derived->ns->proc_name->attr.flavor .
3641         * resolve.c (resolve_symbol):  Likewise.
3642
3643 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
3644
3645         PR fortran/38665
3646         * gfortran.h : Add bit to gfc_expr 'user_operator'
3647         * interface.c (gfc_extend_expr): Set the above if the operator
3648         is substituted by a function. 
3649         * resolve.c (check_host_association): Return if above is set.
3650
3651 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
3652
3653         PR fortran/35681
3654         * ChangeLog-2008: Fix function name.
3655
3656         PR fortran/38487
3657         * dependency.c (gfc_check_argument_var_dependency):
3658         Move the check for pointerness inside the if block
3659         so that it doesn't affect the return value.
3660
3661         PR fortran/38669
3662         * trans-stmt.c (gfc_trans_call):
3663         Add the dependency code after the loop bounds calculation one.
3664
3665 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
3666
3667         * intrinsic.c (do_simplify): Removed already implemented TODO.
3668
3669 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
3670
3671         PR fortran/38718
3672         * simplify.c (gfc_simplify_merge): New.
3673         * intrinsic.h (gfc_simplify_merge): New prototype.
3674         * intrinsic.c (add_functions): Added simplification for MERGE.
3675
3676 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
3677
3678         PR fortran/38536
3679         * gfortran.h (gfc_is_data_pointer): Added prototype
3680         * resolve.c (gfc_iso_c_func_interface):
3681         Use gfc_is_data_pointer to test for pointer attribute.
3682         * dependency.c (gfc_is_data_pointer):
3683         Support pointer-returning functions.
3684
3685 2009-01-03  Daniel Franke  <franke.daniel@gmail.com>
3686
3687         * symbol.c (save_symbol): Don't SAVE function results.
3688
3689 2009-01-03  Paul Thomas  <pault@gcc.gnu.org>
3690
3691         PR fortran/38594
3692         * resolve.c (resolve_call): When searching for proper host
3693         association, use symtree rather than symbol.  For everything
3694         except generic subroutines, substitute the symtree in the call
3695         rather than the symbol.
3696
3697 \f
3698 Copyright (C) 2009 Free Software Foundation, Inc.
3699
3700 Copying and distribution of this file, with or without modification,
3701 are permitted in any medium without royalty provided the copyright
3702 notice and this notice are preserved.