OSDN Git Service

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