OSDN Git Service

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