OSDN Git Service

2010-07-04 Daniel Kraft <d@domob.eu>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-07-04  Daniel Kraft  <d@domob.eu>
2
3         * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
4
5 2010-07-04  Paul Thomas  <pault@gcc.gnu.org>
6
7         PR fortran/44596
8         PR fortran/44745
9         * trans-types.c (gfc_get_derived_type): Derived type fields
10         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
11
12 2010-07-02  Mikael Morin  <mikael@gcc.gnu.org>
13
14         PR fortran/44662
15         * decl.c (match_procedure_in_type): Clear structure before using.
16         (gfc_match_generic): Ditto.
17
18 2010-07-02  Nathan Froyd  <froydnj@codesourcery.com>
19
20         * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
21         * trans-types.c (gfc_add_field_to_struct_1): New function, most
22         of which comes from...
23         (gfc_add_field_to_struct): ...here.  Call it.  Add new parameter.
24         (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
25         building fields.
26         (gfc_get_array_descriptor_base): Likewise.
27         (gfc_get_mixed_entry_union): Likewise.
28         (gfc_get_derived_type): Add extra chain parameter for
29         gfc_add_field_to_struct.
30         * trans-stmt.c (gfc_trans_character_select): Likewise.
31         * trans-io.c (gfc_build_st_parameter): Likewise.
32
33 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
34
35         PR fortran/44718
36         * resolve.c (is_external_proc): Prevent procedure pointers from being
37         regarded as external procedures.
38
39 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
40
41         PR fortran/44696
42         * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
43         passed as second argument of ASSOCIATED.
44
45 2010-06-29  Paul Thomas  <pault@gcc.gnu.org>
46
47         PR fortran/44582
48         * trans-expr.c (arrayfunc_assign_needs_temporary): New function
49         to determine if a function assignment can be made without a
50         temporary.
51         (gfc_trans_arrayfunc_assign): Move all the conditions that
52         suppress the direct function call to the above new functon and
53         call it.
54
55 2010-06-28  Paul Thomas  <pault@gcc.gnu.org>
56
57         PR fortran/40158
58         * interface.c (argument_rank_mismatch): New function.
59         (compare_parameter): Call new function instead of generating
60         the error directly.
61
62 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
63
64         * trans-openmp.c (dovar_init): Define.  Define VECs containing it.
65         (gfc_trans_omp_do): Use a VEC to accumulate variables and their
66         initializers.
67
68 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
69
70         * Make-lang.in: Update dependencies.
71
72 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
73
74         * gfortran.h (gfc_code): Split backend_decl field into cycle_label
75         and exit_label fields.
76         * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
77         individually.
78         * trans-stmt.c (gfc_trans_simple_do): Likewise.
79         (gfc_trans_do): Likewise.
80         (gfc_trans_do_while): Likewise.
81         (gfc_trans_cycle): Use cycle_label directly.
82         (gfc_trans_exit): Use exit_label directly.
83
84 2010-06-27  Daniel Kraft  <d@domob.eu>
85
86         * dump-parse-tree.c (show_symbol): Dump target-expression for
87         associate names.
88         (show_code_node): Make distinction between BLOCK and ASSOCIATE.
89         (show_namespace): Use show_level for correct indentation of
90         "inner namespaces" (contained procedures or BLOCK).
91
92 2010-06-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
93
94         PR fortran/44678
95         * dump-parse-tree.c (show_code_node):  Show namespace for
96         EXEC_BLOCK.
97
98 2010-06-26  Tobias Burnus  <burnus@net-b.de>
99
100         * decl.c (gfc_match_decl_type_spec): Support
101         TYPE(intrinsic-type-spec).
102
103 2010-06-25  Tobias Burnus  <burnus@net-b.de>
104
105         * intrinsic.h (gfc_check_selected_real_kind,
106         gfc_simplify_selected_real_kind): Update prototypes.
107         * intrinsic.c (add_functions): Add radix support to
108         selected_real_kind.
109         * check.c (gfc_check_selected_real_kind): Ditto.
110         * simplify.c (gfc_simplify_selected_real_kind): Ditto.
111         * trans-decl.c (gfc_build_intrinsic_function_decls):
112         Change call from selected_real_kind to selected_real_kind2008.
113         * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
114         (PRECISION, RANGE, RADIX): Add cross @refs.
115
116 2010-06-25  Tobias Burnus  <burnus@net-b.de>
117
118         * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
119         * gfortran.texi (_gfortran_set_options): Update for
120         GFC_STD_F2008_OBS addition.
121         * libgfortran.h: Add GFC_STD_F2008_OBS.
122         * options.c (set_default_std_flags, gfc_handle_option): Handle
123         GFC_STD_F2008_OBS.
124         io.c (check_format): Fix allow_std check.
125
126 2010-06-25  Tobias Burnus  <burnus@net-b.de>
127
128         * decl.c (gfc_match_entry): Allow END besides
129         END SUBROUTINE/END FUNCTION for contained procedures.
130
131 2010-06-25  Tobias Burnus  <burnus@net-b.de>
132
133         * parse.c (next_free, next_fixed): Allow ";" as first character.
134
135 2010-06-24  Tobias Burnus  <burnus@net-b.de>
136
137         PR fortran/44614
138         * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
139
140 2010-06-22  Janus Weil  <janus@gcc.gnu.org>
141
142         PR fortran/44616
143         * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
144         containers.
145
146 2010-06-21  Tobias Burnus  <burnus@net-b.de>
147
148         PR fortran/40632
149         * interface.c (compare_parameter): Add gfc_is_simply_contiguous
150         checks.
151         * symbol.c (gfc_add_contiguous): New function.
152         (gfc_copy_attr, check_conflict): Handle contiguous attribute.
153         * decl.c (match_attr_spec): Ditto.
154         (gfc_match_contiguous): New function.
155         * resolve.c (resolve_fl_derived, resolve_symbol): Handle
156         contiguous.
157         * gfortran.h (symbol_attribute): Add contiguous.
158         (gfc_is_simply_contiguous): Add prototype.
159         (gfc_add_contiguous): Add prototype.
160         * match.h (gfc_match_contiguous): Add prototype.
161         * parse.c (decode_specification_statement,
162         decode_statement): Handle contiguous attribute.
163         * expr.c (gfc_is_simply_contiguous): New function.
164         * dump-parse-tree.c (show_attr): Handle contiguous.
165         * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
166         Ditto.
167         * trans-expr.c (gfc_add_interface_mapping): Copy
168         attr.contiguous.
169         * trans-array.c (gfc_conv_descriptor_stride_get,
170         gfc_conv_array_parameter): Handle contiguous arrays.
171         * trans-types.c (gfc_build_array_type, gfc_build_array_type,
172         gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
173         Ditto.
174         * trans.h (gfc_array_kind): Ditto.
175         * trans-decl.c (gfc_get_symbol_decl): Ditto.
176
177 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
178
179         * options.c (gfc_handle_option): Don't handle N_OPTS.
180
181 2010-06-19  Janus Weil  <janus@gcc.gnu.org>
182
183         PR fortran/44584
184         * resolve.c (resolve_fl_derived): Reverse ordering of conditions
185         to avoid ICE.
186
187 2010-06-18  Tobias Burnus  <burnus@net-b.de>
188
189         PR fortran/44556
190         * resolve.c (resolve_allocate_deallocate): Properly check
191         part-refs in stat=/errmsg= for invalid use.
192
193 2010-06-17  Janus Weil  <janus@gcc.gnu.org>
194
195         PR fortran/44558
196         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
197         Return directly in case of an error.
198
199 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
200
201         PR fortran/44549
202         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
203         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
204         structure to each procedure in a procedure list.
205         * module.c (mio_typebound_proc): Add NULL argument to
206         'gfc_get_typebound_proc'.
207         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
208         to initialize the new structure.
209
210 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
211
212         PR fortran/43388
213         * gfortran.h (gfc_expr): Add new member 'mold'.
214         * match.c (gfc_match_allocate): Implement the MOLD tag.
215         * resolve.c (resolve_allocate_expr): Ditto.
216         * trans-stmt.c (gfc_trans_allocate): Ditto.
217
218 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
219
220         PR fortran/44536
221         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
222         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
223         GFC_DECL_SAVED_DESCRIPTOR set.
224         (gfc_omp_report_decl): New function.
225         * trans.h (gfc_omp_report_decl): New prototype.
226         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
227
228 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
229
230         PR fortran/31588
231         PR fortran/43954
232         * gfortranspec.c (lang_specific_driver): Removed deprecation
233         warning for -M.
234         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
235         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
236         * cpp.h (gfc_cpp_makedep): New.
237         (gfc_cpp_add_dep): New.
238         (gfc_cpp_add_target): New.
239         * cpp.c (gfc_cpp_option): Add deps* members.
240         (gfc_cpp_makedep): New.
241         (gfc_cpp_add_dep): New.
242         (gfc_cpp_add_target): New.
243         (gfc_cpp_init_options): Initialize new options.
244         (gfc_cpp_handle_option): Handle new options.
245         (gfc_cpp_post_options): Map new options to libcpp-options.
246         (gfc_cpp_init): Handle deferred -MQ and -MT options.
247         (gfc_cpp_done): If requested, write dependencies to file.
248         * module.c (gfc_dump_module): Add a module filename as target.
249         * scanner.c (open_included_file): New parameter system; add the
250         included file as dependency.
251         (gfc_open_included_file): Add the included file as dependency.
252         (gfc_open_intrinsic_module): Likewise.
253         * invoke.texi: Removed deprecation warning for -M.
254         * gfortran.texi: Removed Makefile-dependencies project.
255
256 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
257
258         * resolve.c (resolve_global_procedure): Improved checking if an
259         explicit interface is required.
260
261 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
262
263         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
264         return type.
265         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
266         (gfc_conv_intrinsic_ttynam): Likewise.
267         (gfc_conv_intrinsic_trim): Likewise.
268
269 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
270
271         PR fortran/40117
272         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
273
274 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
275
276         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
277
278 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
279
280         * mathbuiltins.def: Add builtins that do not directly correspond
281         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
282         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
283         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
284         code_{r,c}{4,8,10,16} fields. Add
285         {,complex}{float,double,long_double}_built_in fields.
286         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
287         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
288         definition of OTHER_BUILTIN.
289         (real_compnt_info): Remove unused struct.
290         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
291         functions.
292         (build_round_expr): Call builtin_decl_for_precision instead of
293         series of if-else.
294         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
295         instead of a switch.
296         (gfc_build_intrinsic_lib_fndecls): Match
297         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
298         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
299         kinds.
300         (gfc_conv_intrinsic_lib_function): Go through all the extended
301         gfc_intrinsic_map.
302         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
303         instead of a switch.
304         (gfc_conv_intrinsic_abs): Likewise.
305         (gfc_conv_intrinsic_mod): Likewise.
306         (gfc_conv_intrinsic_sign): Likewise.
307         (gfc_conv_intrinsic_fraction): Likewise.
308         (gfc_conv_intrinsic_nearest): Likewise.
309         (gfc_conv_intrinsic_spacing): Likewise.
310         (gfc_conv_intrinsic_rrspacing): Likewise.
311         (gfc_conv_intrinsic_scale): Likewise.
312         (gfc_conv_intrinsic_set_exponent): Likewise.
313
314 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
315
316         PR fortran/42051
317         PR fortran/43896
318         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
319         functions with CLASS formal arguments.
320
321 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
322
323         PR fortran/44207
324         * resolve.c (conformable_arrays): Handle allocatable components.
325
326 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
327
328         PR fortran/38273
329         * gfortran.texi: Document that Cray pointers cannot be function
330         results.
331
332 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
333
334         PR fortran/36234
335         * gfortran.texi: Document lack of support for syntax
336         "complex FUNCTION name*16()", and existence of alternative
337         legacy syntax "complex*16 FUNCTION name()".
338
339 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
340
341         PR fortran/43032
342         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
343         POSIX's fsync(), and how to call the latter from Fortran code.
344
345 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
346
347         PR fortran/44457
348         * interface.c (compare_actual_formal): Reject actual arguments with
349         array subscript passed to ASYNCHRONOUS dummys.
350
351 2010-06-10  Daniel Kraft  <d@domob.eu>
352
353         PR fortran/38936
354         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
355         (struct gfc_symbol): New field `assoc'.
356         (struct gfc_association_list): New struct.
357         (struct gfc_code): New struct `block' in union, move `ns' there
358         and add association list.
359         (gfc_free_association_list): New method.
360         (gfc_has_vector_subscript): Made public;
361         * match.h (gfc_match_associate): New method.
362         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
363         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
364         * interface.c (gfc_has_vector_subscript): Made public.
365         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
366         * match.c (gfc_match_associate): New method.
367         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
368         * primary.c (match_variable): Don't allow names associated to expr here.
369         * parse.c (decode_statement): Try matching ASSOCIATE statement.
370         (case_exec_markers, case_end): Add ASSOCIATE statement.
371         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
372         (parse_associate): New method.
373         (parse_executable): Handle ST_ASSOCIATE.
374         (parse_block_construct): Change reference to gfc_code's `ns' field.
375         * resolve.c (resolve_select_type): Ditto.
376         (resolve_code): Ditto.
377         (resolve_block_construct): Ditto and add comment.
378         (resolve_select_type): Set association list in generated BLOCK to NULL.
379         (resolve_symbol): Resolve associate names.
380         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
381         and free association list.
382         (gfc_free_association_list): New method.
383         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
384         * trans-stmt.c (gfc_trans_block_construct): Change reference to
385         gfc_code's `ns' field.
386
387 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
388
389         * error.c (error_print): Pre-initialize loc by NULL.
390         * openmp.c (resolve_omp_clauses): Add explicit
391         braces to avoid ambigous else.
392         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
393
394 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
395
396         * gfc-internals.texi: Move to GFDL 1.3.
397         * gfortran.texi: Ditto.
398         * intrinsic.texi: Ditto.
399         * invoke.texi: Ditto.
400
401 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
402
403         PR fortran/44347
404         * check.c (gfc_check_selected_real_kind): Verify that the
405         actual arguments are scalar.
406
407 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
408
409         PR fortran/44359
410         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
411
412 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
413
414         PR fortran/44430
415         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
416
417 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
418
419         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
420
421 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
422
423         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
424         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
425         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
426         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
427         gfc_check_bitfcn.
428         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
429         less_than_bitsize2): New functions.
430         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
431         nonnegative_check and less_than_bitsize1.
432         (gfc_check_ibclr, gfc_check_ibset): Removed.
433         (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
434         less_than_bitsize1.
435
436 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
437
438         PR fortran/44211
439         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
440         Resolve references.
441
442 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
443
444         * resolve.c (resolve_deallocate_expr): Avoid warning
445         about possible use of iunitialized sym.
446         (resolve_allocate_expr): Pre-initialize sym by NULL.
447
448 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
449
450         PR fortran/43040
451         * f95-lang.c (gfc_init_builtin_functions): Remove comment.
452
453 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
454
455         * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
456         allocation.
457         (gfc_get_array_type_bounds): Likewise.
458
459         * trans-decl.c (gfc_allocate_lang_decl): Likewise.
460         (gfc_find_module): Likewise.
461
462         * f95-lang.c (pushlevel): Likewise.
463
464         * trans.h (struct lang_type): Add variable_size GTY option.
465         (struct lang_decl): Likewise.
466
467 2010-06-08  Tobias Burnus  <burnus@net-b.de>
468
469         PR fortran/44446
470         * symbol.c (check_conflict): Move protected--external/procedure check ...
471         * resolve.c (resolve_select_type): ... to the resolution stage.
472
473 2010-06-07  Tobias Burnus  <burnus@net-b.de>
474
475         * options.c (gfc_handle_option): Fix -fno-recursive.
476
477 2010-06-07  Tobias Burnus  <burnus@net-b.de>
478
479         * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
480         * gfortran.texi (copyrights-gfortran): Ditto.
481
482 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
483
484         * lang.opt (fshort-enums): Define using Var and VarExists.
485         * options.c (gfc_handle_option): Don't set flag_short_enums here.
486
487 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
488             Janus Weil  <janus@gcc.gnu.org>
489
490         PR fortran/43945
491         * resolve.c (get_declared_from_expr): Move to before
492         resolve_typebound_generic_call.  Make new_ref and class_ref
493         ignorable if set to NULL.
494         (resolve_typebound_generic_call): Once we have resolved the
495         generic call, check that the specific instance is that which
496         is bound to the declared type.
497         (resolve_typebound_function,resolve_typebound_subroutine): Avoid
498         freeing 'class_ref->next' twice.
499
500 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
501
502         PR fortran/43895
503         * trans-array.c (structure_alloc_comps): Dereference scalar
504         'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
505         TREE_TYPE (decl).
506
507 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
508
509         * gfortranspec.c (append_arg, lang_specific_driver): Use
510         GCC-specific formats in diagnostics.
511
512 2010-06-02  Tobias Burnus  <burnus@net-b.de>
513
514         PR fortran/44360
515         * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
516         symbols.
517
518 2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
519
520         PR fortran/44371
521         * match.c (gfc_match_stopcode): Move gfc_match_eos call inside 
522         condition block.
523
524 2010-05-31  Steven G. Kargl  <kargl@gcc.gnu.org>
525
526         * fortran/gfortran.texi:  Fix typos in description of variable-format-
527         expressions.
528
529 2010-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
530
531         PR fortran/36928
532         * dependency.c (gfc_check_section_vs_section):  Check
533         for interleaving array assignments without conflicts.
534
535 2010-05-30  Janus Weil  <janus@gcc.gnu.org>
536
537         * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
538         $data component of a class container.
539         * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
540         * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
541         gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
542         * gcc/fortran/interface.c (matching_typebound_op): Ditto.
543         * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
544         * gcc/fortran/parse.c (parse_derived): Ditto.
545         * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
546         gfc_expr_attr): Ditto.
547         * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
548         resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
549         resolve_fl_var_and_proc, resolve_typebound_procedure,
550         resolve_fl_derived): Ditto.
551         * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
552         * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
553         CLASS_DATA.
554         * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
555         gfc_trans_deferred_vars): Ditto.
556         * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
557
558 2010-05-28  Tobias Burnus  <burnus@net-b.de>
559
560         * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
561
562 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
563
564         * gfortranspec.c (append_arg, lang_specific_driver): Use
565         fatal_error instead of fatal.  Use warning instead of fprintf for
566         warnings.
567
568 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
569
570         * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
571         * module.c (write_char, gfc_dump_module, gfc_use_module): Use
572         xstrerror instead of strerror.
573
574 2010-05-26  Joseph Myers  <joseph@codesourcery.com>
575
576         * cpp.c (cb_cpp_error): Save and restore
577         global_dc->warn_system_headers, not variable warn_system_headers.
578
579 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
580
581         * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
582
583 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
584
585         * trans-common.c: Do not include rtl.h, include output.h instead.
586         * trans-decl.c: Likewise.
587
588 2010-05-26  Paul Thomas  <pault@gcc.gnu.org>
589
590         PR fortran/40011
591         * resolve.c (resolve_global_procedure): Resolve the gsymbol's
592         namespace before trying to reorder the gsymbols.
593
594 2010-05-25  Daniel Franke  <franke.daniel@gmail.com>
595
596         PR fortran/30668
597         PR fortran/31346
598         PR fortran/34260
599         * resolve.c (resolve_global_procedure): Add check for global
600         procedures with implicit interfaces and assumed-shape or optional
601         dummy arguments. Verify that function return type, kind and string
602         lengths match.
603
604 2010-05-21  Tobias Burnus  <burnus@net-b.de>
605
606         * gfortran.h: Do not include system.h.
607         * bbt.c: Include system.h.
608         * data.c: Ditto.
609         * dependency.c: Ditto.
610         * dump-parse-tree.c: Ditto.
611         * arith.h: Do not include gfortran.h.
612         * constructor.h: Do not include gfortran.h and splay-tree.h.
613         * match.h: Do not include gfortran.h.
614         * parse.h: Ditto.
615         * target-memory.h: Ditto.
616         * openmp.c: Do not include toplev.h and target.h.
617         * trans-stmt.c: Ditto not include toplev.h.
618         * primary.c: Ditto.
619         * trans-common.c: Tell why toplev.h is needed. And
620         do not include target.h.
621         * trans-expr.c: Tell why toplev.h is needed.
622         * trans-array.c: Ditto.
623         * trans-openmp.c: Ditto.
624         * trans-const.c: Ditto.
625         * trans.c: Ditto.
626         * trans-types.c: Ditto.
627         * trans-io.c: Ditto.
628         * trans-decl.c: Ditto.
629         * scanner.c: Ditto.
630         * convert.c: Ditto.
631         * trans-intrinsic.c: Ditto.
632         * options.c: Ditto.
633
634 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
635
636         PR fortran/43851
637         * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
638         before returning MATCH_ERROR. Add check for scalar. Add check for
639         default integer kind.
640
641 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
642
643         PR fortran/44212
644         * match.c (gfc_match_select_type): On error jump back out of the local
645         namespace.
646         * parse.c (parse_derived): Defer creation of vtab symbols to resolution
647         stage, more precisely to ...
648         * resolve.c (resolve_fl_derived): ... this place.
649
650 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
651
652         PR fortran/44213
653         * resolve.c (ensure_not_abstract): Allow abstract types with
654         non-abstract ancestors.
655
656 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
657
658         * trans-const.c: Include realmpfr.h.
659         * Make-lang.in: Update dependencies.
660
661 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
662
663         * trans-const.c, trans-types.c, trans-intrinsic.c:
664         Clean up redundant includes.
665
666 2010-05-20  Daniel Franke  <franke.daniel@gmail.com>
667
668         PR fortran/38407
669         * lang.opt (Wunused-dummy-argument): New option.
670         * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
671         * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
672         (set_Wall): Enable warn_unused_dummy_argument.
673         (gfc_handle_option): Set warn_unused_dummy_argument according to
674         command line.
675         * trans-decl.c (generate_local_decl): Separate warnings about
676         unused variables and unused dummy arguments.
677         * invoke.texi: Documented new option.
678
679 2010-05-20  Steven Bosscher  <steven@gcc.gnu.org>
680
681         * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
682         (gfc_conv_string_tmp): Do not assert type comparibilty.
683         *  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
684         (gfc_conv_expr_descriptor): Remove assert.
685         * trans-common.c: Clarify why rtl.h and tm.h are included.
686         * trans-openmp.c: Do not include ggc.h and real.h.
687         Explain why gimple.h is included.
688         * trans-const.c: Do not include ggc.h.
689         * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
690         * trans.c: Do not include ggc.h and real.h.
691         Explain why gimple.h is included.
692         * trans-types.c: Do not include tm.h.  Explain why langhooks.h
693         and dwarf2out.h are included.
694         * trans-io.c: Do not include gimple.h and real.h.
695         * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
696         * trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
697         is included.
698
699 2010-05-20  Tobias Burnus  <burnus@net-b.de>
700
701         * options.c (gfc_init_options,gfc_post_options): Enable
702         flag_associative_math by default.
703
704 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
705
706         PR fortran/43851
707         * trans-stmt.c (gfc_trans_stop): Add generation of call to
708         gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
709         blank STOP, handling a null expression. (gfc_trans_pause): Use
710         pause_string for blank PAUSE.
711         * trans.h: Add external function declaration for error_stop_numeric.
712         * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
713         the declaration for the library call. Adjust whitespaces.
714         * match.c (gfc_match_stopcode): Remove use of the actual stop code to
715         signal no stop code. Match the expression following the stop and pass
716         that to the translators. Remove the old use of digit matching.  Add
717         checks that the stop_code expression is INTEGER or CHARACTER, constant,
718         and if CHARACTER, default character KIND.
719
720 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
721
722         PR fortran/44055
723         * lang.opt (Wconversion-extra): New option.
724         * gfortran.h (gfc_option_t): Add warn_conversion_extra.
725         * options.c (gfc_init_options): Disable -Wconversion-extra by default.
726         (set_Wall): Enable -Wconversion.
727         (gfc_handle_option): Set warn_conversion_extra.
728         * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
729         introduced for -Wconversion if -Wconversion-extra is present.
730         * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
731         -Wconversion; document -Wconversion-extra.
732
733 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
734
735         PR fortran/42360
736         * gfortran.h (gfc_has_default_initializer): New.
737         * expr.c (gfc_has_default_initializer): New.
738         * resolve.c (has_default_initializer): Removed, use
739         gfc_has_default_initializer() instead. Updated all callers.
740         * trans-array.c (has_default_initializer): Removed, use
741         gfc_has_default_initializer() instead. Updated all callers.
742         * trans-decl.c (generate_local_decl): Do not check the
743         first component only to check for initializers, but use
744         gfc_has_default_initializer() instead.
745
746 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
747
748         PR fortran/38404
749         * primary.c (match_string_constant): Move start_locus just inside 
750         the string.
751         * data.c (create_character_intializer): Clarified truncation warning.
752
753 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
754
755         PR fortran/34505
756         * intrinsic.h (gfc_check_float): New prototype.
757         (gfc_check_sngl): New prototype.
758         * check.c (gfc_check_float): New.
759         (gfc_check_sngl): New.
760         * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
761         to be a specific for REAL. Added check routines for FLOAT, DFLOAT
762         and SNGL.
763         * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
764         added them to the list of specifics of REAL instead.
765
766 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
767
768         PR fortran/43990
769         * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
770         This is now handled via 'gfc_class_null_initializer'.
771
772 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
773
774         * class.c (gfc_add_component_ref,gfc_class_null_initializer,
775         gfc_build_class_symbol,add_proc_component,add_proc_comps, 
776         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
777         add_procs_to_declared_vtab,add_generic_specifics, 
778         add_generics_to_declared_vtab,gfc_find_derived_vtab,
779         find_typebound_proc_uop,gfc_find_typebound_proc,
780         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op, 
781         gfc_get_tbp_symtree): Moved here from other places.
782         * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
783         class.c.
784         * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
785         gfc_find_typebound_proc,gfc_find_typebound_user_op,
786         gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
787         gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
788         * Make-lang.in: Add class.o.
789         * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
790         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
791         add_procs_to_declared_vtab,add_generic_specifics,
792         add_generics_to_declared_vtab,gfc_find_derived_vtab,
793         find_typebound_proc_uop,gfc_find_typebound_proc,
794         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
795         gfc_get_tbp_symtree): Move to class.c.
796
797 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
798
799         * trans-types.c (gfc_init_types): Use build_function_type_list.
800         (gfc_get_ppc_type): Likewise.
801         * trans-decl.c (gfc_generate_constructors): Likewise.
802         * f95-lang.c (build_builtin_fntypes): Likewise.
803         (gfc_init_builtin_functions): Likewise.
804         (DEF_FUNCTION_TYPE_0): Likewise.
805         (DEF_FUNCTION_TYPE_1): Likewise.
806         (DEF_FUNCTION_TYPE_2): Likewise.
807         (DEF_FUNCTION_TYPE_3): Likewise.
808         (DEF_FUNCTION_TYPE_4): Likewise.
809         (DEF_FUNCTION_TYPE_5): Likewise.
810         (DEF_FUNCTION_TYPE_6): Likewise.
811         (DEF_FUNCTION_TYPE_7): Likewise.  Use ARG7.
812         (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
813  
814 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
815
816         * trans-array.c (gfc_trans_array_constructor_value): Use
817         build_constructor instead of build_constructor_from_list.
818         (gfc_build_constant_array_constructor): Likewise.
819         * trans-decl.c (create_main_function): Likewise.
820         * trans-stmt.c (gfc_trans_character_select): Likewise.
821
822 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
823
824         PR fortran/44044
825         * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
826         (resolve_fl_variable_derived): ... this place.
827         (resolve_symbol): Make sure function symbols (and their result
828         variables) are not resolved twice.
829
830 2010-05-16  Daniel Franke  <franke.daniel@gmail.com>
831
832         PR fortran/35779
833         * array.c (match_array_list): Revert change from 2010-05-13.
834
835 2010-05-16  Richard Guenther  <rguenther@suse.de>
836
837         * trans-decl.c (module_htab_decls_hash): Revert last change.
838
839 2010-05-16  Richard Guenther  <rguenther@suse.de>
840
841         * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
842
843 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
844
845         * options.c (set_Wall): Remove special logic for Wuninitialized
846         without -O.
847
848 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
849
850         PR fortran/44154
851         PR fortran/42647
852         * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
853         if branches.
854
855 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
856
857         PR fortran/43207
858         PR fortran/43969
859         * gfortran.h (gfc_class_null_initializer): New prototype.
860         * expr.c (gfc_class_null_initializer): New function to build a NULL
861         initializer for CLASS pointers.
862         * symbol.c (gfc_build_class_symbol): Modify internal naming of class
863         containers. Remove default NULL initialization of $data component.
864         * trans.c (gfc_allocate_array_with_status): Fix wording of an error 
865         message.
866         * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
867         Use new function 'gfc_class_null_initializer'.
868         * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
869         class variables.
870
871 2010-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
872
873         PR fortran/44135
874         * fortran/interface.c (get_sym_storage_size): Use signed instead of
875         unsigned mpz_get_?i routines.
876
877 2010-05-14  Jakub Jelinek  <jakub@redhat.com>
878
879         * trans.c (trans_code): Set backend locus early.
880         * trans-decl.c (gfc_get_fake_result_decl): Use source location
881         of the function instead of current input_location.
882
883 2010-05-13  Daniel Franke  <franke.daniel@gmail.com>
884
885         PR fortran/35779
886         * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
887         Updated all usages.
888         * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
889         * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
890         iterators.
891
892 2010-05-13  Jakub Jelinek  <jakub@redhat.com>
893
894         PR fortran/44036
895         * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
896         variable lists.
897         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
898         by reference dummy procedures or non-dummy procedure pointers.
899         (gfc_omp_predetermined_sharing): Return
900         OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
901
902 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
903
904         PR fortran/43711
905         * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
906         after OMP statement.
907         (gfc_match_omp_critical): Likewise.
908         (gfc_match_omp_flush): Likewise.
909         (gfc_match_omp_workshare): Likewise.
910         (gfc_match_omp_master): Likewise.
911         (gfc_match_omp_ordered): Likewise.
912         (gfc_match_omp_atomic): Likewise.
913         (gfc_match_omp_barrier): Likewise.
914         (gfc_match_omp_end_nowait): Likewise.
915
916 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
917
918         PR fortran/31820
919         * resolve.c (validate_case_label_expr): Removed FIXME.
920         (resolve_select): Raise default warning on case labels out of range
921         of the case expression.
922
923 2010-05-10  Daniel Franke  <franke.daniel@gmail.com>
924
925         PR fortran/27866
926         PR fortran/35003
927         PR fortran/42809
928         * intrinsic.c (gfc_convert_type_warn): Be more discriminative
929         about conversion warnings.
930
931 2010-05-10  Janus Weil  <janus@gcc.gnu.org>
932
933         PR fortran/44044
934         * match.c (gfc_match_select_type): Move error message to
935         resolve_select_type.
936         * resolve.c (resolve_select_type): Error message moved here from
937         gfc_match_select_type. Correctly set type of temporary.
938
939 2010-05-10  Richard Guenther  <rguenther@suse.de>
940
941         * trans-decl.c (gfc_build_library_function_decl): Split out
942         worker to ...
943         (build_library_function_decl_1): ... this new function.
944         Set a fnspec attribute if a specification was provided.
945         (gfc_build_library_function_decl_with_spec): New function.
946         (gfc_build_intrinsic_function_decls): Annotate internal_pack
947         and internal_unpack.
948
949 2010-05-07  Daniel Franke  <franke.daniel@gmail.com>
950
951         PR fortran/40728
952         * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
953         as external.
954
955 2010-05-07  Jason Merrill  <jason@redhat.com>
956
957         * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
958         to avoid -Wc++-compat warning.
959
960 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
961
962         PR 40989
963         * options.c (gfc_handle_option): Add argument kind.
964         * gfortran.h (gfc_handle_option): Update declaration.
965
966 2010-05-06  Tobias Burnus  <burnus@net-b.de>
967
968         PR fortran/43985
969         * trans-types.c (gfc_sym_type): Mark Cray pointees as
970         GFC_POINTER_TYPE_P.
971
972 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
973
974         PR fortran/32331
975         * resolve.c (traverse_data_list): Rephrase error message for
976         non-constant bounds in data-implied-do.
977
978 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
979
980         PR fortran/24978
981         * gfortran.h: Removed repeat count from constructor, removed
982         all usages.
983         * data.h (gfc_assign_data_value_range): Changed return value from
984         void to gfc_try.
985         * data.c (gfc_assign_data_value): Add location to constructor element.
986         (gfc_assign_data_value_range): Call gfc_assign_data_value()
987         for each element in range. Return early if an error was generated.
988         * resolve.c (check_data_variable): Stop early if range assignment
989         generated an error.
990
991 2010-05-05  Janus Weil  <janus@gcc.gnu.org>
992
993         PR fortran/43696
994         * resolve.c (resolve_fl_derived): Some fixes for class variables.
995         * symbol.c (gfc_build_class_symbol): Add separate class container for
996         class pointers.
997
998 2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
999
1000         PR fortran/43592
1001         * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
1002
1003 2010-05-02  Tobias Burnus  <burnus@net-b.de>
1004
1005         PR fortran/18918
1006         * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
1007         for lcobound, ucobound, image_index and this_image.
1008         * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
1009         gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
1010         * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
1011         gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
1012         functions.
1013         (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
1014
1015 2010-04-30  Tobias Burnus  <burnus@net-b.de>
1016
1017         PR fortran/18918
1018         PR fortran/43931
1019         *  trans-types.c (gfc_get_array_descriptor_base): Fix index
1020         calculation for array descriptor types.
1021
1022 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1023
1024         PR fortran/43896
1025         * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
1026         initializers for PPC members of the vtabs.
1027
1028 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1029
1030         PR fortran/42274
1031         * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
1032         attribute for all PPC members of the vtypes.
1033         (copy_vtab_proc_comps): Copy the correct interface.
1034         * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
1035         * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
1036         a dummy argument and make sure all PPC members of the vtab are
1037         initialized correctly.
1038         (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
1039         in call to gfc_trans_assign_vtab_procs.
1040         * trans-stmt.c (gfc_trans_allocate): Ditto.
1041
1042 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1043
1044         PR fortran/43326
1045         * resolve.c (resolve_typebound_function): Renamed
1046         resolve_class_compcall.Do all the detection of class references
1047         here.
1048         (resolve_typebound_subroutine): resolve_class_typebound_call
1049         renamed. Otherwise same as resolve_typebound_function.
1050         (gfc_resolve_expr): Call resolve_typebound_function.
1051         (resolve_code): Call resolve_typebound_subroutine.
1052
1053 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
1054
1055         PR fortran/43492
1056         * resolve.c (resolve_typebound_generic_call): For CLASS methods
1057         pass back the specific symtree name, rather than the target
1058         name.
1059
1060 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1061
1062         PR fortran/42353
1063         * resolve.c (resolve_structure_cons): Make the initializer of
1064         the vtab component 'extends' the same type as the component.
1065
1066 2010-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1067
1068         PR fortran/42680
1069         * interface.c (check_interface1): Pass symbol name rather than NULL to
1070         gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
1071         trap MULL. (gfc_compare_derived_types): Revert previous change
1072         incorporated incorrectly during merge from trunk, r155778.
1073         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
1074         than NULL to gfc_compare_interfaces.
1075         * symbol.c (add_generic_specifics): Likewise.
1076
1077 2010-02-29  Janus Weil  <janus@gcc.gnu.org>
1078
1079         PR fortran/42353
1080         * interface.c (gfc_compare_derived_types): Add condition for vtype.
1081         * symbol.c (gfc_find_derived_vtab): Sey access to private.
1082         (gfc_find_derived_vtab): Likewise.
1083         * module.c (ab_attribute): Add enumerator AB_VTAB.
1084         (mio_symbol_attribute): Use new attribute, AB_VTAB.
1085         (check_for_ambiguous): Likewise.
1086
1087 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
1088             Janus Weil  <janus@gcc.gnu.org>
1089
1090         PR fortran/41829
1091         * trans-expr.c (select_class_proc): Remove function.
1092         (conv_function_val): Delete reference to previous.
1093         (gfc_conv_derived_to_class): Add second argument to the call to
1094         gfc_find_derived_vtab.
1095         (gfc_conv_structure): Exclude proc_pointer components when
1096         accessing $data field of class objects.
1097         (gfc_trans_assign_vtab_procs): New function.
1098         (gfc_trans_class_assign): Add second argument to the call to
1099         gfc_find_derived_vtab.
1100         * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
1101         implement holding off searching for the vptr derived type.
1102         (add_proc_component): New function.
1103         (add_proc_comps): New function.
1104         (add_procs_to_declared_vtab1): New function.
1105         (copy_vtab_proc_comps): New function.
1106         (add_procs_to_declared_vtab): New function.
1107         (void add_generic_specifics): New function.
1108         (add_generics_to_declared_vtab): New function.
1109         (gfc_find_derived_vtab): Add second argument to the call to
1110         gfc_find_derived_vtab. Add the calls to
1111         add_procs_to_declared_vtab and add_generics_to_declared_vtab.
1112         * decl.c (build_sym, build_struct): Use new arg in calls to
1113         gfc_build_class_symbol.
1114         * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
1115         definition of struct gfc_class_esym_list. Modify prototypes
1116         of gfc_build_class_symbol and gfc_find_derived_vtab.
1117         * trans-stmt.c (gfc_trans_allocate): Add second argument to the
1118         call to gfc_find_derived_vtab.
1119         * module.c : Add the vtype attribute.
1120         * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
1121         * resolve.c (resolve_typebound_generic_call): Add second arg
1122         to pass along the generic name for class methods.
1123         (resolve_typebound_call): The same.
1124         (resolve_compcall): Use the second arg to carry the generic
1125         name from the above. Remove the reference to class_esym.
1126         (check_members, check_class_members, resolve_class_esym,
1127         hash_value_expr): Remove functions.
1128         (resolve_class_compcall, resolve_class_typebound_call): Modify
1129         to use vtable rather than member by member calls.
1130         (gfc_resolve_expr): Modify second arg in call to
1131         resolve_compcall.
1132         (resolve_select_type): Add second arg in call to
1133         gfc_find_derived_vtab.
1134         (resolve_code): Add second arg in call resolve_typebound_call.
1135         (resolve_fl_derived): Exclude vtypes from check for late
1136         procedure definitions. Likewise for checking of explicit
1137         interface and checking of pass arg.
1138         * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
1139         calls to gfc_find_derived_vtab.
1140         * match.c (select_type_set_tmp): Use new arg in call to
1141         gfc_build_class_symbol.
1142         * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
1143         necessary.
1144         * parse.c (endType): Finish incomplete classes.
1145
1146 2010-04-28  Tobias Burnus  <burnus@net-b.de>
1147
1148         PR fortran/18918
1149         PR fortran/43919
1150         * simplify.c (simplify_cobound): Handle scalar coarrays.
1151
1152 2010-04-27  Tobias Burnus  <burnus@net-b.de>
1153
1154         * gfc-internals.texi: Update copyright year.
1155         * gfortran.texi: Ditto.
1156         * invoke.texi: Ditto.
1157
1158 2010-04-27  Tobias Burnus  <burnus@net-b.de>
1159
1160         PR fortran/18918
1161         * resolve.c (resolve_allocate_expr): Allow array coarrays.
1162         * trans-types.h (gfc_get_array_type_bounds): Update prototype.
1163         * trans-types.c (gfc_get_array_type_bounds,
1164         gfc_get_array_descriptor_base): Add corank argument.
1165         * trans-array.c (gfc_array_init_size): Handle corank.
1166         (gfc_trans_create_temp_array, gfc_array_allocate,
1167         gfc_conv_expr_descriptor): Add corank argument to call.
1168         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1169
1170 2010-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1171
1172         PR fortran/30073
1173         PR fortran/43793
1174         * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
1175         of mucking with a tree directly.
1176
1177 2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1178
1179         PR fortran/43832
1180         * io.c (gfc_match_open): Remove branch to syntax error. Add call to
1181         gfc_error with new error message.
1182
1183 2010-04-24  Paul Thomas  <pault@gcc.gnu.org>
1184
1185         PR fortran/43841
1186         PR fortran/43843
1187         * trans-expr.c (gfc_conv_expr): Supply an address expression for
1188         GFC_SS_REFERENCE.
1189         (gfc_conv_expr_reference): Call gfc_conv_expr and return for
1190         GFC_SS_REFERENCE.
1191         * trans-array.c (gfc_add_loop_ss_code): Store the value rather
1192         than the address of a GFC_SS_REFERENCE.
1193         * trans.h : Change comment on GFC_SS_REFERENCE. 
1194
1195 2010-04-22  Richard Guenther  <rguenther@suse.de>
1196
1197         PR fortran/43829
1198         * resolve.c (gfc_resolve_index): Wrap around ...
1199         (gfc_resolve_index_1): ... this.  Add parameter to allow
1200         any integer kind index type.
1201         (resolve_array_ref): Allow any integer kind for the start
1202         index of an array ref.
1203
1204 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
1205
1206         PR fortran/43836
1207         * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
1208         the decl.
1209
1210 2010-04-20  Harald Anlauf  <anlauf@gmx.de>
1211
1212         * intrinsic.c (sort_actual): Remove 'is' in error message.
1213
1214 2010-04-20  Paul Thomas  <pault@gcc.gnu.org>
1215
1216         PR fortran/43227
1217         * resolve.c (resolve_fl_derived): If a component character
1218         length has not been resolved, do so now.
1219         (resolve_symbol): The same as above for a symbol character
1220         length.
1221         * trans-decl.c (gfc_create_module_variable): A 'length' decl is
1222         not needed for a character valued, procedure pointer.
1223
1224         PR fortran/43266
1225         * resolve.c (ensure_not_abstract_walker): If 'overriding' is
1226         not found, return FAILURE rather than ICEing.
1227
1228 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
1229
1230         PR fortran/43339
1231         * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
1232         sequential loops private in the innermost containing task region.
1233
1234 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
1235
1236         * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
1237         to build_common_tree_nodes.
1238
1239 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
1240
1241         PR fortran/31538
1242         * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
1243         gfc_msg_bounds by using 'Array bound mismatch' directly.
1244         (gfc_trans_dummy_array_bias):  Remove the use of gfc_msg_bounds.  Reword
1245         error message to include the mismatch in the extent of array bound.
1246         * fortran/trans.c: Remove gfc_msg_bounds.  It is only used in one place.
1247         * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
1248
1249 2010-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1250
1251         * gfortran.texi: Update information on temporary file locations.
1252
1253 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
1254
1255         * trans-decl.c (gfc_build_qualified_array): Ensure
1256         ubound.N and lbound.N artificial variable names don't appear
1257         in debug info.
1258
1259 2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1260
1261         PR fortran/30073
1262         * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
1263         block of code.  Set name to the variable associated with the descriptor.
1264
1265 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
1266
1267         * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
1268         on VAR_DECL LBOUND and/or UBOUND, even for -O1.
1269
1270 2010-04-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1271
1272         * intrinsic.texi: Add the missing specific name of intrinsic
1273         procedure where the specific name is identical to the generic name.
1274         Fix inconsistent or mismatch in the argument names in intrinsic
1275         procedure descriptions.  Add the SCALAR allocatable description to
1276         ALLOCATED.
1277
1278 2010-04-14  Tobias Burnus  <burnus@net-b.de>
1279
1280         PR fortran/18918
1281         * array.c (gfc_find_array_ref): Handle codimensions.
1282         (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
1283         * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
1284         gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
1285         New functions.
1286         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
1287         GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
1288         GFC_ISYM_UCOBOUND.
1289         * intrinsic.h (add_functions): Add this_image, image_index,
1290         lcobound and ucobound intrinsics.
1291         * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
1292         gfc_check_image_index, gfc_check_this_image,
1293         gfc_simplify_image_index, gfc_simplify_lcobound,
1294         gfc_simplify_this_image, gfc_simplify_ucobound):
1295         New function prototypes.
1296         * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
1297         IMAGE_INDEX): Document new intrinsic functions.
1298         * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
1299         error fatal.
1300         * simplify.c (simplify_bound_dim): Handle coarrays.
1301         (simplify_bound): Update simplify_bound_dim call.
1302         (gfc_simplify_num_images): Add -fcoarray=none check.
1303         (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
1304         gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
1305
1306 2010-04-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1307
1308         PR fortran/43747
1309         * constructor.c: Fix typo in comment.
1310         * expr.c (find_array_section): Add check for max array limit.
1311
1312 2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>
1313
1314         PR bootstrap/31400
1315         * gfortranspec.c (lookup_option): Check for -static and return
1316         OPTION_static.
1317         (lang_specific_driver): Break when OPTION_static is discovered.
1318
1319 2010-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1320
1321         * array.c (extract_element): Restore function from trunk.
1322         (gfc_get_array_element): Restore function from trunk.
1323         (gfc_expand_constructor): Restore check against
1324         flag_max_array_constructor.
1325         * constructor.c (node_copy_and_append): Delete unused.
1326         * gfortran.h: Delete comment and extra include.
1327         * constructor.h: Bump copyright and clean up TODO comments.
1328         * resolve.c: Whitespace.
1329
1330 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1331
1332         * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
1333         with direct access access to elements. Adjusted prototype, fixed all
1334         callers.
1335         (gfc_simplify_dot_product): Removed duplicate check for zero-sized
1336         array.
1337         (gfc_simplify_matmul): Removed usage of ADVANCE macro.
1338         (gfc_simplify_spread): Removed workaround, directly insert elements
1339         at a given array position.
1340         (gfc_simplify_transpose): Likewise.
1341         (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
1342         function calls.
1343         (gfc_simplify_unpack): Likewise.
1344
1345 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1346
1347         * simplify.c (only_convert_cmplx_boz): Renamed to ...
1348         (convert_boz): ... this and moved to start of file.
1349         (gfc_simplify_abs): Whitespace fix.
1350         (gfc_simplify_acos): Whitespace fix.
1351         (gfc_simplify_acosh): Whitespace fix.
1352         (gfc_simplify_aint): Whitespace fix.
1353         (gfc_simplify_dint): Whitespace fix.
1354         (gfc_simplify_anint): Whitespace fix.
1355         (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
1356         (gfc_simplify_dnint): Whitespace fix.
1357         (gfc_simplify_asin): Whitespace fix.
1358         (gfc_simplify_asinh): Moved creation of result-expr out of switch.
1359         (gfc_simplify_atan): Likewise.
1360         (gfc_simplify_atanh): Whitespace fix.
1361         (gfc_simplify_atan2): Whitespace fix.
1362         (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
1363         (gfc_simplify_bessel_j1): Likewise.
1364         (gfc_simplify_bessel_jn): Likewise.
1365         (gfc_simplify_bessel_y0): Likewise.
1366         (gfc_simplify_bessel_y1): Likewise.
1367         (gfc_simplify_bessel_yn): Likewise.
1368         (gfc_simplify_ceiling): Reorderd statements.
1369         (simplify_cmplx): Use convert_boz(), check for constant arguments.
1370         Whitespace fix.
1371         (gfc_simplify_cmplx): Use correct default kind. Removed check for
1372         constant arguments.
1373         (gfc_simplify_complex): Replaced if-gate. Removed check for
1374         constant arguments.
1375         (gfc_simplify_conjg): Whitespace fix.
1376         (gfc_simplify_cos): Whitespace fix.
1377         (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
1378         (gfc_simplify_dcmplx): Removed check for constant arguments.
1379         (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
1380         (gfc_simplify_digits): Whitespace fix.
1381         (gfc_simplify_dim): Whitespace fix.
1382         (gfc_simplify_dprod): Reordered statements.
1383         (gfc_simplify_erf): Whitespace fix.
1384         (gfc_simplify_erfc): Whitespace fix.
1385         (gfc_simplify_epsilon): Whitespace fix.
1386         (gfc_simplify_exp): Whitespace fix.
1387         (gfc_simplify_exponent): Use convert_boz().
1388         (gfc_simplify_floor): Reorderd statements.
1389         (gfc_simplify_gamma): Whitespace fix.
1390         (gfc_simplify_huge): Whitespace fix.
1391         (gfc_simplify_iand): Whitespace fix.
1392         (gfc_simplify_ieor): Whitespace fix.
1393         (simplify_intconv): Use gfc_convert_constant().
1394         (gfc_simplify_int): Use simplify_intconv().
1395         (gfc_simplify_int2): Reorderd statements.
1396         (gfc_simplify_idint): Reorderd statements.
1397         (gfc_simplify_ior): Whitespace fix.
1398         (gfc_simplify_ishftc): Removed duplicate type check.
1399         (gfc_simplify_len): Use range_check() instead of manual range check.
1400         (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
1401         (gfc_simplify_log): Whitespace fix.
1402         (gfc_simplify_log10): Whitespace fix.
1403         (gfc_simplify_minval): Whitespace fix.
1404         (gfc_simplify_maxval): Whitespace fix.
1405         (gfc_simplify_mod): Whitespace fix.
1406         (gfc_simplify_modulo): Whitespace fix.
1407         (simplify_nint): Reorderd statements.
1408         (gfc_simplify_not): Whitespace fix.
1409         (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
1410         (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
1411         (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
1412         (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
1413         (gfc_simplify_realpart): Whitespace fix.
1414         (gfc_simplify_selected_char_kind): Removed unused result-variable.
1415         (gfc_simplify_selected_int_kind): Removed unused result-variable.
1416         (gfc_simplify_selected_real_kind): Removed unused result-variable.
1417         (gfc_simplify_sign): Whitespace fix.
1418         (gfc_simplify_sin): Whitespace fix.
1419         (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
1420         (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
1421         (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
1422         (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
1423         (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
1424
1425 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1426
1427         * gfortran.h (gfc_start_constructor): Removed.
1428         (gfc_get_array_element): Removed.
1429         * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr 
1430         instead. Fixed all callers.
1431         (extract_element): Removed.
1432         (gfc_expand_constructor): Temporarily removed check for
1433         max-array-constructor. Will be re-introduced later if still required.
1434         (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
1435         instead. Fixed all callers.
1436         * expr.c (find_array_section): Replaced manual lookup of elements
1437         by gfc_constructor_lookup.
1438
1439 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1440
1441         * gfortran.h (gfc_get_null_expr): New prototype.
1442         (gfc_get_operator_expr): New prototype.
1443         (gfc_get_character_expr): New prototype.
1444         (gfc_get_iokind_expr): New prototype.
1445         * expr.c (gfc_get_null_expr): New.
1446         (gfc_get_character_expr): New.
1447         (gfc_get_iokind_expr): New.
1448         (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
1449         * matchexp.c (build_node): Renamed and moved to
1450         expr.c (gfc_get_operator_expr). Reordered arguments to match 
1451         other functions. Fixed all callers.
1452         (gfc_get_parentheses): Use specific function to build expr.
1453         * array.c (gfc_match_array_constructor): Likewise.
1454         * arith.c (eval_intrinsic): Likewise.
1455         (gfc_hollerith2int): Likewise.
1456         (gfc_hollerith2real): Likewise.
1457         (gfc_hollerith2complex): Likewise.
1458         (gfc_hollerith2logical): Likewise.
1459         * data.c (create_character_intializer): Likewise.
1460         * decl.c (gfc_match_null): Likewise.
1461         (enum_initializer): Likewise.
1462         * io.c (gfc_match_format): Likewise.
1463         (match_io): Likewise.
1464         * match.c (gfc_match_nullify): Likewise.
1465         * primary.c (match_string_constant): Likewise.
1466         (match_logical_constant): Likewise.
1467         (build_actual_constructor): Likewise.
1468         * resolve.c (build_default_init_expr): Likewise.
1469         * symbol.c (generate_isocbinding_symbol): Likewise.
1470         (gfc_build_class_symbol): Likewise.
1471         (gfc_find_derived_vtab): Likewise.
1472         * simplify.c (simplify_achar_char): Likewise.
1473         (gfc_simplify_adjustl): Likewise.
1474         (gfc_simplify_adjustr): Likewise.
1475         (gfc_simplify_and): Likewise.
1476         (gfc_simplify_bit_size): Likewise.
1477         (gfc_simplify_is_iostat_end): Likewise.
1478         (gfc_simplify_is_iostat_eor): Likewise.
1479         (gfc_simplify_isnan): Likewise.
1480         (simplify_bound): Likewise.
1481         (gfc_simplify_leadz): Likewise.
1482         (gfc_simplify_len_trim): Likewise.
1483         (gfc_simplify_logical): Likewise.
1484         (gfc_simplify_maxexponent): Likewise.
1485         (gfc_simplify_minexponent): Likewise.
1486         (gfc_simplify_new_line): Likewise.
1487         (gfc_simplify_null): Likewise.
1488         (gfc_simplify_or): Likewise.
1489         (gfc_simplify_precision): Likewise.
1490         (gfc_simplify_repeat): Likewise.
1491         (gfc_simplify_scan): Likewise.
1492         (gfc_simplify_size): Likewise.
1493         (gfc_simplify_trailz): Likewise.
1494         (gfc_simplify_trim): Likewise.
1495         (gfc_simplify_verify): Likewise.
1496         (gfc_simplify_xor): Likewise.
1497         * trans-io.c (build_dt): Likewise.
1498         (gfc_new_nml_name_expr): Removed.
1499
1500 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1501
1502         * arith.h (gfc_constant_result): Removed prototype.
1503         * constructor.h (gfc_build_array_expr): Removed prototype.
1504         (gfc_build_structure_constructor_expr): Removed prototype.
1505         * gfortran.h (gfc_int_expr): Removed prototype.
1506         (gfc_logical_expr): Removed prototype.
1507         (gfc_get_array_expr): New prototype.
1508         (gfc_get_structure_constructor_expr): New prototype.
1509         (gfc_get_constant_expr): New prototype.
1510         (gfc_get_int_expr): New prototype.
1511         (gfc_get_logical_expr): New prototype.
1512         * arith.c (gfc_constant_result): Moved and renamed to
1513         expr.c (gfc_get_constant_expr). Fixed all callers.
1514         * constructor.c (gfc_build_array_expr): Moved and renamed to
1515         expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
1516         and kind. Fixed all callers.
1517         (gfc_build_structure_constructor_expr): Moved and renamed to
1518         expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
1519         to type and kind. Fixed all callers.
1520         * expr.c (gfc_logical_expr): Renamed to ...
1521         (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
1522         (gfc_int_expr): Renamed to ...
1523         (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
1524         callers.
1525         (gfc_get_constant_expr): New.
1526         (gfc_get_array_expr): New.
1527         (gfc_get_structure_constructor_expr): New.
1528         * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
1529         instead.
1530
1531 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
1532
1533         * constructor.h: New.
1534         * constructor.c: New.
1535         * Make-lang.in: Add new files to F95_PARSER_OBJS.
1536         * arith.c (reducy_unary): Use constructor API.
1537         (reduce_binary_ac): Likewise.
1538         (reduce_binary_ca): Likewise.
1539         (reduce_binary_aa): Likewise.
1540         * check.c (gfc_check_pack): Likewise.
1541         (gfc_check_reshape): Likewise.
1542         (gfc_check_unpack): Likewise.
1543         * decl.c (add_init_expr_to_sym): Likewise.
1544         (build_struct): Likewise.
1545         * dependency.c (gfc_check_dependency): Likewise.
1546         (contains_forall_index_p): Likewise.
1547         * dump-parse-tree.c (show_constructor): Likewise.
1548         * expr.c (free_expr0): Likewise.
1549         (gfc_copy_expr): Likewise.
1550         (gfc_is_constant_expr): Likewise.
1551         (simplify_constructor): Likewise.
1552         (find_array_element): Likewise.
1553         (find_component_ref): Likewise.
1554         (find_array_section): Likewise.
1555         (find_substring_ref): Likewise.
1556         (simplify_const_ref): Likewise.
1557         (scalarize_intrinsic_call): Likewise.
1558         (check_alloc_comp_init): Likewise.
1559         (gfc_default_initializer): Likewise.
1560         (gfc_traverse_expr): Likewise.
1561         * iresolve.c (check_charlen_present): Likewise.
1562         (gfc_resolve_reshape): Likewise.
1563         (gfc_resolve_transfer): Likewise.
1564         * module.c (mio_constructor): Likewise.
1565         * primary.c (build_actual_constructor): Likewise.
1566         (gfc_match_structure_constructor): Likewise.
1567         * resolve.c (resolve_structure_cons): Likewise.
1568         * simplify.c (is_constant_array_expr): Likewise.
1569         (init_result_expr): Likewise.
1570         (transformational_result): Likewise.
1571         (simplify_transformation_to_scalar): Likewise.
1572         (simplify_transformation_to_array): Likewise.
1573         (gfc_simplify_dot_product): Likewise.
1574         (simplify_bound): Likewise.
1575         (simplify_matmul): Likewise.
1576         (simplify_minval_maxval): Likewise.
1577         (gfc_simplify_pack): Likewise.
1578         (gfc_simplify_reshape): Likewise.
1579         (gfc_simplify_shape): Likewise.
1580         (gfc_simplify_spread): Likewise.
1581         (gfc_simplify_transpose): Likewise.
1582         (gfc_simplify_unpack): Likewise.q
1583         (gfc_convert_constant): Likewise.
1584         (gfc_convert_char_constant): Likewise.
1585         * target-memory.c (size_array): Likewise.
1586         (encode_array): Likewise.
1587         (encode_derived): Likewise.
1588         (interpret_array): Likewise.
1589         (gfc_interpret_derived): Likewise.
1590         (expr_to_char): Likewise.
1591         (gfc_merge_initializers): Likewise.
1592         * trans-array.c (gfc_get_array_constructor_size): Likewise.
1593         (gfc_trans_array_constructor_value): Likewise.
1594         (get_array_ctor_strlen): Likewise.
1595         (gfc_constant_array_constructor_p): Likewise.
1596         (gfc_build_constant_array_constructor): Likewise.
1597         (gfc_trans_array_constructor): Likewise.
1598         (gfc_conv_array_initializer): Likewise.
1599         * trans-decl.c (check_constant_initializer): Likewise.
1600         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1601         (gfc_apply_interface_mapping_to_cons): Likewise.
1602         (gfc_trans_structure_assign): Likewise.
1603         (gfc_conv_structure): Likewise.
1604         * array.c (check_duplicate_iterator): Likewise.
1605         (match_array_list): Likewise.
1606         (match_array_cons_element): Likewise.
1607         (gfc_match_array_constructor): Likewise.
1608         (check_constructor_type): Likewise.
1609         (check_constructor): Likewise.
1610         (expand): Likewise.
1611         (expand_constructor): Likewise.
1612         (extract_element): Likewise.
1613         (gfc_expanded_ac): Likewise.
1614         (resolve_array_list): Likewise.
1615         (gfc_resolve_character_array_constructor): Likewise.
1616         (copy_iterator): Renamed to ...
1617         (gfc_copy_iterator): ... this.
1618         (gfc_append_constructor): Removed.
1619         (gfc_insert_constructor): Removed unused function.
1620         (gfc_get_constructor): Removed.
1621         (gfc_free_constructor): Removed.
1622         (qgfc_copy_constructor): Removed.
1623         * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
1624         Removed all references. Replaced constructor list by splay-tree.
1625         (struct gfc_constructor): Removed member 'next', moved 'offset' from
1626         the inner struct, added member 'base'.
1627         (gfc_append_constructor): Removed prototype.
1628         (gfc_insert_constructor): Removed prototype.
1629         (gfc_get_constructor): Removed prototype.
1630         (gfc_free_constructor): Removed prototype.
1631         (qgfc_copy_constructor): Removed prototype.
1632         (gfc_copy_iterator): New prototype.
1633         * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
1634
1635 2010-04-10  Tobias Burnus  <burnus@net-b.de>
1636
1637         PR fortran/43591
1638         * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
1639         proc-pointers and type-bound procedures.
1640         (gfc_specification_expr): Check proc-pointers for pureness.
1641
1642 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
1643
1644         PR bootstrap/43684
1645         * gfortranspec.c (lang_specific_driver): Do not expose vars 
1646         only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
1647         for such.
1648
1649 2010-04-09  Tobias Burnus  <burnus@net-b.de>
1650
1651         PR fortran/18918
1652         * decl.c (variable_decl, match_attr_spec): Fix setting the array
1653         spec.
1654         * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
1655         * data.c (gfc_assign_data_value): Ditto.
1656         * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
1657         (gfc_traverse_expr): Traverse also through codimension expressions.
1658         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1659         gfc_has_ultimate_pointer): New functions.
1660         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
1661         (gfc_array_ref): Add codimen.
1662         (gfc_array_ref): Add in_allocate.
1663         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1664         gfc_has_ultimate_pointer): Add prototypes.
1665         * interface.c (compare_parameter, compare_actual_formal,
1666         check_intents): Add coarray constraints.
1667         * match.c (gfc_match_iterator): Add coarray constraint.
1668         * match.h (gfc_match_array_ref): Update interface.
1669         * primary.c (gfc_match_varspec): Handle codimensions.
1670         * resolve.c (coarray_alloc, inquiry_argument): New static variables.
1671         (check_class_members): Return gfc_try instead for error recovery.
1672         (resolve_typebound_function,resolve_typebound_subroutine,
1673         check_members): Handle return value of check_class_members.
1674         (resolve_structure_cons, resolve_actual_arglist, resolve_function,
1675         check_dimension, compare_spec_to_ref, resolve_array_ref,
1676         resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
1677         resolve_allocate_expr, resolve_ordinary_assign): Add coarray
1678         support.
1679         * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
1680         Skip over coarray refs.
1681         (gfc_array_allocate) Add support for references containing coindexes.
1682         * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
1683         (gfc_map_intrinsic_function): Ignore codimensions.
1684
1685 2010-04-08  Bud Davis  <bdavis9659@sbcglobal.net>
1686
1687         PR fortran/28039
1688         * io.c (check_format_string):  Added check for additional non 
1689         blank characters after the format string was successfully 
1690         parsed.
1691         * io.c (check_format): Changed the error messages for positive
1692         int required and period required to drop through the error logic
1693         and report with gfc_error instead of gfc_error_now.  Corrected
1694         format postion for hollerith strings.
1695
1696 2010-04-08  Tobias Burnus  <burnus@net-b.de>
1697
1698         * module.c (use_iso_fortran_env_module): Fix standard check.
1699
1700 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1701
1702         * parse.c (parse_derived, parse_enum): Avoid set but not used
1703         warning.
1704
1705 2010-04-07  Janne Blomqvist  <jb@gcc.gnu.org>
1706
1707         PR fortran/40539
1708         * gfortran.texi: Add section about representation of
1709         LOGICAL variables.
1710
1711 2010-04-07  Simon Baldwin  <simonb@google.com>
1712
1713         * cpp.c (cb_cpp_error): Add warning reason argument, set a value
1714         for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
1715
1716 2010-04-07  Richard Guenther  <rguenther@suse.de>
1717
1718         * options.c (gfc_init_options): Do not set.
1719
1720 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1721
1722         PR fortran/18918
1723         * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
1724         * match.c (gfc_match_critical, sync_statement): Ditto.
1725         * gfortran.h (gfc_fcoarray): New enum.
1726         (gfc_option_t): Use it.
1727         * lang.opt (fcoarray): Add new flag.
1728         * invoke.texi (fcoarray): Document it.
1729         * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
1730         (gfc_handle_coarray_option): New function.
1731
1732 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1733
1734         PR fortran/18918
1735         * gfortran.h (gfc_array_spec): Add cotype.
1736         * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
1737         and defer error diagnostic.
1738         * resolve.c (resolve_fl_derived): Add missing check.
1739         (resolve_symbol): Add cotype/type check.
1740         * parse.c (parse_derived): Fix setting of coarray_comp.
1741
1742 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1743
1744         PR fortran/18918
1745         * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
1746         match_array_element_spec,gfc_copy_array_spec,
1747         gfc_compare_array_spec): Include corank.
1748         (match_array_element_spec,gfc_set_array_spec): Support codimension.
1749         * decl.c (build_sym,build_struct,variable_decl,
1750         match_attr_spec,attr_decl1,cray_pointer_decl,
1751         gfc_match_volatile): Add codimension.
1752         (gfc_match_codimension): New function.
1753         * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
1754         * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
1755         (gfc_add_codimension): New function prototype.
1756         * match.h (gfc_match_codimension): New function prototype.
1757         (gfc_match_array_spec): Update prototype
1758         * match.c (gfc_match_common): Update gfc_match_array_spec call.
1759         * module.c (MOD_VERSION): Bump.
1760         (mio_symbol_attribute): Support coarray attributes.
1761         (mio_array_spec): Add corank support.
1762         * parse.c (decode_specification_statement,decode_statement,
1763         parse_derived): Add coarray support.
1764         * resolve.c (resolve_formal_arglist, was_declared,
1765         is_non_constant_shape_array, resolve_fl_variable,
1766         resolve_fl_derived, resolve_symbol): Add coarray support.
1767         * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
1768         gfc_build_class_symbol): Add coarray support.
1769         (gfc_add_codimension): New function.
1770
1771 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1772
1773         PR fortran/18918
1774         * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
1775         atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
1776         stat_locked_other_image, stat_stopped_image and stat_unlocked of
1777         Fortran 2008.
1778         * intrinsic.texi (iso_fortran_env): Ditto.
1779         * libgfortran.h (libgfortran_stat_codes): New enum.
1780         * module.c (use_iso_fortran_env_module): Honour -std= when loading
1781         constants from the intrinsic module.
1782
1783 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1784
1785         PR fortran/39997
1786         * intrinsic.c (add_functions): Add num_images.
1787         * decl.c (gfc_match_end): Handle END CRITICAL.
1788         * intrinsic.h (gfc_simplify_num_images): Add prototype.
1789         * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
1790         and SYNC.
1791         * gfortran.h (gfc_statement): Add enum items for those.
1792         (gfc_exec_op) Ditto.
1793         (gfc_isym_id): Add num_images.
1794         * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
1795         (gfc_trans_sync,gfc_trans_critical): New functions.
1796         * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
1797         gfc_trans_critical): Add/update prototypes.
1798         * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
1799         and SYNC statements.
1800         * trans.h (gfor_fndecl_error_stop_string) Add variable.
1801         * resolve.c (resolve_sync): Add function.
1802         (gfc_resolve_blocks): Handle CRITICAL.
1803         (resolve_code): Handle CRITICAL, ERROR STOP,
1804         (resolve_branch): Add CRITICAL constraint check.
1805         and SYNC statements.
1806         * st.c (gfc_free_statement): Add new statements.
1807         * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
1808         (gfc_build_builtin_function_decls): Initialize it.
1809         * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
1810         (gfc_match_critical, gfc_match_error_stop, sync_statement,
1811         gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
1812         New functions.
1813         (match_exit_cycle): Handle CRITICAL constraint.
1814         (gfc_match_stopcode): Handle ERROR STOP.
1815         * match.h (gfc_match_critical, gfc_match_error_stop,
1816         gfc_match_sync_all, gfc_match_sync_images,
1817         gfc_match_sync_memory): Add prototype.
1818         * parse.c (decode_statement, gfc_ascii_statement,
1819         parse_executable): Handle new statements.
1820         (parse_critical_block): New function.
1821         * parse.h (gfc_compile_state): Add COMP_CRITICAL.
1822         * intrinsic.texi (num_images): Document new function.
1823         * simplify.c (gfc_simplify_num_images): Add function.
1824
1825 2010-04-06  Tobias Burnus  <burnus@net-b.de>
1826
1827         PR fortran/43178
1828         * trans-array.c (gfc_conv_expr_descriptor): Update
1829         gfc_trans_scalar_assign call.
1830         (has_default_initializer): New function.
1831         (gfc_trans_deferred_array): Nullify less often.
1832         * trans-expr.c (gfc_conv_subref_array_arg,
1833         gfc_trans_subcomponent_assign): Update call to
1834         gfc_trans_scalar_assign.
1835         (gfc_trans_scalar_assign): Add parameter and pass it on.
1836         (gfc_trans_assignment_1): Optionally, do not dealloc before
1837         assignment.
1838         * trans-openmp.c (gfc_trans_omp_array_reduction): Update
1839         call to gfc_trans_scalar_assign.
1840         * trans-decl.c (gfc_get_symbol_decl): Do not always apply
1841         initializer to static variables.
1842         (gfc_init_default_dt): Add dealloc parameter and pass it on.
1843         * trans-stmt.c (forall_make_variable_temp,
1844         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1845         gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
1846         gfc_trans_allocate): Update gfc_trans_assignment call.
1847         * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
1848         gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
1849         parameter to prototype.
1850
1851 2010-03-31  Paul Thomas  <pault@gcc.gnu.org>
1852
1853         * ioparm.def : Update copyright.
1854         * lang.opt : ditto
1855         * trans-array.c : ditto
1856         * trans-array.h : ditto
1857         * expr.c: ditto
1858         * trans-types.c: ditto
1859         * dependency.c : ditto
1860         * gfortran.h : ditto
1861         * options.c : ditto
1862         * trans-io.c : ditto
1863         * trans-intrinsic.c : ditto
1864         * libgfortran.h : ditto
1865         * invoke.texi : ditto
1866         * intrinsic.texi : ditto
1867         * trans.c : ditto
1868         * trans.h : ditto
1869         * intrinsic.c : ditto
1870         * interface.c : ditto
1871         * iresolve.c : ditto
1872         * trans-stmt.c : ditto
1873         * trans-stmt.h : ditto
1874         * parse,c : ditto
1875         * match.h : ditto
1876         * error.c : ditto
1877
1878 2010-03-20  Paul Thomas  <pault@gcc.gnu.org>
1879
1880         PR fortran/43450
1881         * trans-decl.c (gfc_create_module_variable): With -fwhole-file
1882         do not assert the context of derived types.
1883
1884 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1885
1886         PR fortran/43409
1887         * ioparm.def: Change inquire size variable to type pointer to
1888         GFC_IO_INT type.
1889
1890 2010-03-18  Paul Thomas  <pault@gcc.gnu.org>
1891
1892         PR fortran/43039
1893         * trans-expr.c (conv_parent_component_references): Ensure that
1894         'dt' has a backend_decl.
1895
1896         PR fortran/43043
1897         * trans-expr.c (gfc_conv_structure): Ensure that the derived
1898         type has a backend_decl.
1899
1900         PR fortran/43044
1901         * resolve.c (resolve_global_procedure): Check that the 'cl'
1902         structure is not NULL.
1903
1904 2010-03-18  Shujing Zhao  <pearly.zhao@oracle.com>
1905
1906         * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
1907         redundant tab.
1908
1909 2010-03-17  Tobias Burnus  <burnus@net-b.de>
1910
1911         PR fortran/43331
1912         * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
1913         gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
1914         check.
1915         * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
1916         pointees as having explizit size.
1917         * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
1918         check.
1919         * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
1920         (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
1921         * resolve.c (resolve_symbol): Handle cp_was_assumed.
1922         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
1923         (gfc_finish_var_decl): Don't mark Cray pointees as restricted
1924         pointers.
1925
1926 2010-03-14  Tobias Burnus  <burnus@net-b.de>
1927
1928         PR fortran/43362
1929         * resolve.c (resolve_structure_cons): Add missing PURE constraint.
1930         (resolve_ordinary_assign): Add check to avoid segfault.
1931
1932 2010-03-12  Paul Thomas  <pault@gcc.gnu.org>
1933
1934         PR fortran/43291
1935         PR fortran/43326
1936         * resolve.c (resolve_compcall): Add new boolean dummy argument
1937         'class_members'. Only resolve expression at end if false.
1938         Remove redundant, static variable 'class_object'.
1939         (check_class_members): Add extra argument to call of
1940         resolve_compcall.
1941         (resolve_typebound_function): Renamed resolve_class_compcall.
1942         Do all the detection of class references here. Correct calls to
1943         resolve_compcall for extra argument.
1944         (resolve_typebound_subroutine): resolve_class_typebound_call
1945         renamed. Otherwise same as resolve_typebound_function.
1946         (gfc_resolve_expr): Call resolve_typebound_function.
1947         (resolve_code): Call resolve_typebound_subroutine.
1948
1949 2010-03-10  Tobias Burnus  <burnus@net-b.de
1950
1951         PR fortran/43303
1952         * symbol.c (get_iso_c_sym): Set sym->result.
1953
1954 2010-03-08  Janus Weil  <janus@gcc.gnu.org>
1955
1956         PR fortran/43256
1957         * resolve.c (resolve_compcall): Don't set 'value.function.name' here
1958         for TBPs, otherwise they will not be resolved properly.
1959         (resolve_function): Use 'value.function.esym' instead of
1960         'value.function.name' to check if we're dealing with a TBP.
1961         (check_class_members): Set correct type of passed object for all TBPs,
1962         not only generic ones, except if the type is abstract.
1963
1964 2010-03-04  Janus Weil  <janus@gcc.gnu.org>
1965
1966         PR fortran/43244
1967         * decl.c (gfc_match_final_decl): Make sure variable names starting with
1968         'final...' are not misinterpreted as FINAL statements.
1969
1970 2010-03-03  Paul Thomas  <pault@gcc.gnu.org>
1971
1972         PR fortran/43243
1973         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1974         allocatable ultimate components do not need temporaries, whilst
1975         ultimate pointer components do.
1976
1977 2010-03-03  Janus Weil  <janus@gcc.gnu.org>
1978
1979         PR fortran/43169
1980         * resolve.c (resolve_code): Correctly set gfc_current_ns for
1981         EXEC_SELECT_TYPE.
1982         (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
1983         (gfc_pure): Ditto.
1984
1985 2010-03-02  Paul Thomas  <pault@gcc.gnu.org>
1986
1987         PR fortran/43180
1988         * trans-array.c (gfc_conv_array_parameter): A full array of
1989         derived type need not be restricted to a symbol without an
1990         array spec to use the call to gfc_conv_expr_descriptor.
1991
1992         PR fortran/43173
1993         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1994         allocatable arrays do not need temporaries.
1995
1996 2010-03-01  Tobias Burnus  <burnus@net-b.de>
1997
1998         PR fortran/43199
1999         * resolve.c (find_array_spec): Handle REF_COMPONENT with
2000         CLASS components.
2001
2002 2010-02-28  Tobias Burnus  <burnus@net-b.de>
2003
2004         PR fortran/43205
2005         * trans-expr.c (is_zero_initializer_p): Move up in the file.
2006         (gfc_conv_initializer): Handle zero initializer as special case.
2007
2008 2010-02-27  Tobias Burnus  <burnus@net-b.de>
2009
2010         PR fortran/43185
2011         * resolve.c (resolve_fl_variable_derived): Imply SAVE
2012         for module variables for Fortran 2008.
2013
2014 2010-02-25  Jakub Jelinek  <jakub@redhat.com>
2015
2016         PR debug/43166
2017         * trans-common.c (build_common_decl): Also update DECL_MODE,
2018         and DECL_SIZE when encountering a larger common block and call
2019         layout_decl.
2020
2021 2010-02-24  Tobias Burnus  <burnus@net-b.de>
2022
2023         PR fortran/43042
2024         * trans-expr.c (gfc_conv_initializer): Call directly
2025         gfc_conv_constant for C_NULL_(FUN)PTR.
2026
2027 2010-02-22  Paul Thomas  <pault@gcc.gnu.org>
2028
2029         PR fortran/43072
2030         * dependency.c (gfc_full_array_ref_p): Check for contiguous by
2031         checking the rest of the dimensions for elements.
2032
2033 2010-02-21  Tobias Burnus  <burnus@net-b.de>
2034
2035         PR fortran/35259
2036         * gfortran.h (gfc_option_t): New flag -fprotect-parens.
2037         * lang.opt: Ditto.
2038         * option.c (gfc_init_options,gfc_handle_option): Ditto.
2039         * trans-expr.c (gfc_conv_expr_op): Use the flag.
2040         * invoke.texi: Document new -fno-protect-parens flag.
2041
2042 2010-02-20  Paul Thomas  <pault@gcc.gnu.org>
2043
2044         PR fortran/36932
2045         PR fortran/36933
2046         PR fortran/43072
2047         PR fortran/43111
2048         * dependency.c (gfc_check_argument_var_dependency): Use enum
2049         value instead of arithmetic vaue for 'elemental'.
2050         (check_data_pointer_types): New function.
2051         (gfc_check_dependency): Call check_data_pointer_types.
2052         * trans-array.h : Change fourth argument of
2053         gfc_conv_array_parameter to boolean.
2054         * trans-array.c (gfc_conv_array_parameter): A contiguous array
2055         can be a dummy but it must not be assumed shape or deferred.
2056         Change fourth argument to boolean. Array constructor exprs will
2057         always be contiguous and do not need packing and unpacking.
2058         * trans-expr.c (gfc_conv_procedure_call): Clean up some white
2059         space and change fourth argument of gfc_conv_array_parameter
2060         to boolean.
2061         (gfc_trans_arrayfunc_assign): Change fourth argument of
2062         gfc_conv_array_parameter to boolean.
2063         * trans-io.c (gfc_convert_array_to_string): The same.
2064         * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
2065
2066 2010-02-20  Tobias Burnus  <burnus@net-b.de>
2067
2068         PR fortran/42958
2069         * libgfortran.h: Add GFC_RTCHECK_MEM.
2070         * invoke.texi (-fcheck=): Document -fcheck=mem.
2071         * tranc.c (gfc_call_malloc): Remove negative-size run-time error
2072         and enable malloc-success check only with -fcheck=mem.
2073         * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
2074
2075 2010-02-16  Tobias Burnus  <burnus@net-b.de>
2076
2077         PR fortran/43040
2078         * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
2079         * intrinsic.c (add_functions): Ditto.
2080         * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
2081         * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
2082
2083 2010-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2084
2085         PR fortran/32382
2086         * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
2087         gfc_trans_do prototype.
2088         * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
2089         a loop exit condition.  If exit condition is given, build the loop exit
2090         code, checking IO results of implied do loops in READ and WRITE.
2091         (gfc_trans_do): Likewise.
2092         * trans.c (trans_code): New static work function, previously
2093         gfc_trans_code. Passes exit condition to gfc_trans_do.
2094         (gfc_trans_code): Calls trans_code with NULL_TREE condition.
2095         (gfc_trans_code_cond): Calls trans_code with loop exit condition.
2096         * trans-io.c (build_dt): Build an exit condition to allow checking IO
2097         result status bits in the dtparm structure. Use this condition in call
2098         to gfc_trans_code_cond.
2099
2100 2010-02-13  Paul Thomas  <pault@gcc.gnu.org>
2101
2102         PR fortran/41113
2103         PR fortran/41117
2104         * trans-array.c (gfc_conv_array_parameter): Use
2105         gfc_full_array_ref_p to detect full and contiguous variable
2106         arrays. Full array components and contiguous arrays do not need
2107         internal_pack and internal_unpack.
2108
2109 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
2110
2111         PR fortran/43030
2112         * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
2113
2114         PR fortran/43029
2115         * decl.c (enumerator_decl): Don't call gfc_free_enum_history
2116         here.
2117         (gfc_match_enumerator_def): But here whenever enumerator_decl returns
2118         MATCH_ERROR.
2119
2120 2010-02-10  Joost VandeVondele <jv244@cam.ac.uk>
2121             Tobias Burnus <burnus@net-b.de>
2122
2123         PR fortran/40823
2124         * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
2125
2126 2010-02-10  Tobias Burnus  <burnus@net-b.de>
2127
2128         PR fortran/43015
2129         * trans-decl.c (gfc_generate_function_code): Only check
2130         actual-vs.-dummy character bounds if not bind(C).
2131
2132 2010-02-10  Jakub Jelinek  <jakub@redhat.com>
2133
2134         PR fortran/42309
2135         * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
2136         info->dimen after info has been freed.
2137
2138 2010-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2139
2140         PR fortran/42999
2141         * array.c (gfc_constant_ac): Do not prevent expansion of constructors
2142         with iterators.
2143
2144 2010-02-09  Jakub Jelinek  <jakub@redhat.com>
2145
2146         * module.c (fix_mio_expr): Declare sym.
2147
2148 2010-02-09  Paul Thomas  <pault@gcc.gnu.org>
2149
2150         PR fortran/41869
2151         * module.c (fix_mio_expr): Fix for private generic procedures.
2152
2153 2010-02-09  Daniel Kraft  <d@domob.eu>
2154
2155         PR fortran/39171
2156         * resolve.c (resolve_charlen): Change warning about negative CHARACTER
2157         length to be correct and issue only with -Wsurprising.
2158         * invoke.texi (Wsurprising): Mention this new warning that is
2159         turned on by -Wsurprising.
2160
2161 2010-02-09  Daniel Kraft  <d@domob.eu>
2162
2163         PR fortran/41507
2164         * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
2165         can be CHARACTER type.
2166         (MINVAL), (MAXLOC), (MINLOC): Ditto.
2167
2168 2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
2169
2170         PR fortran/42309
2171         * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
2172         'formal_ptr'. If this is true, give returned descriptor unity
2173         lbounds, in all dimensions, and the appropriate offset.
2174         (gfc_conv_procedure_call); If formal is a pointer, set the last
2175         argument of gfc_conv_subref_array_arg to true.
2176         * trans.h : Add last argument for gfc_conv_subref_array_arg.
2177         * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
2178         new arg of gfc_conv_subref_array_arg to false.
2179         * trans-stmt.c (forall_make_variable_temp): The same.
2180
2181 2010-02-03  Tobias Burnus  <burnus@net-b.de>
2182
2183         PR fortran/42936
2184         * interface.c (compare_parameter): Disable rank-checking
2185         for NULL().
2186
2187 2010-02-02  Tobias Burnus  <burnus@net-b.de>
2188
2189         PR fortran/42650
2190         * parse.c (decode_specification_statement): Use sym->result not sym.
2191
2192 2010-02-01  Tobias Burnus  <burnus@net-b.de>
2193
2194         PR fortran/42922
2195         * decl.c (variable_decl): Allow default initializer in
2196         TYPE declarations in PURE functions.
2197
2198 2010-01-31  Janus Weil  <janus@gcc.gnu.org>
2199
2200         PR fortran/42888
2201         * resolve.c (resolve_allocate_expr): Move default initialization code
2202         here from gfc_trans_allocate.
2203         * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
2204         EXEC_INIT_ASSIGN.
2205         * trans-expr.c (gfc_trans_class_assign): Handle default initialization
2206         of CLASS variables via memcpy.
2207         * trans-stmt.c (gfc_trans_allocate): Move default initialization code
2208         to resolve_allocate_expr.
2209
2210 2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
2211
2212         PR fortran/38324
2213         * expr.c (gfc_get_full_arrayspec_from_expr): New function.
2214         * gfortran.h : Add prototype for above.
2215         * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
2216         (gfc_trans_subcomponent_assign): Call new function to replace
2217         the code to deal with allocatable components.
2218         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
2219         gfc_get_full_arrayspec_from_expr to replace existing code.
2220
2221 2010-01-25  Tobias Burnus  <burnus@net-b.de>
2222
2223         PR fortran/42858
2224         * array.c (gfc_array_dimen_size): Fix intrinsic procedure
2225         check.
2226
2227 2010-01-24  Paul Thomas  <pault@gcc.gnu.org>
2228
2229         PR fortran/41044
2230         PR fortran/41167
2231         * expr.c (remove_subobject_ref): If the constructor is NULL use
2232         the expression as the source.
2233         (simplify_const_ref): Change the type of expression if
2234         there are component references.  Allow for substring to be at
2235         the end of an arbitrarily long chain of references.  If an
2236         element is found that is not in an EXPR_ARRAY, assume that this
2237         is scalar initialization of array. Call remove_subobject_ref in
2238         this case with NULL second argument.
2239
2240 2010-01-24  Tobias Burnus  <burnus@net-b.de>
2241
2242         PR fortran/39304
2243         * array.c (gfc_array_dimen_size): Use correct specific
2244         function in the check.
2245
2246 2010-01-21  Paul Thomas  <pault@gcc.gnu.org>
2247
2248         PR fortran/42736
2249         * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
2250         is required, turn any trailing array elements after a range
2251         into ranges so that offsets can be calculated.
2252
2253 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
2254
2255         * module.c (mio_f2k_derived): Use enumerator as initializer of
2256         enum variable.
2257
2258         PR bootstrap/42812
2259         * gfortran.h  (struct gfc_namespace) <resolved>: Change to signed
2260         bitfield of width 2.
2261
2262 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
2263
2264         PR fortran/42804
2265         * resolve.c (extract_compcall_passed_object): Set locus for
2266         passed-object argument.
2267         (extract_ppc_passed_object): Set locus and correctly remove PPC
2268         reference.
2269
2270 2010-01-19  Paul Thomas  <pault@gcc.gnu.org>
2271
2272         PR fortran/42783
2273         * trans-decl.c (add_argument_checking): Do not use the backend
2274         decl directly to test for the presence of an optional dummy
2275         argument.  Use gfc_conv_expr_present, remembering to set the
2276         symbol referenced.
2277
2278         PR fortran/42772
2279         * trans-decl.c (gfc_generate_function_code): Small white space
2280         changes. If 'recurcheckvar' is NULL do not try to reset it.
2281
2282 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
2283
2284         PR fortran/42545
2285         * resolve.c (resolve_fl_derived): Set the accessibility of the parent
2286         component for extended types.
2287         * symbol.c (gfc_find_component): Remove a wrongly-worded error message
2288         and take care of parent component accessibility.
2289
2290 2010-01-17  Janus Weil  <janus@gcc.gnu.org>
2291
2292         PR fortran/42677
2293         * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
2294         * interface.c (check_interface1): Move a warning message here from
2295         resolve_fl_procedure.
2296         (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
2297         * module.c (read_module): Remove call to gfc_check_interfaces, since
2298         this comes too early here.
2299         * resolve.c (resolve_fl_procedure): Move warning message to
2300         check_interface1.
2301
2302 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2303
2304         PR fortran/42684
2305         * interface.c (check_interface1): Pass symbol name rather than NULL to
2306         gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
2307         trap MULL.
2308         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2309         than NULL to gfc_compare_interfaces.
2310
2311 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
2312
2313         PR fortran/41478
2314         * trans-array.c (duplicate_allocatable):  Static version of
2315         gfc_duplicate_allocatable with provision to handle scalar
2316         components. New boolean argument to switch off call to malloc
2317         if true.
2318         (gfc_duplicate_allocatable): New function to call above with
2319         new argument false.
2320         (gfc_copy_allocatable_data): New function to call above with
2321         new argument true.
2322         (structure_alloc_comps): Do not apply indirect reference to
2323         scalar pointers. Add new section to copy allocatable components
2324         of arrays. Extend copying of allocatable components to include
2325         scalars.
2326         (gfc_copy_only_alloc_comp): New function to copy allocatable
2327         component derived types, without allocating the base structure.
2328         * trans-array.h : Add primitive for gfc_copy_allocatable_data.
2329         Add primitive for gfc_copy_only_alloc_comp.
2330         * trans-expr.c (gfc_conv_procedure_call): After calls to
2331         transformational functions with results that are derived types
2332         with allocatable components, copy the components in the result.
2333         (gfc_trans_arrayfunc_assign): Deallocate allocatable components
2334         of lhs derived types before allocation.
2335         
2336 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
2337
2338         PR fortran/42481
2339         * module.c (load_generic_interfaces): If a procedure that is
2340         use associated but not generic is given an interface that
2341         includes itself, then make it generic.
2342
2343 2010-01-11  Joseph Myers  <joseph@codesourcery.com>
2344             Shujing Zhao  <pearly.zhao@oracle.com>
2345
2346         PR translation/42469
2347         * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
2348         finit-logical=, finit-real=, fmax-array-constructor=): Use tab
2349         character between option name and help text.
2350
2351 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2352
2353         PR fortran/20923
2354         PR fortran/32489
2355         * trans-array.c (gfc_conv_array_initializer): Change call to
2356         gfc_error_now to call to gfc_fatal_error.
2357         * array.c (count_elements): Whitespace. (extract_element): Whitespace.
2358         (is_constant_element): Changed name from constant_element.
2359         (gfc_constant_ac): Only use expand_construuctor for expression
2360         types of EXPR_ARRAY.  If expression type is EXPR_CONSTANT, no need to
2361         call gfc_is_constant_expr.
2362         * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
2363         message.
2364         * resolve.c (gfc_is_expandable_expr): New function that determiners if
2365         array expressions should have their constructors expanded.
2366         (gfc_resolve_expr): Use new function to determine whether or not to call
2367         gfc_expand_constructor.
2368
2369 2010-01-09  Tobias Burnus  <burnus@net-b.de>
2370
2371         PR fortran/41298
2372         * trans-expr.c (gfc_trans_structure_assign): Handle
2373         c_null_(fun)ptr.
2374         * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
2375         to the constructor for c_null_(fun)ptr.
2376         * resolve.c (resolve_structure_cons): Add special case
2377         for c_null_(fun)ptr.
2378
2379 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
2380
2381         * gfortranspec.c (lang_specific_driver): Update copyright notice
2382         dates.
2383
2384 2010-01-08  Tobias Burnus  <burnus@net-b.de>
2385
2386         PR/fortran 25829
2387         * symbol.c (check_conflict, gfc_copy_attr): Add
2388         ASYNCHRONOUS support.
2389         (gfc_add_asynchronous): New function.
2390         * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
2391         (gfc_match_asynchronous): New function.
2392         * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
2393         * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
2394         (gfc_add_asynchronous): New Prototype.
2395         * module.c (ab_attribute, mio_symbol_attribute): Add
2396         ASYNCHRONOUS support.
2397         * resolve.c (was_declared): Ditto.
2398         * match.h (gfc_match_asynchronous): New prototype.
2399         * parse.c (decode_specification_statement,decode_statement):
2400         Add ASYNCHRONOUS support.
2401
2402 2010-01-07  Tobias Burnus  <burnus@net-b.de>
2403
2404         PR fortran/42597
2405         * trans-decl.c (get_proc_pointer_decl): Fix call to
2406         gfc_conv_initializer for array-valued proc-pointer funcs.
2407
2408 2010-01-07  Tobias Burnus  <burnus@net-b.de>
2409
2410         PR fortran/41872
2411         * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
2412         allocatable scalars with SAVE attribute.
2413
2414 2010-01-05  Tobias Burnus  <burnus@net-b.de>
2415
2416         PR fortran/42517
2417         * options.c (gfc_post_options): Set -frecursion
2418         when -fopenmp is used.
2419
2420 2010-01-05  Tobias Burnus  <burnus@net-b.de>
2421
2422         PR fortran/41872
2423         * trans-expr.c (gfc_conv_procedure_call): Nullify
2424         return value for allocatable-scalar character functions.
2425
2426 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2427
2428         PR fortran/36161
2429         * error.c (error_printf, gfc_warning, gfc_notify_std,
2430         gfc_warning_now, gfc_error, gfc_error_now,
2431         gfc_fatal_error): Change argument name from nocmsgid to
2432         gmsgid to enable (x)gettext's % checking.
2433
2434 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2435         
2436         * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
2437
2438 2010-01-04  Tobias Burnus  <burnus@net-b.de>
2439
2440         PR fortran/41872
2441         * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
2442         for functions returning allocatable scalars.
2443         * trans-stmt.c (gfc_trans_allocate): Emmit error when
2444         reallocating an allocatable scalar.
2445         * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
2446         in comment.
2447         * trans-decl.c (gfc_trans_deferred_vars): Nullify local
2448         allocatable scalars.
2449         (gfc_generate_function_code): Nullify result variable for
2450         allocatable scalars.
2451         
2452         PR fortran/40849
2453         * module.c (gfc_use_module): Fix warning string to allow
2454         for translation.
2455
2456         PR fortran/42517
2457         * invoke.texi (-fcheck=recursion): Mention that the checking
2458         is also disabled for -frecursive.
2459         * trans-decl.c (gfc_generate_function_code): Disable
2460         -fcheck=recursion when -frecursive is used.
2461
2462         * intrinsic.texi (iso_c_binding): Improve wording.
2463
2464 \f
2465 Copyright (C) 2010 Free Software Foundation, Inc.
2466
2467 Copying and distribution of this file, with or without modification,
2468 are permitted in any medium without royalty provided the copyright
2469 notice and this notice are preserved.