OSDN Git Service

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