OSDN Git Service

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