OSDN Git Service

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