OSDN Git Service

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