OSDN Git Service

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