1 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4 * dependency.c (check_section_vs_section): Single test for
5 identical strides which takes into account that only one
6 of the strides may be NULL.
8 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
11 * primary.c (match_hollerith_constant): Calculate padding needed to
12 fill default integer and allocate string for that size. Set pad bytes
14 * gfortran.h: Add hollerith pad value to type spec union.
15 * data.c (create_character_initializer): Fix spelling of function name.
16 Use hollerith pad value to calculate length.
17 * arith.c (hollerith2representation); Use hollerith pad value to
20 2010-08-26 Daniel Kraft <d@domob.eu>
25 * gfortran.h (struct gfc_association_list): New flag `dangling'.
26 (gfc_build_block_ns): Declared here...
27 * parse.h (gfc_build_block_ns): ...instead of here.
28 * trans.h (gfc_process_block_locals): Expect additionally the
29 gfc_association_list of BLOCK (if present).
30 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
31 * resolve.c (resolve_variable): Only check for invalid *array*
32 references on associate-names.
33 (resolve_assoc_var): New method with code previously in resolve_symbol.
34 (resolve_select_type): Use association to give the selector and
35 temporaries their values instead of ordinary assignment.
36 (resolve_fl_var_and_proc): Allow CLASS associate-names.
37 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
38 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
39 to `gfc_process_block_locals' to match new interface.
40 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
42 (gfc_process_block_locals): Defer them rather here when linked to
43 from the BLOCK's association list.
45 2010-08-25 Jakub Jelinek <jakub@redhat.com>
47 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
48 TREE_NOTHROW on fndecls that can't throw. Set
49 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
50 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
51 gfor_fndecl_associated.
53 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
56 * frontend-passes.c (optimize_equality): Don't optimize array equality
58 2010-08-23 Janus Weil <janus@gcc.gnu.org>
61 * resolve.c (resolve_procedure_interface): New function split off from
63 (resolve_formal_arglist): Call it here ...
64 (resolve_symbol): ... and here.
66 2010-08-22 Joseph Myers <joseph@codesourcery.com>
68 * Make-lang.in (gfortranspec.o): Update dependencies.
69 * gfortranspec.c: Include coretypes.h before gcc.h. Include
71 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
72 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
73 (g77_xargc): Make unsigned.
74 (g77_xargv): Change to g77_x_decoded_options.
75 (g77_newargc): Make unsigned.
76 (g77_newargv): Change to g77_new_decoded_options.
77 (strings_same, options_same): New.
78 (append_arg): Use cl_decoded_option structures.
80 (add_arg_libgfortran): New.
81 (lang_specific_driver): Use cl_decoded_option structures.
83 2010-08-21 Janus Weil <janus@gcc.gnu.org>
87 * class.c (add_proc_comp): Add static initializer for PPCs.
88 (add_procs_to_declared_vtab): Modified comment.
89 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
90 initializer if the component is part of a vtype.
91 (mio_component_list): Add argument 'vtype', pass it on to
93 (mio_symbol): Modified call to 'mio_component_list'.
94 * trans.h (gfc_conv_initializer): Modified prototype.
95 (gfc_trans_assign_vtab_procs): Removed.
96 * trans-common.c (create_common): Modified call to
97 'gfc_conv_initializer'.
98 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
99 gfc_emit_parameter_debug_info): Modified call to
100 'gfc_conv_initializer'.
101 (build_function_decl): Remove assertion.
102 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
103 Removed call to 'gfc_trans_assign_vtab_procs'.
104 (gfc_conv_initializer): Add argument 'procptr'.
105 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
106 (gfc_trans_assign_vtab_procs): Removed.
107 * trans-stmt.c (gfc_trans_allocate): Removed call to
108 'gfc_trans_assign_vtab_procs'.
110 2010-08-21 Tobias Burnus <burnus@net-b.de>
114 * intrinsic.c (add_sym): Init value attribute.
115 (set_attr_value): New function.
116 (add_functions) Use it and add JN/YN resolvers.
117 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
118 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
119 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
120 * iresolve.c (gfc_resolve_bessel_n2): New function.
121 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
123 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
124 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
125 * simplify.c (): For YN set to -INF if previous values
127 * trans-expr.c (gfc_conv_procedure_call): Don't crash
129 * iresolve.c (gfc_resolve_extends_type_of): Set the
130 type of the dummy argument to the one of the actual.
132 2010-08-20 Joseph Myers <joseph@codesourcery.com>
134 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
136 2010-08-20 Joseph Myers <joseph@codesourcery.com>
138 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
141 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
143 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
145 2010-08-19 Daniel Kraft <d@domob.eu>
149 * trans.h (struct gfc_se): New flag `byref_noassign'.
150 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
151 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
152 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
153 and check for compile-time errors with those.
154 * trans-decl.c (trans_associate_var): Use new routine
155 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
156 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
157 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
158 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
159 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
160 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
161 rank remapping for assignment.
163 2010-08-19 Tobias Burnus <burnus@net-b.de>
165 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
166 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
169 2010-08-19 Tobias Burnus <burnus@net-b.de>
173 * check.c (gfc_check_bessel_n2): New function.
174 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
175 * intrinsic.c (add_functions): Add transformational version
176 of the Bessel_jn/yn intrinsics.
177 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
178 gfc_simplify_bessel_yn2): New prototypes.
179 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
180 transformational variant.
181 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
182 Check for negative order.
183 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
184 gfc_simplify_bessel_yn2): New functions.
186 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
189 * resolve.c (resolve_transfer): Traverse operands and set expression
190 to be checked to a non EXPR_OP type.
192 2010-08-19 Janus Weil <janus@gcc.gnu.org>
195 * gfortran.h (gfc_add_save): Modified prototype.
196 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
197 (match_pointer_init): New function to match F08 pointer initialization.
198 (variable_decl,match_procedure_decl,match_ppc_decl): Use
199 'match_pointer_init'.
200 (match_attr_spec): Module variables are implicitly SAVE.
201 (gfc_match_save): Modified call to 'gfc_add_save'.
202 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
204 * primary.c (gfc_variable_attr): Handle SAVE attribute.
205 * resolve.c (resolve_structure_cons): Add new argument and do pointer
206 initialization checks.
207 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
208 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
209 (resolve_fl_variable): Handle SAVE_IMPLICIT.
210 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
212 * trans-decl.c (gfc_create_module_variable): Module variables with
213 TARGET can already exist.
214 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
215 (gfc_conv_initializer): Implement non-NULL pointer
218 2010-08-18 Tobias Burnus <burnus@net-b.de>
221 * intrinsic.texi (selected_char_kind): Document ISO_10646
224 2010-08-17 Jakub Jelinek <jakub@redhat.com>
227 * trans-decl.c (build_library_function_decl_1): Chain on
228 void_list_node instead of creating a new TREE_LIST.
229 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
230 * trans-types.c (gfc_get_function_type): Likewise. Set
231 typelist to void_list_node for the main program.
233 2010-08-17 Daniel Kraft <d@domob.eu>
236 * gfortran.h (struct gfc_association_list): New member `where'.
237 (gfc_is_associate_pointer) New method.
238 * match.c (gfc_match_associate): Remember locus for each associate
239 name matched and do not try to set variable flag.
240 * parse.c (parse_associate): Use remembered locus for symbols.
241 * primary.c (match_variable): Instead of variable-flag check for
242 associate names set it for all such names used.
243 * symbol.c (gfc_is_associate_pointer): New method.
244 * resolve.c (resolve_block_construct): Don't generate assignments
245 to give associate-names their values.
246 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
247 (resolve_symbol): Set some more attributes for associate variables,
248 set variable flag here and check it and don't try to build an
249 explicitely shaped array-spec for array associate variables.
250 * trans-expr.c (gfc_conv_variable): Dereference in case of association
252 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
253 (gfc_sym_type): Return pointer type for association to scalar vars.
254 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
255 (trans_associate_var): New method.
256 (gfc_trans_deferred_vars): Handle association symbols.
258 2010-08-16 Joseph Myers <joseph@codesourcery.com>
260 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
262 (MMDX): Change back to MMD. Mark NoDriverArg instead of
264 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
265 OPT_MDX and OPT_MMDX.
267 2010-08-16 Joseph Myers <joseph@codesourcery.com>
269 * lang.opt (MDX, MMDX): Mark RejectDriver.
271 2010-08-15 Janus Weil <janus@gcc.gnu.org>
273 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
274 vtabs for generics any more).
276 2010-08-15 Daniel Kraft <d@domob.eu>
279 * gfortran.h (gfc_find_proc_namespace): New method.
280 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
281 around with namespace.
282 * symbol.c (gfc_find_proc_namespace): New method.
283 * trans-decl.c (gfc_build_qualified_array): Use it for correct
285 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
286 * parse.c (parse_associate): Removed assignment-generation here...
287 * resolve.c (resolve_block_construct): ...and added it here.
288 (resolve_variable): Handle names that are arrays but were not parsed
289 as such because of association.
290 (resolve_code): Fix BLOCK resolution.
291 (resolve_symbol): Generate array-spec for associate-names.
293 2010-08-15 Tobias Burnus <burnus@net-b.de>
296 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
297 (verify_c_interop): Handle unresolved DT with bind(C).
299 2010-08-15 Tobias Burnus <burnus@net-b.de>
301 * trans-expr.c (gfc_conv_expr_present): Regard nullified
302 pointer arrays as absent.
303 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
304 dummys as absent argument.
305 * interface.c (compare_actual_formal,compare_parameter):
308 2010-08-15 Tobias Burnus <burnus@net-b.de>
310 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
311 dummies with intent(in).
313 2010-08-15 Daniel Kraft <d@domob.eu>
316 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
317 routines not IMPURE also as PURE.
318 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
319 `NO_CLASS' in `CLASS_IMPURE'.
320 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
321 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
322 (add_functions): Ditto.
323 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
324 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
325 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
326 are not ALLOCATABLE and have their INTENT specified.
328 2010-08-13 Daniel Kraft <d@domob.eu>
330 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
331 * array.c (gfc_match_array_spec): Match implied-shape specification and
332 handle AS_IMPLIED_SHAPE correctly otherwise.
333 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
334 (variable_decl): Some checks for implied-shape declaration.
335 * resolve.c (resolve_symbol): Assert that array-spec is no longer
336 AS_IMPLIED_SHAPE in any case.
338 2010-08-12 Joseph Myers <joseph@codesourcery.com>
340 * lang.opt (MD, MMD): Change to MDX and MMDX.
341 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
343 2010-08-11 Janus Weil <janus@gcc.gnu.org>
346 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
348 (check_arglist,check_specific): Add reference to 'name' field.
349 (init_arglist): Remove reference to 'name' field.
350 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
351 * check.c (variable_check): Reverse order of checks. Respect intent of
353 (int_or_proc_check): New function.
354 (coarray_check): New function.
355 (allocatable_check): New function.
356 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
357 (gfc_check_complex): Use 'int_or_real_check'.
358 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
359 gfc_check_ucobound): Use 'coarray_check'.
360 (gfc_check_pack): Use 'real_or_complex_check'.
361 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
363 (scalar_check,type_check,numeric_check,int_or_real_check,
364 real_or_complex_check,kind_check,double_check,logical_array_check,
365 array_check,same_type_check,rank_check,nonoptional_check,
366 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
367 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
368 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
369 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
370 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
371 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
372 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
375 2010-08-10 Daniel Kraft <d@domob.eu>
377 * gfortran.texi (Interoperability with C): Fix ordering in menu
378 and add new subsection about pointers.
379 (Interoperable Subroutines and Functions): Split off the pointer part.
380 (working with Pointers): New subsection with extended discussion
381 of pointers (especially procedure pointers).
383 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
386 * array.c (gfc_ref_dimen_size): Add end argument.
387 If end is non-NULL, calculate it.
388 (ref_size): Adjust call to gfc_ref_dimen_size.
389 (gfc_array_dimen_size): Likewise.
390 (gfc_array_res_shape): Likewise.
391 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
392 * resolve.c (resolve_array_ref): For stride not equal to -1,
393 fill in the lowest possible end.
395 2010-08-09 Janus Weil <janus@gcc.gnu.org>
397 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
399 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
401 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
403 (check_some_aliasing): Likewise.
404 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
405 (gfc_conv_intrinsic_int): Likewise.
406 (gfc_conv_intrinsic_lib_function): Likewise.
407 (gfc_conv_intrinsic_cmplx): Likewise.
408 (gfc_conv_intrinsic_ctime): Likewise.
409 (gfc_conv_intrinsic_fdate): Likewise.
410 (gfc_conv_intrinsic_ttynam): Likewise.
411 (gfc_conv_intrinsic_minmax): Likewise.
412 (gfc_conv_intrinsic_minmax_char): Likewise.
413 (gfc_conv_intrinsic_ishftc): Likewise.
414 (gfc_conv_intrinsic_index_scan_verify): Likewise.
415 (gfc_conv_intrinsic_merge): Likewise.
416 (gfc_conv_intrinsic_trim): Likewise.
417 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
419 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
422 * dependency.c (check_section_vs_section): Handle cases where
423 the start expression coincides with the lower or upper
426 2010-08-04 Janus Weil <janus@gcc.gnu.org>
431 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
432 container types. Do not artificially increase refs. Commit symbols one
434 * interface.c (compare_parameter): Make sure vtabs are present before
435 generating module variables.
436 * resolve.c (resolve_allocate_expr): Ditto.
438 2010-08-04 Tobias Burnus <burnus@net-b.de>
442 * resolve.c (resolve_structure_cons): Fix
445 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
449 * symbol.c (changed_syms): Made static again.
450 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
451 Changed conditional internal error into assert.
452 Rename function to ...
453 (gfc_enforce_clean_symbol_state): ... this.
454 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
455 Rename the former to the latter.
456 * parse.c (decode_statement, decode_omp_directive,
457 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
459 (changed_syms): Remove declaration.
460 (next_statement): Use gfc_enforce_clean_symbol_state.
462 2010-08-04 Tobias Burnus <burnus@net-b.de>
465 * resolve.c (resolve_structure_cons): Fix handling of
466 initialization structure constructors with character
467 elements of the wrong length.
468 * array.c (gfc_check_iter_variable): Add NULL check.
469 (gfc_resolve_character_array_constructor): Also truncate
472 2010-08-04 Tobias Burnus <burnus@net-b.de>
474 * trans-io.c (gfc_build_io_library_fndecls): Fix return
475 value of some libgfortran functions.
477 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
480 * dependency.c (gfc_deb_compare_expr): Remove any integer
481 conversion functions to larger types from both arguments.
482 Remove handling these functions futher down.
484 2010-08-03 Janus Weil <janus@gcc.gnu.org>
488 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
489 * resolve.c (resolve_tb_generic_targets): Check for errors.
491 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
494 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
497 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
500 * dependency.h: Add prototype for gfc_are_identical_variables.
501 * frontend-passes.c: Include depencency.h.
502 (optimimize_equality): Use gfc_are_identical_variables.
503 * dependency.c (identical_array_ref): New function.
504 (gfc_are_identical_variables): New function.
505 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
506 * dependency.c (gfc_check_section_vs_section). Rename gfc_
507 prefix from statc function.
508 (check_section_vs_section): Change arguments to gfc_array_ref,
509 adjust function body accordingly.
511 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
512 Janus Weil <janus@gcc.gnu.org>
517 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
518 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
519 gfc_copy_formal_args, gfc_copy_formal_args_intr,
520 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
521 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
522 Call reject_statement in case of error.
523 (match_deferred_characteritics): Call gfc_undo_symbols in case match
526 2010-08-01 Janus Weil <janus@gcc.gnu.org>
529 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
530 (gfc_find_derived_vtab): Make vtabs and vtypes public.
531 * module.c (read_module): When reading module files, always import
532 vtab and vtype symbols.
534 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
538 * symbol.c (changed_syms): Made non-static.
539 * parse.c (changed_syms): Declare new external.
540 (next_statement): Assert changed_syms is NULL at the beginning.
542 2010-07-30 Janus Weil <janus@gcc.gnu.org>
543 Steven G. Kargl <kargl@gcc.gnu.org>
546 * match.c (match_type_spec): Try to parse derived types before
549 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
551 * gfortran.h (gfc_release_symbol): New prototype.
552 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
553 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
554 Use gfc_release_symbol.
555 * parse.c (gfc_fixup_sibling_symbols): Ditto.
556 * resolve.c (resolve_symbol): Ditto.
558 2010-07-29 Tobias Burnus <burnus@net-b.de>
562 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
563 external procedure declarations in modules.
564 (gfc_get_symbol_decl): Modify assert.
566 2010-07-29 Janus Weil <janus@gcc.gnu.org>
569 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
571 2010-07-29 Janus Weil <janus@gcc.gnu.org>
574 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
575 (gfc_trans_class_assign): Modified prototype.
576 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
577 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
578 (gfc_trans_class_assign): ... here. Modified actual arguments.
579 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
580 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
581 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
583 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
587 * class.c (gfc_find_derived_vtab): Accept or discard newly created
588 symbols before returning.
590 2010-07-29 Joseph Myers <joseph@codesourcery.com>
592 * lang.opt (cpp): Remove Joined and Separate markers.
593 (cpp=): New internal option.
594 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
595 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
598 2010-07-29 Daniel Kraft <d@domob.eu>
601 * array.c (resolve_array_bound): Fix error message to properly handle
602 non-variable expressions.
604 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
606 * decl.c (free_value): Also free repeat field.
607 * data.c (gfc_assign_data_value): Always free offset before returning.
609 2010-07-28 Daniel Kraft <d@domob.eu>
611 * gfortran.h (gfc_build_intrinsic_call): New method.
612 * expr.c (gfc_build_intrinsic_call): New method.
613 * simplify.c (range_check): Ignore non-constant value.
614 (simplify_bound_dim): Handle non-variable expressions and
615 fix memory leak with non-free'ed expression.
616 (simplify_bound): Handle non-variable expressions.
617 (gfc_simplify_shape): Ditto.
618 (gfc_simplify_size): Ditto, but only in certain cases possible.
620 2010-07-28 Joseph Myers <joseph@codesourcery.com>
622 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
625 2010-07-28 Tobias Burnus <burnus@net-b.de>
628 * trans-types.c (gfc_get_derived_type): Fix DT declaration
629 from modules for whole-file mode.
631 2010-07-27 Joseph Myers <joseph@codesourcery.com>
633 * gfortran.h (gfc_handle_option): Update prototype and return
635 * options.c (gfc_handle_option): Update prototype and return value
638 2010-07-27 Joseph Myers <joseph@codesourcery.com>
640 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
641 decoded options in allocating deferred_opt.
642 * cpp.h (gfc_cpp_init_options): Update prototype.
643 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
644 * gfortran.h (gfc_option_lang_mask): New.
645 (gfc_init_options): Update prototype.
646 * options.c (gfc_option_lang_mask): New.
647 (gfc_init_options): Update prototype. Pass new arguments to
648 gfc_cpp_init_options.
650 2010-07-26 Tobias Burnus <burnus@net-b.de>
653 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
654 for functions which are later in the same file.
655 (gfc_create_function_decl, build_function_decl,
656 build_entry_thunks): Add global argument.
657 * trans.c (gfc_generate_module_code): Update
658 gfc_create_function_decl call.
659 * trans.h (gfc_create_function_decl): Update prototype.
660 * resolve.c (resolve_global_procedure): Also resolve for
663 2010-07-26 Richard Henderson <rth@redhat.com>
666 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
667 (gfc_write_global_declarations): New.
669 2010-07-26 Tobias Burnus <burnus@net-b.de>
672 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
673 for call to transfer_namelist_element.
674 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
677 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
680 * Make-lang.in: Add fortran/frontend-passes.o.
681 * gfortran.h: Add prototype for gfc_run_passes.
682 * resolve.c (gfc_resolve): Call gfc_run_passes.
683 * frontend-passes.c: New file.
685 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
688 * scanner.c (gfc_next_char_literal): Enable truncation warning for
691 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
694 * gfortran.h (gfc_namespace): New field old_equiv.
695 (gfc_free_equiv_until): New prototype.
696 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
697 a parameterized stop condition.
698 (gfc_free_equiv): Use gfc_free_equiv_until.
699 * parse.c (next_statement): Save equivalence list.
700 (reject_statement): Restore equivalence list.
702 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
705 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
706 in the function so that it does not get missed by early exits.
707 (load_line): Add checks for quoted strings and free form comments to
708 disable warnings on comments. Add check for ampersand as first
709 character after truncation and don't warn for this case, but warn if
710 there are subsequent non-whitespace characters.
712 2010-07-24 Tobias Burnus <burnus@net-b.de>
715 * parse.c (gfc_parse_file): Do not override
716 gfc_global_ns_list items.
718 2010-07-24 Tobias Burnus <burnus@net-b.de>
720 * options.c (gfc_init_options): Enable -fwhole-file by default.
721 * interface.c (compare_parameter): Assume a Hollerith constant is
722 compatible with all other argument types.
724 2010-07-23 Tobias Burnus <burnus@net-b.de>
727 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
728 -fwhole-file also for derived types.
729 * trans-types.c (copy_dt_decls_ifequal): Remove static and
730 rename to gfc_copy_dt_decls_ifequal.
731 (gfc_get_derived_type): Update call.
732 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
734 2010-07-23 Tobias Burnus <burnus@net-b.de>
737 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
739 2010-07-23 Jakub Jelinek <jakub@redhat.com>
741 * trans-types.c (gfc_get_array_descriptor_base,
742 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
743 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
744 instead of clearing DECL_NAME.
745 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
747 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
750 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
752 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
753 reverse the scalarization loop.
754 gfc_conv_resolve_dependencies: Pass the reverse field of the
755 loopinfo to gfc_dep_resolver.
756 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
757 assignment by resetting loop.reverse.
758 gfortran.h : Add the gfc_reverse enum.
759 trans.h : Add the reverse field to gfc_loopinfo.
760 dependency.c (gfc_check_dependency): Pass null to the new arg
762 (gfc_check_section_vs_section): Check for reverse dependencies.
763 (gfc_dep_resolver): Add reverse argument and deal with the loop
765 dependency.h : Modify prototype for gfc_dep_resolver to include
768 2010-07-23 Daniel Kraft <d@domob.eu>
771 * gfortran.h (gfc_find_symtree_in_proc): New method.
772 * symbol.c (gfc_find_symtree_in_proc): New method.
773 * match.c (match_exit_cycle): Look for loop name also in parent
774 namespaces within current procedure.
776 2010-07-22 Tobias Burnus <burnus@net-b.de>
779 * dependency.c (gfc_check_dependency): Add argument alising check.
780 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
782 2010-07-22 Daniel Kraft <d@domob.eu>
784 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
785 now in the correct place.
787 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
790 * Revert my commit r162325.
792 2010-07-21 Daniel Kraft <d@domob.eu>
794 * trans.h (gfc_get_return_label): Removed.
795 (gfc_generate_return): New method.
796 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
797 returning a tree directly.
798 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
799 (gfc_trans_block_construct): Update for new interface to
800 `gfc_trans_deferred_vars'.
801 * trans-decl.c (current_function_return_label): Removed.
802 (current_procedure_symbol): New variable.
803 (gfc_get_return_label): Removed.
804 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
805 returning a tree directly.
806 (get_proc_result), (gfc_generate_return): New methods.
807 (gfc_generate_function_code): Clean up and do init/cleanup here
808 also with gfc_wrapped_block. Remove return-label but rather
811 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
814 * fortran/match.c (match_type_spec): Check for derived type before
817 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
820 * interface.c (matching_typebound_op): Add argument for the
821 return of the generic name for the procedure.
822 (build_compcall_for_operator): Add an argument for the generic
823 name of an operator procedure and supply it to the expression.
824 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
825 calls to the above procedures.
826 * resolve.c (resolve_typebound_function): Catch procedure
827 component calls for CLASS objects, check that the vtable is
828 complete and insert the $vptr and procedure components, to make
830 (resolve_typebound_function): The same.
831 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
832 an allocatable scalar if it is a result.
834 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
837 * match.c (gfc_match_iterator): Reverted.
839 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
842 * match.c (gfc_match_iterator): Remove error that iterator
843 cannot be INTENT(IN).
845 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
847 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
848 Access subscript through the "dim" field index.
849 (gfc_trans_create_temp_array): Access ss info through the "dim" field
851 (gfc_conv_array_index_offset): Ditto.
852 (gfc_conv_loop_setup): Ditto.
853 (gfc_conv_expr_descriptor): Ditto.
854 (gfc_conv_ss_startstride): Ditto. Update call to
855 gfc_conv_section_startstride.
856 (gfc_conv_section_startstride): Set values along the array dimension.
857 Get array dimension directly from the argument.
859 2010-07-15 Jakub Jelinek <jakub@redhat.com>
861 * trans.h (gfc_string_to_single_character): New prototype.
862 * trans-expr.c (string_to_single_character): Renamed to ...
863 (gfc_string_to_single_character): ... this. No longer static.
864 (gfc_conv_scalar_char_value, gfc_build_compare_string,
865 gfc_trans_string_copy): Adjust callers.
866 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
867 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
868 (select_struct): Move to toplevel, add GTY(()).
869 (gfc_trans_character_select): Optimize SELECT CASE
870 with character length 1.
872 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
874 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
875 * trans-common.c: Likewise.
876 * trans-decl.c: Likewise.
877 * trans-types.c: Likewise.
880 2010-07-15 Janus Weil <janus@gcc.gnu.org>
883 * resolve.c (resolve_typebound_generic_call): Resolve generic
884 non-polymorphic type-bound procedure calls to the correct specific
886 (resolve_typebound_subroutine): Remove superfluous code.
888 2010-07-15 Daniel Kraft <d@domob.eu>
891 * trans.h (struct gfc_wrapped_block): New struct.
892 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
893 (gfc_finish_wrapped_block): New method.
894 (gfc_init_default_dt): Add new init code to block rather than
896 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
897 (gfc_trans_dummy_array_bias): Ditto.
898 (gfc_trans_g77_array): Ditto.
899 (gfc_trans_deferred_array): Ditto.
900 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
901 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
902 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
903 (gfc_finish_wrapped_block): New method.
904 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
905 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
906 (gfc_trans_deferred_array): Ditto.
907 * trans-decl.c (gfc_trans_dummy_character): Ditto.
908 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
909 (init_intent_out_dt): Ditto.
910 (gfc_init_default_dt): Add new init code to block rather than
912 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
913 and cleanup code and put it all together.
915 2010-07-15 Jakub Jelinek <jakub@redhat.com>
917 * trans.h (gfc_build_compare_string): Add CODE argument.
918 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
919 gfc_build_compare_string.
920 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
921 gfc_build_compare_string.
922 (string_to_single_character): Rename len variable to length.
923 (gfc_optimize_len_trim): New function.
924 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
925 or NE_EXPR and one of the strings is string literal with LEN_TRIM
926 bigger than the length of the other string, they compare unequal.
929 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
930 in CASE_LABEL_EXPR and use NULL for low for the default case.
932 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
934 * trans-array.c (gfc_conv_section_upper_bound): Remove
935 (gfc_conv_section_startstride): Don't set the upper bound in the
936 vector subscript case.
937 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
939 2010-07-14 Janus Weil <janus@gcc.gnu.org>
942 * gfortran.h (gfc_is_data_pointer): Remove prototype.
943 * dependency.c (gfc_is_data_pointer): Make it static.
944 * intrinsic.texi: Update documentation on C_LOC.
945 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
946 and add a check for polymorphic variables.
948 2010-07-14 Jakub Jelinek <jakub@redhat.com>
950 * trans-expr.c (string_to_single_character): Also optimize
951 string literals containing a single char followed only by spaces.
952 (gfc_trans_string_copy): Remove redundant string_to_single_character
955 * trans-decl.c (gfc_build_intrinsic_function_decls,
956 gfc_build_builtin_function_decls): Mark functions as
957 DECL_PURE_P or TREE_READONLY.
959 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
961 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
962 instead of build_function_call_expr.
963 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
965 2010-07-13 Tobias Burnus <burnus@net-b.de>
966 Daniel Franke <franke.daniel@gmail.com>
969 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
970 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
972 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
974 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
975 Tobias Burnus <burnus@net-b.de>
978 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
979 noclobber/noescape annotations to function calls.
980 (gfc_build_builtin_function_decls): Likewise.
982 2010-07-13 Janus Weil <janus@gcc.gnu.org>
988 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
989 * class.c (gfc_build_class_symbol): Modified call to
990 'gfc_find_derived_vtab'.
991 (add_proc_component): Removed, moved code into 'add_proc_comp'.
992 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
994 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
995 Removed treatment of generics.
996 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
997 Call 'add_proc_comp' instead of duplicating code.
998 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
1000 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
1001 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
1002 Removed treatment of generics.
1003 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
1004 'gfc_find_derived_vtab'.
1005 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1006 Removed treatment of generics.
1007 (resolve_select_type,resolve_fl_derived): Modified call to
1008 'gfc_find_derived_vtab'.
1009 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1010 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1012 * trans-stmt.c (gfc_trans_allocate): Ditto.
1014 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1017 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
1020 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
1022 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
1023 * resolve.c (build_default_init_expr): Ditto.
1025 2010-07-11 Tobias Burnus <burnus@net-b.de>
1028 * module.c (sort_iso_c_rename_list): Remove.
1029 (import_iso_c_binding_module,use_iso_fortran_env_module):
1030 Allow multiple imports of the same symbol.
1032 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
1034 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
1036 2010-07-11 Janus Weil <janus@gcc.gnu.org>
1039 * decl.c (build_sym,attr_decl1): Only build the class container if the
1040 symbol has sufficient attributes.
1041 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
1042 pointer attribute for classes.
1043 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
1044 * module.c (MOD_VERSION): Bump.
1045 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
1046 (mio_symbol_attribute): Handle class_pointer attribute.
1047 * parse.c (parse_derived): Use class_pointer instead of pointer
1048 attribute for classes.
1049 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
1050 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
1051 resolve_allocate_expr,resolve_fl_derived): Ditto.
1052 (resolve_fl_var_and_proc): Check for class_ok attribute.
1054 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
1056 * trans-io.c (gfc_build_st_parameter): Update calls to
1057 gfc_add_field_to_struct.
1058 * trans-stmt.c (ADD_FIELD): Ditto.
1060 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
1062 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
1063 fieldlist, remove fieldlist from argument list.
1064 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
1065 and remove fieldlist from argument list.
1066 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
1067 gfc_get_mixed_entry_union): Move setting
1068 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
1069 * trans-types.h (gfc_add_field_to_struct): Update prototype.
1071 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
1074 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
1075 if the lhs has never been host associated, as well as not being
1076 use associated, a pointer or a target.
1077 * resolve.c (resolve_variable): Mark variables that are host
1079 * gfortran.h: Add the host_assoc bit to the symbol_attribute
1082 2010-07-09 Janus Weil <janus@gcc.gnu.org>
1084 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
1085 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
1086 SIZEOF and C_SIZEOF.
1088 2010-07-08 Janus Weil <janus@gcc.gnu.org>
1091 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
1092 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
1093 gfc_resolve_storage_size): New prototypes.
1094 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
1095 * intrinsic.c (add_functions): Add STORAGE_SIZE.
1096 * iresolve.c (gfc_resolve_storage_size): New function.
1097 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
1099 (gfc_conv_intrinsic_storage_size): New function.
1100 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
1102 2010-07-08 Jakub Jelinek <jakub@redhat.com>
1105 * match.c (match_exit_cycle): Error on EXIT also from collapsed
1106 !$omp do loops. Error on CYCLE to non-innermost collapsed
1109 2010-07-08 Tobias Burnus <burnus@net-b.de>
1112 * array.c (gfc_match_array_ref): Better error message for
1113 coarrays with too few ranks.
1114 (match_subscript): Move one diagnostic to caller.
1115 * gfortran.h (gfc_get_corank): Add prottype.
1116 * expr.c (gfc_get_corank): New function.
1117 * iresolve.c (resolve_bound): Fix rank for cobounds.
1118 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
1119 gfc_resolve_ucobound, gfc_resolve_this_image): Update
1122 2010-07-06 Tobias Burnus <burnus@net-b.de>
1125 * array.c (gfc_expand_constructor): Add optional diagnostic.
1126 * gfortran.h (gfc_expand_constructor): Update prototype.
1127 * expr.c (gfc_simplify_expr, check_init_expr,
1128 gfc_reduce_init_expr): Update gfc_expand_constructor call.
1129 * resolve.c (gfc_resolve_expr): Ditto.
1131 2010-07-06 Tobias Burnus <burnus@net-b.de>
1133 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
1134 * trans-intrinsic.c: Ditto.
1135 * trans-types.c: Ditto.
1136 * convert.c: Include diagnostic-core.h instead of toplev.h.
1138 * trans-array.c: Ditto.
1139 * trans-const.c: Ditto.
1140 * trans-expr.c: Ditto.
1141 * trans-io.c: Ditto.
1142 * trans-openmp.c: Ditto.
1145 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1148 * check.c (dim_rank_check): Also check intrinsic functions.
1149 Adjust permissible rank for functions which reduce the rank of
1150 their argument. Spread is an exception, where DIM can
1151 be one larger than the rank of array.
1153 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
1156 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
1158 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
1161 * trans-types.c (gfc_get_derived_type): Derived type fields
1162 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
1163 but build_pointer_type_for_mode must be used for this.
1165 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1167 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
1168 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
1169 type of gfc_conv_procedure_call.
1170 (conv_generic_with_optional_char_arg): Likewise.
1171 * trans-stmt.c (gfc_trans_call): Likewise.
1172 * trans-expr.c (gfc_conv_function_expr): Likewise.
1173 (gfc_conv_procedure_call): Use build_call_vec instead of
1176 2010-07-04 Daniel Kraft <d@domob.eu>
1178 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
1180 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
1184 * trans-types.c (gfc_get_derived_type): Derived type fields
1185 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
1187 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
1190 * decl.c (match_procedure_in_type): Clear structure before using.
1191 (gfc_match_generic): Ditto.
1193 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
1195 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
1196 * trans-types.c (gfc_add_field_to_struct_1): New function, most
1197 of which comes from...
1198 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
1199 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
1201 (gfc_get_array_descriptor_base): Likewise.
1202 (gfc_get_mixed_entry_union): Likewise.
1203 (gfc_get_derived_type): Add extra chain parameter for
1204 gfc_add_field_to_struct.
1205 * trans-stmt.c (gfc_trans_character_select): Likewise.
1206 * trans-io.c (gfc_build_st_parameter): Likewise.
1208 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1211 * resolve.c (is_external_proc): Prevent procedure pointers from being
1212 regarded as external procedures.
1214 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1217 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
1218 passed as second argument of ASSOCIATED.
1220 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
1223 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
1224 to determine if a function assignment can be made without a
1226 (gfc_trans_arrayfunc_assign): Move all the conditions that
1227 suppress the direct function call to the above new functon and
1230 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
1233 * interface.c (argument_rank_mismatch): New function.
1234 (compare_parameter): Call new function instead of generating
1237 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
1239 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
1240 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
1243 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1245 * Make-lang.in: Update dependencies.
1247 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
1249 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
1250 and exit_label fields.
1251 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
1253 * trans-stmt.c (gfc_trans_simple_do): Likewise.
1254 (gfc_trans_do): Likewise.
1255 (gfc_trans_do_while): Likewise.
1256 (gfc_trans_cycle): Use cycle_label directly.
1257 (gfc_trans_exit): Use exit_label directly.
1259 2010-06-27 Daniel Kraft <d@domob.eu>
1261 * dump-parse-tree.c (show_symbol): Dump target-expression for
1263 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
1264 (show_namespace): Use show_level for correct indentation of
1265 "inner namespaces" (contained procedures or BLOCK).
1267 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1270 * dump-parse-tree.c (show_code_node): Show namespace for
1273 2010-06-26 Tobias Burnus <burnus@net-b.de>
1275 * decl.c (gfc_match_decl_type_spec): Support
1276 TYPE(intrinsic-type-spec).
1278 2010-06-25 Tobias Burnus <burnus@net-b.de>
1280 * intrinsic.h (gfc_check_selected_real_kind,
1281 gfc_simplify_selected_real_kind): Update prototypes.
1282 * intrinsic.c (add_functions): Add radix support to
1284 * check.c (gfc_check_selected_real_kind): Ditto.
1285 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
1286 * trans-decl.c (gfc_build_intrinsic_function_decls):
1287 Change call from selected_real_kind to selected_real_kind2008.
1288 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
1289 (PRECISION, RANGE, RADIX): Add cross @refs.
1291 2010-06-25 Tobias Burnus <burnus@net-b.de>
1293 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
1294 * gfortran.texi (_gfortran_set_options): Update for
1295 GFC_STD_F2008_OBS addition.
1296 * libgfortran.h: Add GFC_STD_F2008_OBS.
1297 * options.c (set_default_std_flags, gfc_handle_option): Handle
1299 io.c (check_format): Fix allow_std check.
1301 2010-06-25 Tobias Burnus <burnus@net-b.de>
1303 * decl.c (gfc_match_entry): Allow END besides
1304 END SUBROUTINE/END FUNCTION for contained procedures.
1306 2010-06-25 Tobias Burnus <burnus@net-b.de>
1308 * parse.c (next_free, next_fixed): Allow ";" as first character.
1310 2010-06-24 Tobias Burnus <burnus@net-b.de>
1313 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1315 2010-06-22 Janus Weil <janus@gcc.gnu.org>
1318 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1321 2010-06-21 Tobias Burnus <burnus@net-b.de>
1324 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1326 * symbol.c (gfc_add_contiguous): New function.
1327 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1328 * decl.c (match_attr_spec): Ditto.
1329 (gfc_match_contiguous): New function.
1330 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1332 * gfortran.h (symbol_attribute): Add contiguous.
1333 (gfc_is_simply_contiguous): Add prototype.
1334 (gfc_add_contiguous): Add prototype.
1335 * match.h (gfc_match_contiguous): Add prototype.
1336 * parse.c (decode_specification_statement,
1337 decode_statement): Handle contiguous attribute.
1338 * expr.c (gfc_is_simply_contiguous): New function.
1339 * dump-parse-tree.c (show_attr): Handle contiguous.
1340 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1342 * trans-expr.c (gfc_add_interface_mapping): Copy
1344 * trans-array.c (gfc_conv_descriptor_stride_get,
1345 gfc_conv_array_parameter): Handle contiguous arrays.
1346 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1347 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1349 * trans.h (gfc_array_kind): Ditto.
1350 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1352 2010-06-20 Joseph Myers <joseph@codesourcery.com>
1354 * options.c (gfc_handle_option): Don't handle N_OPTS.
1356 2010-06-19 Janus Weil <janus@gcc.gnu.org>
1359 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1362 2010-06-18 Tobias Burnus <burnus@net-b.de>
1365 * resolve.c (resolve_allocate_deallocate): Properly check
1366 part-refs in stat=/errmsg= for invalid use.
1368 2010-06-17 Janus Weil <janus@gcc.gnu.org>
1371 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1372 Return directly in case of an error.
1374 2010-06-16 Janus Weil <janus@gcc.gnu.org>
1377 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1378 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1379 structure to each procedure in a procedure list.
1380 * module.c (mio_typebound_proc): Add NULL argument to
1381 'gfc_get_typebound_proc'.
1382 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1383 to initialize the new structure.
1385 2010-06-15 Janus Weil <janus@gcc.gnu.org>
1388 * gfortran.h (gfc_expr): Add new member 'mold'.
1389 * match.c (gfc_match_allocate): Implement the MOLD tag.
1390 * resolve.c (resolve_allocate_expr): Ditto.
1391 * trans-stmt.c (gfc_trans_allocate): Ditto.
1393 2010-06-15 Jakub Jelinek <jakub@redhat.com>
1396 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1397 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1398 GFC_DECL_SAVED_DESCRIPTOR set.
1399 (gfc_omp_report_decl): New function.
1400 * trans.h (gfc_omp_report_decl): New prototype.
1401 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1403 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
1407 * gfortranspec.c (lang_specific_driver): Removed deprecation
1409 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1410 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1411 * cpp.h (gfc_cpp_makedep): New.
1412 (gfc_cpp_add_dep): New.
1413 (gfc_cpp_add_target): New.
1414 * cpp.c (gfc_cpp_option): Add deps* members.
1415 (gfc_cpp_makedep): New.
1416 (gfc_cpp_add_dep): New.
1417 (gfc_cpp_add_target): New.
1418 (gfc_cpp_init_options): Initialize new options.
1419 (gfc_cpp_handle_option): Handle new options.
1420 (gfc_cpp_post_options): Map new options to libcpp-options.
1421 (gfc_cpp_init): Handle deferred -MQ and -MT options.
1422 (gfc_cpp_done): If requested, write dependencies to file.
1423 * module.c (gfc_dump_module): Add a module filename as target.
1424 * scanner.c (open_included_file): New parameter system; add the
1425 included file as dependency.
1426 (gfc_open_included_file): Add the included file as dependency.
1427 (gfc_open_intrinsic_module): Likewise.
1428 * invoke.texi: Removed deprecation warning for -M.
1429 * gfortran.texi: Removed Makefile-dependencies project.
1431 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
1433 * resolve.c (resolve_global_procedure): Improved checking if an
1434 explicit interface is required.
1436 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1438 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1440 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1441 (gfc_conv_intrinsic_ttynam): Likewise.
1442 (gfc_conv_intrinsic_trim): Likewise.
1444 2010-06-12 Janus Weil <janus@gcc.gnu.org>
1447 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1449 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1451 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1453 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1455 * mathbuiltins.def: Add builtins that do not directly correspond
1456 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1457 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1458 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1459 code_{r,c}{4,8,10,16} fields. Add
1460 {,complex}{float,double,long_double}_built_in fields.
1461 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1462 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1463 definition of OTHER_BUILTIN.
1464 (real_compnt_info): Remove unused struct.
1465 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1467 (build_round_expr): Call builtin_decl_for_precision instead of
1469 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1470 instead of a switch.
1471 (gfc_build_intrinsic_lib_fndecls): Match
1472 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1473 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1475 (gfc_conv_intrinsic_lib_function): Go through all the extended
1477 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1478 instead of a switch.
1479 (gfc_conv_intrinsic_abs): Likewise.
1480 (gfc_conv_intrinsic_mod): Likewise.
1481 (gfc_conv_intrinsic_sign): Likewise.
1482 (gfc_conv_intrinsic_fraction): Likewise.
1483 (gfc_conv_intrinsic_nearest): Likewise.
1484 (gfc_conv_intrinsic_spacing): Likewise.
1485 (gfc_conv_intrinsic_rrspacing): Likewise.
1486 (gfc_conv_intrinsic_scale): Likewise.
1487 (gfc_conv_intrinsic_set_exponent): Likewise.
1489 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
1493 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1494 functions with CLASS formal arguments.
1496 2010-06-10 Janus Weil <janus@gcc.gnu.org>
1499 * resolve.c (conformable_arrays): Handle allocatable components.
1501 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1504 * gfortran.texi: Document that Cray pointers cannot be function
1507 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1510 * gfortran.texi: Document lack of support for syntax
1511 "complex FUNCTION name*16()", and existence of alternative
1512 legacy syntax "complex*16 FUNCTION name()".
1514 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1517 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1518 POSIX's fsync(), and how to call the latter from Fortran code.
1520 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
1523 * interface.c (compare_actual_formal): Reject actual arguments with
1524 array subscript passed to ASYNCHRONOUS dummys.
1526 2010-06-10 Daniel Kraft <d@domob.eu>
1529 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1530 (struct gfc_symbol): New field `assoc'.
1531 (struct gfc_association_list): New struct.
1532 (struct gfc_code): New struct `block' in union, move `ns' there
1533 and add association list.
1534 (gfc_free_association_list): New method.
1535 (gfc_has_vector_subscript): Made public;
1536 * match.h (gfc_match_associate): New method.
1537 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1538 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1539 * interface.c (gfc_has_vector_subscript): Made public.
1540 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1541 * match.c (gfc_match_associate): New method.
1542 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1543 * primary.c (match_variable): Don't allow names associated to expr here.
1544 * parse.c (decode_statement): Try matching ASSOCIATE statement.
1545 (case_exec_markers, case_end): Add ASSOCIATE statement.
1546 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1547 (parse_associate): New method.
1548 (parse_executable): Handle ST_ASSOCIATE.
1549 (parse_block_construct): Change reference to gfc_code's `ns' field.
1550 * resolve.c (resolve_select_type): Ditto.
1551 (resolve_code): Ditto.
1552 (resolve_block_construct): Ditto and add comment.
1553 (resolve_select_type): Set association list in generated BLOCK to NULL.
1554 (resolve_symbol): Resolve associate names.
1555 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1556 and free association list.
1557 (gfc_free_association_list): New method.
1558 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1559 * trans-stmt.c (gfc_trans_block_construct): Change reference to
1560 gfc_code's `ns' field.
1562 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
1564 * error.c (error_print): Pre-initialize loc by NULL.
1565 * openmp.c (resolve_omp_clauses): Add explicit
1566 braces to avoid ambigous else.
1567 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1569 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1571 * gfc-internals.texi: Move to GFDL 1.3.
1572 * gfortran.texi: Ditto.
1573 * intrinsic.texi: Ditto.
1574 * invoke.texi: Ditto.
1576 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1579 * check.c (gfc_check_selected_real_kind): Verify that the
1580 actual arguments are scalar.
1582 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1585 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1587 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1590 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1592 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1594 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
1596 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1598 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1599 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1600 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1601 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
1603 * fortran/check.c (nonnegative_check, less_than_bitsize1,
1604 less_than_bitsize2): New functions.
1605 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
1606 nonnegative_check and less_than_bitsize1.
1607 (gfc_check_ibclr, gfc_check_ibset): Removed.
1608 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1611 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1614 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1617 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
1619 * resolve.c (resolve_deallocate_expr): Avoid warning
1620 about possible use of iunitialized sym.
1621 (resolve_allocate_expr): Pre-initialize sym by NULL.
1623 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1626 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1628 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1630 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1632 (gfc_get_array_type_bounds): Likewise.
1634 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1635 (gfc_find_module): Likewise.
1637 * f95-lang.c (pushlevel): Likewise.
1639 * trans.h (struct lang_type): Add variable_size GTY option.
1640 (struct lang_decl): Likewise.
1642 2010-06-08 Tobias Burnus <burnus@net-b.de>
1645 * symbol.c (check_conflict): Move protected--external/procedure check ...
1646 * resolve.c (resolve_select_type): ... to the resolution stage.
1648 2010-06-07 Tobias Burnus <burnus@net-b.de>
1650 * options.c (gfc_handle_option): Fix -fno-recursive.
1652 2010-06-07 Tobias Burnus <burnus@net-b.de>
1654 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1655 * gfortran.texi (copyrights-gfortran): Ditto.
1657 2010-06-07 Joseph Myers <joseph@codesourcery.com>
1659 * lang.opt (fshort-enums): Define using Var and VarExists.
1660 * options.c (gfc_handle_option): Don't set flag_short_enums here.
1662 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1663 Janus Weil <janus@gcc.gnu.org>
1666 * resolve.c (get_declared_from_expr): Move to before
1667 resolve_typebound_generic_call. Make new_ref and class_ref
1668 ignorable if set to NULL.
1669 (resolve_typebound_generic_call): Once we have resolved the
1670 generic call, check that the specific instance is that which
1671 is bound to the declared type.
1672 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1673 freeing 'class_ref->next' twice.
1675 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1678 * trans-array.c (structure_alloc_comps): Dereference scalar
1679 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1682 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1684 * gfortranspec.c (append_arg, lang_specific_driver): Use
1685 GCC-specific formats in diagnostics.
1687 2010-06-02 Tobias Burnus <burnus@net-b.de>
1690 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1693 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1696 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
1699 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
1701 * fortran/gfortran.texi: Fix typos in description of variable-format-
1704 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1707 * dependency.c (gfc_check_section_vs_section): Check
1708 for interleaving array assignments without conflicts.
1710 2010-05-30 Janus Weil <janus@gcc.gnu.org>
1712 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1713 $data component of a class container.
1714 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1715 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1716 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1717 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1718 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1719 * gcc/fortran/parse.c (parse_derived): Ditto.
1720 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1721 gfc_expr_attr): Ditto.
1722 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1723 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1724 resolve_fl_var_and_proc, resolve_typebound_procedure,
1725 resolve_fl_derived): Ditto.
1726 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1727 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1729 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1730 gfc_trans_deferred_vars): Ditto.
1731 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1733 2010-05-28 Tobias Burnus <burnus@net-b.de>
1735 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1737 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1739 * gfortranspec.c (append_arg, lang_specific_driver): Use
1740 fatal_error instead of fatal. Use warning instead of fprintf for
1743 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1745 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1746 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1747 xstrerror instead of strerror.
1749 2010-05-26 Joseph Myers <joseph@codesourcery.com>
1751 * cpp.c (cb_cpp_error): Save and restore
1752 global_dc->warn_system_headers, not variable warn_system_headers.
1754 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1756 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1758 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1760 * trans-common.c: Do not include rtl.h, include output.h instead.
1761 * trans-decl.c: Likewise.
1763 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
1766 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1767 namespace before trying to reorder the gsymbols.
1769 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
1774 * resolve.c (resolve_global_procedure): Add check for global
1775 procedures with implicit interfaces and assumed-shape or optional
1776 dummy arguments. Verify that function return type, kind and string
1779 2010-05-21 Tobias Burnus <burnus@net-b.de>
1781 * gfortran.h: Do not include system.h.
1782 * bbt.c: Include system.h.
1784 * dependency.c: Ditto.
1785 * dump-parse-tree.c: Ditto.
1786 * arith.h: Do not include gfortran.h.
1787 * constructor.h: Do not include gfortran.h and splay-tree.h.
1788 * match.h: Do not include gfortran.h.
1790 * target-memory.h: Ditto.
1791 * openmp.c: Do not include toplev.h and target.h.
1792 * trans-stmt.c: Ditto not include toplev.h.
1794 * trans-common.c: Tell why toplev.h is needed. And
1795 do not include target.h.
1796 * trans-expr.c: Tell why toplev.h is needed.
1797 * trans-array.c: Ditto.
1798 * trans-openmp.c: Ditto.
1799 * trans-const.c: Ditto.
1801 * trans-types.c: Ditto.
1802 * trans-io.c: Ditto.
1803 * trans-decl.c: Ditto.
1806 * trans-intrinsic.c: Ditto.
1809 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1812 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1813 before returning MATCH_ERROR. Add check for scalar. Add check for
1814 default integer kind.
1816 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1819 * match.c (gfc_match_select_type): On error jump back out of the local
1821 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1822 stage, more precisely to ...
1823 * resolve.c (resolve_fl_derived): ... this place.
1825 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1828 * resolve.c (ensure_not_abstract): Allow abstract types with
1829 non-abstract ancestors.
1831 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1833 * trans-const.c: Include realmpfr.h.
1834 * Make-lang.in: Update dependencies.
1836 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1838 * trans-const.c, trans-types.c, trans-intrinsic.c:
1839 Clean up redundant includes.
1841 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
1844 * lang.opt (Wunused-dummy-argument): New option.
1845 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1846 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1847 (set_Wall): Enable warn_unused_dummy_argument.
1848 (gfc_handle_option): Set warn_unused_dummy_argument according to
1850 * trans-decl.c (generate_local_decl): Separate warnings about
1851 unused variables and unused dummy arguments.
1852 * invoke.texi: Documented new option.
1854 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
1856 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1857 (gfc_conv_string_tmp): Do not assert type comparibilty.
1858 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1859 (gfc_conv_expr_descriptor): Remove assert.
1860 * trans-common.c: Clarify why rtl.h and tm.h are included.
1861 * trans-openmp.c: Do not include ggc.h and real.h.
1862 Explain why gimple.h is included.
1863 * trans-const.c: Do not include ggc.h.
1864 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1865 * trans.c: Do not include ggc.h and real.h.
1866 Explain why gimple.h is included.
1867 * trans-types.c: Do not include tm.h. Explain why langhooks.h
1868 and dwarf2out.h are included.
1869 * trans-io.c: Do not include gimple.h and real.h.
1870 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1871 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
1874 2010-05-20 Tobias Burnus <burnus@net-b.de>
1876 * options.c (gfc_init_options,gfc_post_options): Enable
1877 flag_associative_math by default.
1879 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1882 * trans-stmt.c (gfc_trans_stop): Add generation of call to
1883 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1884 blank STOP, handling a null expression. (gfc_trans_pause): Use
1885 pause_string for blank PAUSE.
1886 * trans.h: Add external function declaration for error_stop_numeric.
1887 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1888 the declaration for the library call. Adjust whitespaces.
1889 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1890 signal no stop code. Match the expression following the stop and pass
1891 that to the translators. Remove the old use of digit matching. Add
1892 checks that the stop_code expression is INTEGER or CHARACTER, constant,
1893 and if CHARACTER, default character KIND.
1895 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1898 * lang.opt (Wconversion-extra): New option.
1899 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1900 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1901 (set_Wall): Enable -Wconversion.
1902 (gfc_handle_option): Set warn_conversion_extra.
1903 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1904 introduced for -Wconversion if -Wconversion-extra is present.
1905 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1906 -Wconversion; document -Wconversion-extra.
1908 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1911 * gfortran.h (gfc_has_default_initializer): New.
1912 * expr.c (gfc_has_default_initializer): New.
1913 * resolve.c (has_default_initializer): Removed, use
1914 gfc_has_default_initializer() instead. Updated all callers.
1915 * trans-array.c (has_default_initializer): Removed, use
1916 gfc_has_default_initializer() instead. Updated all callers.
1917 * trans-decl.c (generate_local_decl): Do not check the
1918 first component only to check for initializers, but use
1919 gfc_has_default_initializer() instead.
1921 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1924 * primary.c (match_string_constant): Move start_locus just inside
1926 * data.c (create_character_intializer): Clarified truncation warning.
1928 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1931 * intrinsic.h (gfc_check_float): New prototype.
1932 (gfc_check_sngl): New prototype.
1933 * check.c (gfc_check_float): New.
1934 (gfc_check_sngl): New.
1935 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1936 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1938 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1939 added them to the list of specifics of REAL instead.
1941 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1944 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1945 This is now handled via 'gfc_class_null_initializer'.
1947 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1949 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1950 gfc_build_class_symbol,add_proc_component,add_proc_comps,
1951 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1952 add_procs_to_declared_vtab,add_generic_specifics,
1953 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1954 find_typebound_proc_uop,gfc_find_typebound_proc,
1955 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1956 gfc_get_tbp_symtree): Moved here from other places.
1957 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1959 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1960 gfc_find_typebound_proc,gfc_find_typebound_user_op,
1961 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1962 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1963 * Make-lang.in: Add class.o.
1964 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1965 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1966 add_procs_to_declared_vtab,add_generic_specifics,
1967 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1968 find_typebound_proc_uop,gfc_find_typebound_proc,
1969 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1970 gfc_get_tbp_symtree): Move to class.c.
1972 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1974 * trans-types.c (gfc_init_types): Use build_function_type_list.
1975 (gfc_get_ppc_type): Likewise.
1976 * trans-decl.c (gfc_generate_constructors): Likewise.
1977 * f95-lang.c (build_builtin_fntypes): Likewise.
1978 (gfc_init_builtin_functions): Likewise.
1979 (DEF_FUNCTION_TYPE_0): Likewise.
1980 (DEF_FUNCTION_TYPE_1): Likewise.
1981 (DEF_FUNCTION_TYPE_2): Likewise.
1982 (DEF_FUNCTION_TYPE_3): Likewise.
1983 (DEF_FUNCTION_TYPE_4): Likewise.
1984 (DEF_FUNCTION_TYPE_5): Likewise.
1985 (DEF_FUNCTION_TYPE_6): Likewise.
1986 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
1987 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1989 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1991 * trans-array.c (gfc_trans_array_constructor_value): Use
1992 build_constructor instead of build_constructor_from_list.
1993 (gfc_build_constant_array_constructor): Likewise.
1994 * trans-decl.c (create_main_function): Likewise.
1995 * trans-stmt.c (gfc_trans_character_select): Likewise.
1997 2010-05-17 Janus Weil <janus@gcc.gnu.org>
2000 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
2001 (resolve_fl_variable_derived): ... this place.
2002 (resolve_symbol): Make sure function symbols (and their result
2003 variables) are not resolved twice.
2005 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
2008 * array.c (match_array_list): Revert change from 2010-05-13.
2010 2010-05-16 Richard Guenther <rguenther@suse.de>
2012 * trans-decl.c (module_htab_decls_hash): Revert last change.
2014 2010-05-16 Richard Guenther <rguenther@suse.de>
2016 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
2018 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2020 * options.c (set_Wall): Remove special logic for Wuninitialized
2023 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2027 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
2030 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2034 * gfortran.h (gfc_class_null_initializer): New prototype.
2035 * expr.c (gfc_class_null_initializer): New function to build a NULL
2036 initializer for CLASS pointers.
2037 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
2038 containers. Remove default NULL initialization of $data component.
2039 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
2041 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
2042 Use new function 'gfc_class_null_initializer'.
2043 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
2046 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2049 * fortran/interface.c (get_sym_storage_size): Use signed instead of
2050 unsigned mpz_get_?i routines.
2052 2010-05-14 Jakub Jelinek <jakub@redhat.com>
2054 * trans.c (trans_code): Set backend locus early.
2055 * trans-decl.c (gfc_get_fake_result_decl): Use source location
2056 of the function instead of current input_location.
2058 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
2061 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
2063 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
2064 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
2067 2010-05-13 Jakub Jelinek <jakub@redhat.com>
2070 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
2072 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
2073 by reference dummy procedures or non-dummy procedure pointers.
2074 (gfc_omp_predetermined_sharing): Return
2075 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
2077 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2080 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
2081 after OMP statement.
2082 (gfc_match_omp_critical): Likewise.
2083 (gfc_match_omp_flush): Likewise.
2084 (gfc_match_omp_workshare): Likewise.
2085 (gfc_match_omp_master): Likewise.
2086 (gfc_match_omp_ordered): Likewise.
2087 (gfc_match_omp_atomic): Likewise.
2088 (gfc_match_omp_barrier): Likewise.
2089 (gfc_match_omp_end_nowait): Likewise.
2091 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2094 * resolve.c (validate_case_label_expr): Removed FIXME.
2095 (resolve_select): Raise default warning on case labels out of range
2096 of the case expression.
2098 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
2103 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
2104 about conversion warnings.
2106 2010-05-10 Janus Weil <janus@gcc.gnu.org>
2109 * match.c (gfc_match_select_type): Move error message to
2110 resolve_select_type.
2111 * resolve.c (resolve_select_type): Error message moved here from
2112 gfc_match_select_type. Correctly set type of temporary.
2114 2010-05-10 Richard Guenther <rguenther@suse.de>
2116 * trans-decl.c (gfc_build_library_function_decl): Split out
2118 (build_library_function_decl_1): ... this new function.
2119 Set a fnspec attribute if a specification was provided.
2120 (gfc_build_library_function_decl_with_spec): New function.
2121 (gfc_build_intrinsic_function_decls): Annotate internal_pack
2122 and internal_unpack.
2124 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
2127 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
2130 2010-05-07 Jason Merrill <jason@redhat.com>
2132 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
2133 to avoid -Wc++-compat warning.
2135 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
2138 * options.c (gfc_handle_option): Add argument kind.
2139 * gfortran.h (gfc_handle_option): Update declaration.
2141 2010-05-06 Tobias Burnus <burnus@net-b.de>
2144 * trans-types.c (gfc_sym_type): Mark Cray pointees as
2147 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
2150 * resolve.c (traverse_data_list): Rephrase error message for
2151 non-constant bounds in data-implied-do.
2153 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
2156 * gfortran.h: Removed repeat count from constructor, removed
2158 * data.h (gfc_assign_data_value_range): Changed return value from
2160 * data.c (gfc_assign_data_value): Add location to constructor element.
2161 (gfc_assign_data_value_range): Call gfc_assign_data_value()
2162 for each element in range. Return early if an error was generated.
2163 * resolve.c (check_data_variable): Stop early if range assignment
2166 2010-05-05 Janus Weil <janus@gcc.gnu.org>
2169 * resolve.c (resolve_fl_derived): Some fixes for class variables.
2170 * symbol.c (gfc_build_class_symbol): Add separate class container for
2173 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
2176 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
2178 2010-05-02 Tobias Burnus <burnus@net-b.de>
2181 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
2182 for lcobound, ucobound, image_index and this_image.
2183 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
2184 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
2185 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
2186 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
2188 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
2190 2010-04-30 Tobias Burnus <burnus@net-b.de>
2194 * trans-types.c (gfc_get_array_descriptor_base): Fix index
2195 calculation for array descriptor types.
2197 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2200 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
2201 initializers for PPC members of the vtabs.
2203 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2206 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
2207 attribute for all PPC members of the vtypes.
2208 (copy_vtab_proc_comps): Copy the correct interface.
2209 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
2210 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
2211 a dummy argument and make sure all PPC members of the vtab are
2212 initialized correctly.
2213 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
2214 in call to gfc_trans_assign_vtab_procs.
2215 * trans-stmt.c (gfc_trans_allocate): Ditto.
2217 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2220 * resolve.c (resolve_typebound_function): Renamed
2221 resolve_class_compcall.Do all the detection of class references
2223 (resolve_typebound_subroutine): resolve_class_typebound_call
2224 renamed. Otherwise same as resolve_typebound_function.
2225 (gfc_resolve_expr): Call resolve_typebound_function.
2226 (resolve_code): Call resolve_typebound_subroutine.
2228 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2231 * resolve.c (resolve_typebound_generic_call): For CLASS methods
2232 pass back the specific symtree name, rather than the target
2235 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2238 * resolve.c (resolve_structure_cons): Make the initializer of
2239 the vtab component 'extends' the same type as the component.
2241 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2244 * interface.c (check_interface1): Pass symbol name rather than NULL to
2245 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
2246 trap MULL. (gfc_compare_derived_types): Revert previous change
2247 incorporated incorrectly during merge from trunk, r155778.
2248 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2249 than NULL to gfc_compare_interfaces.
2250 * symbol.c (add_generic_specifics): Likewise.
2252 2010-02-29 Janus Weil <janus@gcc.gnu.org>
2255 * interface.c (gfc_compare_derived_types): Add condition for vtype.
2256 * symbol.c (gfc_find_derived_vtab): Sey access to private.
2257 (gfc_find_derived_vtab): Likewise.
2258 * module.c (ab_attribute): Add enumerator AB_VTAB.
2259 (mio_symbol_attribute): Use new attribute, AB_VTAB.
2260 (check_for_ambiguous): Likewise.
2262 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2263 Janus Weil <janus@gcc.gnu.org>
2266 * trans-expr.c (select_class_proc): Remove function.
2267 (conv_function_val): Delete reference to previous.
2268 (gfc_conv_derived_to_class): Add second argument to the call to
2269 gfc_find_derived_vtab.
2270 (gfc_conv_structure): Exclude proc_pointer components when
2271 accessing $data field of class objects.
2272 (gfc_trans_assign_vtab_procs): New function.
2273 (gfc_trans_class_assign): Add second argument to the call to
2274 gfc_find_derived_vtab.
2275 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
2276 implement holding off searching for the vptr derived type.
2277 (add_proc_component): New function.
2278 (add_proc_comps): New function.
2279 (add_procs_to_declared_vtab1): New function.
2280 (copy_vtab_proc_comps): New function.
2281 (add_procs_to_declared_vtab): New function.
2282 (void add_generic_specifics): New function.
2283 (add_generics_to_declared_vtab): New function.
2284 (gfc_find_derived_vtab): Add second argument to the call to
2285 gfc_find_derived_vtab. Add the calls to
2286 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
2287 * decl.c (build_sym, build_struct): Use new arg in calls to
2288 gfc_build_class_symbol.
2289 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
2290 definition of struct gfc_class_esym_list. Modify prototypes
2291 of gfc_build_class_symbol and gfc_find_derived_vtab.
2292 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
2293 call to gfc_find_derived_vtab.
2294 * module.c : Add the vtype attribute.
2295 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
2296 * resolve.c (resolve_typebound_generic_call): Add second arg
2297 to pass along the generic name for class methods.
2298 (resolve_typebound_call): The same.
2299 (resolve_compcall): Use the second arg to carry the generic
2300 name from the above. Remove the reference to class_esym.
2301 (check_members, check_class_members, resolve_class_esym,
2302 hash_value_expr): Remove functions.
2303 (resolve_class_compcall, resolve_class_typebound_call): Modify
2304 to use vtable rather than member by member calls.
2305 (gfc_resolve_expr): Modify second arg in call to
2307 (resolve_select_type): Add second arg in call to
2308 gfc_find_derived_vtab.
2309 (resolve_code): Add second arg in call resolve_typebound_call.
2310 (resolve_fl_derived): Exclude vtypes from check for late
2311 procedure definitions. Likewise for checking of explicit
2312 interface and checking of pass arg.
2313 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2314 calls to gfc_find_derived_vtab.
2315 * match.c (select_type_set_tmp): Use new arg in call to
2316 gfc_build_class_symbol.
2317 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2319 * parse.c (endType): Finish incomplete classes.
2321 2010-04-28 Tobias Burnus <burnus@net-b.de>
2325 * simplify.c (simplify_cobound): Handle scalar coarrays.
2327 2010-04-27 Tobias Burnus <burnus@net-b.de>
2329 * gfc-internals.texi: Update copyright year.
2330 * gfortran.texi: Ditto.
2331 * invoke.texi: Ditto.
2333 2010-04-27 Tobias Burnus <burnus@net-b.de>
2336 * resolve.c (resolve_allocate_expr): Allow array coarrays.
2337 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2338 * trans-types.c (gfc_get_array_type_bounds,
2339 gfc_get_array_descriptor_base): Add corank argument.
2340 * trans-array.c (gfc_array_init_size): Handle corank.
2341 (gfc_trans_create_temp_array, gfc_array_allocate,
2342 gfc_conv_expr_descriptor): Add corank argument to call.
2343 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2345 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
2349 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2350 of mucking with a tree directly.
2352 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2355 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2356 gfc_error with new error message.
2358 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
2362 * trans-expr.c (gfc_conv_expr): Supply an address expression for
2364 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2366 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2367 than the address of a GFC_SS_REFERENCE.
2368 * trans.h : Change comment on GFC_SS_REFERENCE.
2370 2010-04-22 Richard Guenther <rguenther@suse.de>
2373 * resolve.c (gfc_resolve_index): Wrap around ...
2374 (gfc_resolve_index_1): ... this. Add parameter to allow
2375 any integer kind index type.
2376 (resolve_array_ref): Allow any integer kind for the start
2377 index of an array ref.
2379 2010-04-21 Jakub Jelinek <jakub@redhat.com>
2382 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2385 2010-04-20 Harald Anlauf <anlauf@gmx.de>
2387 * intrinsic.c (sort_actual): Remove 'is' in error message.
2389 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
2392 * resolve.c (resolve_fl_derived): If a component character
2393 length has not been resolved, do so now.
2394 (resolve_symbol): The same as above for a symbol character
2396 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2397 not needed for a character valued, procedure pointer.
2400 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2401 not found, return FAILURE rather than ICEing.
2403 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2406 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2407 sequential loops private in the innermost containing task region.
2409 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2411 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2412 to build_common_tree_nodes.
2414 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
2417 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2418 gfc_msg_bounds by using 'Array bound mismatch' directly.
2419 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
2420 error message to include the mismatch in the extent of array bound.
2421 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
2422 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2424 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2426 * gfortran.texi: Update information on temporary file locations.
2428 2010-04-16 Jakub Jelinek <jakub@redhat.com>
2430 * trans-decl.c (gfc_build_qualified_array): Ensure
2431 ubound.N and lbound.N artificial variable names don't appear
2434 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
2437 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2438 block of code. Set name to the variable associated with the descriptor.
2440 2010-04-15 Jakub Jelinek <jakub@redhat.com>
2442 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2443 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2445 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
2447 * intrinsic.texi: Add the missing specific name of intrinsic
2448 procedure where the specific name is identical to the generic name.
2449 Fix inconsistent or mismatch in the argument names in intrinsic
2450 procedure descriptions. Add the SCALAR allocatable description to
2453 2010-04-14 Tobias Burnus <burnus@net-b.de>
2456 * array.c (gfc_find_array_ref): Handle codimensions.
2457 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2458 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2459 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2461 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2462 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2464 * intrinsic.h (add_functions): Add this_image, image_index,
2465 lcobound and ucobound intrinsics.
2466 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2467 gfc_check_image_index, gfc_check_this_image,
2468 gfc_simplify_image_index, gfc_simplify_lcobound,
2469 gfc_simplify_this_image, gfc_simplify_ucobound):
2470 New function prototypes.
2471 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2472 IMAGE_INDEX): Document new intrinsic functions.
2473 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2475 * simplify.c (simplify_bound_dim): Handle coarrays.
2476 (simplify_bound): Update simplify_bound_dim call.
2477 (gfc_simplify_num_images): Add -fcoarray=none check.
2478 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2479 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2481 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2484 * constructor.c: Fix typo in comment.
2485 * expr.c (find_array_section): Add check for max array limit.
2487 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
2490 * gfortranspec.c (lookup_option): Check for -static and return
2492 (lang_specific_driver): Break when OPTION_static is discovered.
2494 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2496 * array.c (extract_element): Restore function from trunk.
2497 (gfc_get_array_element): Restore function from trunk.
2498 (gfc_expand_constructor): Restore check against
2499 flag_max_array_constructor.
2500 * constructor.c (node_copy_and_append): Delete unused.
2501 * gfortran.h: Delete comment and extra include.
2502 * constructor.h: Bump copyright and clean up TODO comments.
2503 * resolve.c: Whitespace.
2505 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2507 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2508 with direct access access to elements. Adjusted prototype, fixed all
2510 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2512 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2513 (gfc_simplify_spread): Removed workaround, directly insert elements
2514 at a given array position.
2515 (gfc_simplify_transpose): Likewise.
2516 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2518 (gfc_simplify_unpack): Likewise.
2520 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2522 * simplify.c (only_convert_cmplx_boz): Renamed to ...
2523 (convert_boz): ... this and moved to start of file.
2524 (gfc_simplify_abs): Whitespace fix.
2525 (gfc_simplify_acos): Whitespace fix.
2526 (gfc_simplify_acosh): Whitespace fix.
2527 (gfc_simplify_aint): Whitespace fix.
2528 (gfc_simplify_dint): Whitespace fix.
2529 (gfc_simplify_anint): Whitespace fix.
2530 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2531 (gfc_simplify_dnint): Whitespace fix.
2532 (gfc_simplify_asin): Whitespace fix.
2533 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2534 (gfc_simplify_atan): Likewise.
2535 (gfc_simplify_atanh): Whitespace fix.
2536 (gfc_simplify_atan2): Whitespace fix.
2537 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2538 (gfc_simplify_bessel_j1): Likewise.
2539 (gfc_simplify_bessel_jn): Likewise.
2540 (gfc_simplify_bessel_y0): Likewise.
2541 (gfc_simplify_bessel_y1): Likewise.
2542 (gfc_simplify_bessel_yn): Likewise.
2543 (gfc_simplify_ceiling): Reorderd statements.
2544 (simplify_cmplx): Use convert_boz(), check for constant arguments.
2546 (gfc_simplify_cmplx): Use correct default kind. Removed check for
2548 (gfc_simplify_complex): Replaced if-gate. Removed check for
2550 (gfc_simplify_conjg): Whitespace fix.
2551 (gfc_simplify_cos): Whitespace fix.
2552 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2553 (gfc_simplify_dcmplx): Removed check for constant arguments.
2554 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2555 (gfc_simplify_digits): Whitespace fix.
2556 (gfc_simplify_dim): Whitespace fix.
2557 (gfc_simplify_dprod): Reordered statements.
2558 (gfc_simplify_erf): Whitespace fix.
2559 (gfc_simplify_erfc): Whitespace fix.
2560 (gfc_simplify_epsilon): Whitespace fix.
2561 (gfc_simplify_exp): Whitespace fix.
2562 (gfc_simplify_exponent): Use convert_boz().
2563 (gfc_simplify_floor): Reorderd statements.
2564 (gfc_simplify_gamma): Whitespace fix.
2565 (gfc_simplify_huge): Whitespace fix.
2566 (gfc_simplify_iand): Whitespace fix.
2567 (gfc_simplify_ieor): Whitespace fix.
2568 (simplify_intconv): Use gfc_convert_constant().
2569 (gfc_simplify_int): Use simplify_intconv().
2570 (gfc_simplify_int2): Reorderd statements.
2571 (gfc_simplify_idint): Reorderd statements.
2572 (gfc_simplify_ior): Whitespace fix.
2573 (gfc_simplify_ishftc): Removed duplicate type check.
2574 (gfc_simplify_len): Use range_check() instead of manual range check.
2575 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2576 (gfc_simplify_log): Whitespace fix.
2577 (gfc_simplify_log10): Whitespace fix.
2578 (gfc_simplify_minval): Whitespace fix.
2579 (gfc_simplify_maxval): Whitespace fix.
2580 (gfc_simplify_mod): Whitespace fix.
2581 (gfc_simplify_modulo): Whitespace fix.
2582 (simplify_nint): Reorderd statements.
2583 (gfc_simplify_not): Whitespace fix.
2584 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2585 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2586 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2587 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2588 (gfc_simplify_realpart): Whitespace fix.
2589 (gfc_simplify_selected_char_kind): Removed unused result-variable.
2590 (gfc_simplify_selected_int_kind): Removed unused result-variable.
2591 (gfc_simplify_selected_real_kind): Removed unused result-variable.
2592 (gfc_simplify_sign): Whitespace fix.
2593 (gfc_simplify_sin): Whitespace fix.
2594 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2595 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2596 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2597 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2598 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2600 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2602 * gfortran.h (gfc_start_constructor): Removed.
2603 (gfc_get_array_element): Removed.
2604 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
2605 instead. Fixed all callers.
2606 (extract_element): Removed.
2607 (gfc_expand_constructor): Temporarily removed check for
2608 max-array-constructor. Will be re-introduced later if still required.
2609 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2610 instead. Fixed all callers.
2611 * expr.c (find_array_section): Replaced manual lookup of elements
2612 by gfc_constructor_lookup.
2614 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2616 * gfortran.h (gfc_get_null_expr): New prototype.
2617 (gfc_get_operator_expr): New prototype.
2618 (gfc_get_character_expr): New prototype.
2619 (gfc_get_iokind_expr): New prototype.
2620 * expr.c (gfc_get_null_expr): New.
2621 (gfc_get_character_expr): New.
2622 (gfc_get_iokind_expr): New.
2623 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2624 * matchexp.c (build_node): Renamed and moved to
2625 expr.c (gfc_get_operator_expr). Reordered arguments to match
2626 other functions. Fixed all callers.
2627 (gfc_get_parentheses): Use specific function to build expr.
2628 * array.c (gfc_match_array_constructor): Likewise.
2629 * arith.c (eval_intrinsic): Likewise.
2630 (gfc_hollerith2int): Likewise.
2631 (gfc_hollerith2real): Likewise.
2632 (gfc_hollerith2complex): Likewise.
2633 (gfc_hollerith2logical): Likewise.
2634 * data.c (create_character_intializer): Likewise.
2635 * decl.c (gfc_match_null): Likewise.
2636 (enum_initializer): Likewise.
2637 * io.c (gfc_match_format): Likewise.
2638 (match_io): Likewise.
2639 * match.c (gfc_match_nullify): Likewise.
2640 * primary.c (match_string_constant): Likewise.
2641 (match_logical_constant): Likewise.
2642 (build_actual_constructor): Likewise.
2643 * resolve.c (build_default_init_expr): Likewise.
2644 * symbol.c (generate_isocbinding_symbol): Likewise.
2645 (gfc_build_class_symbol): Likewise.
2646 (gfc_find_derived_vtab): Likewise.
2647 * simplify.c (simplify_achar_char): Likewise.
2648 (gfc_simplify_adjustl): Likewise.
2649 (gfc_simplify_adjustr): Likewise.
2650 (gfc_simplify_and): Likewise.
2651 (gfc_simplify_bit_size): Likewise.
2652 (gfc_simplify_is_iostat_end): Likewise.
2653 (gfc_simplify_is_iostat_eor): Likewise.
2654 (gfc_simplify_isnan): Likewise.
2655 (simplify_bound): Likewise.
2656 (gfc_simplify_leadz): Likewise.
2657 (gfc_simplify_len_trim): Likewise.
2658 (gfc_simplify_logical): Likewise.
2659 (gfc_simplify_maxexponent): Likewise.
2660 (gfc_simplify_minexponent): Likewise.
2661 (gfc_simplify_new_line): Likewise.
2662 (gfc_simplify_null): Likewise.
2663 (gfc_simplify_or): Likewise.
2664 (gfc_simplify_precision): Likewise.
2665 (gfc_simplify_repeat): Likewise.
2666 (gfc_simplify_scan): Likewise.
2667 (gfc_simplify_size): Likewise.
2668 (gfc_simplify_trailz): Likewise.
2669 (gfc_simplify_trim): Likewise.
2670 (gfc_simplify_verify): Likewise.
2671 (gfc_simplify_xor): Likewise.
2672 * trans-io.c (build_dt): Likewise.
2673 (gfc_new_nml_name_expr): Removed.
2675 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2677 * arith.h (gfc_constant_result): Removed prototype.
2678 * constructor.h (gfc_build_array_expr): Removed prototype.
2679 (gfc_build_structure_constructor_expr): Removed prototype.
2680 * gfortran.h (gfc_int_expr): Removed prototype.
2681 (gfc_logical_expr): Removed prototype.
2682 (gfc_get_array_expr): New prototype.
2683 (gfc_get_structure_constructor_expr): New prototype.
2684 (gfc_get_constant_expr): New prototype.
2685 (gfc_get_int_expr): New prototype.
2686 (gfc_get_logical_expr): New prototype.
2687 * arith.c (gfc_constant_result): Moved and renamed to
2688 expr.c (gfc_get_constant_expr). Fixed all callers.
2689 * constructor.c (gfc_build_array_expr): Moved and renamed to
2690 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2691 and kind. Fixed all callers.
2692 (gfc_build_structure_constructor_expr): Moved and renamed to
2693 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2694 to type and kind. Fixed all callers.
2695 * expr.c (gfc_logical_expr): Renamed to ...
2696 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2697 (gfc_int_expr): Renamed to ...
2698 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2700 (gfc_get_constant_expr): New.
2701 (gfc_get_array_expr): New.
2702 (gfc_get_structure_constructor_expr): New.
2703 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2706 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2708 * constructor.h: New.
2709 * constructor.c: New.
2710 * Make-lang.in: Add new files to F95_PARSER_OBJS.
2711 * arith.c (reducy_unary): Use constructor API.
2712 (reduce_binary_ac): Likewise.
2713 (reduce_binary_ca): Likewise.
2714 (reduce_binary_aa): Likewise.
2715 * check.c (gfc_check_pack): Likewise.
2716 (gfc_check_reshape): Likewise.
2717 (gfc_check_unpack): Likewise.
2718 * decl.c (add_init_expr_to_sym): Likewise.
2719 (build_struct): Likewise.
2720 * dependency.c (gfc_check_dependency): Likewise.
2721 (contains_forall_index_p): Likewise.
2722 * dump-parse-tree.c (show_constructor): Likewise.
2723 * expr.c (free_expr0): Likewise.
2724 (gfc_copy_expr): Likewise.
2725 (gfc_is_constant_expr): Likewise.
2726 (simplify_constructor): Likewise.
2727 (find_array_element): Likewise.
2728 (find_component_ref): Likewise.
2729 (find_array_section): Likewise.
2730 (find_substring_ref): Likewise.
2731 (simplify_const_ref): Likewise.
2732 (scalarize_intrinsic_call): Likewise.
2733 (check_alloc_comp_init): Likewise.
2734 (gfc_default_initializer): Likewise.
2735 (gfc_traverse_expr): Likewise.
2736 * iresolve.c (check_charlen_present): Likewise.
2737 (gfc_resolve_reshape): Likewise.
2738 (gfc_resolve_transfer): Likewise.
2739 * module.c (mio_constructor): Likewise.
2740 * primary.c (build_actual_constructor): Likewise.
2741 (gfc_match_structure_constructor): Likewise.
2742 * resolve.c (resolve_structure_cons): Likewise.
2743 * simplify.c (is_constant_array_expr): Likewise.
2744 (init_result_expr): Likewise.
2745 (transformational_result): Likewise.
2746 (simplify_transformation_to_scalar): Likewise.
2747 (simplify_transformation_to_array): Likewise.
2748 (gfc_simplify_dot_product): Likewise.
2749 (simplify_bound): Likewise.
2750 (simplify_matmul): Likewise.
2751 (simplify_minval_maxval): Likewise.
2752 (gfc_simplify_pack): Likewise.
2753 (gfc_simplify_reshape): Likewise.
2754 (gfc_simplify_shape): Likewise.
2755 (gfc_simplify_spread): Likewise.
2756 (gfc_simplify_transpose): Likewise.
2757 (gfc_simplify_unpack): Likewise.q
2758 (gfc_convert_constant): Likewise.
2759 (gfc_convert_char_constant): Likewise.
2760 * target-memory.c (size_array): Likewise.
2761 (encode_array): Likewise.
2762 (encode_derived): Likewise.
2763 (interpret_array): Likewise.
2764 (gfc_interpret_derived): Likewise.
2765 (expr_to_char): Likewise.
2766 (gfc_merge_initializers): Likewise.
2767 * trans-array.c (gfc_get_array_constructor_size): Likewise.
2768 (gfc_trans_array_constructor_value): Likewise.
2769 (get_array_ctor_strlen): Likewise.
2770 (gfc_constant_array_constructor_p): Likewise.
2771 (gfc_build_constant_array_constructor): Likewise.
2772 (gfc_trans_array_constructor): Likewise.
2773 (gfc_conv_array_initializer): Likewise.
2774 * trans-decl.c (check_constant_initializer): Likewise.
2775 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2776 (gfc_apply_interface_mapping_to_cons): Likewise.
2777 (gfc_trans_structure_assign): Likewise.
2778 (gfc_conv_structure): Likewise.
2779 * array.c (check_duplicate_iterator): Likewise.
2780 (match_array_list): Likewise.
2781 (match_array_cons_element): Likewise.
2782 (gfc_match_array_constructor): Likewise.
2783 (check_constructor_type): Likewise.
2784 (check_constructor): Likewise.
2786 (expand_constructor): Likewise.
2787 (extract_element): Likewise.
2788 (gfc_expanded_ac): Likewise.
2789 (resolve_array_list): Likewise.
2790 (gfc_resolve_character_array_constructor): Likewise.
2791 (copy_iterator): Renamed to ...
2792 (gfc_copy_iterator): ... this.
2793 (gfc_append_constructor): Removed.
2794 (gfc_insert_constructor): Removed unused function.
2795 (gfc_get_constructor): Removed.
2796 (gfc_free_constructor): Removed.
2797 (qgfc_copy_constructor): Removed.
2798 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2799 Removed all references. Replaced constructor list by splay-tree.
2800 (struct gfc_constructor): Removed member 'next', moved 'offset' from
2801 the inner struct, added member 'base'.
2802 (gfc_append_constructor): Removed prototype.
2803 (gfc_insert_constructor): Removed prototype.
2804 (gfc_get_constructor): Removed prototype.
2805 (gfc_free_constructor): Removed prototype.
2806 (qgfc_copy_constructor): Removed prototype.
2807 (gfc_copy_iterator): New prototype.
2808 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2810 2010-04-10 Tobias Burnus <burnus@net-b.de>
2813 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2814 proc-pointers and type-bound procedures.
2815 (gfc_specification_expr): Check proc-pointers for pureness.
2817 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
2820 * gfortranspec.c (lang_specific_driver): Do not expose vars
2821 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2824 2010-04-09 Tobias Burnus <burnus@net-b.de>
2827 * decl.c (variable_decl, match_attr_spec): Fix setting the array
2829 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2830 * data.c (gfc_assign_data_value): Ditto.
2831 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2832 (gfc_traverse_expr): Traverse also through codimension expressions.
2833 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2834 gfc_has_ultimate_pointer): New functions.
2835 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2836 (gfc_array_ref): Add codimen.
2837 (gfc_array_ref): Add in_allocate.
2838 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2839 gfc_has_ultimate_pointer): Add prototypes.
2840 * interface.c (compare_parameter, compare_actual_formal,
2841 check_intents): Add coarray constraints.
2842 * match.c (gfc_match_iterator): Add coarray constraint.
2843 * match.h (gfc_match_array_ref): Update interface.
2844 * primary.c (gfc_match_varspec): Handle codimensions.
2845 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2846 (check_class_members): Return gfc_try instead for error recovery.
2847 (resolve_typebound_function,resolve_typebound_subroutine,
2848 check_members): Handle return value of check_class_members.
2849 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2850 check_dimension, compare_spec_to_ref, resolve_array_ref,
2851 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2852 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2854 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2855 Skip over coarray refs.
2856 (gfc_array_allocate) Add support for references containing coindexes.
2857 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2858 (gfc_map_intrinsic_function): Ignore codimensions.
2860 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
2863 * io.c (check_format_string): Added check for additional non
2864 blank characters after the format string was successfully
2866 * io.c (check_format): Changed the error messages for positive
2867 int required and period required to drop through the error logic
2868 and report with gfc_error instead of gfc_error_now. Corrected
2869 format postion for hollerith strings.
2871 2010-04-08 Tobias Burnus <burnus@net-b.de>
2873 * module.c (use_iso_fortran_env_module): Fix standard check.
2875 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2877 * parse.c (parse_derived, parse_enum): Avoid set but not used
2880 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
2883 * gfortran.texi: Add section about representation of
2886 2010-04-07 Simon Baldwin <simonb@google.com>
2888 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2889 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2891 2010-04-07 Richard Guenther <rguenther@suse.de>
2893 * options.c (gfc_init_options): Do not set.
2895 2010-04-06 Tobias Burnus <burnus@net-b.de>
2898 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2899 * match.c (gfc_match_critical, sync_statement): Ditto.
2900 * gfortran.h (gfc_fcoarray): New enum.
2901 (gfc_option_t): Use it.
2902 * lang.opt (fcoarray): Add new flag.
2903 * invoke.texi (fcoarray): Document it.
2904 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2905 (gfc_handle_coarray_option): New function.
2907 2010-04-06 Tobias Burnus <burnus@net-b.de>
2910 * gfortran.h (gfc_array_spec): Add cotype.
2911 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2912 and defer error diagnostic.
2913 * resolve.c (resolve_fl_derived): Add missing check.
2914 (resolve_symbol): Add cotype/type check.
2915 * parse.c (parse_derived): Fix setting of coarray_comp.
2917 2010-04-06 Tobias Burnus <burnus@net-b.de>
2920 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2921 match_array_element_spec,gfc_copy_array_spec,
2922 gfc_compare_array_spec): Include corank.
2923 (match_array_element_spec,gfc_set_array_spec): Support codimension.
2924 * decl.c (build_sym,build_struct,variable_decl,
2925 match_attr_spec,attr_decl1,cray_pointer_decl,
2926 gfc_match_volatile): Add codimension.
2927 (gfc_match_codimension): New function.
2928 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2929 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2930 (gfc_add_codimension): New function prototype.
2931 * match.h (gfc_match_codimension): New function prototype.
2932 (gfc_match_array_spec): Update prototype
2933 * match.c (gfc_match_common): Update gfc_match_array_spec call.
2934 * module.c (MOD_VERSION): Bump.
2935 (mio_symbol_attribute): Support coarray attributes.
2936 (mio_array_spec): Add corank support.
2937 * parse.c (decode_specification_statement,decode_statement,
2938 parse_derived): Add coarray support.
2939 * resolve.c (resolve_formal_arglist, was_declared,
2940 is_non_constant_shape_array, resolve_fl_variable,
2941 resolve_fl_derived, resolve_symbol): Add coarray support.
2942 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2943 gfc_build_class_symbol): Add coarray support.
2944 (gfc_add_codimension): New function.
2946 2010-04-06 Tobias Burnus <burnus@net-b.de>
2949 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2950 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2951 stat_locked_other_image, stat_stopped_image and stat_unlocked of
2953 * intrinsic.texi (iso_fortran_env): Ditto.
2954 * libgfortran.h (libgfortran_stat_codes): New enum.
2955 * module.c (use_iso_fortran_env_module): Honour -std= when loading
2956 constants from the intrinsic module.
2958 2010-04-06 Tobias Burnus <burnus@net-b.de>
2961 * intrinsic.c (add_functions): Add num_images.
2962 * decl.c (gfc_match_end): Handle END CRITICAL.
2963 * intrinsic.h (gfc_simplify_num_images): Add prototype.
2964 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2966 * gfortran.h (gfc_statement): Add enum items for those.
2967 (gfc_exec_op) Ditto.
2968 (gfc_isym_id): Add num_images.
2969 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2970 (gfc_trans_sync,gfc_trans_critical): New functions.
2971 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2972 gfc_trans_critical): Add/update prototypes.
2973 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2974 and SYNC statements.
2975 * trans.h (gfor_fndecl_error_stop_string) Add variable.
2976 * resolve.c (resolve_sync): Add function.
2977 (gfc_resolve_blocks): Handle CRITICAL.
2978 (resolve_code): Handle CRITICAL, ERROR STOP,
2979 (resolve_branch): Add CRITICAL constraint check.
2980 and SYNC statements.
2981 * st.c (gfc_free_statement): Add new statements.
2982 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2983 (gfc_build_builtin_function_decls): Initialize it.
2984 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2985 (gfc_match_critical, gfc_match_error_stop, sync_statement,
2986 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2988 (match_exit_cycle): Handle CRITICAL constraint.
2989 (gfc_match_stopcode): Handle ERROR STOP.
2990 * match.h (gfc_match_critical, gfc_match_error_stop,
2991 gfc_match_sync_all, gfc_match_sync_images,
2992 gfc_match_sync_memory): Add prototype.
2993 * parse.c (decode_statement, gfc_ascii_statement,
2994 parse_executable): Handle new statements.
2995 (parse_critical_block): New function.
2996 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2997 * intrinsic.texi (num_images): Document new function.
2998 * simplify.c (gfc_simplify_num_images): Add function.
3000 2010-04-06 Tobias Burnus <burnus@net-b.de>
3003 * trans-array.c (gfc_conv_expr_descriptor): Update
3004 gfc_trans_scalar_assign call.
3005 (has_default_initializer): New function.
3006 (gfc_trans_deferred_array): Nullify less often.
3007 * trans-expr.c (gfc_conv_subref_array_arg,
3008 gfc_trans_subcomponent_assign): Update call to
3009 gfc_trans_scalar_assign.
3010 (gfc_trans_scalar_assign): Add parameter and pass it on.
3011 (gfc_trans_assignment_1): Optionally, do not dealloc before
3013 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
3014 call to gfc_trans_scalar_assign.
3015 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
3016 initializer to static variables.
3017 (gfc_init_default_dt): Add dealloc parameter and pass it on.
3018 * trans-stmt.c (forall_make_variable_temp,
3019 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3020 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
3021 gfc_trans_allocate): Update gfc_trans_assignment call.
3022 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
3023 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
3024 parameter to prototype.
3026 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
3028 * ioparm.def : Update copyright.
3030 * trans-array.c : ditto
3031 * trans-array.h : ditto
3033 * trans-types.c: ditto
3034 * dependency.c : ditto
3035 * gfortran.h : ditto
3037 * trans-io.c : ditto
3038 * trans-intrinsic.c : ditto
3039 * libgfortran.h : ditto
3040 * invoke.texi : ditto
3041 * intrinsic.texi : ditto
3044 * intrinsic.c : ditto
3045 * interface.c : ditto
3046 * iresolve.c : ditto
3047 * trans-stmt.c : ditto
3048 * trans-stmt.h : ditto
3053 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
3056 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
3057 do not assert the context of derived types.
3059 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3062 * ioparm.def: Change inquire size variable to type pointer to
3065 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
3068 * trans-expr.c (conv_parent_component_references): Ensure that
3069 'dt' has a backend_decl.
3072 * trans-expr.c (gfc_conv_structure): Ensure that the derived
3073 type has a backend_decl.
3076 * resolve.c (resolve_global_procedure): Check that the 'cl'
3077 structure is not NULL.
3079 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
3081 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
3084 2010-03-17 Tobias Burnus <burnus@net-b.de>
3087 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
3088 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
3090 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
3091 pointees as having explizit size.
3092 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
3094 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
3095 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
3096 * resolve.c (resolve_symbol): Handle cp_was_assumed.
3097 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
3098 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
3101 2010-03-14 Tobias Burnus <burnus@net-b.de>
3104 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
3105 (resolve_ordinary_assign): Add check to avoid segfault.
3107 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
3111 * resolve.c (resolve_compcall): Add new boolean dummy argument
3112 'class_members'. Only resolve expression at end if false.
3113 Remove redundant, static variable 'class_object'.
3114 (check_class_members): Add extra argument to call of
3116 (resolve_typebound_function): Renamed resolve_class_compcall.
3117 Do all the detection of class references here. Correct calls to
3118 resolve_compcall for extra argument.
3119 (resolve_typebound_subroutine): resolve_class_typebound_call
3120 renamed. Otherwise same as resolve_typebound_function.
3121 (gfc_resolve_expr): Call resolve_typebound_function.
3122 (resolve_code): Call resolve_typebound_subroutine.
3124 2010-03-10 Tobias Burnus <burnus@net-b.de
3127 * symbol.c (get_iso_c_sym): Set sym->result.
3129 2010-03-08 Janus Weil <janus@gcc.gnu.org>
3132 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
3133 for TBPs, otherwise they will not be resolved properly.
3134 (resolve_function): Use 'value.function.esym' instead of
3135 'value.function.name' to check if we're dealing with a TBP.
3136 (check_class_members): Set correct type of passed object for all TBPs,
3137 not only generic ones, except if the type is abstract.
3139 2010-03-04 Janus Weil <janus@gcc.gnu.org>
3142 * decl.c (gfc_match_final_decl): Make sure variable names starting with
3143 'final...' are not misinterpreted as FINAL statements.
3145 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
3148 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3149 allocatable ultimate components do not need temporaries, whilst
3150 ultimate pointer components do.
3152 2010-03-03 Janus Weil <janus@gcc.gnu.org>
3155 * resolve.c (resolve_code): Correctly set gfc_current_ns for
3157 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
3160 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
3163 * trans-array.c (gfc_conv_array_parameter): A full array of
3164 derived type need not be restricted to a symbol without an
3165 array spec to use the call to gfc_conv_expr_descriptor.
3168 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3169 allocatable arrays do not need temporaries.
3171 2010-03-01 Tobias Burnus <burnus@net-b.de>
3174 * resolve.c (find_array_spec): Handle REF_COMPONENT with
3177 2010-02-28 Tobias Burnus <burnus@net-b.de>
3180 * trans-expr.c (is_zero_initializer_p): Move up in the file.
3181 (gfc_conv_initializer): Handle zero initializer as special case.
3183 2010-02-27 Tobias Burnus <burnus@net-b.de>
3186 * resolve.c (resolve_fl_variable_derived): Imply SAVE
3187 for module variables for Fortran 2008.
3189 2010-02-25 Jakub Jelinek <jakub@redhat.com>
3192 * trans-common.c (build_common_decl): Also update DECL_MODE,
3193 and DECL_SIZE when encountering a larger common block and call
3196 2010-02-24 Tobias Burnus <burnus@net-b.de>
3199 * trans-expr.c (gfc_conv_initializer): Call directly
3200 gfc_conv_constant for C_NULL_(FUN)PTR.
3202 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
3205 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
3206 checking the rest of the dimensions for elements.
3208 2010-02-21 Tobias Burnus <burnus@net-b.de>
3211 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
3213 * option.c (gfc_init_options,gfc_handle_option): Ditto.
3214 * trans-expr.c (gfc_conv_expr_op): Use the flag.
3215 * invoke.texi: Document new -fno-protect-parens flag.
3217 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
3223 * dependency.c (gfc_check_argument_var_dependency): Use enum
3224 value instead of arithmetic vaue for 'elemental'.
3225 (check_data_pointer_types): New function.
3226 (gfc_check_dependency): Call check_data_pointer_types.
3227 * trans-array.h : Change fourth argument of
3228 gfc_conv_array_parameter to boolean.
3229 * trans-array.c (gfc_conv_array_parameter): A contiguous array
3230 can be a dummy but it must not be assumed shape or deferred.
3231 Change fourth argument to boolean. Array constructor exprs will
3232 always be contiguous and do not need packing and unpacking.
3233 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
3234 space and change fourth argument of gfc_conv_array_parameter
3236 (gfc_trans_arrayfunc_assign): Change fourth argument of
3237 gfc_conv_array_parameter to boolean.
3238 * trans-io.c (gfc_convert_array_to_string): The same.
3239 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
3241 2010-02-20 Tobias Burnus <burnus@net-b.de>
3244 * libgfortran.h: Add GFC_RTCHECK_MEM.
3245 * invoke.texi (-fcheck=): Document -fcheck=mem.
3246 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
3247 and enable malloc-success check only with -fcheck=mem.
3248 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
3250 2010-02-16 Tobias Burnus <burnus@net-b.de>
3253 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
3254 * intrinsic.c (add_functions): Ditto.
3255 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
3256 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
3258 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3261 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
3262 gfc_trans_do prototype.
3263 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
3264 a loop exit condition. If exit condition is given, build the loop exit
3265 code, checking IO results of implied do loops in READ and WRITE.
3266 (gfc_trans_do): Likewise.
3267 * trans.c (trans_code): New static work function, previously
3268 gfc_trans_code. Passes exit condition to gfc_trans_do.
3269 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
3270 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
3271 * trans-io.c (build_dt): Build an exit condition to allow checking IO
3272 result status bits in the dtparm structure. Use this condition in call
3273 to gfc_trans_code_cond.
3275 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
3279 * trans-array.c (gfc_conv_array_parameter): Use
3280 gfc_full_array_ref_p to detect full and contiguous variable
3281 arrays. Full array components and contiguous arrays do not need
3282 internal_pack and internal_unpack.
3284 2010-02-11 Jakub Jelinek <jakub@redhat.com>
3287 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
3290 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
3292 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
3295 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
3296 Tobias Burnus <burnus@net-b.de>
3299 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3301 2010-02-10 Tobias Burnus <burnus@net-b.de>
3304 * trans-decl.c (gfc_generate_function_code): Only check
3305 actual-vs.-dummy character bounds if not bind(C).
3307 2010-02-10 Jakub Jelinek <jakub@redhat.com>
3310 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3311 info->dimen after info has been freed.
3313 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3316 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3319 2010-02-09 Jakub Jelinek <jakub@redhat.com>
3321 * module.c (fix_mio_expr): Declare sym.
3323 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
3326 * module.c (fix_mio_expr): Fix for private generic procedures.
3328 2010-02-09 Daniel Kraft <d@domob.eu>
3331 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3332 length to be correct and issue only with -Wsurprising.
3333 * invoke.texi (Wsurprising): Mention this new warning that is
3334 turned on by -Wsurprising.
3336 2010-02-09 Daniel Kraft <d@domob.eu>
3339 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3340 can be CHARACTER type.
3341 (MINVAL), (MAXLOC), (MINLOC): Ditto.
3343 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
3346 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3347 'formal_ptr'. If this is true, give returned descriptor unity
3348 lbounds, in all dimensions, and the appropriate offset.
3349 (gfc_conv_procedure_call); If formal is a pointer, set the last
3350 argument of gfc_conv_subref_array_arg to true.
3351 * trans.h : Add last argument for gfc_conv_subref_array_arg.
3352 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3353 new arg of gfc_conv_subref_array_arg to false.
3354 * trans-stmt.c (forall_make_variable_temp): The same.
3356 2010-02-03 Tobias Burnus <burnus@net-b.de>
3359 * interface.c (compare_parameter): Disable rank-checking
3362 2010-02-02 Tobias Burnus <burnus@net-b.de>
3365 * parse.c (decode_specification_statement): Use sym->result not sym.
3367 2010-02-01 Tobias Burnus <burnus@net-b.de>
3370 * decl.c (variable_decl): Allow default initializer in
3371 TYPE declarations in PURE functions.
3373 2010-01-31 Janus Weil <janus@gcc.gnu.org>
3376 * resolve.c (resolve_allocate_expr): Move default initialization code
3377 here from gfc_trans_allocate.
3378 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3380 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3381 of CLASS variables via memcpy.
3382 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3383 to resolve_allocate_expr.
3385 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
3388 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3389 * gfortran.h : Add prototype for above.
3390 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3391 (gfc_trans_subcomponent_assign): Call new function to replace
3392 the code to deal with allocatable components.
3393 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3394 gfc_get_full_arrayspec_from_expr to replace existing code.
3396 2010-01-25 Tobias Burnus <burnus@net-b.de>
3399 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3402 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
3406 * expr.c (remove_subobject_ref): If the constructor is NULL use
3407 the expression as the source.
3408 (simplify_const_ref): Change the type of expression if
3409 there are component references. Allow for substring to be at
3410 the end of an arbitrarily long chain of references. If an
3411 element is found that is not in an EXPR_ARRAY, assume that this
3412 is scalar initialization of array. Call remove_subobject_ref in
3413 this case with NULL second argument.
3415 2010-01-24 Tobias Burnus <burnus@net-b.de>
3418 * array.c (gfc_array_dimen_size): Use correct specific
3419 function in the check.
3421 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
3424 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3425 is required, turn any trailing array elements after a range
3426 into ranges so that offsets can be calculated.
3428 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
3430 * module.c (mio_f2k_derived): Use enumerator as initializer of
3434 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
3435 bitfield of width 2.
3437 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3440 * resolve.c (extract_compcall_passed_object): Set locus for
3441 passed-object argument.
3442 (extract_ppc_passed_object): Set locus and correctly remove PPC
3445 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
3448 * trans-decl.c (add_argument_checking): Do not use the backend
3449 decl directly to test for the presence of an optional dummy
3450 argument. Use gfc_conv_expr_present, remembering to set the
3454 * trans-decl.c (gfc_generate_function_code): Small white space
3455 changes. If 'recurcheckvar' is NULL do not try to reset it.
3457 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3460 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3461 component for extended types.
3462 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3463 and take care of parent component accessibility.
3465 2010-01-17 Janus Weil <janus@gcc.gnu.org>
3468 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3469 * interface.c (check_interface1): Move a warning message here from
3470 resolve_fl_procedure.
3471 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3472 * module.c (read_module): Remove call to gfc_check_interfaces, since
3473 this comes too early here.
3474 * resolve.c (resolve_fl_procedure): Move warning message to
3477 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3480 * interface.c (check_interface1): Pass symbol name rather than NULL to
3481 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3483 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3484 than NULL to gfc_compare_interfaces.
3486 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3489 * trans-array.c (duplicate_allocatable): Static version of
3490 gfc_duplicate_allocatable with provision to handle scalar
3491 components. New boolean argument to switch off call to malloc
3493 (gfc_duplicate_allocatable): New function to call above with
3495 (gfc_copy_allocatable_data): New function to call above with
3497 (structure_alloc_comps): Do not apply indirect reference to
3498 scalar pointers. Add new section to copy allocatable components
3499 of arrays. Extend copying of allocatable components to include
3501 (gfc_copy_only_alloc_comp): New function to copy allocatable
3502 component derived types, without allocating the base structure.
3503 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3504 Add primitive for gfc_copy_only_alloc_comp.
3505 * trans-expr.c (gfc_conv_procedure_call): After calls to
3506 transformational functions with results that are derived types
3507 with allocatable components, copy the components in the result.
3508 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3509 of lhs derived types before allocation.
3511 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3514 * module.c (load_generic_interfaces): If a procedure that is
3515 use associated but not generic is given an interface that
3516 includes itself, then make it generic.
3518 2010-01-11 Joseph Myers <joseph@codesourcery.com>
3519 Shujing Zhao <pearly.zhao@oracle.com>
3521 PR translation/42469
3522 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3523 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3524 character between option name and help text.
3526 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3530 * trans-array.c (gfc_conv_array_initializer): Change call to
3531 gfc_error_now to call to gfc_fatal_error.
3532 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3533 (is_constant_element): Changed name from constant_element.
3534 (gfc_constant_ac): Only use expand_construuctor for expression
3535 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
3536 call gfc_is_constant_expr.
3537 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
3539 * resolve.c (gfc_is_expandable_expr): New function that determiners if
3540 array expressions should have their constructors expanded.
3541 (gfc_resolve_expr): Use new function to determine whether or not to call
3542 gfc_expand_constructor.
3544 2010-01-09 Tobias Burnus <burnus@net-b.de>
3547 * trans-expr.c (gfc_trans_structure_assign): Handle
3549 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
3550 to the constructor for c_null_(fun)ptr.
3551 * resolve.c (resolve_structure_cons): Add special case
3552 for c_null_(fun)ptr.
3554 2010-01-09 Jakub Jelinek <jakub@redhat.com>
3556 * gfortranspec.c (lang_specific_driver): Update copyright notice
3559 2010-01-08 Tobias Burnus <burnus@net-b.de>
3562 * symbol.c (check_conflict, gfc_copy_attr): Add
3563 ASYNCHRONOUS support.
3564 (gfc_add_asynchronous): New function.
3565 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
3566 (gfc_match_asynchronous): New function.
3567 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
3568 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
3569 (gfc_add_asynchronous): New Prototype.
3570 * module.c (ab_attribute, mio_symbol_attribute): Add
3571 ASYNCHRONOUS support.
3572 * resolve.c (was_declared): Ditto.
3573 * match.h (gfc_match_asynchronous): New prototype.
3574 * parse.c (decode_specification_statement,decode_statement):
3575 Add ASYNCHRONOUS support.
3577 2010-01-07 Tobias Burnus <burnus@net-b.de>
3580 * trans-decl.c (get_proc_pointer_decl): Fix call to
3581 gfc_conv_initializer for array-valued proc-pointer funcs.
3583 2010-01-07 Tobias Burnus <burnus@net-b.de>
3586 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
3587 allocatable scalars with SAVE attribute.
3589 2010-01-05 Tobias Burnus <burnus@net-b.de>
3592 * options.c (gfc_post_options): Set -frecursion
3593 when -fopenmp is used.
3595 2010-01-05 Tobias Burnus <burnus@net-b.de>
3598 * trans-expr.c (gfc_conv_procedure_call): Nullify
3599 return value for allocatable-scalar character functions.
3601 2010-01-04 Tobias Burnus <burnus@net-b.de>
3604 * error.c (error_printf, gfc_warning, gfc_notify_std,
3605 gfc_warning_now, gfc_error, gfc_error_now,
3606 gfc_fatal_error): Change argument name from nocmsgid to
3607 gmsgid to enable (x)gettext's % checking.
3609 2010-01-04 Tobias Burnus <burnus@net-b.de>
3611 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
3613 2010-01-04 Tobias Burnus <burnus@net-b.de>
3616 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
3617 for functions returning allocatable scalars.
3618 * trans-stmt.c (gfc_trans_allocate): Emmit error when
3619 reallocating an allocatable scalar.
3620 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
3622 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
3623 allocatable scalars.
3624 (gfc_generate_function_code): Nullify result variable for
3625 allocatable scalars.
3628 * module.c (gfc_use_module): Fix warning string to allow
3632 * invoke.texi (-fcheck=recursion): Mention that the checking
3633 is also disabled for -frecursive.
3634 * trans-decl.c (gfc_generate_function_code): Disable
3635 -fcheck=recursion when -frecursive is used.
3637 * intrinsic.texi (iso_c_binding): Improve wording.
3640 Copyright (C) 2010 Free Software Foundation, Inc.
3642 Copying and distribution of this file, with or without modification,
3643 are permitted in any medium without royalty provided the copyright
3644 notice and this notice are preserved.