OSDN Git Service

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