1 2010-08-26 Daniel Kraft <d@domob.eu>
6 * gfortran.h (struct gfc_association_list): New flag `dangling'.
7 (gfc_build_block_ns): Declared here...
8 * parse.h (gfc_build_block_ns): ...instead of here.
9 * trans.h (gfc_process_block_locals): Expect additionally the
10 gfc_association_list of BLOCK (if present).
11 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
12 * resolve.c (resolve_variable): Only check for invalid *array*
13 references on associate-names.
14 (resolve_assoc_var): New method with code previously in resolve_symbol.
15 (resolve_select_type): Use association to give the selector and
16 temporaries their values instead of ordinary assignment.
17 (resolve_fl_var_and_proc): Allow CLASS associate-names.
18 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
19 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
20 to `gfc_process_block_locals' to match new interface.
21 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
23 (gfc_process_block_locals): Defer them rather here when linked to
24 from the BLOCK's association list.
26 2010-08-25 Jakub Jelinek <jakub@redhat.com>
28 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
29 TREE_NOTHROW on fndecls that can't throw. Set
30 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
31 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
32 gfor_fndecl_associated.
34 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
37 * frontend-passes.c (optimize_equality): Don't optimize array equality
39 2010-08-23 Janus Weil <janus@gcc.gnu.org>
42 * resolve.c (resolve_procedure_interface): New function split off from
44 (resolve_formal_arglist): Call it here ...
45 (resolve_symbol): ... and here.
47 2010-08-22 Joseph Myers <joseph@codesourcery.com>
49 * Make-lang.in (gfortranspec.o): Update dependencies.
50 * gfortranspec.c: Include coretypes.h before gcc.h. Include
52 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
53 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
54 (g77_xargc): Make unsigned.
55 (g77_xargv): Change to g77_x_decoded_options.
56 (g77_newargc): Make unsigned.
57 (g77_newargv): Change to g77_new_decoded_options.
58 (strings_same, options_same): New.
59 (append_arg): Use cl_decoded_option structures.
61 (add_arg_libgfortran): New.
62 (lang_specific_driver): Use cl_decoded_option structures.
64 2010-08-21 Janus Weil <janus@gcc.gnu.org>
68 * class.c (add_proc_comp): Add static initializer for PPCs.
69 (add_procs_to_declared_vtab): Modified comment.
70 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
71 initializer if the component is part of a vtype.
72 (mio_component_list): Add argument 'vtype', pass it on to
74 (mio_symbol): Modified call to 'mio_component_list'.
75 * trans.h (gfc_conv_initializer): Modified prototype.
76 (gfc_trans_assign_vtab_procs): Removed.
77 * trans-common.c (create_common): Modified call to
78 'gfc_conv_initializer'.
79 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
80 gfc_emit_parameter_debug_info): Modified call to
81 'gfc_conv_initializer'.
82 (build_function_decl): Remove assertion.
83 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
84 Removed call to 'gfc_trans_assign_vtab_procs'.
85 (gfc_conv_initializer): Add argument 'procptr'.
86 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
87 (gfc_trans_assign_vtab_procs): Removed.
88 * trans-stmt.c (gfc_trans_allocate): Removed call to
89 'gfc_trans_assign_vtab_procs'.
91 2010-08-21 Tobias Burnus <burnus@net-b.de>
95 * intrinsic.c (add_sym): Init value attribute.
96 (set_attr_value): New function.
97 (add_functions) Use it and add JN/YN resolvers.
98 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
99 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
100 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
101 * iresolve.c (gfc_resolve_bessel_n2): New function.
102 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
104 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
105 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
106 * simplify.c (): For YN set to -INF if previous values
108 * trans-expr.c (gfc_conv_procedure_call): Don't crash
110 * iresolve.c (gfc_resolve_extends_type_of): Set the
111 type of the dummy argument to the one of the actual.
113 2010-08-20 Joseph Myers <joseph@codesourcery.com>
115 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
117 2010-08-20 Joseph Myers <joseph@codesourcery.com>
119 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
122 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
124 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
126 2010-08-19 Daniel Kraft <d@domob.eu>
130 * trans.h (struct gfc_se): New flag `byref_noassign'.
131 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
132 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
133 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
134 and check for compile-time errors with those.
135 * trans-decl.c (trans_associate_var): Use new routine
136 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
137 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
138 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
139 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
140 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
141 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
142 rank remapping for assignment.
144 2010-08-19 Tobias Burnus <burnus@net-b.de>
146 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
147 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
150 2010-08-19 Tobias Burnus <burnus@net-b.de>
154 * check.c (gfc_check_bessel_n2): New function.
155 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
156 * intrinsic.c (add_functions): Add transformational version
157 of the Bessel_jn/yn intrinsics.
158 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
159 gfc_simplify_bessel_yn2): New prototypes.
160 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
161 transformational variant.
162 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
163 Check for negative order.
164 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
165 gfc_simplify_bessel_yn2): New functions.
167 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
170 * resolve.c (resolve_transfer): Traverse operands and set expression
171 to be checked to a non EXPR_OP type.
173 2010-08-19 Janus Weil <janus@gcc.gnu.org>
176 * gfortran.h (gfc_add_save): Modified prototype.
177 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
178 (match_pointer_init): New function to match F08 pointer initialization.
179 (variable_decl,match_procedure_decl,match_ppc_decl): Use
180 'match_pointer_init'.
181 (match_attr_spec): Module variables are implicitly SAVE.
182 (gfc_match_save): Modified call to 'gfc_add_save'.
183 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
185 * primary.c (gfc_variable_attr): Handle SAVE attribute.
186 * resolve.c (resolve_structure_cons): Add new argument and do pointer
187 initialization checks.
188 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
189 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
190 (resolve_fl_variable): Handle SAVE_IMPLICIT.
191 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
193 * trans-decl.c (gfc_create_module_variable): Module variables with
194 TARGET can already exist.
195 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
196 (gfc_conv_initializer): Implement non-NULL pointer
199 2010-08-18 Tobias Burnus <burnus@net-b.de>
202 * intrinsic.texi (selected_char_kind): Document ISO_10646
205 2010-08-17 Jakub Jelinek <jakub@redhat.com>
208 * trans-decl.c (build_library_function_decl_1): Chain on
209 void_list_node instead of creating a new TREE_LIST.
210 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
211 * trans-types.c (gfc_get_function_type): Likewise. Set
212 typelist to void_list_node for the main program.
214 2010-08-17 Daniel Kraft <d@domob.eu>
217 * gfortran.h (struct gfc_association_list): New member `where'.
218 (gfc_is_associate_pointer) New method.
219 * match.c (gfc_match_associate): Remember locus for each associate
220 name matched and do not try to set variable flag.
221 * parse.c (parse_associate): Use remembered locus for symbols.
222 * primary.c (match_variable): Instead of variable-flag check for
223 associate names set it for all such names used.
224 * symbol.c (gfc_is_associate_pointer): New method.
225 * resolve.c (resolve_block_construct): Don't generate assignments
226 to give associate-names their values.
227 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
228 (resolve_symbol): Set some more attributes for associate variables,
229 set variable flag here and check it and don't try to build an
230 explicitely shaped array-spec for array associate variables.
231 * trans-expr.c (gfc_conv_variable): Dereference in case of association
233 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
234 (gfc_sym_type): Return pointer type for association to scalar vars.
235 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
236 (trans_associate_var): New method.
237 (gfc_trans_deferred_vars): Handle association symbols.
239 2010-08-16 Joseph Myers <joseph@codesourcery.com>
241 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
243 (MMDX): Change back to MMD. Mark NoDriverArg instead of
245 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
246 OPT_MDX and OPT_MMDX.
248 2010-08-16 Joseph Myers <joseph@codesourcery.com>
250 * lang.opt (MDX, MMDX): Mark RejectDriver.
252 2010-08-15 Janus Weil <janus@gcc.gnu.org>
254 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
255 vtabs for generics any more).
257 2010-08-15 Daniel Kraft <d@domob.eu>
260 * gfortran.h (gfc_find_proc_namespace): New method.
261 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
262 around with namespace.
263 * symbol.c (gfc_find_proc_namespace): New method.
264 * trans-decl.c (gfc_build_qualified_array): Use it for correct
266 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
267 * parse.c (parse_associate): Removed assignment-generation here...
268 * resolve.c (resolve_block_construct): ...and added it here.
269 (resolve_variable): Handle names that are arrays but were not parsed
270 as such because of association.
271 (resolve_code): Fix BLOCK resolution.
272 (resolve_symbol): Generate array-spec for associate-names.
274 2010-08-15 Tobias Burnus <burnus@net-b.de>
277 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
278 (verify_c_interop): Handle unresolved DT with bind(C).
280 2010-08-15 Tobias Burnus <burnus@net-b.de>
282 * trans-expr.c (gfc_conv_expr_present): Regard nullified
283 pointer arrays as absent.
284 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
285 dummys as absent argument.
286 * interface.c (compare_actual_formal,compare_parameter):
289 2010-08-15 Tobias Burnus <burnus@net-b.de>
291 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
292 dummies with intent(in).
294 2010-08-15 Daniel Kraft <d@domob.eu>
297 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
298 routines not IMPURE also as PURE.
299 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
300 `NO_CLASS' in `CLASS_IMPURE'.
301 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
302 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
303 (add_functions): Ditto.
304 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
305 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
306 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
307 are not ALLOCATABLE and have their INTENT specified.
309 2010-08-13 Daniel Kraft <d@domob.eu>
311 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
312 * array.c (gfc_match_array_spec): Match implied-shape specification and
313 handle AS_IMPLIED_SHAPE correctly otherwise.
314 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
315 (variable_decl): Some checks for implied-shape declaration.
316 * resolve.c (resolve_symbol): Assert that array-spec is no longer
317 AS_IMPLIED_SHAPE in any case.
319 2010-08-12 Joseph Myers <joseph@codesourcery.com>
321 * lang.opt (MD, MMD): Change to MDX and MMDX.
322 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
324 2010-08-11 Janus Weil <janus@gcc.gnu.org>
327 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
329 (check_arglist,check_specific): Add reference to 'name' field.
330 (init_arglist): Remove reference to 'name' field.
331 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
332 * check.c (variable_check): Reverse order of checks. Respect intent of
334 (int_or_proc_check): New function.
335 (coarray_check): New function.
336 (allocatable_check): New function.
337 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
338 (gfc_check_complex): Use 'int_or_real_check'.
339 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
340 gfc_check_ucobound): Use 'coarray_check'.
341 (gfc_check_pack): Use 'real_or_complex_check'.
342 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
344 (scalar_check,type_check,numeric_check,int_or_real_check,
345 real_or_complex_check,kind_check,double_check,logical_array_check,
346 array_check,same_type_check,rank_check,nonoptional_check,
347 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
348 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
349 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
350 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
351 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
352 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
353 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
356 2010-08-10 Daniel Kraft <d@domob.eu>
358 * gfortran.texi (Interoperability with C): Fix ordering in menu
359 and add new subsection about pointers.
360 (Interoperable Subroutines and Functions): Split off the pointer part.
361 (working with Pointers): New subsection with extended discussion
362 of pointers (especially procedure pointers).
364 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
367 * array.c (gfc_ref_dimen_size): Add end argument.
368 If end is non-NULL, calculate it.
369 (ref_size): Adjust call to gfc_ref_dimen_size.
370 (gfc_array_dimen_size): Likewise.
371 (gfc_array_res_shape): Likewise.
372 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
373 * resolve.c (resolve_array_ref): For stride not equal to -1,
374 fill in the lowest possible end.
376 2010-08-09 Janus Weil <janus@gcc.gnu.org>
378 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
380 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
382 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
384 (check_some_aliasing): Likewise.
385 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
386 (gfc_conv_intrinsic_int): Likewise.
387 (gfc_conv_intrinsic_lib_function): Likewise.
388 (gfc_conv_intrinsic_cmplx): Likewise.
389 (gfc_conv_intrinsic_ctime): Likewise.
390 (gfc_conv_intrinsic_fdate): Likewise.
391 (gfc_conv_intrinsic_ttynam): Likewise.
392 (gfc_conv_intrinsic_minmax): Likewise.
393 (gfc_conv_intrinsic_minmax_char): Likewise.
394 (gfc_conv_intrinsic_ishftc): Likewise.
395 (gfc_conv_intrinsic_index_scan_verify): Likewise.
396 (gfc_conv_intrinsic_merge): Likewise.
397 (gfc_conv_intrinsic_trim): Likewise.
398 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
400 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
403 * dependency.c (check_section_vs_section): Handle cases where
404 the start expression coincides with the lower or upper
407 2010-08-04 Janus Weil <janus@gcc.gnu.org>
412 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
413 container types. Do not artificially increase refs. Commit symbols one
415 * interface.c (compare_parameter): Make sure vtabs are present before
416 generating module variables.
417 * resolve.c (resolve_allocate_expr): Ditto.
419 2010-08-04 Tobias Burnus <burnus@net-b.de>
423 * resolve.c (resolve_structure_cons): Fix
426 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
430 * symbol.c (changed_syms): Made static again.
431 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
432 Changed conditional internal error into assert.
433 Rename function to ...
434 (gfc_enforce_clean_symbol_state): ... this.
435 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
436 Rename the former to the latter.
437 * parse.c (decode_statement, decode_omp_directive,
438 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
440 (changed_syms): Remove declaration.
441 (next_statement): Use gfc_enforce_clean_symbol_state.
443 2010-08-04 Tobias Burnus <burnus@net-b.de>
446 * resolve.c (resolve_structure_cons): Fix handling of
447 initialization structure constructors with character
448 elements of the wrong length.
449 * array.c (gfc_check_iter_variable): Add NULL check.
450 (gfc_resolve_character_array_constructor): Also truncate
453 2010-08-04 Tobias Burnus <burnus@net-b.de>
455 * trans-io.c (gfc_build_io_library_fndecls): Fix return
456 value of some libgfortran functions.
458 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
461 * dependency.c (gfc_deb_compare_expr): Remove any integer
462 conversion functions to larger types from both arguments.
463 Remove handling these functions futher down.
465 2010-08-03 Janus Weil <janus@gcc.gnu.org>
469 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
470 * resolve.c (resolve_tb_generic_targets): Check for errors.
472 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
475 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
478 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
481 * dependency.h: Add prototype for gfc_are_identical_variables.
482 * frontend-passes.c: Include depencency.h.
483 (optimimize_equality): Use gfc_are_identical_variables.
484 * dependency.c (identical_array_ref): New function.
485 (gfc_are_identical_variables): New function.
486 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
487 * dependency.c (gfc_check_section_vs_section). Rename gfc_
488 prefix from statc function.
489 (check_section_vs_section): Change arguments to gfc_array_ref,
490 adjust function body accordingly.
492 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
493 Janus Weil <janus@gcc.gnu.org>
498 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
499 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
500 gfc_copy_formal_args, gfc_copy_formal_args_intr,
501 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
502 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
503 Call reject_statement in case of error.
504 (match_deferred_characteritics): Call gfc_undo_symbols in case match
507 2010-08-01 Janus Weil <janus@gcc.gnu.org>
510 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
511 (gfc_find_derived_vtab): Make vtabs and vtypes public.
512 * module.c (read_module): When reading module files, always import
513 vtab and vtype symbols.
515 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
519 * symbol.c (changed_syms): Made non-static.
520 * parse.c (changed_syms): Declare new external.
521 (next_statement): Assert changed_syms is NULL at the beginning.
523 2010-07-30 Janus Weil <janus@gcc.gnu.org>
524 Steven G. Kargl <kargl@gcc.gnu.org>
527 * match.c (match_type_spec): Try to parse derived types before
530 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
532 * gfortran.h (gfc_release_symbol): New prototype.
533 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
534 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
535 Use gfc_release_symbol.
536 * parse.c (gfc_fixup_sibling_symbols): Ditto.
537 * resolve.c (resolve_symbol): Ditto.
539 2010-07-29 Tobias Burnus <burnus@net-b.de>
543 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
544 external procedure declarations in modules.
545 (gfc_get_symbol_decl): Modify assert.
547 2010-07-29 Janus Weil <janus@gcc.gnu.org>
550 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
552 2010-07-29 Janus Weil <janus@gcc.gnu.org>
555 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
556 (gfc_trans_class_assign): Modified prototype.
557 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
558 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
559 (gfc_trans_class_assign): ... here. Modified actual arguments.
560 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
561 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
562 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
564 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
568 * class.c (gfc_find_derived_vtab): Accept or discard newly created
569 symbols before returning.
571 2010-07-29 Joseph Myers <joseph@codesourcery.com>
573 * lang.opt (cpp): Remove Joined and Separate markers.
574 (cpp=): New internal option.
575 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
576 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
579 2010-07-29 Daniel Kraft <d@domob.eu>
582 * array.c (resolve_array_bound): Fix error message to properly handle
583 non-variable expressions.
585 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
587 * decl.c (free_value): Also free repeat field.
588 * data.c (gfc_assign_data_value): Always free offset before returning.
590 2010-07-28 Daniel Kraft <d@domob.eu>
592 * gfortran.h (gfc_build_intrinsic_call): New method.
593 * expr.c (gfc_build_intrinsic_call): New method.
594 * simplify.c (range_check): Ignore non-constant value.
595 (simplify_bound_dim): Handle non-variable expressions and
596 fix memory leak with non-free'ed expression.
597 (simplify_bound): Handle non-variable expressions.
598 (gfc_simplify_shape): Ditto.
599 (gfc_simplify_size): Ditto, but only in certain cases possible.
601 2010-07-28 Joseph Myers <joseph@codesourcery.com>
603 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
606 2010-07-28 Tobias Burnus <burnus@net-b.de>
609 * trans-types.c (gfc_get_derived_type): Fix DT declaration
610 from modules for whole-file mode.
612 2010-07-27 Joseph Myers <joseph@codesourcery.com>
614 * gfortran.h (gfc_handle_option): Update prototype and return
616 * options.c (gfc_handle_option): Update prototype and return value
619 2010-07-27 Joseph Myers <joseph@codesourcery.com>
621 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
622 decoded options in allocating deferred_opt.
623 * cpp.h (gfc_cpp_init_options): Update prototype.
624 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
625 * gfortran.h (gfc_option_lang_mask): New.
626 (gfc_init_options): Update prototype.
627 * options.c (gfc_option_lang_mask): New.
628 (gfc_init_options): Update prototype. Pass new arguments to
629 gfc_cpp_init_options.
631 2010-07-26 Tobias Burnus <burnus@net-b.de>
634 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
635 for functions which are later in the same file.
636 (gfc_create_function_decl, build_function_decl,
637 build_entry_thunks): Add global argument.
638 * trans.c (gfc_generate_module_code): Update
639 gfc_create_function_decl call.
640 * trans.h (gfc_create_function_decl): Update prototype.
641 * resolve.c (resolve_global_procedure): Also resolve for
644 2010-07-26 Richard Henderson <rth@redhat.com>
647 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
648 (gfc_write_global_declarations): New.
650 2010-07-26 Tobias Burnus <burnus@net-b.de>
653 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
654 for call to transfer_namelist_element.
655 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
658 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
661 * Make-lang.in: Add fortran/frontend-passes.o.
662 * gfortran.h: Add prototype for gfc_run_passes.
663 * resolve.c (gfc_resolve): Call gfc_run_passes.
664 * frontend-passes.c: New file.
666 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
669 * scanner.c (gfc_next_char_literal): Enable truncation warning for
672 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
675 * gfortran.h (gfc_namespace): New field old_equiv.
676 (gfc_free_equiv_until): New prototype.
677 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
678 a parameterized stop condition.
679 (gfc_free_equiv): Use gfc_free_equiv_until.
680 * parse.c (next_statement): Save equivalence list.
681 (reject_statement): Restore equivalence list.
683 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
686 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
687 in the function so that it does not get missed by early exits.
688 (load_line): Add checks for quoted strings and free form comments to
689 disable warnings on comments. Add check for ampersand as first
690 character after truncation and don't warn for this case, but warn if
691 there are subsequent non-whitespace characters.
693 2010-07-24 Tobias Burnus <burnus@net-b.de>
696 * parse.c (gfc_parse_file): Do not override
697 gfc_global_ns_list items.
699 2010-07-24 Tobias Burnus <burnus@net-b.de>
701 * options.c (gfc_init_options): Enable -fwhole-file by default.
702 * interface.c (compare_parameter): Assume a Hollerith constant is
703 compatible with all other argument types.
705 2010-07-23 Tobias Burnus <burnus@net-b.de>
708 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
709 -fwhole-file also for derived types.
710 * trans-types.c (copy_dt_decls_ifequal): Remove static and
711 rename to gfc_copy_dt_decls_ifequal.
712 (gfc_get_derived_type): Update call.
713 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
715 2010-07-23 Tobias Burnus <burnus@net-b.de>
718 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
720 2010-07-23 Jakub Jelinek <jakub@redhat.com>
722 * trans-types.c (gfc_get_array_descriptor_base,
723 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
724 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
725 instead of clearing DECL_NAME.
726 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
728 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
731 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
733 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
734 reverse the scalarization loop.
735 gfc_conv_resolve_dependencies: Pass the reverse field of the
736 loopinfo to gfc_dep_resolver.
737 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
738 assignment by resetting loop.reverse.
739 gfortran.h : Add the gfc_reverse enum.
740 trans.h : Add the reverse field to gfc_loopinfo.
741 dependency.c (gfc_check_dependency): Pass null to the new arg
743 (gfc_check_section_vs_section): Check for reverse dependencies.
744 (gfc_dep_resolver): Add reverse argument and deal with the loop
746 dependency.h : Modify prototype for gfc_dep_resolver to include
749 2010-07-23 Daniel Kraft <d@domob.eu>
752 * gfortran.h (gfc_find_symtree_in_proc): New method.
753 * symbol.c (gfc_find_symtree_in_proc): New method.
754 * match.c (match_exit_cycle): Look for loop name also in parent
755 namespaces within current procedure.
757 2010-07-22 Tobias Burnus <burnus@net-b.de>
760 * dependency.c (gfc_check_dependency): Add argument alising check.
761 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
763 2010-07-22 Daniel Kraft <d@domob.eu>
765 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
766 now in the correct place.
768 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
771 * Revert my commit r162325.
773 2010-07-21 Daniel Kraft <d@domob.eu>
775 * trans.h (gfc_get_return_label): Removed.
776 (gfc_generate_return): New method.
777 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
778 returning a tree directly.
779 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
780 (gfc_trans_block_construct): Update for new interface to
781 `gfc_trans_deferred_vars'.
782 * trans-decl.c (current_function_return_label): Removed.
783 (current_procedure_symbol): New variable.
784 (gfc_get_return_label): Removed.
785 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
786 returning a tree directly.
787 (get_proc_result), (gfc_generate_return): New methods.
788 (gfc_generate_function_code): Clean up and do init/cleanup here
789 also with gfc_wrapped_block. Remove return-label but rather
792 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
795 * fortran/match.c (match_type_spec): Check for derived type before
798 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
801 * interface.c (matching_typebound_op): Add argument for the
802 return of the generic name for the procedure.
803 (build_compcall_for_operator): Add an argument for the generic
804 name of an operator procedure and supply it to the expression.
805 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
806 calls to the above procedures.
807 * resolve.c (resolve_typebound_function): Catch procedure
808 component calls for CLASS objects, check that the vtable is
809 complete and insert the $vptr and procedure components, to make
811 (resolve_typebound_function): The same.
812 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
813 an allocatable scalar if it is a result.
815 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
818 * match.c (gfc_match_iterator): Reverted.
820 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
823 * match.c (gfc_match_iterator): Remove error that iterator
824 cannot be INTENT(IN).
826 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
828 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
829 Access subscript through the "dim" field index.
830 (gfc_trans_create_temp_array): Access ss info through the "dim" field
832 (gfc_conv_array_index_offset): Ditto.
833 (gfc_conv_loop_setup): Ditto.
834 (gfc_conv_expr_descriptor): Ditto.
835 (gfc_conv_ss_startstride): Ditto. Update call to
836 gfc_conv_section_startstride.
837 (gfc_conv_section_startstride): Set values along the array dimension.
838 Get array dimension directly from the argument.
840 2010-07-15 Jakub Jelinek <jakub@redhat.com>
842 * trans.h (gfc_string_to_single_character): New prototype.
843 * trans-expr.c (string_to_single_character): Renamed to ...
844 (gfc_string_to_single_character): ... this. No longer static.
845 (gfc_conv_scalar_char_value, gfc_build_compare_string,
846 gfc_trans_string_copy): Adjust callers.
847 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
848 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
849 (select_struct): Move to toplevel, add GTY(()).
850 (gfc_trans_character_select): Optimize SELECT CASE
851 with character length 1.
853 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
855 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
856 * trans-common.c: Likewise.
857 * trans-decl.c: Likewise.
858 * trans-types.c: Likewise.
861 2010-07-15 Janus Weil <janus@gcc.gnu.org>
864 * resolve.c (resolve_typebound_generic_call): Resolve generic
865 non-polymorphic type-bound procedure calls to the correct specific
867 (resolve_typebound_subroutine): Remove superfluous code.
869 2010-07-15 Daniel Kraft <d@domob.eu>
872 * trans.h (struct gfc_wrapped_block): New struct.
873 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
874 (gfc_finish_wrapped_block): New method.
875 (gfc_init_default_dt): Add new init code to block rather than
877 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
878 (gfc_trans_dummy_array_bias): Ditto.
879 (gfc_trans_g77_array): Ditto.
880 (gfc_trans_deferred_array): Ditto.
881 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
882 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
883 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
884 (gfc_finish_wrapped_block): New method.
885 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
886 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
887 (gfc_trans_deferred_array): Ditto.
888 * trans-decl.c (gfc_trans_dummy_character): Ditto.
889 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
890 (init_intent_out_dt): Ditto.
891 (gfc_init_default_dt): Add new init code to block rather than
893 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
894 and cleanup code and put it all together.
896 2010-07-15 Jakub Jelinek <jakub@redhat.com>
898 * trans.h (gfc_build_compare_string): Add CODE argument.
899 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
900 gfc_build_compare_string.
901 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
902 gfc_build_compare_string.
903 (string_to_single_character): Rename len variable to length.
904 (gfc_optimize_len_trim): New function.
905 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
906 or NE_EXPR and one of the strings is string literal with LEN_TRIM
907 bigger than the length of the other string, they compare unequal.
910 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
911 in CASE_LABEL_EXPR and use NULL for low for the default case.
913 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
915 * trans-array.c (gfc_conv_section_upper_bound): Remove
916 (gfc_conv_section_startstride): Don't set the upper bound in the
917 vector subscript case.
918 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
920 2010-07-14 Janus Weil <janus@gcc.gnu.org>
923 * gfortran.h (gfc_is_data_pointer): Remove prototype.
924 * dependency.c (gfc_is_data_pointer): Make it static.
925 * intrinsic.texi: Update documentation on C_LOC.
926 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
927 and add a check for polymorphic variables.
929 2010-07-14 Jakub Jelinek <jakub@redhat.com>
931 * trans-expr.c (string_to_single_character): Also optimize
932 string literals containing a single char followed only by spaces.
933 (gfc_trans_string_copy): Remove redundant string_to_single_character
936 * trans-decl.c (gfc_build_intrinsic_function_decls,
937 gfc_build_builtin_function_decls): Mark functions as
938 DECL_PURE_P or TREE_READONLY.
940 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
942 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
943 instead of build_function_call_expr.
944 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
946 2010-07-13 Tobias Burnus <burnus@net-b.de>
947 Daniel Franke <franke.daniel@gmail.com>
950 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
951 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
953 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
955 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
956 Tobias Burnus <burnus@net-b.de>
959 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
960 noclobber/noescape annotations to function calls.
961 (gfc_build_builtin_function_decls): Likewise.
963 2010-07-13 Janus Weil <janus@gcc.gnu.org>
969 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
970 * class.c (gfc_build_class_symbol): Modified call to
971 'gfc_find_derived_vtab'.
972 (add_proc_component): Removed, moved code into 'add_proc_comp'.
973 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
975 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
976 Removed treatment of generics.
977 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
978 Call 'add_proc_comp' instead of duplicating code.
979 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
981 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
982 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
983 Removed treatment of generics.
984 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
985 'gfc_find_derived_vtab'.
986 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
987 Removed treatment of generics.
988 (resolve_select_type,resolve_fl_derived): Modified call to
989 'gfc_find_derived_vtab'.
990 * trans-decl.c (gfc_get_symbol_decl): Ditto.
991 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
993 * trans-stmt.c (gfc_trans_allocate): Ditto.
995 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
998 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
1001 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
1003 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
1004 * resolve.c (build_default_init_expr): Ditto.
1006 2010-07-11 Tobias Burnus <burnus@net-b.de>
1009 * module.c (sort_iso_c_rename_list): Remove.
1010 (import_iso_c_binding_module,use_iso_fortran_env_module):
1011 Allow multiple imports of the same symbol.
1013 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
1015 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
1017 2010-07-11 Janus Weil <janus@gcc.gnu.org>
1020 * decl.c (build_sym,attr_decl1): Only build the class container if the
1021 symbol has sufficient attributes.
1022 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
1023 pointer attribute for classes.
1024 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
1025 * module.c (MOD_VERSION): Bump.
1026 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
1027 (mio_symbol_attribute): Handle class_pointer attribute.
1028 * parse.c (parse_derived): Use class_pointer instead of pointer
1029 attribute for classes.
1030 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
1031 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
1032 resolve_allocate_expr,resolve_fl_derived): Ditto.
1033 (resolve_fl_var_and_proc): Check for class_ok attribute.
1035 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
1037 * trans-io.c (gfc_build_st_parameter): Update calls to
1038 gfc_add_field_to_struct.
1039 * trans-stmt.c (ADD_FIELD): Ditto.
1041 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
1043 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
1044 fieldlist, remove fieldlist from argument list.
1045 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
1046 and remove fieldlist from argument list.
1047 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
1048 gfc_get_mixed_entry_union): Move setting
1049 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
1050 * trans-types.h (gfc_add_field_to_struct): Update prototype.
1052 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
1055 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
1056 if the lhs has never been host associated, as well as not being
1057 use associated, a pointer or a target.
1058 * resolve.c (resolve_variable): Mark variables that are host
1060 * gfortran.h: Add the host_assoc bit to the symbol_attribute
1063 2010-07-09 Janus Weil <janus@gcc.gnu.org>
1065 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
1066 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
1067 SIZEOF and C_SIZEOF.
1069 2010-07-08 Janus Weil <janus@gcc.gnu.org>
1072 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
1073 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
1074 gfc_resolve_storage_size): New prototypes.
1075 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
1076 * intrinsic.c (add_functions): Add STORAGE_SIZE.
1077 * iresolve.c (gfc_resolve_storage_size): New function.
1078 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
1080 (gfc_conv_intrinsic_storage_size): New function.
1081 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
1083 2010-07-08 Jakub Jelinek <jakub@redhat.com>
1086 * match.c (match_exit_cycle): Error on EXIT also from collapsed
1087 !$omp do loops. Error on CYCLE to non-innermost collapsed
1090 2010-07-08 Tobias Burnus <burnus@net-b.de>
1093 * array.c (gfc_match_array_ref): Better error message for
1094 coarrays with too few ranks.
1095 (match_subscript): Move one diagnostic to caller.
1096 * gfortran.h (gfc_get_corank): Add prottype.
1097 * expr.c (gfc_get_corank): New function.
1098 * iresolve.c (resolve_bound): Fix rank for cobounds.
1099 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
1100 gfc_resolve_ucobound, gfc_resolve_this_image): Update
1103 2010-07-06 Tobias Burnus <burnus@net-b.de>
1106 * array.c (gfc_expand_constructor): Add optional diagnostic.
1107 * gfortran.h (gfc_expand_constructor): Update prototype.
1108 * expr.c (gfc_simplify_expr, check_init_expr,
1109 gfc_reduce_init_expr): Update gfc_expand_constructor call.
1110 * resolve.c (gfc_resolve_expr): Ditto.
1112 2010-07-06 Tobias Burnus <burnus@net-b.de>
1114 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
1115 * trans-intrinsic.c: Ditto.
1116 * trans-types.c: Ditto.
1117 * convert.c: Include diagnostic-core.h instead of toplev.h.
1119 * trans-array.c: Ditto.
1120 * trans-const.c: Ditto.
1121 * trans-expr.c: Ditto.
1122 * trans-io.c: Ditto.
1123 * trans-openmp.c: Ditto.
1126 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1129 * check.c (dim_rank_check): Also check intrinsic functions.
1130 Adjust permissible rank for functions which reduce the rank of
1131 their argument. Spread is an exception, where DIM can
1132 be one larger than the rank of array.
1134 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
1137 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
1139 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
1142 * trans-types.c (gfc_get_derived_type): Derived type fields
1143 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
1144 but build_pointer_type_for_mode must be used for this.
1146 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
1148 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
1149 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
1150 type of gfc_conv_procedure_call.
1151 (conv_generic_with_optional_char_arg): Likewise.
1152 * trans-stmt.c (gfc_trans_call): Likewise.
1153 * trans-expr.c (gfc_conv_function_expr): Likewise.
1154 (gfc_conv_procedure_call): Use build_call_vec instead of
1157 2010-07-04 Daniel Kraft <d@domob.eu>
1159 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
1161 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
1165 * trans-types.c (gfc_get_derived_type): Derived type fields
1166 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
1168 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
1171 * decl.c (match_procedure_in_type): Clear structure before using.
1172 (gfc_match_generic): Ditto.
1174 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
1176 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
1177 * trans-types.c (gfc_add_field_to_struct_1): New function, most
1178 of which comes from...
1179 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
1180 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
1182 (gfc_get_array_descriptor_base): Likewise.
1183 (gfc_get_mixed_entry_union): Likewise.
1184 (gfc_get_derived_type): Add extra chain parameter for
1185 gfc_add_field_to_struct.
1186 * trans-stmt.c (gfc_trans_character_select): Likewise.
1187 * trans-io.c (gfc_build_st_parameter): Likewise.
1189 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1192 * resolve.c (is_external_proc): Prevent procedure pointers from being
1193 regarded as external procedures.
1195 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1198 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
1199 passed as second argument of ASSOCIATED.
1201 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
1204 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
1205 to determine if a function assignment can be made without a
1207 (gfc_trans_arrayfunc_assign): Move all the conditions that
1208 suppress the direct function call to the above new functon and
1211 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
1214 * interface.c (argument_rank_mismatch): New function.
1215 (compare_parameter): Call new function instead of generating
1218 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
1220 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
1221 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
1224 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1226 * Make-lang.in: Update dependencies.
1228 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
1230 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
1231 and exit_label fields.
1232 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
1234 * trans-stmt.c (gfc_trans_simple_do): Likewise.
1235 (gfc_trans_do): Likewise.
1236 (gfc_trans_do_while): Likewise.
1237 (gfc_trans_cycle): Use cycle_label directly.
1238 (gfc_trans_exit): Use exit_label directly.
1240 2010-06-27 Daniel Kraft <d@domob.eu>
1242 * dump-parse-tree.c (show_symbol): Dump target-expression for
1244 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
1245 (show_namespace): Use show_level for correct indentation of
1246 "inner namespaces" (contained procedures or BLOCK).
1248 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1251 * dump-parse-tree.c (show_code_node): Show namespace for
1254 2010-06-26 Tobias Burnus <burnus@net-b.de>
1256 * decl.c (gfc_match_decl_type_spec): Support
1257 TYPE(intrinsic-type-spec).
1259 2010-06-25 Tobias Burnus <burnus@net-b.de>
1261 * intrinsic.h (gfc_check_selected_real_kind,
1262 gfc_simplify_selected_real_kind): Update prototypes.
1263 * intrinsic.c (add_functions): Add radix support to
1265 * check.c (gfc_check_selected_real_kind): Ditto.
1266 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
1267 * trans-decl.c (gfc_build_intrinsic_function_decls):
1268 Change call from selected_real_kind to selected_real_kind2008.
1269 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
1270 (PRECISION, RANGE, RADIX): Add cross @refs.
1272 2010-06-25 Tobias Burnus <burnus@net-b.de>
1274 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
1275 * gfortran.texi (_gfortran_set_options): Update for
1276 GFC_STD_F2008_OBS addition.
1277 * libgfortran.h: Add GFC_STD_F2008_OBS.
1278 * options.c (set_default_std_flags, gfc_handle_option): Handle
1280 io.c (check_format): Fix allow_std check.
1282 2010-06-25 Tobias Burnus <burnus@net-b.de>
1284 * decl.c (gfc_match_entry): Allow END besides
1285 END SUBROUTINE/END FUNCTION for contained procedures.
1287 2010-06-25 Tobias Burnus <burnus@net-b.de>
1289 * parse.c (next_free, next_fixed): Allow ";" as first character.
1291 2010-06-24 Tobias Burnus <burnus@net-b.de>
1294 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1296 2010-06-22 Janus Weil <janus@gcc.gnu.org>
1299 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1302 2010-06-21 Tobias Burnus <burnus@net-b.de>
1305 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1307 * symbol.c (gfc_add_contiguous): New function.
1308 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1309 * decl.c (match_attr_spec): Ditto.
1310 (gfc_match_contiguous): New function.
1311 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1313 * gfortran.h (symbol_attribute): Add contiguous.
1314 (gfc_is_simply_contiguous): Add prototype.
1315 (gfc_add_contiguous): Add prototype.
1316 * match.h (gfc_match_contiguous): Add prototype.
1317 * parse.c (decode_specification_statement,
1318 decode_statement): Handle contiguous attribute.
1319 * expr.c (gfc_is_simply_contiguous): New function.
1320 * dump-parse-tree.c (show_attr): Handle contiguous.
1321 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1323 * trans-expr.c (gfc_add_interface_mapping): Copy
1325 * trans-array.c (gfc_conv_descriptor_stride_get,
1326 gfc_conv_array_parameter): Handle contiguous arrays.
1327 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1328 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1330 * trans.h (gfc_array_kind): Ditto.
1331 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1333 2010-06-20 Joseph Myers <joseph@codesourcery.com>
1335 * options.c (gfc_handle_option): Don't handle N_OPTS.
1337 2010-06-19 Janus Weil <janus@gcc.gnu.org>
1340 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1343 2010-06-18 Tobias Burnus <burnus@net-b.de>
1346 * resolve.c (resolve_allocate_deallocate): Properly check
1347 part-refs in stat=/errmsg= for invalid use.
1349 2010-06-17 Janus Weil <janus@gcc.gnu.org>
1352 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1353 Return directly in case of an error.
1355 2010-06-16 Janus Weil <janus@gcc.gnu.org>
1358 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1359 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1360 structure to each procedure in a procedure list.
1361 * module.c (mio_typebound_proc): Add NULL argument to
1362 'gfc_get_typebound_proc'.
1363 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1364 to initialize the new structure.
1366 2010-06-15 Janus Weil <janus@gcc.gnu.org>
1369 * gfortran.h (gfc_expr): Add new member 'mold'.
1370 * match.c (gfc_match_allocate): Implement the MOLD tag.
1371 * resolve.c (resolve_allocate_expr): Ditto.
1372 * trans-stmt.c (gfc_trans_allocate): Ditto.
1374 2010-06-15 Jakub Jelinek <jakub@redhat.com>
1377 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1378 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1379 GFC_DECL_SAVED_DESCRIPTOR set.
1380 (gfc_omp_report_decl): New function.
1381 * trans.h (gfc_omp_report_decl): New prototype.
1382 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1384 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
1388 * gfortranspec.c (lang_specific_driver): Removed deprecation
1390 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1391 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1392 * cpp.h (gfc_cpp_makedep): New.
1393 (gfc_cpp_add_dep): New.
1394 (gfc_cpp_add_target): New.
1395 * cpp.c (gfc_cpp_option): Add deps* members.
1396 (gfc_cpp_makedep): New.
1397 (gfc_cpp_add_dep): New.
1398 (gfc_cpp_add_target): New.
1399 (gfc_cpp_init_options): Initialize new options.
1400 (gfc_cpp_handle_option): Handle new options.
1401 (gfc_cpp_post_options): Map new options to libcpp-options.
1402 (gfc_cpp_init): Handle deferred -MQ and -MT options.
1403 (gfc_cpp_done): If requested, write dependencies to file.
1404 * module.c (gfc_dump_module): Add a module filename as target.
1405 * scanner.c (open_included_file): New parameter system; add the
1406 included file as dependency.
1407 (gfc_open_included_file): Add the included file as dependency.
1408 (gfc_open_intrinsic_module): Likewise.
1409 * invoke.texi: Removed deprecation warning for -M.
1410 * gfortran.texi: Removed Makefile-dependencies project.
1412 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
1414 * resolve.c (resolve_global_procedure): Improved checking if an
1415 explicit interface is required.
1417 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1419 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1421 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1422 (gfc_conv_intrinsic_ttynam): Likewise.
1423 (gfc_conv_intrinsic_trim): Likewise.
1425 2010-06-12 Janus Weil <janus@gcc.gnu.org>
1428 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1430 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1432 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1434 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1436 * mathbuiltins.def: Add builtins that do not directly correspond
1437 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1438 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1439 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1440 code_{r,c}{4,8,10,16} fields. Add
1441 {,complex}{float,double,long_double}_built_in fields.
1442 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1443 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1444 definition of OTHER_BUILTIN.
1445 (real_compnt_info): Remove unused struct.
1446 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1448 (build_round_expr): Call builtin_decl_for_precision instead of
1450 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1451 instead of a switch.
1452 (gfc_build_intrinsic_lib_fndecls): Match
1453 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1454 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1456 (gfc_conv_intrinsic_lib_function): Go through all the extended
1458 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1459 instead of a switch.
1460 (gfc_conv_intrinsic_abs): Likewise.
1461 (gfc_conv_intrinsic_mod): Likewise.
1462 (gfc_conv_intrinsic_sign): Likewise.
1463 (gfc_conv_intrinsic_fraction): Likewise.
1464 (gfc_conv_intrinsic_nearest): Likewise.
1465 (gfc_conv_intrinsic_spacing): Likewise.
1466 (gfc_conv_intrinsic_rrspacing): Likewise.
1467 (gfc_conv_intrinsic_scale): Likewise.
1468 (gfc_conv_intrinsic_set_exponent): Likewise.
1470 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
1474 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1475 functions with CLASS formal arguments.
1477 2010-06-10 Janus Weil <janus@gcc.gnu.org>
1480 * resolve.c (conformable_arrays): Handle allocatable components.
1482 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1485 * gfortran.texi: Document that Cray pointers cannot be function
1488 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1491 * gfortran.texi: Document lack of support for syntax
1492 "complex FUNCTION name*16()", and existence of alternative
1493 legacy syntax "complex*16 FUNCTION name()".
1495 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1498 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1499 POSIX's fsync(), and how to call the latter from Fortran code.
1501 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
1504 * interface.c (compare_actual_formal): Reject actual arguments with
1505 array subscript passed to ASYNCHRONOUS dummys.
1507 2010-06-10 Daniel Kraft <d@domob.eu>
1510 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1511 (struct gfc_symbol): New field `assoc'.
1512 (struct gfc_association_list): New struct.
1513 (struct gfc_code): New struct `block' in union, move `ns' there
1514 and add association list.
1515 (gfc_free_association_list): New method.
1516 (gfc_has_vector_subscript): Made public;
1517 * match.h (gfc_match_associate): New method.
1518 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1519 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1520 * interface.c (gfc_has_vector_subscript): Made public.
1521 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1522 * match.c (gfc_match_associate): New method.
1523 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1524 * primary.c (match_variable): Don't allow names associated to expr here.
1525 * parse.c (decode_statement): Try matching ASSOCIATE statement.
1526 (case_exec_markers, case_end): Add ASSOCIATE statement.
1527 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1528 (parse_associate): New method.
1529 (parse_executable): Handle ST_ASSOCIATE.
1530 (parse_block_construct): Change reference to gfc_code's `ns' field.
1531 * resolve.c (resolve_select_type): Ditto.
1532 (resolve_code): Ditto.
1533 (resolve_block_construct): Ditto and add comment.
1534 (resolve_select_type): Set association list in generated BLOCK to NULL.
1535 (resolve_symbol): Resolve associate names.
1536 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1537 and free association list.
1538 (gfc_free_association_list): New method.
1539 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1540 * trans-stmt.c (gfc_trans_block_construct): Change reference to
1541 gfc_code's `ns' field.
1543 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
1545 * error.c (error_print): Pre-initialize loc by NULL.
1546 * openmp.c (resolve_omp_clauses): Add explicit
1547 braces to avoid ambigous else.
1548 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1550 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1552 * gfc-internals.texi: Move to GFDL 1.3.
1553 * gfortran.texi: Ditto.
1554 * intrinsic.texi: Ditto.
1555 * invoke.texi: Ditto.
1557 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1560 * check.c (gfc_check_selected_real_kind): Verify that the
1561 actual arguments are scalar.
1563 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1566 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1568 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1571 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1573 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1575 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
1577 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1579 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1580 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1581 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1582 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
1584 * fortran/check.c (nonnegative_check, less_than_bitsize1,
1585 less_than_bitsize2): New functions.
1586 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
1587 nonnegative_check and less_than_bitsize1.
1588 (gfc_check_ibclr, gfc_check_ibset): Removed.
1589 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1592 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1595 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1598 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
1600 * resolve.c (resolve_deallocate_expr): Avoid warning
1601 about possible use of iunitialized sym.
1602 (resolve_allocate_expr): Pre-initialize sym by NULL.
1604 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1607 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1609 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1611 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1613 (gfc_get_array_type_bounds): Likewise.
1615 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1616 (gfc_find_module): Likewise.
1618 * f95-lang.c (pushlevel): Likewise.
1620 * trans.h (struct lang_type): Add variable_size GTY option.
1621 (struct lang_decl): Likewise.
1623 2010-06-08 Tobias Burnus <burnus@net-b.de>
1626 * symbol.c (check_conflict): Move protected--external/procedure check ...
1627 * resolve.c (resolve_select_type): ... to the resolution stage.
1629 2010-06-07 Tobias Burnus <burnus@net-b.de>
1631 * options.c (gfc_handle_option): Fix -fno-recursive.
1633 2010-06-07 Tobias Burnus <burnus@net-b.de>
1635 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1636 * gfortran.texi (copyrights-gfortran): Ditto.
1638 2010-06-07 Joseph Myers <joseph@codesourcery.com>
1640 * lang.opt (fshort-enums): Define using Var and VarExists.
1641 * options.c (gfc_handle_option): Don't set flag_short_enums here.
1643 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1644 Janus Weil <janus@gcc.gnu.org>
1647 * resolve.c (get_declared_from_expr): Move to before
1648 resolve_typebound_generic_call. Make new_ref and class_ref
1649 ignorable if set to NULL.
1650 (resolve_typebound_generic_call): Once we have resolved the
1651 generic call, check that the specific instance is that which
1652 is bound to the declared type.
1653 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1654 freeing 'class_ref->next' twice.
1656 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1659 * trans-array.c (structure_alloc_comps): Dereference scalar
1660 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1663 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1665 * gfortranspec.c (append_arg, lang_specific_driver): Use
1666 GCC-specific formats in diagnostics.
1668 2010-06-02 Tobias Burnus <burnus@net-b.de>
1671 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1674 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1677 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
1680 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
1682 * fortran/gfortran.texi: Fix typos in description of variable-format-
1685 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1688 * dependency.c (gfc_check_section_vs_section): Check
1689 for interleaving array assignments without conflicts.
1691 2010-05-30 Janus Weil <janus@gcc.gnu.org>
1693 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1694 $data component of a class container.
1695 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1696 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1697 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1698 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1699 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1700 * gcc/fortran/parse.c (parse_derived): Ditto.
1701 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1702 gfc_expr_attr): Ditto.
1703 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1704 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1705 resolve_fl_var_and_proc, resolve_typebound_procedure,
1706 resolve_fl_derived): Ditto.
1707 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1708 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1710 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1711 gfc_trans_deferred_vars): Ditto.
1712 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1714 2010-05-28 Tobias Burnus <burnus@net-b.de>
1716 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1718 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1720 * gfortranspec.c (append_arg, lang_specific_driver): Use
1721 fatal_error instead of fatal. Use warning instead of fprintf for
1724 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1726 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1727 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1728 xstrerror instead of strerror.
1730 2010-05-26 Joseph Myers <joseph@codesourcery.com>
1732 * cpp.c (cb_cpp_error): Save and restore
1733 global_dc->warn_system_headers, not variable warn_system_headers.
1735 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1737 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1739 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1741 * trans-common.c: Do not include rtl.h, include output.h instead.
1742 * trans-decl.c: Likewise.
1744 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
1747 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1748 namespace before trying to reorder the gsymbols.
1750 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
1755 * resolve.c (resolve_global_procedure): Add check for global
1756 procedures with implicit interfaces and assumed-shape or optional
1757 dummy arguments. Verify that function return type, kind and string
1760 2010-05-21 Tobias Burnus <burnus@net-b.de>
1762 * gfortran.h: Do not include system.h.
1763 * bbt.c: Include system.h.
1765 * dependency.c: Ditto.
1766 * dump-parse-tree.c: Ditto.
1767 * arith.h: Do not include gfortran.h.
1768 * constructor.h: Do not include gfortran.h and splay-tree.h.
1769 * match.h: Do not include gfortran.h.
1771 * target-memory.h: Ditto.
1772 * openmp.c: Do not include toplev.h and target.h.
1773 * trans-stmt.c: Ditto not include toplev.h.
1775 * trans-common.c: Tell why toplev.h is needed. And
1776 do not include target.h.
1777 * trans-expr.c: Tell why toplev.h is needed.
1778 * trans-array.c: Ditto.
1779 * trans-openmp.c: Ditto.
1780 * trans-const.c: Ditto.
1782 * trans-types.c: Ditto.
1783 * trans-io.c: Ditto.
1784 * trans-decl.c: Ditto.
1787 * trans-intrinsic.c: Ditto.
1790 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1793 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1794 before returning MATCH_ERROR. Add check for scalar. Add check for
1795 default integer kind.
1797 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1800 * match.c (gfc_match_select_type): On error jump back out of the local
1802 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1803 stage, more precisely to ...
1804 * resolve.c (resolve_fl_derived): ... this place.
1806 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1809 * resolve.c (ensure_not_abstract): Allow abstract types with
1810 non-abstract ancestors.
1812 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1814 * trans-const.c: Include realmpfr.h.
1815 * Make-lang.in: Update dependencies.
1817 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1819 * trans-const.c, trans-types.c, trans-intrinsic.c:
1820 Clean up redundant includes.
1822 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
1825 * lang.opt (Wunused-dummy-argument): New option.
1826 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1827 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1828 (set_Wall): Enable warn_unused_dummy_argument.
1829 (gfc_handle_option): Set warn_unused_dummy_argument according to
1831 * trans-decl.c (generate_local_decl): Separate warnings about
1832 unused variables and unused dummy arguments.
1833 * invoke.texi: Documented new option.
1835 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
1837 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1838 (gfc_conv_string_tmp): Do not assert type comparibilty.
1839 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1840 (gfc_conv_expr_descriptor): Remove assert.
1841 * trans-common.c: Clarify why rtl.h and tm.h are included.
1842 * trans-openmp.c: Do not include ggc.h and real.h.
1843 Explain why gimple.h is included.
1844 * trans-const.c: Do not include ggc.h.
1845 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1846 * trans.c: Do not include ggc.h and real.h.
1847 Explain why gimple.h is included.
1848 * trans-types.c: Do not include tm.h. Explain why langhooks.h
1849 and dwarf2out.h are included.
1850 * trans-io.c: Do not include gimple.h and real.h.
1851 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1852 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
1855 2010-05-20 Tobias Burnus <burnus@net-b.de>
1857 * options.c (gfc_init_options,gfc_post_options): Enable
1858 flag_associative_math by default.
1860 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1863 * trans-stmt.c (gfc_trans_stop): Add generation of call to
1864 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1865 blank STOP, handling a null expression. (gfc_trans_pause): Use
1866 pause_string for blank PAUSE.
1867 * trans.h: Add external function declaration for error_stop_numeric.
1868 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1869 the declaration for the library call. Adjust whitespaces.
1870 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1871 signal no stop code. Match the expression following the stop and pass
1872 that to the translators. Remove the old use of digit matching. Add
1873 checks that the stop_code expression is INTEGER or CHARACTER, constant,
1874 and if CHARACTER, default character KIND.
1876 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1879 * lang.opt (Wconversion-extra): New option.
1880 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1881 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1882 (set_Wall): Enable -Wconversion.
1883 (gfc_handle_option): Set warn_conversion_extra.
1884 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1885 introduced for -Wconversion if -Wconversion-extra is present.
1886 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1887 -Wconversion; document -Wconversion-extra.
1889 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1892 * gfortran.h (gfc_has_default_initializer): New.
1893 * expr.c (gfc_has_default_initializer): New.
1894 * resolve.c (has_default_initializer): Removed, use
1895 gfc_has_default_initializer() instead. Updated all callers.
1896 * trans-array.c (has_default_initializer): Removed, use
1897 gfc_has_default_initializer() instead. Updated all callers.
1898 * trans-decl.c (generate_local_decl): Do not check the
1899 first component only to check for initializers, but use
1900 gfc_has_default_initializer() instead.
1902 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1905 * primary.c (match_string_constant): Move start_locus just inside
1907 * data.c (create_character_intializer): Clarified truncation warning.
1909 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1912 * intrinsic.h (gfc_check_float): New prototype.
1913 (gfc_check_sngl): New prototype.
1914 * check.c (gfc_check_float): New.
1915 (gfc_check_sngl): New.
1916 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1917 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1919 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1920 added them to the list of specifics of REAL instead.
1922 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1925 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1926 This is now handled via 'gfc_class_null_initializer'.
1928 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1930 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1931 gfc_build_class_symbol,add_proc_component,add_proc_comps,
1932 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1933 add_procs_to_declared_vtab,add_generic_specifics,
1934 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1935 find_typebound_proc_uop,gfc_find_typebound_proc,
1936 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1937 gfc_get_tbp_symtree): Moved here from other places.
1938 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1940 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1941 gfc_find_typebound_proc,gfc_find_typebound_user_op,
1942 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1943 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1944 * Make-lang.in: Add class.o.
1945 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1946 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1947 add_procs_to_declared_vtab,add_generic_specifics,
1948 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1949 find_typebound_proc_uop,gfc_find_typebound_proc,
1950 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1951 gfc_get_tbp_symtree): Move to class.c.
1953 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1955 * trans-types.c (gfc_init_types): Use build_function_type_list.
1956 (gfc_get_ppc_type): Likewise.
1957 * trans-decl.c (gfc_generate_constructors): Likewise.
1958 * f95-lang.c (build_builtin_fntypes): Likewise.
1959 (gfc_init_builtin_functions): Likewise.
1960 (DEF_FUNCTION_TYPE_0): Likewise.
1961 (DEF_FUNCTION_TYPE_1): Likewise.
1962 (DEF_FUNCTION_TYPE_2): Likewise.
1963 (DEF_FUNCTION_TYPE_3): Likewise.
1964 (DEF_FUNCTION_TYPE_4): Likewise.
1965 (DEF_FUNCTION_TYPE_5): Likewise.
1966 (DEF_FUNCTION_TYPE_6): Likewise.
1967 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
1968 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1970 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1972 * trans-array.c (gfc_trans_array_constructor_value): Use
1973 build_constructor instead of build_constructor_from_list.
1974 (gfc_build_constant_array_constructor): Likewise.
1975 * trans-decl.c (create_main_function): Likewise.
1976 * trans-stmt.c (gfc_trans_character_select): Likewise.
1978 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1981 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
1982 (resolve_fl_variable_derived): ... this place.
1983 (resolve_symbol): Make sure function symbols (and their result
1984 variables) are not resolved twice.
1986 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
1989 * array.c (match_array_list): Revert change from 2010-05-13.
1991 2010-05-16 Richard Guenther <rguenther@suse.de>
1993 * trans-decl.c (module_htab_decls_hash): Revert last change.
1995 2010-05-16 Richard Guenther <rguenther@suse.de>
1997 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
1999 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2001 * options.c (set_Wall): Remove special logic for Wuninitialized
2004 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2008 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
2011 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2015 * gfortran.h (gfc_class_null_initializer): New prototype.
2016 * expr.c (gfc_class_null_initializer): New function to build a NULL
2017 initializer for CLASS pointers.
2018 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
2019 containers. Remove default NULL initialization of $data component.
2020 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
2022 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
2023 Use new function 'gfc_class_null_initializer'.
2024 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
2027 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2030 * fortran/interface.c (get_sym_storage_size): Use signed instead of
2031 unsigned mpz_get_?i routines.
2033 2010-05-14 Jakub Jelinek <jakub@redhat.com>
2035 * trans.c (trans_code): Set backend locus early.
2036 * trans-decl.c (gfc_get_fake_result_decl): Use source location
2037 of the function instead of current input_location.
2039 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
2042 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
2044 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
2045 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
2048 2010-05-13 Jakub Jelinek <jakub@redhat.com>
2051 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
2053 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
2054 by reference dummy procedures or non-dummy procedure pointers.
2055 (gfc_omp_predetermined_sharing): Return
2056 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
2058 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2061 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
2062 after OMP statement.
2063 (gfc_match_omp_critical): Likewise.
2064 (gfc_match_omp_flush): Likewise.
2065 (gfc_match_omp_workshare): Likewise.
2066 (gfc_match_omp_master): Likewise.
2067 (gfc_match_omp_ordered): Likewise.
2068 (gfc_match_omp_atomic): Likewise.
2069 (gfc_match_omp_barrier): Likewise.
2070 (gfc_match_omp_end_nowait): Likewise.
2072 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2075 * resolve.c (validate_case_label_expr): Removed FIXME.
2076 (resolve_select): Raise default warning on case labels out of range
2077 of the case expression.
2079 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
2084 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
2085 about conversion warnings.
2087 2010-05-10 Janus Weil <janus@gcc.gnu.org>
2090 * match.c (gfc_match_select_type): Move error message to
2091 resolve_select_type.
2092 * resolve.c (resolve_select_type): Error message moved here from
2093 gfc_match_select_type. Correctly set type of temporary.
2095 2010-05-10 Richard Guenther <rguenther@suse.de>
2097 * trans-decl.c (gfc_build_library_function_decl): Split out
2099 (build_library_function_decl_1): ... this new function.
2100 Set a fnspec attribute if a specification was provided.
2101 (gfc_build_library_function_decl_with_spec): New function.
2102 (gfc_build_intrinsic_function_decls): Annotate internal_pack
2103 and internal_unpack.
2105 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
2108 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
2111 2010-05-07 Jason Merrill <jason@redhat.com>
2113 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
2114 to avoid -Wc++-compat warning.
2116 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
2119 * options.c (gfc_handle_option): Add argument kind.
2120 * gfortran.h (gfc_handle_option): Update declaration.
2122 2010-05-06 Tobias Burnus <burnus@net-b.de>
2125 * trans-types.c (gfc_sym_type): Mark Cray pointees as
2128 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
2131 * resolve.c (traverse_data_list): Rephrase error message for
2132 non-constant bounds in data-implied-do.
2134 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
2137 * gfortran.h: Removed repeat count from constructor, removed
2139 * data.h (gfc_assign_data_value_range): Changed return value from
2141 * data.c (gfc_assign_data_value): Add location to constructor element.
2142 (gfc_assign_data_value_range): Call gfc_assign_data_value()
2143 for each element in range. Return early if an error was generated.
2144 * resolve.c (check_data_variable): Stop early if range assignment
2147 2010-05-05 Janus Weil <janus@gcc.gnu.org>
2150 * resolve.c (resolve_fl_derived): Some fixes for class variables.
2151 * symbol.c (gfc_build_class_symbol): Add separate class container for
2154 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
2157 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
2159 2010-05-02 Tobias Burnus <burnus@net-b.de>
2162 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
2163 for lcobound, ucobound, image_index and this_image.
2164 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
2165 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
2166 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
2167 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
2169 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
2171 2010-04-30 Tobias Burnus <burnus@net-b.de>
2175 * trans-types.c (gfc_get_array_descriptor_base): Fix index
2176 calculation for array descriptor types.
2178 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2181 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
2182 initializers for PPC members of the vtabs.
2184 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2187 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
2188 attribute for all PPC members of the vtypes.
2189 (copy_vtab_proc_comps): Copy the correct interface.
2190 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
2191 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
2192 a dummy argument and make sure all PPC members of the vtab are
2193 initialized correctly.
2194 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
2195 in call to gfc_trans_assign_vtab_procs.
2196 * trans-stmt.c (gfc_trans_allocate): Ditto.
2198 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2201 * resolve.c (resolve_typebound_function): Renamed
2202 resolve_class_compcall.Do all the detection of class references
2204 (resolve_typebound_subroutine): resolve_class_typebound_call
2205 renamed. Otherwise same as resolve_typebound_function.
2206 (gfc_resolve_expr): Call resolve_typebound_function.
2207 (resolve_code): Call resolve_typebound_subroutine.
2209 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2212 * resolve.c (resolve_typebound_generic_call): For CLASS methods
2213 pass back the specific symtree name, rather than the target
2216 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2219 * resolve.c (resolve_structure_cons): Make the initializer of
2220 the vtab component 'extends' the same type as the component.
2222 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2225 * interface.c (check_interface1): Pass symbol name rather than NULL to
2226 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
2227 trap MULL. (gfc_compare_derived_types): Revert previous change
2228 incorporated incorrectly during merge from trunk, r155778.
2229 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2230 than NULL to gfc_compare_interfaces.
2231 * symbol.c (add_generic_specifics): Likewise.
2233 2010-02-29 Janus Weil <janus@gcc.gnu.org>
2236 * interface.c (gfc_compare_derived_types): Add condition for vtype.
2237 * symbol.c (gfc_find_derived_vtab): Sey access to private.
2238 (gfc_find_derived_vtab): Likewise.
2239 * module.c (ab_attribute): Add enumerator AB_VTAB.
2240 (mio_symbol_attribute): Use new attribute, AB_VTAB.
2241 (check_for_ambiguous): Likewise.
2243 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2244 Janus Weil <janus@gcc.gnu.org>
2247 * trans-expr.c (select_class_proc): Remove function.
2248 (conv_function_val): Delete reference to previous.
2249 (gfc_conv_derived_to_class): Add second argument to the call to
2250 gfc_find_derived_vtab.
2251 (gfc_conv_structure): Exclude proc_pointer components when
2252 accessing $data field of class objects.
2253 (gfc_trans_assign_vtab_procs): New function.
2254 (gfc_trans_class_assign): Add second argument to the call to
2255 gfc_find_derived_vtab.
2256 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
2257 implement holding off searching for the vptr derived type.
2258 (add_proc_component): New function.
2259 (add_proc_comps): New function.
2260 (add_procs_to_declared_vtab1): New function.
2261 (copy_vtab_proc_comps): New function.
2262 (add_procs_to_declared_vtab): New function.
2263 (void add_generic_specifics): New function.
2264 (add_generics_to_declared_vtab): New function.
2265 (gfc_find_derived_vtab): Add second argument to the call to
2266 gfc_find_derived_vtab. Add the calls to
2267 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
2268 * decl.c (build_sym, build_struct): Use new arg in calls to
2269 gfc_build_class_symbol.
2270 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
2271 definition of struct gfc_class_esym_list. Modify prototypes
2272 of gfc_build_class_symbol and gfc_find_derived_vtab.
2273 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
2274 call to gfc_find_derived_vtab.
2275 * module.c : Add the vtype attribute.
2276 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
2277 * resolve.c (resolve_typebound_generic_call): Add second arg
2278 to pass along the generic name for class methods.
2279 (resolve_typebound_call): The same.
2280 (resolve_compcall): Use the second arg to carry the generic
2281 name from the above. Remove the reference to class_esym.
2282 (check_members, check_class_members, resolve_class_esym,
2283 hash_value_expr): Remove functions.
2284 (resolve_class_compcall, resolve_class_typebound_call): Modify
2285 to use vtable rather than member by member calls.
2286 (gfc_resolve_expr): Modify second arg in call to
2288 (resolve_select_type): Add second arg in call to
2289 gfc_find_derived_vtab.
2290 (resolve_code): Add second arg in call resolve_typebound_call.
2291 (resolve_fl_derived): Exclude vtypes from check for late
2292 procedure definitions. Likewise for checking of explicit
2293 interface and checking of pass arg.
2294 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2295 calls to gfc_find_derived_vtab.
2296 * match.c (select_type_set_tmp): Use new arg in call to
2297 gfc_build_class_symbol.
2298 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2300 * parse.c (endType): Finish incomplete classes.
2302 2010-04-28 Tobias Burnus <burnus@net-b.de>
2306 * simplify.c (simplify_cobound): Handle scalar coarrays.
2308 2010-04-27 Tobias Burnus <burnus@net-b.de>
2310 * gfc-internals.texi: Update copyright year.
2311 * gfortran.texi: Ditto.
2312 * invoke.texi: Ditto.
2314 2010-04-27 Tobias Burnus <burnus@net-b.de>
2317 * resolve.c (resolve_allocate_expr): Allow array coarrays.
2318 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2319 * trans-types.c (gfc_get_array_type_bounds,
2320 gfc_get_array_descriptor_base): Add corank argument.
2321 * trans-array.c (gfc_array_init_size): Handle corank.
2322 (gfc_trans_create_temp_array, gfc_array_allocate,
2323 gfc_conv_expr_descriptor): Add corank argument to call.
2324 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2326 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
2330 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2331 of mucking with a tree directly.
2333 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2336 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2337 gfc_error with new error message.
2339 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
2343 * trans-expr.c (gfc_conv_expr): Supply an address expression for
2345 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2347 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2348 than the address of a GFC_SS_REFERENCE.
2349 * trans.h : Change comment on GFC_SS_REFERENCE.
2351 2010-04-22 Richard Guenther <rguenther@suse.de>
2354 * resolve.c (gfc_resolve_index): Wrap around ...
2355 (gfc_resolve_index_1): ... this. Add parameter to allow
2356 any integer kind index type.
2357 (resolve_array_ref): Allow any integer kind for the start
2358 index of an array ref.
2360 2010-04-21 Jakub Jelinek <jakub@redhat.com>
2363 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2366 2010-04-20 Harald Anlauf <anlauf@gmx.de>
2368 * intrinsic.c (sort_actual): Remove 'is' in error message.
2370 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
2373 * resolve.c (resolve_fl_derived): If a component character
2374 length has not been resolved, do so now.
2375 (resolve_symbol): The same as above for a symbol character
2377 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2378 not needed for a character valued, procedure pointer.
2381 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2382 not found, return FAILURE rather than ICEing.
2384 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2387 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2388 sequential loops private in the innermost containing task region.
2390 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2392 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2393 to build_common_tree_nodes.
2395 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
2398 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2399 gfc_msg_bounds by using 'Array bound mismatch' directly.
2400 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
2401 error message to include the mismatch in the extent of array bound.
2402 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
2403 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2405 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2407 * gfortran.texi: Update information on temporary file locations.
2409 2010-04-16 Jakub Jelinek <jakub@redhat.com>
2411 * trans-decl.c (gfc_build_qualified_array): Ensure
2412 ubound.N and lbound.N artificial variable names don't appear
2415 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
2418 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2419 block of code. Set name to the variable associated with the descriptor.
2421 2010-04-15 Jakub Jelinek <jakub@redhat.com>
2423 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2424 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2426 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
2428 * intrinsic.texi: Add the missing specific name of intrinsic
2429 procedure where the specific name is identical to the generic name.
2430 Fix inconsistent or mismatch in the argument names in intrinsic
2431 procedure descriptions. Add the SCALAR allocatable description to
2434 2010-04-14 Tobias Burnus <burnus@net-b.de>
2437 * array.c (gfc_find_array_ref): Handle codimensions.
2438 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2439 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2440 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2442 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2443 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2445 * intrinsic.h (add_functions): Add this_image, image_index,
2446 lcobound and ucobound intrinsics.
2447 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2448 gfc_check_image_index, gfc_check_this_image,
2449 gfc_simplify_image_index, gfc_simplify_lcobound,
2450 gfc_simplify_this_image, gfc_simplify_ucobound):
2451 New function prototypes.
2452 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2453 IMAGE_INDEX): Document new intrinsic functions.
2454 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2456 * simplify.c (simplify_bound_dim): Handle coarrays.
2457 (simplify_bound): Update simplify_bound_dim call.
2458 (gfc_simplify_num_images): Add -fcoarray=none check.
2459 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2460 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2462 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2465 * constructor.c: Fix typo in comment.
2466 * expr.c (find_array_section): Add check for max array limit.
2468 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
2471 * gfortranspec.c (lookup_option): Check for -static and return
2473 (lang_specific_driver): Break when OPTION_static is discovered.
2475 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2477 * array.c (extract_element): Restore function from trunk.
2478 (gfc_get_array_element): Restore function from trunk.
2479 (gfc_expand_constructor): Restore check against
2480 flag_max_array_constructor.
2481 * constructor.c (node_copy_and_append): Delete unused.
2482 * gfortran.h: Delete comment and extra include.
2483 * constructor.h: Bump copyright and clean up TODO comments.
2484 * resolve.c: Whitespace.
2486 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2488 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2489 with direct access access to elements. Adjusted prototype, fixed all
2491 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2493 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2494 (gfc_simplify_spread): Removed workaround, directly insert elements
2495 at a given array position.
2496 (gfc_simplify_transpose): Likewise.
2497 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2499 (gfc_simplify_unpack): Likewise.
2501 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2503 * simplify.c (only_convert_cmplx_boz): Renamed to ...
2504 (convert_boz): ... this and moved to start of file.
2505 (gfc_simplify_abs): Whitespace fix.
2506 (gfc_simplify_acos): Whitespace fix.
2507 (gfc_simplify_acosh): Whitespace fix.
2508 (gfc_simplify_aint): Whitespace fix.
2509 (gfc_simplify_dint): Whitespace fix.
2510 (gfc_simplify_anint): Whitespace fix.
2511 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2512 (gfc_simplify_dnint): Whitespace fix.
2513 (gfc_simplify_asin): Whitespace fix.
2514 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2515 (gfc_simplify_atan): Likewise.
2516 (gfc_simplify_atanh): Whitespace fix.
2517 (gfc_simplify_atan2): Whitespace fix.
2518 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2519 (gfc_simplify_bessel_j1): Likewise.
2520 (gfc_simplify_bessel_jn): Likewise.
2521 (gfc_simplify_bessel_y0): Likewise.
2522 (gfc_simplify_bessel_y1): Likewise.
2523 (gfc_simplify_bessel_yn): Likewise.
2524 (gfc_simplify_ceiling): Reorderd statements.
2525 (simplify_cmplx): Use convert_boz(), check for constant arguments.
2527 (gfc_simplify_cmplx): Use correct default kind. Removed check for
2529 (gfc_simplify_complex): Replaced if-gate. Removed check for
2531 (gfc_simplify_conjg): Whitespace fix.
2532 (gfc_simplify_cos): Whitespace fix.
2533 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2534 (gfc_simplify_dcmplx): Removed check for constant arguments.
2535 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2536 (gfc_simplify_digits): Whitespace fix.
2537 (gfc_simplify_dim): Whitespace fix.
2538 (gfc_simplify_dprod): Reordered statements.
2539 (gfc_simplify_erf): Whitespace fix.
2540 (gfc_simplify_erfc): Whitespace fix.
2541 (gfc_simplify_epsilon): Whitespace fix.
2542 (gfc_simplify_exp): Whitespace fix.
2543 (gfc_simplify_exponent): Use convert_boz().
2544 (gfc_simplify_floor): Reorderd statements.
2545 (gfc_simplify_gamma): Whitespace fix.
2546 (gfc_simplify_huge): Whitespace fix.
2547 (gfc_simplify_iand): Whitespace fix.
2548 (gfc_simplify_ieor): Whitespace fix.
2549 (simplify_intconv): Use gfc_convert_constant().
2550 (gfc_simplify_int): Use simplify_intconv().
2551 (gfc_simplify_int2): Reorderd statements.
2552 (gfc_simplify_idint): Reorderd statements.
2553 (gfc_simplify_ior): Whitespace fix.
2554 (gfc_simplify_ishftc): Removed duplicate type check.
2555 (gfc_simplify_len): Use range_check() instead of manual range check.
2556 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2557 (gfc_simplify_log): Whitespace fix.
2558 (gfc_simplify_log10): Whitespace fix.
2559 (gfc_simplify_minval): Whitespace fix.
2560 (gfc_simplify_maxval): Whitespace fix.
2561 (gfc_simplify_mod): Whitespace fix.
2562 (gfc_simplify_modulo): Whitespace fix.
2563 (simplify_nint): Reorderd statements.
2564 (gfc_simplify_not): Whitespace fix.
2565 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2566 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2567 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2568 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2569 (gfc_simplify_realpart): Whitespace fix.
2570 (gfc_simplify_selected_char_kind): Removed unused result-variable.
2571 (gfc_simplify_selected_int_kind): Removed unused result-variable.
2572 (gfc_simplify_selected_real_kind): Removed unused result-variable.
2573 (gfc_simplify_sign): Whitespace fix.
2574 (gfc_simplify_sin): Whitespace fix.
2575 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2576 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2577 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2578 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2579 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2581 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2583 * gfortran.h (gfc_start_constructor): Removed.
2584 (gfc_get_array_element): Removed.
2585 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
2586 instead. Fixed all callers.
2587 (extract_element): Removed.
2588 (gfc_expand_constructor): Temporarily removed check for
2589 max-array-constructor. Will be re-introduced later if still required.
2590 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2591 instead. Fixed all callers.
2592 * expr.c (find_array_section): Replaced manual lookup of elements
2593 by gfc_constructor_lookup.
2595 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2597 * gfortran.h (gfc_get_null_expr): New prototype.
2598 (gfc_get_operator_expr): New prototype.
2599 (gfc_get_character_expr): New prototype.
2600 (gfc_get_iokind_expr): New prototype.
2601 * expr.c (gfc_get_null_expr): New.
2602 (gfc_get_character_expr): New.
2603 (gfc_get_iokind_expr): New.
2604 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2605 * matchexp.c (build_node): Renamed and moved to
2606 expr.c (gfc_get_operator_expr). Reordered arguments to match
2607 other functions. Fixed all callers.
2608 (gfc_get_parentheses): Use specific function to build expr.
2609 * array.c (gfc_match_array_constructor): Likewise.
2610 * arith.c (eval_intrinsic): Likewise.
2611 (gfc_hollerith2int): Likewise.
2612 (gfc_hollerith2real): Likewise.
2613 (gfc_hollerith2complex): Likewise.
2614 (gfc_hollerith2logical): Likewise.
2615 * data.c (create_character_intializer): Likewise.
2616 * decl.c (gfc_match_null): Likewise.
2617 (enum_initializer): Likewise.
2618 * io.c (gfc_match_format): Likewise.
2619 (match_io): Likewise.
2620 * match.c (gfc_match_nullify): Likewise.
2621 * primary.c (match_string_constant): Likewise.
2622 (match_logical_constant): Likewise.
2623 (build_actual_constructor): Likewise.
2624 * resolve.c (build_default_init_expr): Likewise.
2625 * symbol.c (generate_isocbinding_symbol): Likewise.
2626 (gfc_build_class_symbol): Likewise.
2627 (gfc_find_derived_vtab): Likewise.
2628 * simplify.c (simplify_achar_char): Likewise.
2629 (gfc_simplify_adjustl): Likewise.
2630 (gfc_simplify_adjustr): Likewise.
2631 (gfc_simplify_and): Likewise.
2632 (gfc_simplify_bit_size): Likewise.
2633 (gfc_simplify_is_iostat_end): Likewise.
2634 (gfc_simplify_is_iostat_eor): Likewise.
2635 (gfc_simplify_isnan): Likewise.
2636 (simplify_bound): Likewise.
2637 (gfc_simplify_leadz): Likewise.
2638 (gfc_simplify_len_trim): Likewise.
2639 (gfc_simplify_logical): Likewise.
2640 (gfc_simplify_maxexponent): Likewise.
2641 (gfc_simplify_minexponent): Likewise.
2642 (gfc_simplify_new_line): Likewise.
2643 (gfc_simplify_null): Likewise.
2644 (gfc_simplify_or): Likewise.
2645 (gfc_simplify_precision): Likewise.
2646 (gfc_simplify_repeat): Likewise.
2647 (gfc_simplify_scan): Likewise.
2648 (gfc_simplify_size): Likewise.
2649 (gfc_simplify_trailz): Likewise.
2650 (gfc_simplify_trim): Likewise.
2651 (gfc_simplify_verify): Likewise.
2652 (gfc_simplify_xor): Likewise.
2653 * trans-io.c (build_dt): Likewise.
2654 (gfc_new_nml_name_expr): Removed.
2656 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2658 * arith.h (gfc_constant_result): Removed prototype.
2659 * constructor.h (gfc_build_array_expr): Removed prototype.
2660 (gfc_build_structure_constructor_expr): Removed prototype.
2661 * gfortran.h (gfc_int_expr): Removed prototype.
2662 (gfc_logical_expr): Removed prototype.
2663 (gfc_get_array_expr): New prototype.
2664 (gfc_get_structure_constructor_expr): New prototype.
2665 (gfc_get_constant_expr): New prototype.
2666 (gfc_get_int_expr): New prototype.
2667 (gfc_get_logical_expr): New prototype.
2668 * arith.c (gfc_constant_result): Moved and renamed to
2669 expr.c (gfc_get_constant_expr). Fixed all callers.
2670 * constructor.c (gfc_build_array_expr): Moved and renamed to
2671 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2672 and kind. Fixed all callers.
2673 (gfc_build_structure_constructor_expr): Moved and renamed to
2674 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2675 to type and kind. Fixed all callers.
2676 * expr.c (gfc_logical_expr): Renamed to ...
2677 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2678 (gfc_int_expr): Renamed to ...
2679 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2681 (gfc_get_constant_expr): New.
2682 (gfc_get_array_expr): New.
2683 (gfc_get_structure_constructor_expr): New.
2684 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2687 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2689 * constructor.h: New.
2690 * constructor.c: New.
2691 * Make-lang.in: Add new files to F95_PARSER_OBJS.
2692 * arith.c (reducy_unary): Use constructor API.
2693 (reduce_binary_ac): Likewise.
2694 (reduce_binary_ca): Likewise.
2695 (reduce_binary_aa): Likewise.
2696 * check.c (gfc_check_pack): Likewise.
2697 (gfc_check_reshape): Likewise.
2698 (gfc_check_unpack): Likewise.
2699 * decl.c (add_init_expr_to_sym): Likewise.
2700 (build_struct): Likewise.
2701 * dependency.c (gfc_check_dependency): Likewise.
2702 (contains_forall_index_p): Likewise.
2703 * dump-parse-tree.c (show_constructor): Likewise.
2704 * expr.c (free_expr0): Likewise.
2705 (gfc_copy_expr): Likewise.
2706 (gfc_is_constant_expr): Likewise.
2707 (simplify_constructor): Likewise.
2708 (find_array_element): Likewise.
2709 (find_component_ref): Likewise.
2710 (find_array_section): Likewise.
2711 (find_substring_ref): Likewise.
2712 (simplify_const_ref): Likewise.
2713 (scalarize_intrinsic_call): Likewise.
2714 (check_alloc_comp_init): Likewise.
2715 (gfc_default_initializer): Likewise.
2716 (gfc_traverse_expr): Likewise.
2717 * iresolve.c (check_charlen_present): Likewise.
2718 (gfc_resolve_reshape): Likewise.
2719 (gfc_resolve_transfer): Likewise.
2720 * module.c (mio_constructor): Likewise.
2721 * primary.c (build_actual_constructor): Likewise.
2722 (gfc_match_structure_constructor): Likewise.
2723 * resolve.c (resolve_structure_cons): Likewise.
2724 * simplify.c (is_constant_array_expr): Likewise.
2725 (init_result_expr): Likewise.
2726 (transformational_result): Likewise.
2727 (simplify_transformation_to_scalar): Likewise.
2728 (simplify_transformation_to_array): Likewise.
2729 (gfc_simplify_dot_product): Likewise.
2730 (simplify_bound): Likewise.
2731 (simplify_matmul): Likewise.
2732 (simplify_minval_maxval): Likewise.
2733 (gfc_simplify_pack): Likewise.
2734 (gfc_simplify_reshape): Likewise.
2735 (gfc_simplify_shape): Likewise.
2736 (gfc_simplify_spread): Likewise.
2737 (gfc_simplify_transpose): Likewise.
2738 (gfc_simplify_unpack): Likewise.q
2739 (gfc_convert_constant): Likewise.
2740 (gfc_convert_char_constant): Likewise.
2741 * target-memory.c (size_array): Likewise.
2742 (encode_array): Likewise.
2743 (encode_derived): Likewise.
2744 (interpret_array): Likewise.
2745 (gfc_interpret_derived): Likewise.
2746 (expr_to_char): Likewise.
2747 (gfc_merge_initializers): Likewise.
2748 * trans-array.c (gfc_get_array_constructor_size): Likewise.
2749 (gfc_trans_array_constructor_value): Likewise.
2750 (get_array_ctor_strlen): Likewise.
2751 (gfc_constant_array_constructor_p): Likewise.
2752 (gfc_build_constant_array_constructor): Likewise.
2753 (gfc_trans_array_constructor): Likewise.
2754 (gfc_conv_array_initializer): Likewise.
2755 * trans-decl.c (check_constant_initializer): Likewise.
2756 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2757 (gfc_apply_interface_mapping_to_cons): Likewise.
2758 (gfc_trans_structure_assign): Likewise.
2759 (gfc_conv_structure): Likewise.
2760 * array.c (check_duplicate_iterator): Likewise.
2761 (match_array_list): Likewise.
2762 (match_array_cons_element): Likewise.
2763 (gfc_match_array_constructor): Likewise.
2764 (check_constructor_type): Likewise.
2765 (check_constructor): Likewise.
2767 (expand_constructor): Likewise.
2768 (extract_element): Likewise.
2769 (gfc_expanded_ac): Likewise.
2770 (resolve_array_list): Likewise.
2771 (gfc_resolve_character_array_constructor): Likewise.
2772 (copy_iterator): Renamed to ...
2773 (gfc_copy_iterator): ... this.
2774 (gfc_append_constructor): Removed.
2775 (gfc_insert_constructor): Removed unused function.
2776 (gfc_get_constructor): Removed.
2777 (gfc_free_constructor): Removed.
2778 (qgfc_copy_constructor): Removed.
2779 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2780 Removed all references. Replaced constructor list by splay-tree.
2781 (struct gfc_constructor): Removed member 'next', moved 'offset' from
2782 the inner struct, added member 'base'.
2783 (gfc_append_constructor): Removed prototype.
2784 (gfc_insert_constructor): Removed prototype.
2785 (gfc_get_constructor): Removed prototype.
2786 (gfc_free_constructor): Removed prototype.
2787 (qgfc_copy_constructor): Removed prototype.
2788 (gfc_copy_iterator): New prototype.
2789 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2791 2010-04-10 Tobias Burnus <burnus@net-b.de>
2794 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2795 proc-pointers and type-bound procedures.
2796 (gfc_specification_expr): Check proc-pointers for pureness.
2798 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
2801 * gfortranspec.c (lang_specific_driver): Do not expose vars
2802 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2805 2010-04-09 Tobias Burnus <burnus@net-b.de>
2808 * decl.c (variable_decl, match_attr_spec): Fix setting the array
2810 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2811 * data.c (gfc_assign_data_value): Ditto.
2812 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2813 (gfc_traverse_expr): Traverse also through codimension expressions.
2814 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2815 gfc_has_ultimate_pointer): New functions.
2816 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2817 (gfc_array_ref): Add codimen.
2818 (gfc_array_ref): Add in_allocate.
2819 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2820 gfc_has_ultimate_pointer): Add prototypes.
2821 * interface.c (compare_parameter, compare_actual_formal,
2822 check_intents): Add coarray constraints.
2823 * match.c (gfc_match_iterator): Add coarray constraint.
2824 * match.h (gfc_match_array_ref): Update interface.
2825 * primary.c (gfc_match_varspec): Handle codimensions.
2826 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2827 (check_class_members): Return gfc_try instead for error recovery.
2828 (resolve_typebound_function,resolve_typebound_subroutine,
2829 check_members): Handle return value of check_class_members.
2830 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2831 check_dimension, compare_spec_to_ref, resolve_array_ref,
2832 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2833 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2835 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2836 Skip over coarray refs.
2837 (gfc_array_allocate) Add support for references containing coindexes.
2838 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2839 (gfc_map_intrinsic_function): Ignore codimensions.
2841 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
2844 * io.c (check_format_string): Added check for additional non
2845 blank characters after the format string was successfully
2847 * io.c (check_format): Changed the error messages for positive
2848 int required and period required to drop through the error logic
2849 and report with gfc_error instead of gfc_error_now. Corrected
2850 format postion for hollerith strings.
2852 2010-04-08 Tobias Burnus <burnus@net-b.de>
2854 * module.c (use_iso_fortran_env_module): Fix standard check.
2856 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2858 * parse.c (parse_derived, parse_enum): Avoid set but not used
2861 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
2864 * gfortran.texi: Add section about representation of
2867 2010-04-07 Simon Baldwin <simonb@google.com>
2869 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2870 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2872 2010-04-07 Richard Guenther <rguenther@suse.de>
2874 * options.c (gfc_init_options): Do not set.
2876 2010-04-06 Tobias Burnus <burnus@net-b.de>
2879 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2880 * match.c (gfc_match_critical, sync_statement): Ditto.
2881 * gfortran.h (gfc_fcoarray): New enum.
2882 (gfc_option_t): Use it.
2883 * lang.opt (fcoarray): Add new flag.
2884 * invoke.texi (fcoarray): Document it.
2885 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2886 (gfc_handle_coarray_option): New function.
2888 2010-04-06 Tobias Burnus <burnus@net-b.de>
2891 * gfortran.h (gfc_array_spec): Add cotype.
2892 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2893 and defer error diagnostic.
2894 * resolve.c (resolve_fl_derived): Add missing check.
2895 (resolve_symbol): Add cotype/type check.
2896 * parse.c (parse_derived): Fix setting of coarray_comp.
2898 2010-04-06 Tobias Burnus <burnus@net-b.de>
2901 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2902 match_array_element_spec,gfc_copy_array_spec,
2903 gfc_compare_array_spec): Include corank.
2904 (match_array_element_spec,gfc_set_array_spec): Support codimension.
2905 * decl.c (build_sym,build_struct,variable_decl,
2906 match_attr_spec,attr_decl1,cray_pointer_decl,
2907 gfc_match_volatile): Add codimension.
2908 (gfc_match_codimension): New function.
2909 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2910 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2911 (gfc_add_codimension): New function prototype.
2912 * match.h (gfc_match_codimension): New function prototype.
2913 (gfc_match_array_spec): Update prototype
2914 * match.c (gfc_match_common): Update gfc_match_array_spec call.
2915 * module.c (MOD_VERSION): Bump.
2916 (mio_symbol_attribute): Support coarray attributes.
2917 (mio_array_spec): Add corank support.
2918 * parse.c (decode_specification_statement,decode_statement,
2919 parse_derived): Add coarray support.
2920 * resolve.c (resolve_formal_arglist, was_declared,
2921 is_non_constant_shape_array, resolve_fl_variable,
2922 resolve_fl_derived, resolve_symbol): Add coarray support.
2923 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2924 gfc_build_class_symbol): Add coarray support.
2925 (gfc_add_codimension): New function.
2927 2010-04-06 Tobias Burnus <burnus@net-b.de>
2930 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2931 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2932 stat_locked_other_image, stat_stopped_image and stat_unlocked of
2934 * intrinsic.texi (iso_fortran_env): Ditto.
2935 * libgfortran.h (libgfortran_stat_codes): New enum.
2936 * module.c (use_iso_fortran_env_module): Honour -std= when loading
2937 constants from the intrinsic module.
2939 2010-04-06 Tobias Burnus <burnus@net-b.de>
2942 * intrinsic.c (add_functions): Add num_images.
2943 * decl.c (gfc_match_end): Handle END CRITICAL.
2944 * intrinsic.h (gfc_simplify_num_images): Add prototype.
2945 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2947 * gfortran.h (gfc_statement): Add enum items for those.
2948 (gfc_exec_op) Ditto.
2949 (gfc_isym_id): Add num_images.
2950 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2951 (gfc_trans_sync,gfc_trans_critical): New functions.
2952 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2953 gfc_trans_critical): Add/update prototypes.
2954 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2955 and SYNC statements.
2956 * trans.h (gfor_fndecl_error_stop_string) Add variable.
2957 * resolve.c (resolve_sync): Add function.
2958 (gfc_resolve_blocks): Handle CRITICAL.
2959 (resolve_code): Handle CRITICAL, ERROR STOP,
2960 (resolve_branch): Add CRITICAL constraint check.
2961 and SYNC statements.
2962 * st.c (gfc_free_statement): Add new statements.
2963 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2964 (gfc_build_builtin_function_decls): Initialize it.
2965 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2966 (gfc_match_critical, gfc_match_error_stop, sync_statement,
2967 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2969 (match_exit_cycle): Handle CRITICAL constraint.
2970 (gfc_match_stopcode): Handle ERROR STOP.
2971 * match.h (gfc_match_critical, gfc_match_error_stop,
2972 gfc_match_sync_all, gfc_match_sync_images,
2973 gfc_match_sync_memory): Add prototype.
2974 * parse.c (decode_statement, gfc_ascii_statement,
2975 parse_executable): Handle new statements.
2976 (parse_critical_block): New function.
2977 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2978 * intrinsic.texi (num_images): Document new function.
2979 * simplify.c (gfc_simplify_num_images): Add function.
2981 2010-04-06 Tobias Burnus <burnus@net-b.de>
2984 * trans-array.c (gfc_conv_expr_descriptor): Update
2985 gfc_trans_scalar_assign call.
2986 (has_default_initializer): New function.
2987 (gfc_trans_deferred_array): Nullify less often.
2988 * trans-expr.c (gfc_conv_subref_array_arg,
2989 gfc_trans_subcomponent_assign): Update call to
2990 gfc_trans_scalar_assign.
2991 (gfc_trans_scalar_assign): Add parameter and pass it on.
2992 (gfc_trans_assignment_1): Optionally, do not dealloc before
2994 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
2995 call to gfc_trans_scalar_assign.
2996 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
2997 initializer to static variables.
2998 (gfc_init_default_dt): Add dealloc parameter and pass it on.
2999 * trans-stmt.c (forall_make_variable_temp,
3000 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3001 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
3002 gfc_trans_allocate): Update gfc_trans_assignment call.
3003 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
3004 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
3005 parameter to prototype.
3007 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
3009 * ioparm.def : Update copyright.
3011 * trans-array.c : ditto
3012 * trans-array.h : ditto
3014 * trans-types.c: ditto
3015 * dependency.c : ditto
3016 * gfortran.h : ditto
3018 * trans-io.c : ditto
3019 * trans-intrinsic.c : ditto
3020 * libgfortran.h : ditto
3021 * invoke.texi : ditto
3022 * intrinsic.texi : ditto
3025 * intrinsic.c : ditto
3026 * interface.c : ditto
3027 * iresolve.c : ditto
3028 * trans-stmt.c : ditto
3029 * trans-stmt.h : ditto
3034 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
3037 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
3038 do not assert the context of derived types.
3040 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3043 * ioparm.def: Change inquire size variable to type pointer to
3046 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
3049 * trans-expr.c (conv_parent_component_references): Ensure that
3050 'dt' has a backend_decl.
3053 * trans-expr.c (gfc_conv_structure): Ensure that the derived
3054 type has a backend_decl.
3057 * resolve.c (resolve_global_procedure): Check that the 'cl'
3058 structure is not NULL.
3060 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
3062 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
3065 2010-03-17 Tobias Burnus <burnus@net-b.de>
3068 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
3069 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
3071 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
3072 pointees as having explizit size.
3073 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
3075 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
3076 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
3077 * resolve.c (resolve_symbol): Handle cp_was_assumed.
3078 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
3079 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
3082 2010-03-14 Tobias Burnus <burnus@net-b.de>
3085 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
3086 (resolve_ordinary_assign): Add check to avoid segfault.
3088 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
3092 * resolve.c (resolve_compcall): Add new boolean dummy argument
3093 'class_members'. Only resolve expression at end if false.
3094 Remove redundant, static variable 'class_object'.
3095 (check_class_members): Add extra argument to call of
3097 (resolve_typebound_function): Renamed resolve_class_compcall.
3098 Do all the detection of class references here. Correct calls to
3099 resolve_compcall for extra argument.
3100 (resolve_typebound_subroutine): resolve_class_typebound_call
3101 renamed. Otherwise same as resolve_typebound_function.
3102 (gfc_resolve_expr): Call resolve_typebound_function.
3103 (resolve_code): Call resolve_typebound_subroutine.
3105 2010-03-10 Tobias Burnus <burnus@net-b.de
3108 * symbol.c (get_iso_c_sym): Set sym->result.
3110 2010-03-08 Janus Weil <janus@gcc.gnu.org>
3113 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
3114 for TBPs, otherwise they will not be resolved properly.
3115 (resolve_function): Use 'value.function.esym' instead of
3116 'value.function.name' to check if we're dealing with a TBP.
3117 (check_class_members): Set correct type of passed object for all TBPs,
3118 not only generic ones, except if the type is abstract.
3120 2010-03-04 Janus Weil <janus@gcc.gnu.org>
3123 * decl.c (gfc_match_final_decl): Make sure variable names starting with
3124 'final...' are not misinterpreted as FINAL statements.
3126 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
3129 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3130 allocatable ultimate components do not need temporaries, whilst
3131 ultimate pointer components do.
3133 2010-03-03 Janus Weil <janus@gcc.gnu.org>
3136 * resolve.c (resolve_code): Correctly set gfc_current_ns for
3138 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
3141 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
3144 * trans-array.c (gfc_conv_array_parameter): A full array of
3145 derived type need not be restricted to a symbol without an
3146 array spec to use the call to gfc_conv_expr_descriptor.
3149 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
3150 allocatable arrays do not need temporaries.
3152 2010-03-01 Tobias Burnus <burnus@net-b.de>
3155 * resolve.c (find_array_spec): Handle REF_COMPONENT with
3158 2010-02-28 Tobias Burnus <burnus@net-b.de>
3161 * trans-expr.c (is_zero_initializer_p): Move up in the file.
3162 (gfc_conv_initializer): Handle zero initializer as special case.
3164 2010-02-27 Tobias Burnus <burnus@net-b.de>
3167 * resolve.c (resolve_fl_variable_derived): Imply SAVE
3168 for module variables for Fortran 2008.
3170 2010-02-25 Jakub Jelinek <jakub@redhat.com>
3173 * trans-common.c (build_common_decl): Also update DECL_MODE,
3174 and DECL_SIZE when encountering a larger common block and call
3177 2010-02-24 Tobias Burnus <burnus@net-b.de>
3180 * trans-expr.c (gfc_conv_initializer): Call directly
3181 gfc_conv_constant for C_NULL_(FUN)PTR.
3183 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
3186 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
3187 checking the rest of the dimensions for elements.
3189 2010-02-21 Tobias Burnus <burnus@net-b.de>
3192 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
3194 * option.c (gfc_init_options,gfc_handle_option): Ditto.
3195 * trans-expr.c (gfc_conv_expr_op): Use the flag.
3196 * invoke.texi: Document new -fno-protect-parens flag.
3198 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
3204 * dependency.c (gfc_check_argument_var_dependency): Use enum
3205 value instead of arithmetic vaue for 'elemental'.
3206 (check_data_pointer_types): New function.
3207 (gfc_check_dependency): Call check_data_pointer_types.
3208 * trans-array.h : Change fourth argument of
3209 gfc_conv_array_parameter to boolean.
3210 * trans-array.c (gfc_conv_array_parameter): A contiguous array
3211 can be a dummy but it must not be assumed shape or deferred.
3212 Change fourth argument to boolean. Array constructor exprs will
3213 always be contiguous and do not need packing and unpacking.
3214 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
3215 space and change fourth argument of gfc_conv_array_parameter
3217 (gfc_trans_arrayfunc_assign): Change fourth argument of
3218 gfc_conv_array_parameter to boolean.
3219 * trans-io.c (gfc_convert_array_to_string): The same.
3220 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
3222 2010-02-20 Tobias Burnus <burnus@net-b.de>
3225 * libgfortran.h: Add GFC_RTCHECK_MEM.
3226 * invoke.texi (-fcheck=): Document -fcheck=mem.
3227 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
3228 and enable malloc-success check only with -fcheck=mem.
3229 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
3231 2010-02-16 Tobias Burnus <burnus@net-b.de>
3234 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
3235 * intrinsic.c (add_functions): Ditto.
3236 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
3237 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
3239 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3242 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
3243 gfc_trans_do prototype.
3244 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
3245 a loop exit condition. If exit condition is given, build the loop exit
3246 code, checking IO results of implied do loops in READ and WRITE.
3247 (gfc_trans_do): Likewise.
3248 * trans.c (trans_code): New static work function, previously
3249 gfc_trans_code. Passes exit condition to gfc_trans_do.
3250 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
3251 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
3252 * trans-io.c (build_dt): Build an exit condition to allow checking IO
3253 result status bits in the dtparm structure. Use this condition in call
3254 to gfc_trans_code_cond.
3256 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
3260 * trans-array.c (gfc_conv_array_parameter): Use
3261 gfc_full_array_ref_p to detect full and contiguous variable
3262 arrays. Full array components and contiguous arrays do not need
3263 internal_pack and internal_unpack.
3265 2010-02-11 Jakub Jelinek <jakub@redhat.com>
3268 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
3271 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
3273 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
3276 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
3277 Tobias Burnus <burnus@net-b.de>
3280 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3282 2010-02-10 Tobias Burnus <burnus@net-b.de>
3285 * trans-decl.c (gfc_generate_function_code): Only check
3286 actual-vs.-dummy character bounds if not bind(C).
3288 2010-02-10 Jakub Jelinek <jakub@redhat.com>
3291 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3292 info->dimen after info has been freed.
3294 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3297 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3300 2010-02-09 Jakub Jelinek <jakub@redhat.com>
3302 * module.c (fix_mio_expr): Declare sym.
3304 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
3307 * module.c (fix_mio_expr): Fix for private generic procedures.
3309 2010-02-09 Daniel Kraft <d@domob.eu>
3312 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3313 length to be correct and issue only with -Wsurprising.
3314 * invoke.texi (Wsurprising): Mention this new warning that is
3315 turned on by -Wsurprising.
3317 2010-02-09 Daniel Kraft <d@domob.eu>
3320 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3321 can be CHARACTER type.
3322 (MINVAL), (MAXLOC), (MINLOC): Ditto.
3324 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
3327 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3328 'formal_ptr'. If this is true, give returned descriptor unity
3329 lbounds, in all dimensions, and the appropriate offset.
3330 (gfc_conv_procedure_call); If formal is a pointer, set the last
3331 argument of gfc_conv_subref_array_arg to true.
3332 * trans.h : Add last argument for gfc_conv_subref_array_arg.
3333 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3334 new arg of gfc_conv_subref_array_arg to false.
3335 * trans-stmt.c (forall_make_variable_temp): The same.
3337 2010-02-03 Tobias Burnus <burnus@net-b.de>
3340 * interface.c (compare_parameter): Disable rank-checking
3343 2010-02-02 Tobias Burnus <burnus@net-b.de>
3346 * parse.c (decode_specification_statement): Use sym->result not sym.
3348 2010-02-01 Tobias Burnus <burnus@net-b.de>
3351 * decl.c (variable_decl): Allow default initializer in
3352 TYPE declarations in PURE functions.
3354 2010-01-31 Janus Weil <janus@gcc.gnu.org>
3357 * resolve.c (resolve_allocate_expr): Move default initialization code
3358 here from gfc_trans_allocate.
3359 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3361 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3362 of CLASS variables via memcpy.
3363 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3364 to resolve_allocate_expr.
3366 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
3369 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3370 * gfortran.h : Add prototype for above.
3371 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3372 (gfc_trans_subcomponent_assign): Call new function to replace
3373 the code to deal with allocatable components.
3374 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3375 gfc_get_full_arrayspec_from_expr to replace existing code.
3377 2010-01-25 Tobias Burnus <burnus@net-b.de>
3380 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3383 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
3387 * expr.c (remove_subobject_ref): If the constructor is NULL use
3388 the expression as the source.
3389 (simplify_const_ref): Change the type of expression if
3390 there are component references. Allow for substring to be at
3391 the end of an arbitrarily long chain of references. If an
3392 element is found that is not in an EXPR_ARRAY, assume that this
3393 is scalar initialization of array. Call remove_subobject_ref in
3394 this case with NULL second argument.
3396 2010-01-24 Tobias Burnus <burnus@net-b.de>
3399 * array.c (gfc_array_dimen_size): Use correct specific
3400 function in the check.
3402 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
3405 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3406 is required, turn any trailing array elements after a range
3407 into ranges so that offsets can be calculated.
3409 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
3411 * module.c (mio_f2k_derived): Use enumerator as initializer of
3415 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
3416 bitfield of width 2.
3418 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3421 * resolve.c (extract_compcall_passed_object): Set locus for
3422 passed-object argument.
3423 (extract_ppc_passed_object): Set locus and correctly remove PPC
3426 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
3429 * trans-decl.c (add_argument_checking): Do not use the backend
3430 decl directly to test for the presence of an optional dummy
3431 argument. Use gfc_conv_expr_present, remembering to set the
3435 * trans-decl.c (gfc_generate_function_code): Small white space
3436 changes. If 'recurcheckvar' is NULL do not try to reset it.
3438 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3441 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3442 component for extended types.
3443 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3444 and take care of parent component accessibility.
3446 2010-01-17 Janus Weil <janus@gcc.gnu.org>
3449 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3450 * interface.c (check_interface1): Move a warning message here from
3451 resolve_fl_procedure.
3452 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3453 * module.c (read_module): Remove call to gfc_check_interfaces, since
3454 this comes too early here.
3455 * resolve.c (resolve_fl_procedure): Move warning message to
3458 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3461 * interface.c (check_interface1): Pass symbol name rather than NULL to
3462 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3464 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3465 than NULL to gfc_compare_interfaces.
3467 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3470 * trans-array.c (duplicate_allocatable): Static version of
3471 gfc_duplicate_allocatable with provision to handle scalar
3472 components. New boolean argument to switch off call to malloc
3474 (gfc_duplicate_allocatable): New function to call above with
3476 (gfc_copy_allocatable_data): New function to call above with
3478 (structure_alloc_comps): Do not apply indirect reference to
3479 scalar pointers. Add new section to copy allocatable components
3480 of arrays. Extend copying of allocatable components to include
3482 (gfc_copy_only_alloc_comp): New function to copy allocatable
3483 component derived types, without allocating the base structure.
3484 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3485 Add primitive for gfc_copy_only_alloc_comp.
3486 * trans-expr.c (gfc_conv_procedure_call): After calls to
3487 transformational functions with results that are derived types
3488 with allocatable components, copy the components in the result.
3489 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3490 of lhs derived types before allocation.
3492 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3495 * module.c (load_generic_interfaces): If a procedure that is
3496 use associated but not generic is given an interface that
3497 includes itself, then make it generic.
3499 2010-01-11 Joseph Myers <joseph@codesourcery.com>
3500 Shujing Zhao <pearly.zhao@oracle.com>
3502 PR translation/42469
3503 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3504 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3505 character between option name and help text.
3507 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3511 * trans-array.c (gfc_conv_array_initializer): Change call to
3512 gfc_error_now to call to gfc_fatal_error.
3513 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3514 (is_constant_element): Changed name from constant_element.
3515 (gfc_constant_ac): Only use expand_construuctor for expression
3516 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
3517 call gfc_is_constant_expr.
3518 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
3520 * resolve.c (gfc_is_expandable_expr): New function that determiners if
3521 array expressions should have their constructors expanded.
3522 (gfc_resolve_expr): Use new function to determine whether or not to call
3523 gfc_expand_constructor.
3525 2010-01-09 Tobias Burnus <burnus@net-b.de>
3528 * trans-expr.c (gfc_trans_structure_assign): Handle
3530 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
3531 to the constructor for c_null_(fun)ptr.
3532 * resolve.c (resolve_structure_cons): Add special case
3533 for c_null_(fun)ptr.
3535 2010-01-09 Jakub Jelinek <jakub@redhat.com>
3537 * gfortranspec.c (lang_specific_driver): Update copyright notice
3540 2010-01-08 Tobias Burnus <burnus@net-b.de>
3543 * symbol.c (check_conflict, gfc_copy_attr): Add
3544 ASYNCHRONOUS support.
3545 (gfc_add_asynchronous): New function.
3546 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
3547 (gfc_match_asynchronous): New function.
3548 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
3549 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
3550 (gfc_add_asynchronous): New Prototype.
3551 * module.c (ab_attribute, mio_symbol_attribute): Add
3552 ASYNCHRONOUS support.
3553 * resolve.c (was_declared): Ditto.
3554 * match.h (gfc_match_asynchronous): New prototype.
3555 * parse.c (decode_specification_statement,decode_statement):
3556 Add ASYNCHRONOUS support.
3558 2010-01-07 Tobias Burnus <burnus@net-b.de>
3561 * trans-decl.c (get_proc_pointer_decl): Fix call to
3562 gfc_conv_initializer for array-valued proc-pointer funcs.
3564 2010-01-07 Tobias Burnus <burnus@net-b.de>
3567 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
3568 allocatable scalars with SAVE attribute.
3570 2010-01-05 Tobias Burnus <burnus@net-b.de>
3573 * options.c (gfc_post_options): Set -frecursion
3574 when -fopenmp is used.
3576 2010-01-05 Tobias Burnus <burnus@net-b.de>
3579 * trans-expr.c (gfc_conv_procedure_call): Nullify
3580 return value for allocatable-scalar character functions.
3582 2010-01-04 Tobias Burnus <burnus@net-b.de>
3585 * error.c (error_printf, gfc_warning, gfc_notify_std,
3586 gfc_warning_now, gfc_error, gfc_error_now,
3587 gfc_fatal_error): Change argument name from nocmsgid to
3588 gmsgid to enable (x)gettext's % checking.
3590 2010-01-04 Tobias Burnus <burnus@net-b.de>
3592 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
3594 2010-01-04 Tobias Burnus <burnus@net-b.de>
3597 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
3598 for functions returning allocatable scalars.
3599 * trans-stmt.c (gfc_trans_allocate): Emmit error when
3600 reallocating an allocatable scalar.
3601 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
3603 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
3604 allocatable scalars.
3605 (gfc_generate_function_code): Nullify result variable for
3606 allocatable scalars.
3609 * module.c (gfc_use_module): Fix warning string to allow
3613 * invoke.texi (-fcheck=recursion): Mention that the checking
3614 is also disabled for -frecursive.
3615 * trans-decl.c (gfc_generate_function_code): Disable
3616 -fcheck=recursion when -frecursive is used.
3618 * intrinsic.texi (iso_c_binding): Improve wording.
3621 Copyright (C) 2010 Free Software Foundation, Inc.
3623 Copying and distribution of this file, with or without modification,
3624 are permitted in any medium without royalty provided the copyright
3625 notice and this notice are preserved.