OSDN Git Service

c0551e15ba1dfc08b47b944989f37a57803f97fa
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2
3         PR fortran/38282
4         * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
5         MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
6         * gfortran.h: Define ISYM values for above intrinsics.
7         * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
8         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
9         gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
10         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
11         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
12         gfc_simplify_merge_bits, gfc_simplify_rshift,
13         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
14         gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
15         gfc_resolve_shift): New prototypes.
16         * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
17         gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
18         * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
19         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
20         functions.
21         * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
22         gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
23         gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
24         functions.
25         (gfc_conv_intrinsic_function): Call above static functions.
26         * intrinsic.texi: Document new intrinsics.
27         * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
28         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
29         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
30         gfc_simplify_merge_bits, gfc_simplify_rshift, 
31         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
32         New functions.
33
34 2010-09-08  Jakub Jelinek  <jakub@redhat.com>
35
36         * frontend-passes.c (optimize_code_node): Walk block chain by default.
37
38         PR fortran/45597
39         * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
40         instead of code->block.
41
42         PR fortran/45595
43         * openmp.c (resolve_omp_do): Report not enough do loops for
44         collapse even if block->next is NULL.
45
46 2010-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
47
48         PR fortran/45576
49         * dependency.c (gfc_deb_compare_expr):  Take missing optional
50         arguments into account.
51
52 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
53
54         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
55         * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
56         (gfc_build_intrinsic_function_decls): Don't build the
57         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
58         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
59         gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
60         of calling clz128/ctz128 library functions.
61
62 2010-09-07  Jan Hubicka  <jh@suse.cz>
63
64         * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
65         initializers.
66
67 2010-09-07  Tobias Burnus <burnus@net-b.de>
68         
69         PR fortran/45583
70         * intrinsic.texi (COS): Remove superfluous "n".
71
72 2010-09-07  Tobias Burnus <burnus@net-b.de>
73
74         PR fortran/45186
75         * trans-array.c (gfc_conv_descriptor_data_get,
76         gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
77         gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
78         gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
79         gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
80         gfc_conv_shift_descriptor_lbound,
81         gfc_set_loop_bounds_from_array_spec,
82         gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
83         gfc_conv_array_transpose, gfc_get_iteration_count,
84         gfc_grow_array, gfc_trans_array_ctor_element,
85         gfc_trans_array_constructor_subarray,
86         gfc_trans_array_constructor_value,
87         constant_array_constructor_loop_size, gfc_trans_array_constructor,
88         gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
89         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
90         gfc_conv_array_ref, gfc_trans_preloop_setup,
91         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
92         gfc_conv_loop_setup, gfc_conv_array_extent_dim,
93         gfc_conv_descriptor_size, gfc_array_init_size,
94         gfc_array_allocate, gfc_array_deallocate,
95         gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
96         gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
97         get_array_charlen, gfc_conv_expr_descriptor,
98         array_parameter_size, gfc_conv_array_parameter,
99         gfc_trans_dealloc_allocated, get_full_array_size,
100         duplicate_allocatable,
101         structure_alloc_comps): Change fold_build[0-9] to
102         fold_build[0-9]_loc.
103         (duplicate_allocatable, structure_alloc_comps,
104         gfc_duplicate_allocatable): Add space after function name.
105
106 2010-09-07  Mikael Morin  <mikael@gcc.gnu.org>
107
108         * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
109         checking string length value.
110         * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
111         gfc_charlen_type_node type.
112
113         PR fortran/45564
114         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
115         length to gfc_charlen_type_node.
116
117 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
118
119         PR fortran/36931
120         * frontend-passes.c (optimize_binop_array_assignment):  New
121         function.
122         (optimize_assignment):  Call it.
123
124 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
125
126         PR fortran/34145
127         * trans-expr.c (gfc_conv_substring):  If start and end
128         of the string reference are equal, set the length to one.
129
130 2010-09-06  Tobias Burnus  <burnus@net-b.de>
131
132         PR fortran/45560
133         * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
134
135 2010-09-06  Tobias Burnus  <burnus@net-b.de>
136
137         PR fortran/45560
138         * dump-parse-tree.c (gfc_debug_expr): New function.
139
140 2010-09-06  Tobias Burnus  <burnus@net-b.de>
141
142         PR fortran/38282
143         * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
144         (check_specific): Special case for those intrinsics.
145         * gfortran.h (gfc_isym_id): Add new intrinsics
146         * intrinsic.h (gfc_check_transf_bit_intrins,
147         gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
148         gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
149         New prototypes.
150         * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
151         gfc_resolve_iparity, resolve_transformational): New functions.
152         (gfc_resolve_product, gfc_resolve_sum,
153         gfc_resolve_parity): Use resolve_transformational.
154         * check.c (gfc_check_transf_bit_intrins): New function.
155         * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
156         gfc_simplify_iparity, do_bit_any, do_bit_ior,
157         do_bit_xor, simplify_transformation): New functions.
158         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
159         gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
160         * trans-intrinsic.c (gfc_conv_intrinsic_arith,
161         gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
162         Handle IALL, IANY and IPARITY intrinsics.       
163         * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
164         order.
165         (IALL, IANY, IPARITY): Document new intrinsics.
166
167 2010-09-05  Tobias Burnus <burnus@net-b.de>
168
169         PR fortran/45186
170         * f95-lang.c (gfc_truthvalue_conversion): Use
171         fold_build[0-9]_loc instead of fold_build[0-9].
172         * convert.c (convert): Ditto.
173         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
174         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
175         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
176         gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
177         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
178         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
179         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
180         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
181         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
182         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
183         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
184         gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
185         gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
186         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
187         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
188         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
189         gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
190         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
191         gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
192         gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
193         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
194         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
195         size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
196         gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
197         gfc_conv_intrinsic_transfer, gfc_conv_allocated,
198         gfc_conv_associated, gfc_conv_same_type_as,
199         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
200
201 2010-09-04  Tobias Burnus  <burnus@net-b.de>
202
203         PR fortran/45530
204         * resolve.c (resolve_fl_namelist): Change constraint checking
205         order to prevent endless loop.
206
207 2010-09-04  Janus Weil  <janus@gcc.gnu.org>
208
209         PR fortran/45507
210         * resolve.c (resolve_allocate_expr): Generate default initializers
211         already at this point, resolve them and put them into expr3, ...
212         * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
213         translation stage.
214
215 2010-09-03  Tobias Burnus  <burnus@net-b.de>
216
217         PR fortran/45186
218         * trans-intrinsic.c (gfc_conv_intrinsic_sign,
219         gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
220         of build_call_expr.
221         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
222         gfc_conv_string_length, gfc_conv_substring,
223         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
224         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
225         gfc_conv_expr_op, gfc_build_compare_string,
226         gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
227         gfc_conv_derived_to_class, conv_isocbinding_procedure,
228         gfc_conv_procedure_call, fill_with_spaces,
229         gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
230         gfc_trans_structure_assign, gfc_trans_pointer_assignment,
231         gfc_trans_scalar_assign, gfc_trans_zero_assign,
232         gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
233         fold_build[0-9] to fold_build[0-9]_loc.
234         * trans-io.c (set_parameter_const, set_parameter_value,
235         set_parameter_ref, gfc_convert_array_to_string, set_string,
236         set_internal_unit, io_result, set_error_locus,
237         nml_get_addr_expr, build_dt): Ditto.
238         * trans-openmp.c (gfc_omp_clause_default_ctor,
239         gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
240         gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
241         gfc_trans_omp_do): Ditto.
242         * trans.c (gfc_add_modify, gfc_build_addr_expr,
243         gfc_build_array_ref, gfc_trans_runtime_error_vararg,
244         gfc_trans_runtime_check, gfc_call_malloc,
245         gfc_allocate_with_status, gfc_allocate_array_with_status,
246         gfc_call_free, gfc_deallocate_with_status,
247         gfc_call_realloc): Ditto.
248
249 2010-09-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
250
251         PR fortran/45159
252         * dependency.c (gfc_deb_compare_expr):  Compare equal for equal
253         arglists for pure user functions, or for those intrinsic
254         functions which are also pure.
255         * intrinsics.c (add_conv):  Mark conversion functions as pure.
256         (add_char_conversions):  Likewise.
257
258 2010-09-03  Daniel Kraft  <d@domob.eu>
259
260         PR fortran/34162
261         * resolve.c (resolve_actual_arglist): Allow internal procedure
262         as actual argument with Fortran 2008.
263
264 2010-09-03  Daniel Kraft  <d@domob.eu>
265
266         PR fortran/44602
267         * gfortran.h (struct gfc_code): Renamed `whichloop' to
268         `which_construct' as this is no longer restricted to loops.
269         * parse.h (struct gfc_state_data): New field `construct'.
270         * match.c (match_exit_cycle): Handle EXIT from non-loops.
271         * parse.c (push_state): Set `construct' field.
272         * resolve.c (resolve_select_type): Extend comment.
273         * trans-stmt.c (gfc_trans_if): Add exit label.
274         (gfc_trans_block_construct), (gfc_trans_select): Ditto.
275         (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
276         (gfc_trans_do), (gfc_trans_do_while): Ditto.
277         (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
278         (gfc_trans_cycle): Ditto.
279         (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
280
281 2010-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
282
283         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
284         (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
285         (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
286         * intrinsic.texi (RSHIFT): Fix documentation.
287
288 2010-09-02  Tobias Burnus  <burnus@net-b.de>
289
290         PR fortran/45186
291         * trans-common.c (create_common): Change build[0-9] to
292         build[0-9]_loc.
293         * trans-const.c (gfc_conv_constant_to_tree,
294         gfc_conv_constant_to_tree): Ditto.
295         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
296         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
297         add_argument_checking, create_main_function,
298         gfc_generate_return): Ditto.
299         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
300         * trans-stmt.c (allocate_temp_for_forall_nest_1,
301         compute_inner_temp_size, compute_overall_iter_number,
302         generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
303         gfc_conv_elemental_dependencies, gfc_do_allocate,
304         gfc_evaluate_where_mask, gfc_trans_allocate,
305         gfc_trans_arithmetic_if, gfc_trans_call,
306         gfc_trans_character_select, gfc_trans_deallocate,
307         gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
308         gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
309         gfc_trans_integer_select, gfc_trans_logical_select,
310         gfc_trans_pointer_assign_need_temp, gfc_trans_return,
311         gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
312         gfc_trans_where_assign) Ditto.
313
314 2010-09-02  Janus Weil  <janus@gcc.gnu.org>
315
316         PR fortran/44541
317         * resolve.c (resolve_symbol): Correct check for attributes of CLASS
318         variable.
319
320 2010-09-02  Tobias Burnus  <burnus@net-b.de>
321
322         PR fortran/45489
323         * resolve.c (apply_default_init): Mark symbol as referenced,
324         if it is initialized.
325         (resolve_symbol): Change intialized check for BT_DERIVED such
326         that also function results get initialized; remove now obsolete
327         gfc_set_sym_referenced for BT_CLASS.
328
329 2010-09-01  Janus Weil  <janus@gcc.gnu.org>
330
331         PR fortran/44541
332         * class.c (gfc_find_derived_vtab): Add component '$def_init'.
333         * resolve.c (resolve_allocate_expr): Defer handling of default
334         initialization to 'gfc_trans_allocate'.
335         (apply_default_init,resolve_symbol): Handle polymorphic dummies.
336         (resolve_fl_derived): Suppress error messages for vtypes.
337         * trans-stmt.c (gfc_trans_allocate): Handle initialization via
338         polymorphic MOLD expression.
339         * trans-expr.c (gfc_trans_class_init_assign): Now only used for
340         dummy initialization.
341
342 2010-09-01  Tobias Burnus  <burnus@net-b.de>
343
344         * gfortran.texi (preprocessing): Update URL to COCO.
345
346 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
347
348         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
349         array quad_decls. Remove unnecessary assignment.
350
351 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
352
353         * trans-expr.c (gfc_conv_power_op): Handle floating-point types
354         other than long double.
355         * mathbuiltins.def: Add builtins from the POW and CPOW family.
356         * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
357         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
358         prefix to function name.
359         (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
360         (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
361         function name.
362         (gfc_conv_intrinsic_exponent): Likewise.
363         (gfc_conv_intrinsic_abs): Likewise.
364         (gfc_conv_intrinsic_mod): Likewise.
365         (gfc_conv_intrinsic_sign): Likewise.
366         (gfc_conv_intrinsic_arith): Likewise.
367         (gfc_conv_intrinsic_fraction): Likewise.
368         (gfc_conv_intrinsic_nearest): Likewise.
369         (gfc_conv_intrinsic_spacing): Likewise.
370         (gfc_conv_intrinsic_rrspacing): Likewise.
371         (gfc_conv_intrinsic_scale): Likewise.
372         (gfc_conv_intrinsic_set_exponent): Likewise.
373
374 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
375
376         * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
377         * intrinsic.h (gfc_resolve_execute_command_line): New function.
378         * iresolve.c (gfc_resolve_execute_command_line): New function.
379         * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
380         * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
381
382 2010-08-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
383
384         PR fortran/38282
385         * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
386         and parity{,l,ll} builtins.
387         * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
388         (gfc_conv_intrinsic_function): Call above new functions.
389         * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
390         functions.
391         * intrinsic.texi: Document POPCNT and POPPAR.
392
393 2010-08-30  Janus Weil  <janus@gcc.gnu.org>
394
395         PR fortran/45456
396         * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
397
398 2010-08-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
399
400         * Make-lang.in: Add frontend-passes.o dependencies.
401
402 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
403
404         PR fortran/42769
405         * resolve.c (resolve_structure_cons): For derived types, make sure the
406         type has been resolved.
407         (resolve_typebound_procedures): Make sure the vtab has been generated.
408
409 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
410
411         PR fortran/45439
412         * match.c (gfc_match_select_type): Give the associate-name the
413         FL_VARIABLE attribute.
414
415 2010-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
416
417         * simplify.c (gfc_simplify_bessel_n2): Fix indention
418         and argument type.
419
420 2010-08-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
421
422         PR fortran/45436
423         * trans-types.c (gfc_init_kinds): Disable TFmode.
424
425 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
426
427         PR fortran/45432
428         * match.c (gfc_match_allocate): Avoid double free on error.
429
430 2010-08-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
431
432         PR fortran/32049
433         * gfortran.h (gfc_real_info): Add c_float128 field.
434         * mathbuiltins.def: Indicate which builtins are const.
435         * trans-types.h (float128_type_node, complex_float128_type_node,
436         gfc_real16_is_float128): New variables.
437         * trans-types.c (float128_type_node, complex_float128_type_node,
438         gfc_real16_is_float128): New variables.
439         (gfc_init_kinds): Allow TFmode.
440         (gfc_build_real_type): Mark __float128 types as such.
441         (gfc_init_types): Initialize float128_type_node and
442         complex_float128_type_node
443         * f95-lang.c (gfc_init_builtin_functions): Adjust for new
444         argument of OTHER_BUILTIN macro.
445         * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
446         (builtin_decl_for_precision): Special case for __float128.
447         (builtin_decl_for_float_kind): Likewise.
448         (define_quad_builtin): New function.
449         (gfc_build_intrinsic_lib_fndecls): Create all __float128
450         library decls if necessary. Store them in the real16_decl and
451         complex16_decl builtin map fields.
452         (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
453         library function names.
454
455 2010-08-27  Tobias Burnus  <burnus@net-b.de>
456
457         PR fortran/33197
458         * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
459         * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
460         gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
461         gfc_resolve_parity): New prototypes.
462         * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
463         GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
464         * gcc/fortran/iresolve.c (gfc_resolve_norm2,
465         gfc_resolve_parity): New functions.
466         * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
467         New functions.
468         * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
469         gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
470         * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
471         * gcc/fortran/simplify.c (simplify_transformation_to_array):
472         Add post-processing opterator.
473         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
474         gfc_simplify_product, gfc_simplify_sum): Update call.
475         (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
476         gfc_simplify_parity): New functions.
477
478 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
479
480         PR fortran/45420
481         * match.c (select_type_set_tmp): Add the possibility to reset the
482         temporary to NULL.
483         (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
484
485 2010-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
486
487         PR fortran/45159
488         * dependency.c (check_section_vs_section):  Single test for
489         identical strides which takes into account that only one
490         of the strides may be NULL.
491
492 2010-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
493
494         PR fortran/43217
495         * primary.c (match_hollerith_constant): Calculate padding needed to
496         fill default integer and allocate string for that size.  Set pad bytes
497         to ' '.
498         * gfortran.h: Add hollerith pad value to type spec union.
499         * data.c (create_character_initializer): Fix spelling of function name.
500         Use hollerith pad value to calculate length.
501         * arith.c (hollerith2representation); Use hollerith pad value to
502         calculate length.
503
504 2010-08-26  Daniel Kraft  <d@domob.eu>
505
506         PR fortran/38936
507         PR fortran/44047
508         PR fortran/45384
509         * gfortran.h (struct gfc_association_list): New flag `dangling'.
510         (gfc_build_block_ns): Declared here...
511         * parse.h (gfc_build_block_ns): ...instead of here.
512         * trans.h (gfc_process_block_locals): Expect additionally the
513         gfc_association_list of BLOCK (if present).
514         * match.c (select_type_set_tmp): Create sym->assoc for temporary.
515         * resolve.c (resolve_variable): Only check for invalid *array*
516         references on associate-names.
517         (resolve_assoc_var): New method with code previously in resolve_symbol.
518         (resolve_select_type): Use association to give the selector and
519         temporaries their values instead of ordinary assignment.
520         (resolve_fl_var_and_proc): Allow CLASS associate-names.
521         (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
522         * trans-stmt.c (gfc_trans_block_construct): Pass association-list
523         to `gfc_process_block_locals' to match new interface.
524         * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
525         here automatically.
526         (gfc_process_block_locals): Defer them rather here when linked to
527         from the BLOCK's association list.
528
529 2010-08-25  Jakub Jelinek  <jakub@redhat.com>
530
531         * trans-decl.c (gfc_build_intrinsic_function_decls): Set
532         TREE_NOTHROW on fndecls that can't throw.  Set
533         TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
534         (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
535         gfor_fndecl_associated.
536
537 2010-08-23  Mikael Morin  <mikael@gcc.gnu.org>
538
539         PR fortran/45380
540         * frontend-passes.c (optimize_equality): Don't optimize array equality
541
542 2010-08-23  Janus Weil  <janus@gcc.gnu.org>
543
544         PR fortran/45366
545         * resolve.c (resolve_procedure_interface): New function split off from
546         'resolve_symbol'.
547         (resolve_formal_arglist): Call it here ...
548         (resolve_symbol): ... and here.
549
550 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
551
552         * Make-lang.in (gfortranspec.o): Update dependencies.
553         * gfortranspec.c: Include coretypes.h before gcc.h.  Include
554         opts.h.
555         (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
556         (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
557         (g77_xargc): Make unsigned.
558         (g77_xargv): Change to g77_x_decoded_options.
559         (g77_newargc): Make unsigned.
560         (g77_newargv): Change to g77_new_decoded_options.
561         (strings_same, options_same): New.
562         (append_arg): Use cl_decoded_option structures.
563         (append_option): New.
564         (add_arg_libgfortran): New.
565         (lang_specific_driver): Use cl_decoded_option structures.
566
567 2010-08-21  Janus Weil  <janus@gcc.gnu.org>
568
569         PR fortran/45271
570         PR fortran/45290
571         * class.c (add_proc_comp): Add static initializer for PPCs.
572         (add_procs_to_declared_vtab): Modified comment.
573         * module.c (mio_component): Add argument 'vtype'. Don't read/write the
574         initializer if the component is part of a vtype.
575         (mio_component_list): Add argument 'vtype', pass it on to
576         'mio_component'.
577         (mio_symbol): Modified call to 'mio_component_list'.
578         * trans.h (gfc_conv_initializer): Modified prototype.
579         (gfc_trans_assign_vtab_procs): Removed.
580         * trans-common.c (create_common): Modified call to
581         'gfc_conv_initializer'.
582         * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
583         gfc_emit_parameter_debug_info): Modified call to
584         'gfc_conv_initializer'.
585         (build_function_decl): Remove assertion.
586         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
587         Removed call to 'gfc_trans_assign_vtab_procs'.
588         (gfc_conv_initializer): Add argument 'procptr'.
589         (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
590         (gfc_trans_assign_vtab_procs): Removed.
591         * trans-stmt.c (gfc_trans_allocate): Removed call to
592         'gfc_trans_assign_vtab_procs'.
593
594 2010-08-21  Tobias Burnus  <burnus@net-b.de>
595
596         PR fortran/36158
597         PR fortran/33197
598         * intrinsic.c (add_sym): Init value attribute.
599         (set_attr_value): New function.
600         (add_functions) Use it and add JN/YN resolvers.
601         * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
602         * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
603         * gfortran.h (gfc_intrinsic_arg): Add value attribute.
604         * iresolve.c (gfc_resolve_bessel_n2): New function.
605         * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
606         formal arg list.
607         (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
608         Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
609         * simplify.c (): For YN set to -INF if previous values
610         was -INF.
611         * trans-expr.c (gfc_conv_procedure_call): Don't crash
612         if sym->as is NULL.
613         * iresolve.c (gfc_resolve_extends_type_of): Set the
614         type of the dummy argument to the one of the actual.
615
616 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
617
618         * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
619
620 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
621
622         * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
623         comment, not -lg2c.
624
625 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
626
627         * trans-openmp.c: Use FOR_EACH_VEC_ELT.
628
629 2010-08-19  Daniel Kraft  <d@domob.eu>
630
631         PR fortran/29785
632         PR fortran/45016
633         * trans.h (struct gfc_se): New flag `byref_noassign'.
634         * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
635         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
636         * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
637         and check for compile-time errors with those.
638         * trans-decl.c (trans_associate_var): Use new routine
639         `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
640         * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
641         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
642         (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
643         (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
644         * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
645         rank remapping for assignment.
646
647 2010-08-19  Tobias Burnus  <burnus@net-b.de>
648
649         * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
650         * * simplify.c (gfc_simplify_bessel_yn): Change recursive
651         into recurrence.
652
653 2010-08-19  Tobias Burnus  <burnus@net-b.de>
654
655         PR fortran/36158
656         PR fortran/33197
657         * check.c (gfc_check_bessel_n2): New function.
658         * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
659         * intrinsic.c (add_functions): Add transformational version
660         of the Bessel_jn/yn intrinsics.
661         * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
662         gfc_simplify_bessel_yn2): New prototypes.
663         * intrinsic.texi (Bessel_jn, Bessel_yn): Document
664         transformational variant.
665         * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
666         Check for negative order.
667         (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
668         gfc_simplify_bessel_yn2): New functions.
669
670 2010-08-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
671
672         PR fortran/41859
673         * resolve.c (resolve_transfer): Traverse operands and set expression
674         to be checked to a non EXPR_OP type.
675
676 2010-08-19  Janus Weil  <janus@gcc.gnu.org>
677
678         PR fortran/45290
679         * gfortran.h (gfc_add_save): Modified prototype.
680         * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
681         (match_pointer_init): New function to match F08 pointer initialization.
682         (variable_decl,match_procedure_decl,match_ppc_decl): Use
683         'match_pointer_init'.
684         (match_attr_spec): Module variables are implicitly SAVE.
685         (gfc_match_save): Modified call to 'gfc_add_save'.
686         * expr.c (gfc_check_assign_symbol): Extra checks for pointer
687         initialization.
688         * primary.c (gfc_variable_attr): Handle SAVE attribute.
689         * resolve.c (resolve_structure_cons): Add new argument and do pointer
690         initialization checks.
691         (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
692         (resolve_values): Call 'resolve_structure_cons' directly with init arg.
693         (resolve_fl_variable): Handle SAVE_IMPLICIT.
694         * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
695         SAVE_IMPLICIT.
696         * trans-decl.c (gfc_create_module_variable): Module variables with
697         TARGET can already exist.
698         * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
699         (gfc_conv_initializer): Implement non-NULL pointer
700         initialization.
701
702 2010-08-18  Tobias Burnus  <burnus@net-b.de>
703
704         PR fortran/45295
705         * intrinsic.texi (selected_char_kind): Document ISO_10646
706         support.
707
708 2010-08-17  Jakub Jelinek  <jakub@redhat.com>
709
710         PR fortran/45304
711         * trans-decl.c (build_library_function_decl_1): Chain on
712         void_list_node instead of creating a new TREE_LIST.
713         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
714         * trans-types.c (gfc_get_function_type): Likewise.  Set
715         typelist to void_list_node for the main program.
716
717 2010-08-17  Daniel Kraft  <d@domob.eu>
718
719         PR fortran/38936
720         * gfortran.h (struct gfc_association_list): New member `where'.
721         (gfc_is_associate_pointer) New method.
722         * match.c (gfc_match_associate): Remember locus for each associate
723         name matched and do not try to set variable flag.
724         * parse.c (parse_associate): Use remembered locus for symbols.
725         * primary.c (match_variable): Instead of variable-flag check for
726         associate names set it for all such names used.
727         * symbol.c (gfc_is_associate_pointer): New method.
728         * resolve.c (resolve_block_construct): Don't generate assignments
729         to give associate-names their values.
730         (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
731         (resolve_symbol): Set some more attributes for associate variables,
732         set variable flag here and check it and don't try to build an
733         explicitely shaped array-spec for array associate variables.
734         * trans-expr.c (gfc_conv_variable): Dereference in case of association
735         to scalar variable.
736         * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
737         (gfc_sym_type): Return pointer type for association to scalar vars.
738         * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
739         (trans_associate_var): New method.
740         (gfc_trans_deferred_vars): Handle association symbols.
741
742 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
743
744         * lang.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
745         RejectDriver.
746         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
747         RejectDriver.
748         * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
749         OPT_MDX and OPT_MMDX.
750
751 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
752
753         * lang.opt (MDX, MMDX): Mark RejectDriver.
754
755 2010-08-15  Janus Weil  <janus@gcc.gnu.org>
756
757         * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
758         vtabs for generics any more).
759
760 2010-08-15  Daniel Kraft  <d@domob.eu>
761
762         PR fortran/38936
763         * gfortran.h (gfc_find_proc_namespace): New method.
764         * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
765         around with namespace.
766         * symbol.c (gfc_find_proc_namespace): New method.
767         * trans-decl.c (gfc_build_qualified_array): Use it for correct
768         value of nest.
769         * primary.c (gfc_match_varspec): Handle associate-names as arrays.
770         * parse.c (parse_associate): Removed assignment-generation here...
771         * resolve.c (resolve_block_construct): ...and added it here.
772         (resolve_variable): Handle names that are arrays but were not parsed
773         as such because of association.
774         (resolve_code): Fix BLOCK resolution.
775         (resolve_symbol): Generate array-spec for associate-names.
776
777 2010-08-15  Tobias Burnus  <burnus@net-b.de>
778
779         PR fortran/45211
780         * decl.c (verify_c_interop_param): Remove superfluous space (" ").
781         (verify_c_interop): Handle unresolved DT with bind(C).
782
783 2010-08-15  Tobias Burnus  <burnus@net-b.de>
784
785         * trans-expr.c (gfc_conv_expr_present): Regard nullified
786         pointer arrays as absent.
787         (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
788         dummys as absent argument.
789         * interface.c (compare_actual_formal,compare_parameter):
790         Ditto.
791
792 2010-08-15  Tobias Burnus  <burnus@net-b.de>
793
794         * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
795         dummies with intent(in).
796
797 2010-08-15  Daniel Kraft  <d@domob.eu>
798
799         PR fortran/45197
800         * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
801         routines not IMPURE also as PURE.
802         * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
803         `NO_CLASS' in `CLASS_IMPURE'.
804         (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
805         (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
806         (add_functions): Ditto.
807         (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
808         * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
809         (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
810         are not ALLOCATABLE and have their INTENT specified.
811
812 2010-08-13  Daniel Kraft  <d@domob.eu>
813
814         * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
815         * array.c (gfc_match_array_spec): Match implied-shape specification and
816         handle AS_IMPLIED_SHAPE correctly otherwise.
817         * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
818         (variable_decl): Some checks for implied-shape declaration.
819         * resolve.c (resolve_symbol): Assert that array-spec is no longer
820         AS_IMPLIED_SHAPE in any case.
821
822 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
823
824         * lang.opt (MD, MMD): Change to MDX and MMDX.
825         * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
826
827 2010-08-11  Janus Weil  <janus@gcc.gnu.org>
828
829         PR fortran/44595
830         * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
831         'gfc_intrinsic_arg'.
832         (check_arglist,check_specific): Add reference to 'name' field.
833         (init_arglist): Remove reference to 'name' field.
834         * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
835         * check.c (variable_check): Reverse order of checks. Respect intent of
836         formal arg.
837         (int_or_proc_check): New function.
838         (coarray_check): New function.
839         (allocatable_check): New function.
840         (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
841         (gfc_check_complex): Use 'int_or_real_check'.
842         (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
843         gfc_check_ucobound): Use 'coarray_check'.
844         (gfc_check_pack): Use 'real_or_complex_check'.
845         (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
846         'int_or_proc_check'.
847         (scalar_check,type_check,numeric_check,int_or_real_check,
848         real_or_complex_check,kind_check,double_check,logical_array_check,
849         array_check,same_type_check,rank_check,nonoptional_check,
850         kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
851         gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
852         gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
853         gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
854         gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
855         gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
856         gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
857         to 'name' field.
858
859 2010-08-10  Daniel Kraft  <d@domob.eu>
860
861         * gfortran.texi (Interoperability with C): Fix ordering in menu
862         and add new subsection about pointers.
863         (Interoperable Subroutines and Functions): Split off the pointer part.
864         (working with Pointers): New subsection with extended discussion
865         of pointers (especially procedure pointers).
866
867 2010-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
868
869         PR fortran/44235
870         * array.c (gfc_ref_dimen_size):  Add end argument.
871         If end is non-NULL, calculate it.
872         (ref_size):  Adjust call to gfc_ref_dimen_size.
873         (gfc_array_dimen_size):  Likewise.
874         (gfc_array_res_shape):  Likewise.
875         * gfortran.h:  Adjust prototype for gfc_ref_dimen_size.
876         * resolve.c (resolve_array_ref):  For stride not equal to -1,
877         fill in the lowest possible end.
878
879 2010-08-09  Janus Weil  <janus@gcc.gnu.org>
880
881         * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
882
883 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
884
885         * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
886         alloca.
887         (check_some_aliasing): Likewise.
888         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
889         (gfc_conv_intrinsic_int): Likewise.
890         (gfc_conv_intrinsic_lib_function): Likewise.
891         (gfc_conv_intrinsic_cmplx): Likewise.
892         (gfc_conv_intrinsic_ctime): Likewise.
893         (gfc_conv_intrinsic_fdate): Likewise.
894         (gfc_conv_intrinsic_ttynam): Likewise.
895         (gfc_conv_intrinsic_minmax): Likewise.
896         (gfc_conv_intrinsic_minmax_char): Likewise.
897         (gfc_conv_intrinsic_ishftc): Likewise.
898         (gfc_conv_intrinsic_index_scan_verify): Likewise.
899         (gfc_conv_intrinsic_merge): Likewise.
900         (gfc_conv_intrinsic_trim): Likewise.
901         * trans.c (gfc_trans_runtime_error_vararg): Likewise.
902
903 2010-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
904
905         PR fortran/45159
906         * dependency.c (check_section_vs_section):  Handle cases where
907         the start expression coincides with the lower or upper
908         bound of the array.
909
910 2010-08-04  Janus Weil  <janus@gcc.gnu.org>
911
912         PR fortran/42207
913         PR fortran/44064
914         PR fortran/44065
915         * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
916         container types. Do not artificially increase refs. Commit symbols one
917         by one.
918         * interface.c (compare_parameter): Make sure vtabs are present before
919         generating module variables.
920         * resolve.c (resolve_allocate_expr): Ditto.
921
922 2010-08-04  Tobias Burnus  <burnus@net-b.de>
923
924         PR fortran/45183
925         PR fortran/44857
926         * resolve.c (resolve_structure_cons): Fix
927         freeing of charlen.
928
929 2010-08-04  Mikael Morin  <mikael@gcc.gnu.org>
930
931         PR fortran/42051
932         PR fortran/44064
933         * symbol.c (changed_syms): Made static again.
934         (gfc_symbol_state): Don't conditionalize on GFC_DEBUG. 
935         Changed conditional internal error into assert.
936         Rename function to ...
937         (gfc_enforce_clean_symbol_state): ... this.
938         * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state): 
939         Rename the former to the latter.
940         * parse.c (decode_statement, decode_omp_directive,
941         decode_gcc_attribute): Update callers accordingly. Don't conditionalize
942         on GFC_DEBUG.
943         (changed_syms): Remove declaration.
944         (next_statement): Use gfc_enforce_clean_symbol_state.
945
946 2010-08-04  Tobias Burnus  <burnus@net-b.de>
947
948         PR fortran/44857
949         * resolve.c (resolve_structure_cons): Fix handling of
950         initialization structure constructors with character
951         elements of the wrong length.
952         * array.c (gfc_check_iter_variable): Add NULL check.
953         (gfc_resolve_character_array_constructor): Also truncate
954         character length.
955
956 2010-08-04  Tobias Burnus  <burnus@net-b.de>
957
958         * trans-io.c (gfc_build_io_library_fndecls): Fix return
959         value of some libgfortran functions.
960
961 2010-08-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
962
963         PR fortran/45159
964         * dependency.c (gfc_deb_compare_expr):  Remove any integer
965         conversion functions to larger types from both arguments.
966         Remove handling these functions futher down.
967
968 2010-08-03  Janus Weil  <janus@gcc.gnu.org>
969
970         PR fortran/44584
971         PR fortran/45161
972         * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
973         * resolve.c (resolve_tb_generic_targets): Check for errors.
974
975 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
976
977         PR fortran/45159
978         * depencency.c (gfc_dep_resolver):  Fix logic for when a loop
979         can be reversed.
980
981 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
982
983         PR fortran/36854
984         * dependency.h:  Add prototype for gfc_are_identical_variables.
985         * frontend-passes.c:  Include depencency.h.
986         (optimimize_equality):  Use gfc_are_identical_variables.
987         * dependency.c (identical_array_ref): New function.
988         (gfc_are_identical_variables):  New function.
989         (gfc_deb_compare_expr):  Use gfc_are_identical_variables.
990         * dependency.c (gfc_check_section_vs_section).  Rename gfc_
991         prefix from statc function.
992         (check_section_vs_section): Change arguments to gfc_array_ref,
993         adjust function body accordingly.
994
995 2010-08-02  Mikael Morin  <mikael@gcc.gnu.org>
996             Janus Weil  <janus@gcc.gnu.org>
997
998         PR fortran/42051
999         PR fortran/44064
1000         PR fortran/45151
1001         * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol. 
1002         * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
1003         gfc_copy_formal_args, gfc_copy_formal_args_intr,
1004         gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
1005         * parse.c (parse_derived_contains, parse_spec, parse_progunit): 
1006         Call reject_statement in case of error. 
1007         (match_deferred_characteritics): Call gfc_undo_symbols in case match
1008         fails.
1009
1010 2010-08-01  Janus Weil  <janus@gcc.gnu.org>
1011
1012         PR fortran/44912
1013         * class.c (gfc_build_class_symbol): Make '$vptr' component private.
1014         (gfc_find_derived_vtab): Make vtabs and vtypes public.
1015         * module.c (read_module): When reading module files, always import
1016         vtab and vtype symbols.
1017
1018 2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>
1019
1020         PR fortran/42051
1021         PR fortran/44064
1022         * symbol.c (changed_syms): Made non-static.
1023         * parse.c (changed_syms): Declare new external. 
1024         (next_statement): Assert changed_syms is NULL at the beginning.
1025
1026 2010-07-30  Janus Weil  <janus@gcc.gnu.org>
1027             Steven G. Kargl  <kargl@gcc.gnu.org>
1028
1029         PR fortran/44929
1030         * match.c (match_type_spec): Try to parse derived types before
1031         intrinsic types.
1032
1033 2010-07-30  Mikael Morin  <mikael@gcc.gnu.org>
1034
1035         * gfortran.h (gfc_release_symbol): New prototype.
1036         * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
1037         (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
1038         Use gfc_release_symbol.
1039         * parse.c (gfc_fixup_sibling_symbols): Ditto.
1040         * resolve.c (resolve_symbol): Ditto.
1041
1042 2010-07-29  Tobias Burnus  <burnus@net-b.de>
1043
1044         PR fortran/45087
1045         PR fortran/45125
1046         * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
1047         external procedure declarations in modules.
1048         (gfc_get_symbol_decl): Modify assert.
1049
1050 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
1051
1052         PR fortran/44962
1053         * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
1054
1055 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
1056
1057         PR fortran/45004
1058         * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
1059         (gfc_trans_class_assign): Modified prototype.
1060         * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
1061         * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
1062         (gfc_trans_class_assign): ... here. Modified actual arguments.
1063         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
1064         handle the MOVE_ALLOC intrinsic with scalar and class arguments.
1065         * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
1066
1067 2010-07-29  Mikael Morin  <mikael@gcc.gnu.org>
1068
1069         PR fortran/42051
1070         PR fortran/44064
1071         * class.c (gfc_find_derived_vtab): Accept or discard newly created
1072         symbols before returning.
1073
1074 2010-07-29  Joseph Myers  <joseph@codesourcery.com>
1075
1076         * lang.opt (cpp): Remove Joined and Separate markers.
1077         (cpp=): New internal option.
1078         * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
1079         * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
1080         OPT_cpp.
1081
1082 2010-07-29  Daniel Kraft  <d@domob.eu>
1083
1084         PR fortran/45117
1085         * array.c (resolve_array_bound): Fix error message to properly handle
1086         non-variable expressions.
1087
1088 2010-07-28  Mikael Morin  <mikael@gcc.gnu.org>
1089
1090         * decl.c (free_value): Also free repeat field.
1091         * data.c (gfc_assign_data_value): Always free offset before returning.
1092
1093 2010-07-28  Daniel Kraft  <d@domob.eu>
1094
1095         * gfortran.h (gfc_build_intrinsic_call): New method.
1096         * expr.c (gfc_build_intrinsic_call): New method.
1097         * simplify.c (range_check): Ignore non-constant value.
1098         (simplify_bound_dim): Handle non-variable expressions and
1099         fix memory leak with non-free'ed expression.
1100         (simplify_bound): Handle non-variable expressions.
1101         (gfc_simplify_shape): Ditto.
1102         (gfc_simplify_size): Ditto, but only in certain cases possible.
1103
1104 2010-07-28  Joseph Myers  <joseph@codesourcery.com>
1105
1106         * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
1107         Remove.
1108
1109 2010-07-28  Tobias Burnus  <burnus@net-b.de>
1110
1111         PR fortran/45077
1112         * trans-types.c (gfc_get_derived_type): Fix DT declaration
1113         from modules for whole-file mode.
1114
1115 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
1116
1117         * gfortran.h (gfc_handle_option): Update prototype and return
1118         value type.
1119         * options.c (gfc_handle_option): Update prototype and return value
1120         type.
1121
1122 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
1123
1124         * cpp.c (gfc_cpp_init_options): Update prototype.  Use number of
1125         decoded options in allocating deferred_opt.
1126         * cpp.h (gfc_cpp_init_options): Update prototype.
1127         * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
1128         * gfortran.h (gfc_option_lang_mask): New.
1129         (gfc_init_options): Update prototype.
1130         * options.c (gfc_option_lang_mask): New.
1131         (gfc_init_options): Update prototype.  Pass new arguments to
1132         gfc_cpp_init_options.
1133
1134 2010-07-26  Tobias Burnus  <burnus@net-b.de>
1135
1136         PR fortran/40873
1137         * trans-decl.c (gfc_get_extern_function_decl): Fix generation
1138         for functions which are later in the same file.
1139         (gfc_create_function_decl, build_function_decl,
1140         build_entry_thunks): Add global argument.
1141         * trans.c (gfc_generate_module_code): Update
1142         gfc_create_function_decl call.
1143         * trans.h (gfc_create_function_decl): Update prototype.
1144         * resolve.c (resolve_global_procedure): Also resolve for
1145         IFSRC_IFBODY.
1146
1147 2010-07-26  Richard Henderson  <rth@redhat.com>
1148
1149         PR target/44132
1150         * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
1151         (gfc_write_global_declarations): New.
1152
1153 2010-07-26  Tobias Burnus  <burnus@net-b.de>
1154
1155         PR fortran/45066
1156         * trans-io.c (build_dt): Use NULL_TREE rather than NULL
1157         for call to transfer_namelist_element.
1158         * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
1159         for -fwhole-file.
1160
1161 2010-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
1162
1163         PR fortran/40628
1164         * Make-lang.in:  Add fortran/frontend-passes.o.
1165         * gfortran.h:  Add prototype for gfc_run_passes.
1166         * resolve.c (gfc_resolve):  Call gfc_run_passes.
1167         * frontend-passes.c:  New file.
1168
1169 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1170
1171         PR fortran/42852
1172         * scanner.c (gfc_next_char_literal): Enable truncation warning for
1173         free-form '&'.
1174
1175 2010-07-25  Mikael Morin  <mikael@gcc.gnu.org>
1176
1177         PR fortran/44660
1178         * gfortran.h (gfc_namespace): New field old_equiv.
1179         (gfc_free_equiv_until): New prototype.
1180         * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
1181         a parameterized stop condition.
1182         (gfc_free_equiv): Use gfc_free_equiv_until.
1183         * parse.c (next_statement): Save equivalence list.
1184         (reject_statement): Restore equivalence list. 
1185
1186 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1187
1188         PR fortran/42852
1189         * scanner.c (gfc_next_char_literal): Move check for truncation earlier
1190         in the function so that it does not get missed by early exits.
1191         (load_line): Add checks for quoted strings and free form comments to
1192         disable warnings on comments. Add check for ampersand as first
1193         character after truncation and don't warn for this case, but warn if
1194         there are subsequent non-whitespace characters.
1195
1196 2010-07-24  Tobias Burnus  <burnus@net-b.de>
1197
1198         PR fortran/40011
1199         * parse.c (gfc_parse_file): Do not override
1200         gfc_global_ns_list items.
1201
1202 2010-07-24  Tobias Burnus  <burnus@net-b.de>
1203
1204         * options.c (gfc_init_options): Enable -fwhole-file by default.
1205         * interface.c (compare_parameter): Assume a Hollerith constant is
1206         compatible with all other argument types.
1207
1208 2010-07-23  Tobias Burnus  <burnus@net-b.de>
1209
1210         PR fortran/44945
1211         * trans-decl.c (gfc_get_symbol_decl): Use module decl with
1212         -fwhole-file also for derived types.
1213         * trans-types.c (copy_dt_decls_ifequal): Remove static and
1214         rename to gfc_copy_dt_decls_ifequal.
1215         (gfc_get_derived_type): Update call.
1216         * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
1217
1218 2010-07-23  Tobias Burnus  <burnus@net-b.de>
1219
1220         PR fortran/45030
1221         * resolve.c (resolve_global_procedure): Properly handle ENTRY.
1222
1223 2010-07-23  Jakub Jelinek  <jakub@redhat.com>
1224
1225         * trans-types.c (gfc_get_array_descriptor_base,
1226         gfc_get_array_type_bounds): Set TYPE_NAMELESS.
1227         * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
1228         instead of clearing DECL_NAME.
1229         (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
1230
1231 2009-07-23  Paul Thomas  <pault@gcc.gnu.org>
1232
1233         PR fortran/24524
1234         * trans-array.c (gfc_init_loopinfo): Initialize the reverse
1235         field.
1236         gfc_trans_scalarized_loop_end: If reverse set in dimension n,
1237         reverse the scalarization loop.
1238         gfc_conv_resolve_dependencies: Pass the reverse field of the
1239         loopinfo to gfc_dep_resolver.
1240         trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
1241         assignment by resetting loop.reverse.
1242         gfortran.h : Add the gfc_reverse enum.
1243         trans.h : Add the reverse field to gfc_loopinfo.
1244         dependency.c (gfc_check_dependency): Pass null to the new arg
1245         of gfc_dep_resolver.
1246         (gfc_check_section_vs_section): Check for reverse dependencies.
1247         (gfc_dep_resolver): Add reverse argument and deal with the loop
1248         reversal logic.
1249         dependency.h : Modify prototype for gfc_dep_resolver to include
1250         gfc_reverse *.
1251
1252 2010-07-23  Daniel Kraft  <d@domob.eu>
1253
1254         PR fortran/44709
1255         * gfortran.h (gfc_find_symtree_in_proc): New method.
1256         * symbol.c (gfc_find_symtree_in_proc): New method.
1257         * match.c (match_exit_cycle): Look for loop name also in parent
1258         namespaces within current procedure.
1259
1260 2010-07-22  Tobias Burnus  <burnus@net-b.de>
1261
1262         PR fortran/45019
1263         * dependency.c (gfc_check_dependency): Add argument alising check.
1264         * symbol.c (gfc_symbols_could_alias): Add argument alising check.
1265
1266 2010-07-22  Daniel Kraft  <d@domob.eu>
1267
1268         * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
1269         now in the correct place.
1270
1271 2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
1272
1273         PR fortran/44929
1274         * Revert my commit r162325.
1275
1276 2010-07-21  Daniel Kraft  <d@domob.eu>
1277
1278         * trans.h (gfc_get_return_label): Removed.
1279         (gfc_generate_return): New method.
1280         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1281         returning a tree directly.
1282         * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
1283         (gfc_trans_block_construct): Update for new interface to
1284         `gfc_trans_deferred_vars'.
1285         * trans-decl.c (current_function_return_label): Removed.
1286         (current_procedure_symbol): New variable.
1287         (gfc_get_return_label): Removed.
1288         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1289         returning a tree directly.
1290         (get_proc_result), (gfc_generate_return): New methods.
1291         (gfc_generate_function_code): Clean up and do init/cleanup here
1292         also with gfc_wrapped_block.  Remove return-label but rather
1293         return directly.
1294
1295 2010-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
1296
1297         PR fortran/44929
1298         * fortran/match.c (match_type_spec): Check for derived type before
1299         intrinsic types.
1300
1301 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
1302
1303         PR fortran/42385
1304         * interface.c (matching_typebound_op): Add argument for the
1305         return of the generic name for the procedure.
1306         (build_compcall_for_operator): Add an argument for the generic
1307         name of an operator procedure and supply it to the expression.
1308         (gfc_extend_expr, gfc_extend_assign): Use the generic name in
1309         calls to the above procedures.
1310         * resolve.c (resolve_typebound_function): Catch procedure
1311         component calls for CLASS objects, check that the vtable is
1312         complete and insert the $vptr and procedure components, to make
1313         the call.
1314         (resolve_typebound_function): The same.
1315         * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
1316         an allocatable scalar if it is a result.
1317
1318 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
1319
1320         PR fortran/44353
1321         * match.c (gfc_match_iterator): Reverted.
1322
1323 2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
1324
1325         PR fortran/44353
1326         * match.c (gfc_match_iterator): Remove error that iterator
1327         cannot be INTENT(IN).
1328
1329 2010-07-17  Mikael Morin  <mikael@gcc.gnu.org>
1330
1331         * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
1332         Access subscript through the "dim" field index.
1333         (gfc_trans_create_temp_array): Access ss info through the "dim" field
1334         index.
1335         (gfc_conv_array_index_offset): Ditto.
1336         (gfc_conv_loop_setup): Ditto.
1337         (gfc_conv_expr_descriptor): Ditto.
1338         (gfc_conv_ss_startstride): Ditto.  Update call to
1339         gfc_conv_section_startstride.
1340         (gfc_conv_section_startstride): Set values along the array dimension.
1341         Get array dimension directly from the argument.
1342
1343 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
1344
1345         * trans.h (gfc_string_to_single_character): New prototype.
1346         * trans-expr.c (string_to_single_character): Renamed to ...
1347         (gfc_string_to_single_character): ... this.  No longer static.
1348         (gfc_conv_scalar_char_value, gfc_build_compare_string,
1349         gfc_trans_string_copy): Adjust callers.
1350         * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
1351         * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
1352         (select_struct): Move to toplevel, add GTY(()).
1353         (gfc_trans_character_select): Optimize SELECT CASE
1354         with character length 1.
1355
1356 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
1357
1358         * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1359         * trans-common.c: Likewise.
1360         * trans-decl.c: Likewise.
1361         * trans-types.c: Likewise.
1362         * trans.c: Likewise.
1363
1364 2010-07-15  Janus Weil  <janus@gcc.gnu.org>
1365
1366         PR fortran/44936
1367         * resolve.c (resolve_typebound_generic_call): Resolve generic
1368         non-polymorphic type-bound procedure calls to the correct specific
1369         procedure.
1370         (resolve_typebound_subroutine): Remove superfluous code.
1371
1372 2010-07-15  Daniel Kraft  <d@domob.eu>
1373
1374         PR fortran/44709
1375         * trans.h (struct gfc_wrapped_block): New struct.
1376         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
1377         (gfc_finish_wrapped_block): New method.
1378         (gfc_init_default_dt): Add new init code to block rather than
1379         returning it.
1380         * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
1381         (gfc_trans_dummy_array_bias): Ditto.
1382         (gfc_trans_g77_array): Ditto.
1383         (gfc_trans_deferred_array): Ditto.
1384         * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
1385         (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
1386         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
1387         (gfc_finish_wrapped_block): New method.
1388         * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
1389         (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
1390         (gfc_trans_deferred_array): Ditto.
1391         * trans-decl.c (gfc_trans_dummy_character): Ditto.
1392         (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
1393         (init_intent_out_dt): Ditto.
1394         (gfc_init_default_dt): Add new init code to block rather than
1395         returning it.
1396         (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
1397         and cleanup code and put it all together.
1398
1399 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
1400
1401         * trans.h (gfc_build_compare_string): Add CODE argument.
1402         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
1403         gfc_build_compare_string.
1404         * trans-expr.c (gfc_conv_expr_op): Pass CODE to
1405         gfc_build_compare_string.
1406         (string_to_single_character): Rename len variable to length.
1407         (gfc_optimize_len_trim): New function.
1408         (gfc_build_compare_string): Add CODE argument.  If it is EQ_EXPR
1409         or NE_EXPR and one of the strings is string literal with LEN_TRIM
1410         bigger than the length of the other string, they compare unequal.
1411
1412         PR fortran/40206
1413         * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
1414         in CASE_LABEL_EXPR and use NULL for low for the default case.
1415
1416 2010-07-14  Mikael Morin  <mikael@gcc.gnu.org>
1417
1418         * trans-array.c (gfc_conv_section_upper_bound): Remove
1419         (gfc_conv_section_startstride): Don't set the upper bound in the 
1420         vector subscript case.
1421         (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
1422
1423 2010-07-14  Janus Weil  <janus@gcc.gnu.org>
1424
1425         PR fortran/44925
1426         * gfortran.h (gfc_is_data_pointer): Remove prototype.
1427         * dependency.c (gfc_is_data_pointer): Make it static.
1428         * intrinsic.texi: Update documentation on C_LOC.
1429         * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
1430         and add a check for polymorphic variables.
1431
1432 2010-07-14  Jakub Jelinek  <jakub@redhat.com>
1433
1434         * trans-expr.c (string_to_single_character): Also optimize
1435         string literals containing a single char followed only by spaces.
1436         (gfc_trans_string_copy): Remove redundant string_to_single_character
1437         calls.
1438
1439         * trans-decl.c (gfc_build_intrinsic_function_decls,
1440         gfc_build_builtin_function_decls): Mark functions as
1441         DECL_PURE_P or TREE_READONLY.
1442
1443 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
1444
1445         * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
1446         instead of build_function_call_expr.
1447         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
1448
1449 2010-07-13  Tobias Burnus  <burnus@net-b.de>
1450             Daniel Franke  <franke.daniel@gmail.com>
1451
1452         PR fortran/43665
1453         * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
1454         * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
1455         static.
1456         * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
1457
1458 2010-07-13  Daniel Franke  <franke.daniel@gmail.com>
1459             Tobias Burnus  <burnus@net-b.de>
1460
1461         PR fortran/43665
1462         * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1463         noclobber/noescape annotations to function calls.
1464         (gfc_build_builtin_function_decls): Likewise.
1465
1466 2010-07-13  Janus Weil  <janus@gcc.gnu.org>
1467
1468         PR fortran/44434
1469         PR fortran/44565
1470         PR fortran/43945
1471         PR fortran/44869
1472         * gfortran.h (gfc_find_derived_vtab): Modified prototype.
1473         * class.c (gfc_build_class_symbol): Modified call to
1474         'gfc_find_derived_vtab'.
1475         (add_proc_component): Removed, moved code into 'add_proc_comp'.
1476         (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
1477         generics.
1478         (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
1479         Removed treatment of generics.
1480         (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
1481         Call 'add_proc_comp' instead of duplicating code.
1482         (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
1483         and 'declared'.
1484         (add_generic_specifics,add_generics_to_declared_vtab): Removed.
1485         (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
1486         Removed treatment of generics.
1487         * iresolve.c (gfc_resolve_extends_type_of): Modified call to
1488         'gfc_find_derived_vtab'.
1489         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1490         Removed treatment of generics.
1491         (resolve_select_type,resolve_fl_derived): Modified call to
1492         'gfc_find_derived_vtab'.
1493         * trans-decl.c (gfc_get_symbol_decl): Ditto.
1494         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1495         Ditto.
1496         * trans-stmt.c (gfc_trans_allocate): Ditto.
1497
1498 2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1499
1500         PR fortran/37077
1501         * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
1502         internal unit.
1503
1504 2010-07-12  Mikael Morin  <mikael@gcc.gnu.org>
1505
1506         * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
1507         * resolve.c (build_default_init_expr): Ditto.
1508
1509 2010-07-11  Tobias Burnus  <burnus@net-b.de>
1510
1511         PR fortran/44702
1512         * module.c (sort_iso_c_rename_list): Remove.
1513         (import_iso_c_binding_module,use_iso_fortran_env_module):
1514         Allow multiple imports of the same symbol.
1515
1516 2010-07-11  Mikael Morin  <mikael@gcc.gnu.org>
1517
1518         * arith.c (gfc_arith_done_1): Release mpfr internal caches.
1519
1520 2010-07-11  Janus Weil  <janus@gcc.gnu.org>
1521
1522         PR fortran/44869
1523         * decl.c (build_sym,attr_decl1): Only build the class container if the
1524         symbol has sufficient attributes.
1525         * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
1526         pointer attribute for classes.
1527         * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
1528         * module.c (MOD_VERSION): Bump.
1529         (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
1530         (mio_symbol_attribute): Handle class_pointer attribute.
1531         * parse.c (parse_derived): Use class_pointer instead of pointer
1532         attribute for classes.
1533         * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
1534         * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
1535         resolve_allocate_expr,resolve_fl_derived): Ditto.
1536         (resolve_fl_var_and_proc): Check for class_ok attribute.
1537
1538 2010-07-10  Mikael Morin  <mikael@gcc.gnu.org>
1539
1540         * trans-io.c (gfc_build_st_parameter): Update calls to
1541         gfc_add_field_to_struct.
1542         * trans-stmt.c (ADD_FIELD): Ditto.
1543         * trans-types.c
1544         (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
1545         C_ADDRESS field.
1546         (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
1547         fieldlist, remove fieldlist from argument list.
1548         (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
1549         and remove fieldlist from argument list.
1550         (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
1551         gfc_get_mixed_entry_union): Move setting
1552         TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
1553         * trans-types.h (gfc_add_field_to_struct): Update prototype.
1554
1555 2010-07-10  Paul Thomas  <pault@gcc.gnu.org>
1556
1557         PR fortran/44773
1558         * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
1559         if the lhs has never been host associated, as well as not being
1560         use associated, a pointer or a target.
1561         * resolve.c (resolve_variable): Mark variables that are host
1562         associated.
1563         * gfortran.h: Add the host_assoc bit to the symbol_attribute
1564         structure.
1565
1566 2010-07-09  Janus Weil  <janus@gcc.gnu.org>
1567
1568         * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
1569         STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
1570         SIZEOF and C_SIZEOF.
1571
1572 2010-07-08  Janus Weil  <janus@gcc.gnu.org>
1573
1574         PR fortran/44649
1575         * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
1576         * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
1577         gfc_resolve_storage_size): New prototypes.
1578         * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
1579         * intrinsic.c (add_functions): Add STORAGE_SIZE.
1580         * iresolve.c (gfc_resolve_storage_size): New function.
1581         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
1582         arguments.
1583         (gfc_conv_intrinsic_storage_size): New function.
1584         (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
1585
1586 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
1587
1588         PR fortran/44847
1589         * match.c (match_exit_cycle): Error on EXIT also from collapsed
1590         !$omp do loops.  Error on CYCLE to non-innermost collapsed
1591         !$omp do loops.
1592
1593 2010-07-08  Tobias Burnus  <burnus@net-b.de>
1594
1595         PR fortran/18918
1596         * array.c (gfc_match_array_ref): Better error message for
1597         coarrays with too few ranks.
1598         (match_subscript): Move one diagnostic to caller.
1599         * gfortran.h (gfc_get_corank): Add prottype.
1600         * expr.c (gfc_get_corank): New function.
1601         * iresolve.c (resolve_bound): Fix rank for cobounds.
1602         (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
1603         gfc_resolve_ucobound, gfc_resolve_this_image): Update
1604         resolve_bound call.
1605
1606 2010-07-06  Tobias Burnus  <burnus@net-b.de>
1607
1608         PR fortran/44742
1609         * array.c (gfc_expand_constructor): Add optional diagnostic.
1610         * gfortran.h (gfc_expand_constructor): Update prototype.
1611         * expr.c (gfc_simplify_expr, check_init_expr,
1612         gfc_reduce_init_expr): Update gfc_expand_constructor call.
1613         * resolve.c (gfc_resolve_expr): Ditto.
1614
1615 2010-07-06  Tobias Burnus  <burnus@net-b.de>
1616
1617         * trans-decl.c: Include diagnostic-core.h besides toplev.h.
1618         * trans-intrinsic.c: Ditto.
1619         * trans-types.c: Ditto.
1620         * convert.c: Include diagnostic-core.h instead of toplev.h.
1621         * options.c: Ditto.
1622         * trans-array.c: Ditto.
1623         * trans-const.c: Ditto.
1624         * trans-expr.c: Ditto.
1625         * trans-io.c: Ditto.
1626         * trans-openmp.c: Ditto.
1627         * trans.c: Ditto.
1628
1629 2010-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1630
1631         PR fortran/PR44693
1632         * check.c (dim_rank_check):  Also check intrinsic functions.
1633         Adjust permissible rank for functions which reduce the rank of
1634         their argument.  Spread is an exception, where DIM can
1635         be one larger than the rank of array.
1636
1637 2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>
1638
1639         PR fortran/44797
1640         * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
1641
1642 2010-07-05  Paul Thomas  <pault@gcc.gnu.org>
1643
1644         PR fortran/44596
1645         * trans-types.c (gfc_get_derived_type): Derived type fields
1646         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
1647         but build_pointer_type_for_mode must be used for this.
1648
1649 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
1650
1651         * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
1652         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
1653         type of gfc_conv_procedure_call.
1654         (conv_generic_with_optional_char_arg): Likewise.
1655         * trans-stmt.c (gfc_trans_call): Likewise.
1656         * trans-expr.c (gfc_conv_function_expr): Likewise.
1657         (gfc_conv_procedure_call): Use build_call_vec instead of
1658         build_call_list.
1659
1660 2010-07-04  Daniel Kraft  <d@domob.eu>
1661
1662         * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
1663
1664 2010-07-04  Paul Thomas  <pault@gcc.gnu.org>
1665
1666         PR fortran/44596
1667         PR fortran/44745
1668         * trans-types.c (gfc_get_derived_type): Derived type fields
1669         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
1670
1671 2010-07-02  Mikael Morin  <mikael@gcc.gnu.org>
1672
1673         PR fortran/44662
1674         * decl.c (match_procedure_in_type): Clear structure before using.
1675         (gfc_match_generic): Ditto.
1676
1677 2010-07-02  Nathan Froyd  <froydnj@codesourcery.com>
1678
1679         * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
1680         * trans-types.c (gfc_add_field_to_struct_1): New function, most
1681         of which comes from...
1682         (gfc_add_field_to_struct): ...here.  Call it.  Add new parameter.
1683         (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
1684         building fields.
1685         (gfc_get_array_descriptor_base): Likewise.
1686         (gfc_get_mixed_entry_union): Likewise.
1687         (gfc_get_derived_type): Add extra chain parameter for
1688         gfc_add_field_to_struct.
1689         * trans-stmt.c (gfc_trans_character_select): Likewise.
1690         * trans-io.c (gfc_build_st_parameter): Likewise.
1691
1692 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
1693
1694         PR fortran/44718
1695         * resolve.c (is_external_proc): Prevent procedure pointers from being
1696         regarded as external procedures.
1697
1698 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
1699
1700         PR fortran/44696
1701         * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
1702         passed as second argument of ASSOCIATED.
1703
1704 2010-06-29  Paul Thomas  <pault@gcc.gnu.org>
1705
1706         PR fortran/44582
1707         * trans-expr.c (arrayfunc_assign_needs_temporary): New function
1708         to determine if a function assignment can be made without a
1709         temporary.
1710         (gfc_trans_arrayfunc_assign): Move all the conditions that
1711         suppress the direct function call to the above new functon and
1712         call it.
1713
1714 2010-06-28  Paul Thomas  <pault@gcc.gnu.org>
1715
1716         PR fortran/40158
1717         * interface.c (argument_rank_mismatch): New function.
1718         (compare_parameter): Call new function instead of generating
1719         the error directly.
1720
1721 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
1722
1723         * trans-openmp.c (dovar_init): Define.  Define VECs containing it.
1724         (gfc_trans_omp_do): Use a VEC to accumulate variables and their
1725         initializers.
1726
1727 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
1728
1729         * Make-lang.in: Update dependencies.
1730
1731 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
1732
1733         * gfortran.h (gfc_code): Split backend_decl field into cycle_label
1734         and exit_label fields.
1735         * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
1736         individually.
1737         * trans-stmt.c (gfc_trans_simple_do): Likewise.
1738         (gfc_trans_do): Likewise.
1739         (gfc_trans_do_while): Likewise.
1740         (gfc_trans_cycle): Use cycle_label directly.
1741         (gfc_trans_exit): Use exit_label directly.
1742
1743 2010-06-27  Daniel Kraft  <d@domob.eu>
1744
1745         * dump-parse-tree.c (show_symbol): Dump target-expression for
1746         associate names.
1747         (show_code_node): Make distinction between BLOCK and ASSOCIATE.
1748         (show_namespace): Use show_level for correct indentation of
1749         "inner namespaces" (contained procedures or BLOCK).
1750
1751 2010-06-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1752
1753         PR fortran/44678
1754         * dump-parse-tree.c (show_code_node):  Show namespace for
1755         EXEC_BLOCK.
1756
1757 2010-06-26  Tobias Burnus  <burnus@net-b.de>
1758
1759         * decl.c (gfc_match_decl_type_spec): Support
1760         TYPE(intrinsic-type-spec).
1761
1762 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1763
1764         * intrinsic.h (gfc_check_selected_real_kind,
1765         gfc_simplify_selected_real_kind): Update prototypes.
1766         * intrinsic.c (add_functions): Add radix support to
1767         selected_real_kind.
1768         * check.c (gfc_check_selected_real_kind): Ditto.
1769         * simplify.c (gfc_simplify_selected_real_kind): Ditto.
1770         * trans-decl.c (gfc_build_intrinsic_function_decls):
1771         Change call from selected_real_kind to selected_real_kind2008.
1772         * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
1773         (PRECISION, RANGE, RADIX): Add cross @refs.
1774
1775 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1776
1777         * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
1778         * gfortran.texi (_gfortran_set_options): Update for
1779         GFC_STD_F2008_OBS addition.
1780         * libgfortran.h: Add GFC_STD_F2008_OBS.
1781         * options.c (set_default_std_flags, gfc_handle_option): Handle
1782         GFC_STD_F2008_OBS.
1783         io.c (check_format): Fix allow_std check.
1784
1785 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1786
1787         * decl.c (gfc_match_entry): Allow END besides
1788         END SUBROUTINE/END FUNCTION for contained procedures.
1789
1790 2010-06-25  Tobias Burnus  <burnus@net-b.de>
1791
1792         * parse.c (next_free, next_fixed): Allow ";" as first character.
1793
1794 2010-06-24  Tobias Burnus  <burnus@net-b.de>
1795
1796         PR fortran/44614
1797         * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1798
1799 2010-06-22  Janus Weil  <janus@gcc.gnu.org>
1800
1801         PR fortran/44616
1802         * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1803         containers.
1804
1805 2010-06-21  Tobias Burnus  <burnus@net-b.de>
1806
1807         PR fortran/40632
1808         * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1809         checks.
1810         * symbol.c (gfc_add_contiguous): New function.
1811         (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1812         * decl.c (match_attr_spec): Ditto.
1813         (gfc_match_contiguous): New function.
1814         * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1815         contiguous.
1816         * gfortran.h (symbol_attribute): Add contiguous.
1817         (gfc_is_simply_contiguous): Add prototype.
1818         (gfc_add_contiguous): Add prototype.
1819         * match.h (gfc_match_contiguous): Add prototype.
1820         * parse.c (decode_specification_statement,
1821         decode_statement): Handle contiguous attribute.
1822         * expr.c (gfc_is_simply_contiguous): New function.
1823         * dump-parse-tree.c (show_attr): Handle contiguous.
1824         * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1825         Ditto.
1826         * trans-expr.c (gfc_add_interface_mapping): Copy
1827         attr.contiguous.
1828         * trans-array.c (gfc_conv_descriptor_stride_get,
1829         gfc_conv_array_parameter): Handle contiguous arrays.
1830         * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1831         gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1832         Ditto.
1833         * trans.h (gfc_array_kind): Ditto.
1834         * trans-decl.c (gfc_get_symbol_decl): Ditto.
1835
1836 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
1837
1838         * options.c (gfc_handle_option): Don't handle N_OPTS.
1839
1840 2010-06-19  Janus Weil  <janus@gcc.gnu.org>
1841
1842         PR fortran/44584
1843         * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1844         to avoid ICE.
1845
1846 2010-06-18  Tobias Burnus  <burnus@net-b.de>
1847
1848         PR fortran/44556
1849         * resolve.c (resolve_allocate_deallocate): Properly check
1850         part-refs in stat=/errmsg= for invalid use.
1851
1852 2010-06-17  Janus Weil  <janus@gcc.gnu.org>
1853
1854         PR fortran/44558
1855         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1856         Return directly in case of an error.
1857
1858 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
1859
1860         PR fortran/44549
1861         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1862         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1863         structure to each procedure in a procedure list.
1864         * module.c (mio_typebound_proc): Add NULL argument to
1865         'gfc_get_typebound_proc'.
1866         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1867         to initialize the new structure.
1868
1869 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
1870
1871         PR fortran/43388
1872         * gfortran.h (gfc_expr): Add new member 'mold'.
1873         * match.c (gfc_match_allocate): Implement the MOLD tag.
1874         * resolve.c (resolve_allocate_expr): Ditto.
1875         * trans-stmt.c (gfc_trans_allocate): Ditto.
1876
1877 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
1878
1879         PR fortran/44536
1880         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1881         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1882         GFC_DECL_SAVED_DESCRIPTOR set.
1883         (gfc_omp_report_decl): New function.
1884         * trans.h (gfc_omp_report_decl): New prototype.
1885         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1886
1887 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
1888
1889         PR fortran/31588
1890         PR fortran/43954
1891         * gfortranspec.c (lang_specific_driver): Removed deprecation
1892         warning for -M.
1893         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1894         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1895         * cpp.h (gfc_cpp_makedep): New.
1896         (gfc_cpp_add_dep): New.
1897         (gfc_cpp_add_target): New.
1898         * cpp.c (gfc_cpp_option): Add deps* members.
1899         (gfc_cpp_makedep): New.
1900         (gfc_cpp_add_dep): New.
1901         (gfc_cpp_add_target): New.
1902         (gfc_cpp_init_options): Initialize new options.
1903         (gfc_cpp_handle_option): Handle new options.
1904         (gfc_cpp_post_options): Map new options to libcpp-options.
1905         (gfc_cpp_init): Handle deferred -MQ and -MT options.
1906         (gfc_cpp_done): If requested, write dependencies to file.
1907         * module.c (gfc_dump_module): Add a module filename as target.
1908         * scanner.c (open_included_file): New parameter system; add the
1909         included file as dependency.
1910         (gfc_open_included_file): Add the included file as dependency.
1911         (gfc_open_intrinsic_module): Likewise.
1912         * invoke.texi: Removed deprecation warning for -M.
1913         * gfortran.texi: Removed Makefile-dependencies project.
1914
1915 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
1916
1917         * resolve.c (resolve_global_procedure): Improved checking if an
1918         explicit interface is required.
1919
1920 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1921
1922         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1923         return type.
1924         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1925         (gfc_conv_intrinsic_ttynam): Likewise.
1926         (gfc_conv_intrinsic_trim): Likewise.
1927
1928 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
1929
1930         PR fortran/40117
1931         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1932
1933 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1934
1935         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1936
1937 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1938
1939         * mathbuiltins.def: Add builtins that do not directly correspond
1940         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1941         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1942         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1943         code_{r,c}{4,8,10,16} fields. Add
1944         {,complex}{float,double,long_double}_built_in fields.
1945         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1946         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1947         definition of OTHER_BUILTIN.
1948         (real_compnt_info): Remove unused struct.
1949         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1950         functions.
1951         (build_round_expr): Call builtin_decl_for_precision instead of
1952         series of if-else.
1953         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1954         instead of a switch.
1955         (gfc_build_intrinsic_lib_fndecls): Match
1956         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1957         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1958         kinds.
1959         (gfc_conv_intrinsic_lib_function): Go through all the extended
1960         gfc_intrinsic_map.
1961         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1962         instead of a switch.
1963         (gfc_conv_intrinsic_abs): Likewise.
1964         (gfc_conv_intrinsic_mod): Likewise.
1965         (gfc_conv_intrinsic_sign): Likewise.
1966         (gfc_conv_intrinsic_fraction): Likewise.
1967         (gfc_conv_intrinsic_nearest): Likewise.
1968         (gfc_conv_intrinsic_spacing): Likewise.
1969         (gfc_conv_intrinsic_rrspacing): Likewise.
1970         (gfc_conv_intrinsic_scale): Likewise.
1971         (gfc_conv_intrinsic_set_exponent): Likewise.
1972
1973 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
1974
1975         PR fortran/42051
1976         PR fortran/43896
1977         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1978         functions with CLASS formal arguments.
1979
1980 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
1981
1982         PR fortran/44207
1983         * resolve.c (conformable_arrays): Handle allocatable components.
1984
1985 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1986
1987         PR fortran/38273
1988         * gfortran.texi: Document that Cray pointers cannot be function
1989         results.
1990
1991 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1992
1993         PR fortran/36234
1994         * gfortran.texi: Document lack of support for syntax
1995         "complex FUNCTION name*16()", and existence of alternative
1996         legacy syntax "complex*16 FUNCTION name()".
1997
1998 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1999
2000         PR fortran/43032
2001         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
2002         POSIX's fsync(), and how to call the latter from Fortran code.
2003
2004 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
2005
2006         PR fortran/44457
2007         * interface.c (compare_actual_formal): Reject actual arguments with
2008         array subscript passed to ASYNCHRONOUS dummys.
2009
2010 2010-06-10  Daniel Kraft  <d@domob.eu>
2011
2012         PR fortran/38936
2013         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
2014         (struct gfc_symbol): New field `assoc'.
2015         (struct gfc_association_list): New struct.
2016         (struct gfc_code): New struct `block' in union, move `ns' there
2017         and add association list.
2018         (gfc_free_association_list): New method.
2019         (gfc_has_vector_subscript): Made public;
2020         * match.h (gfc_match_associate): New method.
2021         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
2022         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
2023         * interface.c (gfc_has_vector_subscript): Made public.
2024         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
2025         * match.c (gfc_match_associate): New method.
2026         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
2027         * primary.c (match_variable): Don't allow names associated to expr here.
2028         * parse.c (decode_statement): Try matching ASSOCIATE statement.
2029         (case_exec_markers, case_end): Add ASSOCIATE statement.
2030         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
2031         (parse_associate): New method.
2032         (parse_executable): Handle ST_ASSOCIATE.
2033         (parse_block_construct): Change reference to gfc_code's `ns' field.
2034         * resolve.c (resolve_select_type): Ditto.
2035         (resolve_code): Ditto.
2036         (resolve_block_construct): Ditto and add comment.
2037         (resolve_select_type): Set association list in generated BLOCK to NULL.
2038         (resolve_symbol): Resolve associate names.
2039         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
2040         and free association list.
2041         (gfc_free_association_list): New method.
2042         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
2043         * trans-stmt.c (gfc_trans_block_construct): Change reference to
2044         gfc_code's `ns' field.
2045
2046 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
2047
2048         * error.c (error_print): Pre-initialize loc by NULL.
2049         * openmp.c (resolve_omp_clauses): Add explicit
2050         braces to avoid ambigous else.
2051         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
2052
2053 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
2054
2055         * gfc-internals.texi: Move to GFDL 1.3.
2056         * gfortran.texi: Ditto.
2057         * intrinsic.texi: Ditto.
2058         * invoke.texi: Ditto.
2059
2060 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
2061
2062         PR fortran/44347
2063         * check.c (gfc_check_selected_real_kind): Verify that the
2064         actual arguments are scalar.
2065
2066 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
2067
2068         PR fortran/44359
2069         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
2070
2071 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
2072
2073         PR fortran/44430
2074         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
2075
2076 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2077
2078         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
2079
2080 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2081
2082         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
2083         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
2084         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
2085         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
2086         gfc_check_bitfcn.
2087         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
2088         less_than_bitsize2): New functions.
2089         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
2090         nonnegative_check and less_than_bitsize1.
2091         (gfc_check_ibclr, gfc_check_ibset): Removed.
2092         (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
2093         less_than_bitsize1.
2094
2095 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
2096
2097         PR fortran/44211
2098         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2099         Resolve references.
2100
2101 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
2102
2103         * resolve.c (resolve_deallocate_expr): Avoid warning
2104         about possible use of iunitialized sym.
2105         (resolve_allocate_expr): Pre-initialize sym by NULL.
2106
2107 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2108
2109         PR fortran/43040
2110         * f95-lang.c (gfc_init_builtin_functions): Remove comment.
2111
2112 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
2113
2114         * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
2115         allocation.
2116         (gfc_get_array_type_bounds): Likewise.
2117
2118         * trans-decl.c (gfc_allocate_lang_decl): Likewise.
2119         (gfc_find_module): Likewise.
2120
2121         * f95-lang.c (pushlevel): Likewise.
2122
2123         * trans.h (struct lang_type): Add variable_size GTY option.
2124         (struct lang_decl): Likewise.
2125
2126 2010-06-08  Tobias Burnus  <burnus@net-b.de>
2127
2128         PR fortran/44446
2129         * symbol.c (check_conflict): Move protected--external/procedure check ...
2130         * resolve.c (resolve_select_type): ... to the resolution stage.
2131
2132 2010-06-07  Tobias Burnus  <burnus@net-b.de>
2133
2134         * options.c (gfc_handle_option): Fix -fno-recursive.
2135
2136 2010-06-07  Tobias Burnus  <burnus@net-b.de>
2137
2138         * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
2139         * gfortran.texi (copyrights-gfortran): Ditto.
2140
2141 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
2142
2143         * lang.opt (fshort-enums): Define using Var and VarExists.
2144         * options.c (gfc_handle_option): Don't set flag_short_enums here.
2145
2146 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
2147             Janus Weil  <janus@gcc.gnu.org>
2148
2149         PR fortran/43945
2150         * resolve.c (get_declared_from_expr): Move to before
2151         resolve_typebound_generic_call.  Make new_ref and class_ref
2152         ignorable if set to NULL.
2153         (resolve_typebound_generic_call): Once we have resolved the
2154         generic call, check that the specific instance is that which
2155         is bound to the declared type.
2156         (resolve_typebound_function,resolve_typebound_subroutine): Avoid
2157         freeing 'class_ref->next' twice.
2158
2159 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
2160
2161         PR fortran/43895
2162         * trans-array.c (structure_alloc_comps): Dereference scalar
2163         'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
2164         TREE_TYPE (decl).
2165
2166 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
2167
2168         * gfortranspec.c (append_arg, lang_specific_driver): Use
2169         GCC-specific formats in diagnostics.
2170
2171 2010-06-02  Tobias Burnus  <burnus@net-b.de>
2172
2173         PR fortran/44360
2174         * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
2175         symbols.
2176
2177 2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2178
2179         PR fortran/44371
2180         * match.c (gfc_match_stopcode): Move gfc_match_eos call inside 
2181         condition block.
2182
2183 2010-05-31  Steven G. Kargl  <kargl@gcc.gnu.org>
2184
2185         * fortran/gfortran.texi:  Fix typos in description of variable-format-
2186         expressions.
2187
2188 2010-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
2189
2190         PR fortran/36928
2191         * dependency.c (gfc_check_section_vs_section):  Check
2192         for interleaving array assignments without conflicts.
2193
2194 2010-05-30  Janus Weil  <janus@gcc.gnu.org>
2195
2196         * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
2197         $data component of a class container.
2198         * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
2199         * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
2200         gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
2201         * gcc/fortran/interface.c (matching_typebound_op): Ditto.
2202         * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
2203         * gcc/fortran/parse.c (parse_derived): Ditto.
2204         * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
2205         gfc_expr_attr): Ditto.
2206         * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
2207         resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
2208         resolve_fl_var_and_proc, resolve_typebound_procedure,
2209         resolve_fl_derived): Ditto.
2210         * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
2211         * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
2212         CLASS_DATA.
2213         * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
2214         gfc_trans_deferred_vars): Ditto.
2215         * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
2216
2217 2010-05-28  Tobias Burnus  <burnus@net-b.de>
2218
2219         * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
2220
2221 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
2222
2223         * gfortranspec.c (append_arg, lang_specific_driver): Use
2224         fatal_error instead of fatal.  Use warning instead of fprintf for
2225         warnings.
2226
2227 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
2228
2229         * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
2230         * module.c (write_char, gfc_dump_module, gfc_use_module): Use
2231         xstrerror instead of strerror.
2232
2233 2010-05-26  Joseph Myers  <joseph@codesourcery.com>
2234
2235         * cpp.c (cb_cpp_error): Save and restore
2236         global_dc->warn_system_headers, not variable warn_system_headers.
2237
2238 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
2239
2240         * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
2241
2242 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
2243
2244         * trans-common.c: Do not include rtl.h, include output.h instead.
2245         * trans-decl.c: Likewise.
2246
2247 2010-05-26  Paul Thomas  <pault@gcc.gnu.org>
2248
2249         PR fortran/40011
2250         * resolve.c (resolve_global_procedure): Resolve the gsymbol's
2251         namespace before trying to reorder the gsymbols.
2252
2253 2010-05-25  Daniel Franke  <franke.daniel@gmail.com>
2254
2255         PR fortran/30668
2256         PR fortran/31346
2257         PR fortran/34260
2258         * resolve.c (resolve_global_procedure): Add check for global
2259         procedures with implicit interfaces and assumed-shape or optional
2260         dummy arguments. Verify that function return type, kind and string
2261         lengths match.
2262
2263 2010-05-21  Tobias Burnus  <burnus@net-b.de>
2264
2265         * gfortran.h: Do not include system.h.
2266         * bbt.c: Include system.h.
2267         * data.c: Ditto.
2268         * dependency.c: Ditto.
2269         * dump-parse-tree.c: Ditto.
2270         * arith.h: Do not include gfortran.h.
2271         * constructor.h: Do not include gfortran.h and splay-tree.h.
2272         * match.h: Do not include gfortran.h.
2273         * parse.h: Ditto.
2274         * target-memory.h: Ditto.
2275         * openmp.c: Do not include toplev.h and target.h.
2276         * trans-stmt.c: Ditto not include toplev.h.
2277         * primary.c: Ditto.
2278         * trans-common.c: Tell why toplev.h is needed. And
2279         do not include target.h.
2280         * trans-expr.c: Tell why toplev.h is needed.
2281         * trans-array.c: Ditto.
2282         * trans-openmp.c: Ditto.
2283         * trans-const.c: Ditto.
2284         * trans.c: Ditto.
2285         * trans-types.c: Ditto.
2286         * trans-io.c: Ditto.
2287         * trans-decl.c: Ditto.
2288         * scanner.c: Ditto.
2289         * convert.c: Ditto.
2290         * trans-intrinsic.c: Ditto.
2291         * options.c: Ditto.
2292
2293 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2294
2295         PR fortran/43851
2296         * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
2297         before returning MATCH_ERROR. Add check for scalar. Add check for
2298         default integer kind.
2299
2300 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
2301
2302         PR fortran/44212
2303         * match.c (gfc_match_select_type): On error jump back out of the local
2304         namespace.
2305         * parse.c (parse_derived): Defer creation of vtab symbols to resolution
2306         stage, more precisely to ...
2307         * resolve.c (resolve_fl_derived): ... this place.
2308
2309 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
2310
2311         PR fortran/44213
2312         * resolve.c (ensure_not_abstract): Allow abstract types with
2313         non-abstract ancestors.
2314
2315 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
2316
2317         * trans-const.c: Include realmpfr.h.
2318         * Make-lang.in: Update dependencies.
2319
2320 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
2321
2322         * trans-const.c, trans-types.c, trans-intrinsic.c:
2323         Clean up redundant includes.
2324
2325 2010-05-20  Daniel Franke  <franke.daniel@gmail.com>
2326
2327         PR fortran/38407
2328         * lang.opt (Wunused-dummy-argument): New option.
2329         * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
2330         * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
2331         (set_Wall): Enable warn_unused_dummy_argument.
2332         (gfc_handle_option): Set warn_unused_dummy_argument according to
2333         command line.
2334         * trans-decl.c (generate_local_decl): Separate warnings about
2335         unused variables and unused dummy arguments.
2336         * invoke.texi: Documented new option.
2337
2338 2010-05-20  Steven Bosscher  <steven@gcc.gnu.org>
2339
2340         * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
2341         (gfc_conv_string_tmp): Do not assert type comparibilty.
2342         *  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
2343         (gfc_conv_expr_descriptor): Remove assert.
2344         * trans-common.c: Clarify why rtl.h and tm.h are included.
2345         * trans-openmp.c: Do not include ggc.h and real.h.
2346         Explain why gimple.h is included.
2347         * trans-const.c: Do not include ggc.h.
2348         * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
2349         * trans.c: Do not include ggc.h and real.h.
2350         Explain why gimple.h is included.
2351         * trans-types.c: Do not include tm.h.  Explain why langhooks.h
2352         and dwarf2out.h are included.
2353         * trans-io.c: Do not include gimple.h and real.h.
2354         * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
2355         * trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
2356         is included.
2357
2358 2010-05-20  Tobias Burnus  <burnus@net-b.de>
2359
2360         * options.c (gfc_init_options,gfc_post_options): Enable
2361         flag_associative_math by default.
2362
2363 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2364
2365         PR fortran/43851
2366         * trans-stmt.c (gfc_trans_stop): Add generation of call to
2367         gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
2368         blank STOP, handling a null expression. (gfc_trans_pause): Use
2369         pause_string for blank PAUSE.
2370         * trans.h: Add external function declaration for error_stop_numeric.
2371         * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
2372         the declaration for the library call. Adjust whitespaces.
2373         * match.c (gfc_match_stopcode): Remove use of the actual stop code to
2374         signal no stop code. Match the expression following the stop and pass
2375         that to the translators. Remove the old use of digit matching.  Add
2376         checks that the stop_code expression is INTEGER or CHARACTER, constant,
2377         and if CHARACTER, default character KIND.
2378
2379 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
2380
2381         PR fortran/44055
2382         * lang.opt (Wconversion-extra): New option.
2383         * gfortran.h (gfc_option_t): Add warn_conversion_extra.
2384         * options.c (gfc_init_options): Disable -Wconversion-extra by default.
2385         (set_Wall): Enable -Wconversion.
2386         (gfc_handle_option): Set warn_conversion_extra.
2387         * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
2388         introduced for -Wconversion if -Wconversion-extra is present.
2389         * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
2390         -Wconversion; document -Wconversion-extra.
2391
2392 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
2393
2394         PR fortran/42360
2395         * gfortran.h (gfc_has_default_initializer): New.
2396         * expr.c (gfc_has_default_initializer): New.
2397         * resolve.c (has_default_initializer): Removed, use
2398         gfc_has_default_initializer() instead. Updated all callers.
2399         * trans-array.c (has_default_initializer): Removed, use
2400         gfc_has_default_initializer() instead. Updated all callers.
2401         * trans-decl.c (generate_local_decl): Do not check the
2402         first component only to check for initializers, but use
2403         gfc_has_default_initializer() instead.
2404
2405 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
2406
2407         PR fortran/38404
2408         * primary.c (match_string_constant): Move start_locus just inside 
2409         the string.
2410         * data.c (create_character_intializer): Clarified truncation warning.
2411
2412 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
2413
2414         PR fortran/34505
2415         * intrinsic.h (gfc_check_float): New prototype.
2416         (gfc_check_sngl): New prototype.
2417         * check.c (gfc_check_float): New.
2418         (gfc_check_sngl): New.
2419         * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
2420         to be a specific for REAL. Added check routines for FLOAT, DFLOAT
2421         and SNGL.
2422         * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
2423         added them to the list of specifics of REAL instead.
2424
2425 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
2426
2427         PR fortran/43990
2428         * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
2429         This is now handled via 'gfc_class_null_initializer'.
2430
2431 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
2432
2433         * class.c (gfc_add_component_ref,gfc_class_null_initializer,
2434         gfc_build_class_symbol,add_proc_component,add_proc_comps, 
2435         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
2436         add_procs_to_declared_vtab,add_generic_specifics, 
2437         add_generics_to_declared_vtab,gfc_find_derived_vtab,
2438         find_typebound_proc_uop,gfc_find_typebound_proc,
2439         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op, 
2440         gfc_get_tbp_symtree): Moved here from other places.
2441         * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
2442         class.c.
2443         * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
2444         gfc_find_typebound_proc,gfc_find_typebound_user_op,
2445         gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
2446         gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
2447         * Make-lang.in: Add class.o.
2448         * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
2449         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
2450         add_procs_to_declared_vtab,add_generic_specifics,
2451         add_generics_to_declared_vtab,gfc_find_derived_vtab,
2452         find_typebound_proc_uop,gfc_find_typebound_proc,
2453         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
2454         gfc_get_tbp_symtree): Move to class.c.
2455
2456 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
2457
2458         * trans-types.c (gfc_init_types): Use build_function_type_list.
2459         (gfc_get_ppc_type): Likewise.
2460         * trans-decl.c (gfc_generate_constructors): Likewise.
2461         * f95-lang.c (build_builtin_fntypes): Likewise.
2462         (gfc_init_builtin_functions): Likewise.
2463         (DEF_FUNCTION_TYPE_0): Likewise.
2464         (DEF_FUNCTION_TYPE_1): Likewise.
2465         (DEF_FUNCTION_TYPE_2): Likewise.
2466         (DEF_FUNCTION_TYPE_3): Likewise.
2467         (DEF_FUNCTION_TYPE_4): Likewise.
2468         (DEF_FUNCTION_TYPE_5): Likewise.
2469         (DEF_FUNCTION_TYPE_6): Likewise.
2470         (DEF_FUNCTION_TYPE_7): Likewise.  Use ARG7.
2471         (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
2472  
2473 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
2474
2475         * trans-array.c (gfc_trans_array_constructor_value): Use
2476         build_constructor instead of build_constructor_from_list.
2477         (gfc_build_constant_array_constructor): Likewise.
2478         * trans-decl.c (create_main_function): Likewise.
2479         * trans-stmt.c (gfc_trans_character_select): Likewise.
2480
2481 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
2482
2483         PR fortran/44044
2484         * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
2485         (resolve_fl_variable_derived): ... this place.
2486         (resolve_symbol): Make sure function symbols (and their result
2487         variables) are not resolved twice.
2488
2489 2010-05-16  Daniel Franke  <franke.daniel@gmail.com>
2490
2491         PR fortran/35779
2492         * array.c (match_array_list): Revert change from 2010-05-13.
2493
2494 2010-05-16  Richard Guenther  <rguenther@suse.de>
2495
2496         * trans-decl.c (module_htab_decls_hash): Revert last change.
2497
2498 2010-05-16  Richard Guenther  <rguenther@suse.de>
2499
2500         * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
2501
2502 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2503
2504         * options.c (set_Wall): Remove special logic for Wuninitialized
2505         without -O.
2506
2507 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
2508
2509         PR fortran/44154
2510         PR fortran/42647
2511         * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
2512         if branches.
2513
2514 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
2515
2516         PR fortran/43207
2517         PR fortran/43969
2518         * gfortran.h (gfc_class_null_initializer): New prototype.
2519         * expr.c (gfc_class_null_initializer): New function to build a NULL
2520         initializer for CLASS pointers.
2521         * symbol.c (gfc_build_class_symbol): Modify internal naming of class
2522         containers. Remove default NULL initialization of $data component.
2523         * trans.c (gfc_allocate_array_with_status): Fix wording of an error 
2524         message.
2525         * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
2526         Use new function 'gfc_class_null_initializer'.
2527         * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
2528         class variables.
2529
2530 2010-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2531
2532         PR fortran/44135
2533         * fortran/interface.c (get_sym_storage_size): Use signed instead of
2534         unsigned mpz_get_?i routines.
2535
2536 2010-05-14  Jakub Jelinek  <jakub@redhat.com>
2537
2538         * trans.c (trans_code): Set backend locus early.
2539         * trans-decl.c (gfc_get_fake_result_decl): Use source location
2540         of the function instead of current input_location.
2541
2542 2010-05-13  Daniel Franke  <franke.daniel@gmail.com>
2543
2544         PR fortran/35779
2545         * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
2546         Updated all usages.
2547         * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
2548         * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
2549         iterators.
2550
2551 2010-05-13  Jakub Jelinek  <jakub@redhat.com>
2552
2553         PR fortran/44036
2554         * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
2555         variable lists.
2556         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
2557         by reference dummy procedures or non-dummy procedure pointers.
2558         (gfc_omp_predetermined_sharing): Return
2559         OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
2560
2561 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
2562
2563         PR fortran/43711
2564         * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
2565         after OMP statement.
2566         (gfc_match_omp_critical): Likewise.
2567         (gfc_match_omp_flush): Likewise.
2568         (gfc_match_omp_workshare): Likewise.
2569         (gfc_match_omp_master): Likewise.
2570         (gfc_match_omp_ordered): Likewise.
2571         (gfc_match_omp_atomic): Likewise.
2572         (gfc_match_omp_barrier): Likewise.
2573         (gfc_match_omp_end_nowait): Likewise.
2574
2575 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
2576
2577         PR fortran/31820
2578         * resolve.c (validate_case_label_expr): Removed FIXME.
2579         (resolve_select): Raise default warning on case labels out of range
2580         of the case expression.
2581
2582 2010-05-10  Daniel Franke  <franke.daniel@gmail.com>
2583
2584         PR fortran/27866
2585         PR fortran/35003
2586         PR fortran/42809
2587         * intrinsic.c (gfc_convert_type_warn): Be more discriminative
2588         about conversion warnings.
2589
2590 2010-05-10  Janus Weil  <janus@gcc.gnu.org>
2591
2592         PR fortran/44044
2593         * match.c (gfc_match_select_type): Move error message to
2594         resolve_select_type.
2595         * resolve.c (resolve_select_type): Error message moved here from
2596         gfc_match_select_type. Correctly set type of temporary.
2597
2598 2010-05-10  Richard Guenther  <rguenther@suse.de>
2599
2600         * trans-decl.c (gfc_build_library_function_decl): Split out
2601         worker to ...
2602         (build_library_function_decl_1): ... this new function.
2603         Set a fnspec attribute if a specification was provided.
2604         (gfc_build_library_function_decl_with_spec): New function.
2605         (gfc_build_intrinsic_function_decls): Annotate internal_pack
2606         and internal_unpack.
2607
2608 2010-05-07  Daniel Franke  <franke.daniel@gmail.com>
2609
2610         PR fortran/40728
2611         * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
2612         as external.
2613
2614 2010-05-07  Jason Merrill  <jason@redhat.com>
2615
2616         * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
2617         to avoid -Wc++-compat warning.
2618
2619 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
2620
2621         PR 40989
2622         * options.c (gfc_handle_option): Add argument kind.
2623         * gfortran.h (gfc_handle_option): Update declaration.
2624
2625 2010-05-06  Tobias Burnus  <burnus@net-b.de>
2626
2627         PR fortran/43985
2628         * trans-types.c (gfc_sym_type): Mark Cray pointees as
2629         GFC_POINTER_TYPE_P.
2630
2631 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
2632
2633         PR fortran/32331
2634         * resolve.c (traverse_data_list): Rephrase error message for
2635         non-constant bounds in data-implied-do.
2636
2637 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
2638
2639         PR fortran/24978
2640         * gfortran.h: Removed repeat count from constructor, removed
2641         all usages.
2642         * data.h (gfc_assign_data_value_range): Changed return value from
2643         void to gfc_try.
2644         * data.c (gfc_assign_data_value): Add location to constructor element.
2645         (gfc_assign_data_value_range): Call gfc_assign_data_value()
2646         for each element in range. Return early if an error was generated.
2647         * resolve.c (check_data_variable): Stop early if range assignment
2648         generated an error.
2649
2650 2010-05-05  Janus Weil  <janus@gcc.gnu.org>
2651
2652         PR fortran/43696
2653         * resolve.c (resolve_fl_derived): Some fixes for class variables.
2654         * symbol.c (gfc_build_class_symbol): Add separate class container for
2655         class pointers.
2656
2657 2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
2658
2659         PR fortran/43592
2660         * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
2661
2662 2010-05-02  Tobias Burnus  <burnus@net-b.de>
2663
2664         PR fortran/18918
2665         * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
2666         for lcobound, ucobound, image_index and this_image.
2667         * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
2668         gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
2669         * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
2670         gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
2671         functions.
2672         (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
2673
2674 2010-04-30  Tobias Burnus  <burnus@net-b.de>
2675
2676         PR fortran/18918
2677         PR fortran/43931
2678         *  trans-types.c (gfc_get_array_descriptor_base): Fix index
2679         calculation for array descriptor types.
2680
2681 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
2682
2683         PR fortran/43896
2684         * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
2685         initializers for PPC members of the vtabs.
2686
2687 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
2688
2689         PR fortran/42274
2690         * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
2691         attribute for all PPC members of the vtypes.
2692         (copy_vtab_proc_comps): Copy the correct interface.
2693         * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
2694         * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
2695         a dummy argument and make sure all PPC members of the vtab are
2696         initialized correctly.
2697         (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
2698         in call to gfc_trans_assign_vtab_procs.
2699         * trans-stmt.c (gfc_trans_allocate): Ditto.
2700
2701 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
2702
2703         PR fortran/43326
2704         * resolve.c (resolve_typebound_function): Renamed
2705         resolve_class_compcall.Do all the detection of class references
2706         here.
2707         (resolve_typebound_subroutine): resolve_class_typebound_call
2708         renamed. Otherwise same as resolve_typebound_function.
2709         (gfc_resolve_expr): Call resolve_typebound_function.
2710         (resolve_code): Call resolve_typebound_subroutine.
2711
2712 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
2713
2714         PR fortran/43492
2715         * resolve.c (resolve_typebound_generic_call): For CLASS methods
2716         pass back the specific symtree name, rather than the target
2717         name.
2718
2719 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
2720
2721         PR fortran/42353
2722         * resolve.c (resolve_structure_cons): Make the initializer of
2723         the vtab component 'extends' the same type as the component.
2724
2725 2010-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2726
2727         PR fortran/42680
2728         * interface.c (check_interface1): Pass symbol name rather than NULL to
2729         gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
2730         trap MULL. (gfc_compare_derived_types): Revert previous change
2731         incorporated incorrectly during merge from trunk, r155778.
2732         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2733         than NULL to gfc_compare_interfaces.
2734         * symbol.c (add_generic_specifics): Likewise.
2735
2736 2010-02-29  Janus Weil  <janus@gcc.gnu.org>
2737
2738         PR fortran/42353
2739         * interface.c (gfc_compare_derived_types): Add condition for vtype.
2740         * symbol.c (gfc_find_derived_vtab): Sey access to private.
2741         (gfc_find_derived_vtab): Likewise.
2742         * module.c (ab_attribute): Add enumerator AB_VTAB.
2743         (mio_symbol_attribute): Use new attribute, AB_VTAB.
2744         (check_for_ambiguous): Likewise.
2745
2746 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
2747             Janus Weil  <janus@gcc.gnu.org>
2748
2749         PR fortran/41829
2750         * trans-expr.c (select_class_proc): Remove function.
2751         (conv_function_val): Delete reference to previous.
2752         (gfc_conv_derived_to_class): Add second argument to the call to
2753         gfc_find_derived_vtab.
2754         (gfc_conv_structure): Exclude proc_pointer components when
2755         accessing $data field of class objects.
2756         (gfc_trans_assign_vtab_procs): New function.
2757         (gfc_trans_class_assign): Add second argument to the call to
2758         gfc_find_derived_vtab.
2759         * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
2760         implement holding off searching for the vptr derived type.
2761         (add_proc_component): New function.
2762         (add_proc_comps): New function.
2763         (add_procs_to_declared_vtab1): New function.
2764         (copy_vtab_proc_comps): New function.
2765         (add_procs_to_declared_vtab): New function.
2766         (void add_generic_specifics): New function.
2767         (add_generics_to_declared_vtab): New function.
2768         (gfc_find_derived_vtab): Add second argument to the call to
2769         gfc_find_derived_vtab. Add the calls to
2770         add_procs_to_declared_vtab and add_generics_to_declared_vtab.
2771         * decl.c (build_sym, build_struct): Use new arg in calls to
2772         gfc_build_class_symbol.
2773         * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
2774         definition of struct gfc_class_esym_list. Modify prototypes
2775         of gfc_build_class_symbol and gfc_find_derived_vtab.
2776         * trans-stmt.c (gfc_trans_allocate): Add second argument to the
2777         call to gfc_find_derived_vtab.
2778         * module.c : Add the vtype attribute.
2779         * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
2780         * resolve.c (resolve_typebound_generic_call): Add second arg
2781         to pass along the generic name for class methods.
2782         (resolve_typebound_call): The same.
2783         (resolve_compcall): Use the second arg to carry the generic
2784         name from the above. Remove the reference to class_esym.
2785         (check_members, check_class_members, resolve_class_esym,
2786         hash_value_expr): Remove functions.
2787         (resolve_class_compcall, resolve_class_typebound_call): Modify
2788         to use vtable rather than member by member calls.
2789         (gfc_resolve_expr): Modify second arg in call to
2790         resolve_compcall.
2791         (resolve_select_type): Add second arg in call to
2792         gfc_find_derived_vtab.
2793         (resolve_code): Add second arg in call resolve_typebound_call.
2794         (resolve_fl_derived): Exclude vtypes from check for late
2795         procedure definitions. Likewise for checking of explicit
2796         interface and checking of pass arg.
2797         * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2798         calls to gfc_find_derived_vtab.
2799         * match.c (select_type_set_tmp): Use new arg in call to
2800         gfc_build_class_symbol.
2801         * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2802         necessary.
2803         * parse.c (endType): Finish incomplete classes.
2804
2805 2010-04-28  Tobias Burnus  <burnus@net-b.de>
2806
2807         PR fortran/18918
2808         PR fortran/43919
2809         * simplify.c (simplify_cobound): Handle scalar coarrays.
2810
2811 2010-04-27  Tobias Burnus  <burnus@net-b.de>
2812
2813         * gfc-internals.texi: Update copyright year.
2814         * gfortran.texi: Ditto.
2815         * invoke.texi: Ditto.
2816
2817 2010-04-27  Tobias Burnus  <burnus@net-b.de>
2818
2819         PR fortran/18918
2820         * resolve.c (resolve_allocate_expr): Allow array coarrays.
2821         * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2822         * trans-types.c (gfc_get_array_type_bounds,
2823         gfc_get_array_descriptor_base): Add corank argument.
2824         * trans-array.c (gfc_array_init_size): Handle corank.
2825         (gfc_trans_create_temp_array, gfc_array_allocate,
2826         gfc_conv_expr_descriptor): Add corank argument to call.
2827         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2828
2829 2010-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
2830
2831         PR fortran/30073
2832         PR fortran/43793
2833         * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2834         of mucking with a tree directly.
2835
2836 2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2837
2838         PR fortran/43832
2839         * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2840         gfc_error with new error message.
2841
2842 2010-04-24  Paul Thomas  <pault@gcc.gnu.org>
2843
2844         PR fortran/43841
2845         PR fortran/43843
2846         * trans-expr.c (gfc_conv_expr): Supply an address expression for
2847         GFC_SS_REFERENCE.
2848         (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2849         GFC_SS_REFERENCE.
2850         * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2851         than the address of a GFC_SS_REFERENCE.
2852         * trans.h : Change comment on GFC_SS_REFERENCE. 
2853
2854 2010-04-22  Richard Guenther  <rguenther@suse.de>
2855
2856         PR fortran/43829
2857         * resolve.c (gfc_resolve_index): Wrap around ...
2858         (gfc_resolve_index_1): ... this.  Add parameter to allow
2859         any integer kind index type.
2860         (resolve_array_ref): Allow any integer kind for the start
2861         index of an array ref.
2862
2863 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
2864
2865         PR fortran/43836
2866         * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2867         the decl.
2868
2869 2010-04-20  Harald Anlauf  <anlauf@gmx.de>
2870
2871         * intrinsic.c (sort_actual): Remove 'is' in error message.
2872
2873 2010-04-20  Paul Thomas  <pault@gcc.gnu.org>
2874
2875         PR fortran/43227
2876         * resolve.c (resolve_fl_derived): If a component character
2877         length has not been resolved, do so now.
2878         (resolve_symbol): The same as above for a symbol character
2879         length.
2880         * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2881         not needed for a character valued, procedure pointer.
2882
2883         PR fortran/43266
2884         * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2885         not found, return FAILURE rather than ICEing.
2886
2887 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
2888
2889         PR fortran/43339
2890         * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2891         sequential loops private in the innermost containing task region.
2892
2893 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2894
2895         * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2896         to build_common_tree_nodes.
2897
2898 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
2899
2900         PR fortran/31538
2901         * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2902         gfc_msg_bounds by using 'Array bound mismatch' directly.
2903         (gfc_trans_dummy_array_bias):  Remove the use of gfc_msg_bounds.  Reword
2904         error message to include the mismatch in the extent of array bound.
2905         * fortran/trans.c: Remove gfc_msg_bounds.  It is only used in one place.
2906         * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2907
2908 2010-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2909
2910         * gfortran.texi: Update information on temporary file locations.
2911
2912 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
2913
2914         * trans-decl.c (gfc_build_qualified_array): Ensure
2915         ubound.N and lbound.N artificial variable names don't appear
2916         in debug info.
2917
2918 2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
2919
2920         PR fortran/30073
2921         * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2922         block of code.  Set name to the variable associated with the descriptor.
2923
2924 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
2925
2926         * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2927         on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2928
2929 2010-04-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2930
2931         * intrinsic.texi: Add the missing specific name of intrinsic
2932         procedure where the specific name is identical to the generic name.
2933         Fix inconsistent or mismatch in the argument names in intrinsic
2934         procedure descriptions.  Add the SCALAR allocatable description to
2935         ALLOCATED.
2936
2937 2010-04-14  Tobias Burnus  <burnus@net-b.de>
2938
2939         PR fortran/18918
2940         * array.c (gfc_find_array_ref): Handle codimensions.
2941         (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2942         * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2943         gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2944         New functions.
2945         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2946         GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2947         GFC_ISYM_UCOBOUND.
2948         * intrinsic.h (add_functions): Add this_image, image_index,
2949         lcobound and ucobound intrinsics.
2950         * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2951         gfc_check_image_index, gfc_check_this_image,
2952         gfc_simplify_image_index, gfc_simplify_lcobound,
2953         gfc_simplify_this_image, gfc_simplify_ucobound):
2954         New function prototypes.
2955         * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2956         IMAGE_INDEX): Document new intrinsic functions.
2957         * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2958         error fatal.
2959         * simplify.c (simplify_bound_dim): Handle coarrays.
2960         (simplify_bound): Update simplify_bound_dim call.
2961         (gfc_simplify_num_images): Add -fcoarray=none check.
2962         (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2963         gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2964
2965 2010-04-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2966
2967         PR fortran/43747
2968         * constructor.c: Fix typo in comment.
2969         * expr.c (find_array_section): Add check for max array limit.
2970
2971 2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>
2972
2973         PR bootstrap/31400
2974         * gfortranspec.c (lookup_option): Check for -static and return
2975         OPTION_static.
2976         (lang_specific_driver): Break when OPTION_static is discovered.
2977
2978 2010-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2979
2980         * array.c (extract_element): Restore function from trunk.
2981         (gfc_get_array_element): Restore function from trunk.
2982         (gfc_expand_constructor): Restore check against
2983         flag_max_array_constructor.
2984         * constructor.c (node_copy_and_append): Delete unused.
2985         * gfortran.h: Delete comment and extra include.
2986         * constructor.h: Bump copyright and clean up TODO comments.
2987         * resolve.c: Whitespace.
2988
2989 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
2990
2991         * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2992         with direct access access to elements. Adjusted prototype, fixed all
2993         callers.
2994         (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2995         array.
2996         (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2997         (gfc_simplify_spread): Removed workaround, directly insert elements
2998         at a given array position.
2999         (gfc_simplify_transpose): Likewise.
3000         (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
3001         function calls.
3002         (gfc_simplify_unpack): Likewise.
3003
3004 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
3005
3006         * simplify.c (only_convert_cmplx_boz): Renamed to ...
3007         (convert_boz): ... this and moved to start of file.
3008         (gfc_simplify_abs): Whitespace fix.
3009         (gfc_simplify_acos): Whitespace fix.
3010         (gfc_simplify_acosh): Whitespace fix.
3011         (gfc_simplify_aint): Whitespace fix.
3012         (gfc_simplify_dint): Whitespace fix.
3013         (gfc_simplify_anint): Whitespace fix.
3014         (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
3015         (gfc_simplify_dnint): Whitespace fix.
3016         (gfc_simplify_asin): Whitespace fix.
3017         (gfc_simplify_asinh): Moved creation of result-expr out of switch.
3018         (gfc_simplify_atan): Likewise.
3019         (gfc_simplify_atanh): Whitespace fix.
3020         (gfc_simplify_atan2): Whitespace fix.
3021         (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
3022         (gfc_simplify_bessel_j1): Likewise.
3023         (gfc_simplify_bessel_jn): Likewise.
3024         (gfc_simplify_bessel_y0): Likewise.
3025         (gfc_simplify_bessel_y1): Likewise.
3026         (gfc_simplify_bessel_yn): Likewise.
3027         (gfc_simplify_ceiling): Reorderd statements.
3028         (simplify_cmplx): Use convert_boz(), check for constant arguments.
3029         Whitespace fix.
3030         (gfc_simplify_cmplx): Use correct default kind. Removed check for
3031         constant arguments.
3032         (gfc_simplify_complex): Replaced if-gate. Removed check for
3033         constant arguments.
3034         (gfc_simplify_conjg): Whitespace fix.
3035         (gfc_simplify_cos): Whitespace fix.
3036         (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
3037         (gfc_simplify_dcmplx): Removed check for constant arguments.
3038         (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
3039         (gfc_simplify_digits): Whitespace fix.
3040         (gfc_simplify_dim): Whitespace fix.
3041         (gfc_simplify_dprod): Reordered statements.
3042         (gfc_simplify_erf): Whitespace fix.
3043         (gfc_simplify_erfc): Whitespace fix.
3044         (gfc_simplify_epsilon): Whitespace fix.
3045         (gfc_simplify_exp): Whitespace fix.
3046         (gfc_simplify_exponent): Use convert_boz().
3047         (gfc_simplify_floor): Reorderd statements.
3048         (gfc_simplify_gamma): Whitespace fix.
3049         (gfc_simplify_huge): Whitespace fix.
3050         (gfc_simplify_iand): Whitespace fix.
3051         (gfc_simplify_ieor): Whitespace fix.
3052         (simplify_intconv): Use gfc_convert_constant().
3053         (gfc_simplify_int): Use simplify_intconv().
3054         (gfc_simplify_int2): Reorderd statements.
3055         (gfc_simplify_idint): Reorderd statements.
3056         (gfc_simplify_ior): Whitespace fix.
3057         (gfc_simplify_ishftc): Removed duplicate type check.
3058         (gfc_simplify_len): Use range_check() instead of manual range check.
3059         (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
3060         (gfc_simplify_log): Whitespace fix.
3061         (gfc_simplify_log10): Whitespace fix.
3062         (gfc_simplify_minval): Whitespace fix.
3063         (gfc_simplify_maxval): Whitespace fix.
3064         (gfc_simplify_mod): Whitespace fix.
3065         (gfc_simplify_modulo): Whitespace fix.
3066         (simplify_nint): Reorderd statements.
3067         (gfc_simplify_not): Whitespace fix.
3068         (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
3069         (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
3070         (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
3071         (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
3072         (gfc_simplify_realpart): Whitespace fix.
3073         (gfc_simplify_selected_char_kind): Removed unused result-variable.
3074         (gfc_simplify_selected_int_kind): Removed unused result-variable.
3075         (gfc_simplify_selected_real_kind): Removed unused result-variable.
3076         (gfc_simplify_sign): Whitespace fix.
3077         (gfc_simplify_sin): Whitespace fix.
3078         (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
3079         (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
3080         (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
3081         (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
3082         (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
3083
3084 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
3085
3086         * gfortran.h (gfc_start_constructor): Removed.
3087         (gfc_get_array_element): Removed.
3088         * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr 
3089         instead. Fixed all callers.
3090         (extract_element): Removed.
3091         (gfc_expand_constructor): Temporarily removed check for
3092         max-array-constructor. Will be re-introduced later if still required.
3093         (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
3094         instead. Fixed all callers.
3095         * expr.c (find_array_section): Replaced manual lookup of elements
3096         by gfc_constructor_lookup.
3097
3098 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
3099
3100         * gfortran.h (gfc_get_null_expr): New prototype.
3101         (gfc_get_operator_expr): New prototype.
3102         (gfc_get_character_expr): New prototype.
3103         (gfc_get_iokind_expr): New prototype.
3104         * expr.c (gfc_get_null_expr): New.
3105         (gfc_get_character_expr): New.
3106         (gfc_get_iokind_expr): New.
3107         (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
3108         * matchexp.c (build_node): Renamed and moved to
3109         expr.c (gfc_get_operator_expr). Reordered arguments to match 
3110         other functions. Fixed all callers.
3111         (gfc_get_parentheses): Use specific function to build expr.
3112         * array.c (gfc_match_array_constructor): Likewise.
3113         * arith.c (eval_intrinsic): Likewise.
3114         (gfc_hollerith2int): Likewise.
3115         (gfc_hollerith2real): Likewise.
3116         (gfc_hollerith2complex): Likewise.
3117         (gfc_hollerith2logical): Likewise.
3118         * data.c (create_character_intializer): Likewise.
3119         * decl.c (gfc_match_null): Likewise.
3120         (enum_initializer): Likewise.
3121         * io.c (gfc_match_format): Likewise.
3122         (match_io): Likewise.
3123         * match.c (gfc_match_nullify): Likewise.
3124         * primary.c (match_string_constant): Likewise.
3125         (match_logical_constant): Likewise.
3126         (build_actual_constructor): Likewise.
3127         * resolve.c (build_default_init_expr): Likewise.
3128         * symbol.c (generate_isocbinding_symbol): Likewise.
3129         (gfc_build_class_symbol): Likewise.
3130         (gfc_find_derived_vtab): Likewise.
3131         * simplify.c (simplify_achar_char): Likewise.
3132         (gfc_simplify_adjustl): Likewise.
3133         (gfc_simplify_adjustr): Likewise.
3134         (gfc_simplify_and): Likewise.
3135         (gfc_simplify_bit_size): Likewise.
3136         (gfc_simplify_is_iostat_end): Likewise.
3137         (gfc_simplify_is_iostat_eor): Likewise.
3138         (gfc_simplify_isnan): Likewise.
3139         (simplify_bound): Likewise.
3140         (gfc_simplify_leadz): Likewise.
3141         (gfc_simplify_len_trim): Likewise.
3142         (gfc_simplify_logical): Likewise.
3143         (gfc_simplify_maxexponent): Likewise.
3144         (gfc_simplify_minexponent): Likewise.
3145         (gfc_simplify_new_line): Likewise.
3146         (gfc_simplify_null): Likewise.
3147         (gfc_simplify_or): Likewise.
3148         (gfc_simplify_precision): Likewise.
3149         (gfc_simplify_repeat): Likewise.
3150         (gfc_simplify_scan): Likewise.
3151         (gfc_simplify_size): Likewise.
3152         (gfc_simplify_trailz): Likewise.
3153         (gfc_simplify_trim): Likewise.
3154         (gfc_simplify_verify): Likewise.
3155         (gfc_simplify_xor): Likewise.
3156         * trans-io.c (build_dt): Likewise.
3157         (gfc_new_nml_name_expr): Removed.
3158
3159 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
3160
3161         * arith.h (gfc_constant_result): Removed prototype.
3162         * constructor.h (gfc_build_array_expr): Removed prototype.
3163         (gfc_build_structure_constructor_expr): Removed prototype.
3164         * gfortran.h (gfc_int_expr): Removed prototype.
3165         (gfc_logical_expr): Removed prototype.
3166         (gfc_get_array_expr): New prototype.
3167         (gfc_get_structure_constructor_expr): New prototype.
3168         (gfc_get_constant_expr): New prototype.
3169         (gfc_get_int_expr): New prototype.
3170         (gfc_get_logical_expr): New prototype.
3171         * arith.c (gfc_constant_result): Moved and renamed to
3172         expr.c (gfc_get_constant_expr). Fixed all callers.
3173         * constructor.c (gfc_build_array_expr): Moved and renamed to
3174         expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
3175         and kind. Fixed all callers.
3176         (gfc_build_structure_constructor_expr): Moved and renamed to
3177         expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
3178         to type and kind. Fixed all callers.
3179         * expr.c (gfc_logical_expr): Renamed to ...
3180         (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
3181         (gfc_int_expr): Renamed to ...
3182         (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
3183         callers.
3184         (gfc_get_constant_expr): New.
3185         (gfc_get_array_expr): New.
3186         (gfc_get_structure_constructor_expr): New.
3187         * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
3188         instead.
3189
3190 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
3191
3192         * constructor.h: New.
3193         * constructor.c: New.
3194         * Make-lang.in: Add new files to F95_PARSER_OBJS.
3195         * arith.c (reducy_unary): Use constructor API.
3196         (reduce_binary_ac): Likewise.
3197         (reduce_binary_ca): Likewise.
3198         (reduce_binary_aa): Likewise.
3199         * check.c (gfc_check_pack): Likewise.
3200         (gfc_check_reshape): Likewise.
3201         (gfc_check_unpack): Likewise.
3202         * decl.c (add_init_expr_to_sym): Likewise.
3203         (build_struct): Likewise.
3204         * dependency.c (gfc_check_dependency): Likewise.
3205         (contains_forall_index_p): Likewise.
3206         * dump-parse-tree.c (show_constructor): Likewise.
3207         * expr.c (free_expr0): Likewise.
3208         (gfc_copy_expr): Likewise.
3209         (gfc_is_constant_expr): Likewise.
3210         (simplify_constructor): Likewise.
3211         (find_array_element): Likewise.
3212         (find_component_ref): Likewise.
3213         (find_array_section): Likewise.
3214         (find_substring_ref): Likewise.
3215         (simplify_const_ref): Likewise.
3216         (scalarize_intrinsic_call): Likewise.
3217         (check_alloc_comp_init): Likewise.
3218         (gfc_default_initializer): Likewise.
3219         (gfc_traverse_expr): Likewise.
3220         * iresolve.c (check_charlen_present): Likewise.
3221         (gfc_resolve_reshape): Likewise.
3222         (gfc_resolve_transfer): Likewise.
3223         * module.c (mio_constructor): Likewise.
3224         * primary.c (build_actual_constructor): Likewise.
3225         (gfc_match_structure_constructor): Likewise.
3226         * resolve.c (resolve_structure_cons): Likewise.
3227         * simplify.c (is_constant_array_expr): Likewise.
3228         (init_result_expr): Likewise.
3229         (transformational_result): Likewise.
3230         (simplify_transformation_to_scalar): Likewise.
3231         (simplify_transformation_to_array): Likewise.
3232         (gfc_simplify_dot_product): Likewise.
3233         (simplify_bound): Likewise.
3234         (simplify_matmul): Likewise.
3235         (simplify_minval_maxval): Likewise.
3236         (gfc_simplify_pack): Likewise.
3237         (gfc_simplify_reshape): Likewise.
3238         (gfc_simplify_shape): Likewise.
3239         (gfc_simplify_spread): Likewise.
3240         (gfc_simplify_transpose): Likewise.
3241         (gfc_simplify_unpack): Likewise.q
3242         (gfc_convert_constant): Likewise.
3243         (gfc_convert_char_constant): Likewise.
3244         * target-memory.c (size_array): Likewise.
3245         (encode_array): Likewise.
3246         (encode_derived): Likewise.
3247         (interpret_array): Likewise.
3248         (gfc_interpret_derived): Likewise.
3249         (expr_to_char): Likewise.
3250         (gfc_merge_initializers): Likewise.
3251         * trans-array.c (gfc_get_array_constructor_size): Likewise.
3252         (gfc_trans_array_constructor_value): Likewise.
3253         (get_array_ctor_strlen): Likewise.
3254         (gfc_constant_array_constructor_p): Likewise.
3255         (gfc_build_constant_array_constructor): Likewise.
3256         (gfc_trans_array_constructor): Likewise.
3257         (gfc_conv_array_initializer): Likewise.
3258         * trans-decl.c (check_constant_initializer): Likewise.
3259         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
3260         (gfc_apply_interface_mapping_to_cons): Likewise.
3261         (gfc_trans_structure_assign): Likewise.
3262         (gfc_conv_structure): Likewise.
3263         * array.c (check_duplicate_iterator): Likewise.
3264         (match_array_list): Likewise.
3265         (match_array_cons_element): Likewise.
3266         (gfc_match_array_constructor): Likewise.
3267         (check_constructor_type): Likewise.
3268         (check_constructor): Likewise.
3269         (expand): Likewise.
3270         (expand_constructor): Likewise.
3271         (extract_element): Likewise.
3272         (gfc_expanded_ac): Likewise.
3273         (resolve_array_list): Likewise.
3274         (gfc_resolve_character_array_constructor): Likewise.
3275         (copy_iterator): Renamed to ...
3276         (gfc_copy_iterator): ... this.
3277         (gfc_append_constructor): Removed.
3278         (gfc_insert_constructor): Removed unused function.
3279         (gfc_get_constructor): Removed.
3280         (gfc_free_constructor): Removed.
3281         (qgfc_copy_constructor): Removed.
3282         * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
3283         Removed all references. Replaced constructor list by splay-tree.
3284         (struct gfc_constructor): Removed member 'next', moved 'offset' from
3285         the inner struct, added member 'base'.
3286         (gfc_append_constructor): Removed prototype.
3287         (gfc_insert_constructor): Removed prototype.
3288         (gfc_get_constructor): Removed prototype.
3289         (gfc_free_constructor): Removed prototype.
3290         (qgfc_copy_constructor): Removed prototype.
3291         (gfc_copy_iterator): New prototype.
3292         * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
3293
3294 2010-04-10  Tobias Burnus  <burnus@net-b.de>
3295
3296         PR fortran/43591
3297         * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
3298         proc-pointers and type-bound procedures.
3299         (gfc_specification_expr): Check proc-pointers for pureness.
3300
3301 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
3302
3303         PR bootstrap/43684
3304         * gfortranspec.c (lang_specific_driver): Do not expose vars 
3305         only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
3306         for such.
3307
3308 2010-04-09  Tobias Burnus  <burnus@net-b.de>
3309
3310         PR fortran/18918
3311         * decl.c (variable_decl, match_attr_spec): Fix setting the array
3312         spec.
3313         * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
3314         * data.c (gfc_assign_data_value): Ditto.
3315         * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
3316         (gfc_traverse_expr): Traverse also through codimension expressions.
3317         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
3318         gfc_has_ultimate_pointer): New functions.
3319         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
3320         (gfc_array_ref): Add codimen.
3321         (gfc_array_ref): Add in_allocate.
3322         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
3323         gfc_has_ultimate_pointer): Add prototypes.
3324         * interface.c (compare_parameter, compare_actual_formal,
3325         check_intents): Add coarray constraints.
3326         * match.c (gfc_match_iterator): Add coarray constraint.
3327         * match.h (gfc_match_array_ref): Update interface.
3328         * primary.c (gfc_match_varspec): Handle codimensions.
3329         * resolve.c (coarray_alloc, inquiry_argument): New static variables.
3330         (check_class_members): Return gfc_try instead for error recovery.
3331         (resolve_typebound_function,resolve_typebound_subroutine,
3332         check_members): Handle return value of check_class_members.
3333         (resolve_structure_cons, resolve_actual_arglist, resolve_function,
3334         check_dimension, compare_spec_to_ref, resolve_array_ref,
3335         resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
3336         resolve_allocate_expr, resolve_ordinary_assign): Add coarray
3337         support.
3338         * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
3339         Skip over coarray refs.
3340         (gfc_array_allocate) Add support for references containing coindexes.
3341         * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
3342         (gfc_map_intrinsic_function): Ignore codimensions.
3343
3344 2010-04-08  Bud Davis  <bdavis9659@sbcglobal.net>
3345
3346         PR fortran/28039
3347         * io.c (check_format_string):  Added check for additional non 
3348         blank characters after the format string was successfully 
3349         parsed.
3350         * io.c (check_format): Changed the error messages for positive
3351         int required and period required to drop through the error logic
3352         and report with gfc_error instead of gfc_error_now.  Corrected
3353         format postion for hollerith strings.
3354
3355 2010-04-08  Tobias Burnus  <burnus@net-b.de>
3356
3357         * module.c (use_iso_fortran_env_module): Fix standard check.
3358
3359 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
3360
3361         * parse.c (parse_derived, parse_enum): Avoid set but not used
3362         warning.
3363
3364 2010-04-07  Janne Blomqvist  <jb@gcc.gnu.org>
3365
3366         PR fortran/40539
3367         * gfortran.texi: Add section about representation of
3368         LOGICAL variables.
3369
3370 2010-04-07  Simon Baldwin  <simonb@google.com>
3371
3372         * cpp.c (cb_cpp_error): Add warning reason argument, set a value
3373         for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
3374
3375 2010-04-07  Richard Guenther  <rguenther@suse.de>
3376
3377         * options.c (gfc_init_options): Do not set.
3378
3379 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3380
3381         PR fortran/18918
3382         * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
3383         * match.c (gfc_match_critical, sync_statement): Ditto.
3384         * gfortran.h (gfc_fcoarray): New enum.
3385         (gfc_option_t): Use it.
3386         * lang.opt (fcoarray): Add new flag.
3387         * invoke.texi (fcoarray): Document it.
3388         * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
3389         (gfc_handle_coarray_option): New function.
3390
3391 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3392
3393         PR fortran/18918
3394         * gfortran.h (gfc_array_spec): Add cotype.
3395         * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
3396         and defer error diagnostic.
3397         * resolve.c (resolve_fl_derived): Add missing check.
3398         (resolve_symbol): Add cotype/type check.
3399         * parse.c (parse_derived): Fix setting of coarray_comp.
3400
3401 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3402
3403         PR fortran/18918
3404         * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
3405         match_array_element_spec,gfc_copy_array_spec,
3406         gfc_compare_array_spec): Include corank.
3407         (match_array_element_spec,gfc_set_array_spec): Support codimension.
3408         * decl.c (build_sym,build_struct,variable_decl,
3409         match_attr_spec,attr_decl1,cray_pointer_decl,
3410         gfc_match_volatile): Add codimension.
3411         (gfc_match_codimension): New function.
3412         * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
3413         * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
3414         (gfc_add_codimension): New function prototype.
3415         * match.h (gfc_match_codimension): New function prototype.
3416         (gfc_match_array_spec): Update prototype
3417         * match.c (gfc_match_common): Update gfc_match_array_spec call.
3418         * module.c (MOD_VERSION): Bump.
3419         (mio_symbol_attribute): Support coarray attributes.
3420         (mio_array_spec): Add corank support.
3421         * parse.c (decode_specification_statement,decode_statement,
3422         parse_derived): Add coarray support.
3423         * resolve.c (resolve_formal_arglist, was_declared,
3424         is_non_constant_shape_array, resolve_fl_variable,
3425         resolve_fl_derived, resolve_symbol): Add coarray support.
3426         * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
3427         gfc_build_class_symbol): Add coarray support.
3428         (gfc_add_codimension): New function.
3429
3430 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3431
3432         PR fortran/18918
3433         * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
3434         atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
3435         stat_locked_other_image, stat_stopped_image and stat_unlocked of
3436         Fortran 2008.
3437         * intrinsic.texi (iso_fortran_env): Ditto.
3438         * libgfortran.h (libgfortran_stat_codes): New enum.
3439         * module.c (use_iso_fortran_env_module): Honour -std= when loading
3440         constants from the intrinsic module.
3441
3442 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3443
3444         PR fortran/39997
3445         * intrinsic.c (add_functions): Add num_images.
3446         * decl.c (gfc_match_end): Handle END CRITICAL.
3447         * intrinsic.h (gfc_simplify_num_images): Add prototype.
3448         * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
3449         and SYNC.
3450         * gfortran.h (gfc_statement): Add enum items for those.
3451         (gfc_exec_op) Ditto.
3452         (gfc_isym_id): Add num_images.
3453         * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
3454         (gfc_trans_sync,gfc_trans_critical): New functions.
3455         * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
3456         gfc_trans_critical): Add/update prototypes.
3457         * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
3458         and SYNC statements.
3459         * trans.h (gfor_fndecl_error_stop_string) Add variable.
3460         * resolve.c (resolve_sync): Add function.
3461         (gfc_resolve_blocks): Handle CRITICAL.
3462         (resolve_code): Handle CRITICAL, ERROR STOP,
3463         (resolve_branch): Add CRITICAL constraint check.
3464         and SYNC statements.
3465         * st.c (gfc_free_statement): Add new statements.
3466         * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
3467         (gfc_build_builtin_function_decls): Initialize it.
3468         * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
3469         (gfc_match_critical, gfc_match_error_stop, sync_statement,
3470         gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
3471         New functions.
3472         (match_exit_cycle): Handle CRITICAL constraint.
3473         (gfc_match_stopcode): Handle ERROR STOP.
3474         * match.h (gfc_match_critical, gfc_match_error_stop,
3475         gfc_match_sync_all, gfc_match_sync_images,
3476         gfc_match_sync_memory): Add prototype.
3477         * parse.c (decode_statement, gfc_ascii_statement,
3478         parse_executable): Handle new statements.
3479         (parse_critical_block): New function.
3480         * parse.h (gfc_compile_state): Add COMP_CRITICAL.
3481         * intrinsic.texi (num_images): Document new function.
3482         * simplify.c (gfc_simplify_num_images): Add function.
3483
3484 2010-04-06  Tobias Burnus  <burnus@net-b.de>
3485
3486         PR fortran/43178
3487         * trans-array.c (gfc_conv_expr_descriptor): Update
3488         gfc_trans_scalar_assign call.
3489         (has_default_initializer): New function.
3490         (gfc_trans_deferred_array): Nullify less often.
3491         * trans-expr.c (gfc_conv_subref_array_arg,
3492         gfc_trans_subcomponent_assign): Update call to
3493         gfc_trans_scalar_assign.
3494         (gfc_trans_scalar_assign): Add parameter and pass it on.
3495         (gfc_trans_assignment_1): Optionally, do not dealloc before
3496         assignment.
3497         * trans-openmp.c (gfc_trans_omp_array_reduction): Update
3498         call to gfc_trans_scalar_assign.
3499         * trans-decl.c (gfc_get_symbol_decl): Do not always apply
3500         initializer to static variables.
3501         (gfc_init_default_dt): Add dealloc parameter and pass it on.
3502         * trans-stmt.c (forall_make_variable_temp,
3503         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3504         gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
3505         gfc_trans_allocate): Update gfc_trans_assignment call.
3506         * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
3507         gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
3508         parameter to prototype.
3509
3510 2010-03-31  Paul Thomas  <pault@gcc.gnu.org>
3511
3512         * ioparm.def : Update copyright.
3513         * lang.opt : ditto
3514         * trans-array.c : ditto
3515         * trans-array.h : ditto
3516         * expr.c: ditto
3517         * trans-types.c: ditto
3518         * dependency.c : ditto
3519         * gfortran.h : ditto
3520         * options.c : ditto
3521         * trans-io.c : ditto
3522         * trans-intrinsic.c : ditto
3523         * libgfortran.h : ditto
3524         * invoke.texi : ditto
3525         * intrinsic.texi : ditto
3526         * trans.c : ditto
3527         * trans.h : ditto
3528         * intrinsic.c : ditto
3529         * interface.c : ditto
3530         * iresolve.c : ditto
3531         * trans-stmt.c : ditto
3532         * trans-stmt.h : ditto
3533         * parse,c : ditto
3534         * match.h : ditto
3535         * error.c : ditto
3536
3537 2010-03-20  Paul Thomas  <pault@gcc.gnu.org>
3538
3539         PR fortran/43450
3540         * trans-decl.c (gfc_create_module_variable): With -fwhole-file
3541         do not assert the context of derived types.
3542
3543 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3544
3545         PR fortran/43409
3546         * ioparm.def: Change inquire size variable to type pointer to
3547         GFC_IO_INT type.
3548
3549 2010-03-18  Paul Thomas  <pault@gcc.gnu.org>
3550
3551         PR fortran/43039
3552         * trans-expr.c (conv_parent_component_references): Ensure that
3553         'dt' has a backend_decl.
3554
3555         PR fortran/43043
3556         * trans-expr.c (gfc_conv_structure): Ensure that the derived
3557         type has a backend_decl.
3558
3559         PR fortran/43044
3560         * resolve.c (resolve_global_procedure): Check that the 'cl'
3561         structure is not NULL.
3562
3563 2010-03-18  Shujing Zhao  <pearly.zhao@oracle.com>
3564
3565         * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
3566         redundant tab.
3567
3568 2010-03-17  Tobias Burnus  <burnus@net-b.de>
3569
3570         PR fortran/43331
3571         * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
3572         gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
3573         check.
3574         * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
3575         pointees as having explizit size.
3576         * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
3577         check.
3578         * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
3579         (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
3580         * resolve.c (resolve_symbol): Handle cp_was_assumed.
3581         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
3582         (gfc_finish_var_decl): Don't mark Cray pointees as restricted
3583         pointers.
3584
3585 2010-03-14  Tobias Burnus  <burnus@net-b.de>
3586
3587         PR fortran/43362
3588         * resolve.c (resolve_structure_cons): Add missing PURE constraint.
3589         (resolve_ordinary_assign): Add check to avoid segfault.
3590
3591 2010-03-12  Paul Thomas  <pault@gcc.gnu.org>
3592
3593         PR fortran/43291
3594         PR fortran/43326
3595         * resolve.c (resolve_compcall): Add new boolean dummy argument
3596         'class_members'. Only resolve expression at end if false.
3597         Remove redundant, static variable 'class_object'.
3598         (check_class_members): Add extra argument to call of
3599         resolve_compcall.
3600         (resolve_typebound_function): Renamed resolve_class_compcall.
3601         Do all the detection of class references here. Correct calls to
3602         resolve_compcall for extra argument.
3603         (resolve_typebound_subroutine): resolve_class_typebound_call
3604         renamed. Otherwise same as resolve_typebound_function.
3605         (gfc_resolve_expr): Call resolve_typebound_function.
3606         (resolve_code): Call resolve_typebound_subroutine.
3607
3608 2010-03-10  Tobias Burnus  <burnus@net-b.de
3609
3610         PR fortran/43303
3611         * symbol.c (get_iso_c_sym): Set sym->result.
3612
3613 2010-03-08  Janus Weil  <janus@gcc.gnu.org>
3614
3615         PR fortran/43256
3616         * resolve.c (resolve_compcall): Don't set 'value.function.name' here
3617         for TBPs, otherwise they will not be resolved properly.
3618         (resolve_function): Use 'value.function.esym' instead of
3619         'value.function.name' to check if we're dealing with a TBP.
3620         (check_class_members): Set correct type of passed object for all TBPs,
3621         not only generic ones, except if the type is abstract.
3622
3623 2010-03-04  Janus Weil  <janus@gcc.gnu.org>
3624
3625         PR fortran/43244
3626         * decl.c (gfc_match_final_decl): Make sure variable names starting with
3627         'final...' are not misinterpreted as FINAL statements.
3628
3629 2010-03-03  Paul Thomas  <pault@gcc.gnu.org>
3630
3631         PR fortran/43243
3632         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3633         allocatable ultimate components do not need temporaries, whilst
3634         ultimate pointer components do.
3635
3636 2010-03-03  Janus Weil  <janus@gcc.gnu.org>
3637
3638         PR fortran/43169
3639         * resolve.c (resolve_code): Correctly set gfc_current_ns for
3640         EXEC_SELECT_TYPE.
3641         (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
3642         (gfc_pure): Ditto.
3643
3644 2010-03-02  Paul Thomas  <pault@gcc.gnu.org>
3645
3646         PR fortran/43180
3647         * trans-array.c (gfc_conv_array_parameter): A full array of
3648         derived type need not be restricted to a symbol without an
3649         array spec to use the call to gfc_conv_expr_descriptor.
3650
3651         PR fortran/43173
3652         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3653         allocatable arrays do not need temporaries.
3654
3655 2010-03-01  Tobias Burnus  <burnus@net-b.de>
3656
3657         PR fortran/43199
3658         * resolve.c (find_array_spec): Handle REF_COMPONENT with
3659         CLASS components.
3660
3661 2010-02-28  Tobias Burnus  <burnus@net-b.de>
3662
3663         PR fortran/43205
3664         * trans-expr.c (is_zero_initializer_p): Move up in the file.
3665         (gfc_conv_initializer): Handle zero initializer as special case.
3666
3667 2010-02-27  Tobias Burnus  <burnus@net-b.de>
3668
3669         PR fortran/43185
3670         * resolve.c (resolve_fl_variable_derived): Imply SAVE
3671         for module variables for Fortran 2008.
3672
3673 2010-02-25  Jakub Jelinek  <jakub@redhat.com>
3674
3675         PR debug/43166
3676         * trans-common.c (build_common_decl): Also update DECL_MODE,
3677         and DECL_SIZE when encountering a larger common block and call
3678         layout_decl.
3679
3680 2010-02-24  Tobias Burnus  <burnus@net-b.de>
3681
3682         PR fortran/43042
3683         * trans-expr.c (gfc_conv_initializer): Call directly
3684         gfc_conv_constant for C_NULL_(FUN)PTR.
3685
3686 2010-02-22  Paul Thomas  <pault@gcc.gnu.org>
3687
3688         PR fortran/43072
3689         * dependency.c (gfc_full_array_ref_p): Check for contiguous by
3690         checking the rest of the dimensions for elements.
3691
3692 2010-02-21  Tobias Burnus  <burnus@net-b.de>
3693
3694         PR fortran/35259
3695         * gfortran.h (gfc_option_t): New flag -fprotect-parens.
3696         * lang.opt: Ditto.
3697         * option.c (gfc_init_options,gfc_handle_option): Ditto.
3698         * trans-expr.c (gfc_conv_expr_op): Use the flag.
3699         * invoke.texi: Document new -fno-protect-parens flag.
3700
3701 2010-02-20  Paul Thomas  <pault@gcc.gnu.org>
3702
3703         PR fortran/36932
3704         PR fortran/36933
3705         PR fortran/43072
3706         PR fortran/43111
3707         * dependency.c (gfc_check_argument_var_dependency): Use enum
3708         value instead of arithmetic vaue for 'elemental'.
3709         (check_data_pointer_types): New function.
3710         (gfc_check_dependency): Call check_data_pointer_types.
3711         * trans-array.h : Change fourth argument of
3712         gfc_conv_array_parameter to boolean.
3713         * trans-array.c (gfc_conv_array_parameter): A contiguous array
3714         can be a dummy but it must not be assumed shape or deferred.
3715         Change fourth argument to boolean. Array constructor exprs will
3716         always be contiguous and do not need packing and unpacking.
3717         * trans-expr.c (gfc_conv_procedure_call): Clean up some white
3718         space and change fourth argument of gfc_conv_array_parameter
3719         to boolean.
3720         (gfc_trans_arrayfunc_assign): Change fourth argument of
3721         gfc_conv_array_parameter to boolean.
3722         * trans-io.c (gfc_convert_array_to_string): The same.
3723         * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
3724
3725 2010-02-20  Tobias Burnus  <burnus@net-b.de>
3726
3727         PR fortran/42958
3728         * libgfortran.h: Add GFC_RTCHECK_MEM.
3729         * invoke.texi (-fcheck=): Document -fcheck=mem.
3730         * tranc.c (gfc_call_malloc): Remove negative-size run-time error
3731         and enable malloc-success check only with -fcheck=mem.
3732         * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
3733
3734 2010-02-16  Tobias Burnus  <burnus@net-b.de>
3735
3736         PR fortran/43040
3737         * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
3738         * intrinsic.c (add_functions): Ditto.
3739         * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
3740         * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
3741
3742 2010-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3743
3744         PR fortran/32382
3745         * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
3746         gfc_trans_do prototype.
3747         * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
3748         a loop exit condition.  If exit condition is given, build the loop exit
3749         code, checking IO results of implied do loops in READ and WRITE.
3750         (gfc_trans_do): Likewise.
3751         * trans.c (trans_code): New static work function, previously
3752         gfc_trans_code. Passes exit condition to gfc_trans_do.
3753         (gfc_trans_code): Calls trans_code with NULL_TREE condition.
3754         (gfc_trans_code_cond): Calls trans_code with loop exit condition.
3755         * trans-io.c (build_dt): Build an exit condition to allow checking IO
3756         result status bits in the dtparm structure. Use this condition in call
3757         to gfc_trans_code_cond.
3758
3759 2010-02-13  Paul Thomas  <pault@gcc.gnu.org>
3760
3761         PR fortran/41113
3762         PR fortran/41117
3763         * trans-array.c (gfc_conv_array_parameter): Use
3764         gfc_full_array_ref_p to detect full and contiguous variable
3765         arrays. Full array components and contiguous arrays do not need
3766         internal_pack and internal_unpack.
3767
3768 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
3769
3770         PR fortran/43030
3771         * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
3772
3773         PR fortran/43029
3774         * decl.c (enumerator_decl): Don't call gfc_free_enum_history
3775         here.
3776         (gfc_match_enumerator_def): But here whenever enumerator_decl returns
3777         MATCH_ERROR.
3778
3779 2010-02-10  Joost VandeVondele <jv244@cam.ac.uk>
3780             Tobias Burnus <burnus@net-b.de>
3781
3782         PR fortran/40823
3783         * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3784
3785 2010-02-10  Tobias Burnus  <burnus@net-b.de>
3786
3787         PR fortran/43015
3788         * trans-decl.c (gfc_generate_function_code): Only check
3789         actual-vs.-dummy character bounds if not bind(C).
3790
3791 2010-02-10  Jakub Jelinek  <jakub@redhat.com>
3792
3793         PR fortran/42309
3794         * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3795         info->dimen after info has been freed.
3796
3797 2010-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3798
3799         PR fortran/42999
3800         * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3801         with iterators.
3802
3803 2010-02-09  Jakub Jelinek  <jakub@redhat.com>
3804
3805         * module.c (fix_mio_expr): Declare sym.
3806
3807 2010-02-09  Paul Thomas  <pault@gcc.gnu.org>
3808
3809         PR fortran/41869
3810         * module.c (fix_mio_expr): Fix for private generic procedures.
3811
3812 2010-02-09  Daniel Kraft  <d@domob.eu>
3813
3814         PR fortran/39171
3815         * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3816         length to be correct and issue only with -Wsurprising.
3817         * invoke.texi (Wsurprising): Mention this new warning that is
3818         turned on by -Wsurprising.
3819
3820 2010-02-09  Daniel Kraft  <d@domob.eu>
3821
3822         PR fortran/41507
3823         * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3824         can be CHARACTER type.
3825         (MINVAL), (MAXLOC), (MINLOC): Ditto.
3826
3827 2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
3828
3829         PR fortran/42309
3830         * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3831         'formal_ptr'. If this is true, give returned descriptor unity
3832         lbounds, in all dimensions, and the appropriate offset.
3833         (gfc_conv_procedure_call); If formal is a pointer, set the last
3834         argument of gfc_conv_subref_array_arg to true.
3835         * trans.h : Add last argument for gfc_conv_subref_array_arg.
3836         * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3837         new arg of gfc_conv_subref_array_arg to false.
3838         * trans-stmt.c (forall_make_variable_temp): The same.
3839
3840 2010-02-03  Tobias Burnus  <burnus@net-b.de>
3841
3842         PR fortran/42936
3843         * interface.c (compare_parameter): Disable rank-checking
3844         for NULL().
3845
3846 2010-02-02  Tobias Burnus  <burnus@net-b.de>
3847
3848         PR fortran/42650
3849         * parse.c (decode_specification_statement): Use sym->result not sym.
3850
3851 2010-02-01  Tobias Burnus  <burnus@net-b.de>
3852
3853         PR fortran/42922
3854         * decl.c (variable_decl): Allow default initializer in
3855         TYPE declarations in PURE functions.
3856
3857 2010-01-31  Janus Weil  <janus@gcc.gnu.org>
3858
3859         PR fortran/42888
3860         * resolve.c (resolve_allocate_expr): Move default initialization code
3861         here from gfc_trans_allocate.
3862         * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3863         EXEC_INIT_ASSIGN.
3864         * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3865         of CLASS variables via memcpy.
3866         * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3867         to resolve_allocate_expr.
3868
3869 2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
3870
3871         PR fortran/38324
3872         * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3873         * gfortran.h : Add prototype for above.
3874         * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3875         (gfc_trans_subcomponent_assign): Call new function to replace
3876         the code to deal with allocatable components.
3877         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3878         gfc_get_full_arrayspec_from_expr to replace existing code.
3879
3880 2010-01-25  Tobias Burnus  <burnus@net-b.de>
3881
3882         PR fortran/42858
3883         * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3884         check.
3885
3886 2010-01-24  Paul Thomas  <pault@gcc.gnu.org>
3887
3888         PR fortran/41044
3889         PR fortran/41167
3890         * expr.c (remove_subobject_ref): If the constructor is NULL use
3891         the expression as the source.
3892         (simplify_const_ref): Change the type of expression if
3893         there are component references.  Allow for substring to be at
3894         the end of an arbitrarily long chain of references.  If an
3895         element is found that is not in an EXPR_ARRAY, assume that this
3896         is scalar initialization of array. Call remove_subobject_ref in
3897         this case with NULL second argument.
3898
3899 2010-01-24  Tobias Burnus  <burnus@net-b.de>
3900
3901         PR fortran/39304