OSDN Git Service

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