1 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 * resolve.c (resolve_transfer): Traverse operands and set expression
5 to be checked to a non EXPR_OP type.
7 2010-08-19 Janus Weil <janus@gcc.gnu.org>
10 * gfortran.h (gfc_add_save): Modified prototype.
11 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
12 (match_pointer_init): New function to match F08 pointer initialization.
13 (variable_decl,match_procedure_decl,match_ppc_decl): Use
15 (match_attr_spec): Module variables are implicitly SAVE.
16 (gfc_match_save): Modified call to 'gfc_add_save'.
17 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
19 * primary.c (gfc_variable_attr): Handle SAVE attribute.
20 * resolve.c (resolve_structure_cons): Add new argument and do pointer
21 initialization checks.
22 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
23 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
24 (resolve_fl_variable): Handle SAVE_IMPLICIT.
25 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
27 * trans-decl.c (gfc_create_module_variable): Module variables with
28 TARGET can already exist.
29 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
30 (gfc_conv_initializer): Implement non-NULL pointer
33 2010-08-18 Tobias Burnus <burnus@net-b.de>
36 * intrinsic.texi (selected_char_kind): Document ISO_10646
39 2010-08-17 Jakub Jelinek <jakub@redhat.com>
42 * trans-decl.c (build_library_function_decl_1): Chain on
43 void_list_node instead of creating a new TREE_LIST.
44 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
45 * trans-types.c (gfc_get_function_type): Likewise. Set
46 typelist to void_list_node for the main program.
48 2010-08-17 Daniel Kraft <d@domob.eu>
51 * gfortran.h (struct gfc_association_list): New member `where'.
52 (gfc_is_associate_pointer) New method.
53 * match.c (gfc_match_associate): Remember locus for each associate
54 name matched and do not try to set variable flag.
55 * parse.c (parse_associate): Use remembered locus for symbols.
56 * primary.c (match_variable): Instead of variable-flag check for
57 associate names set it for all such names used.
58 * symbol.c (gfc_is_associate_pointer): New method.
59 * resolve.c (resolve_block_construct): Don't generate assignments
60 to give associate-names their values.
61 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
62 (resolve_symbol): Set some more attributes for associate variables,
63 set variable flag here and check it and don't try to build an
64 explicitely shaped array-spec for array associate variables.
65 * trans-expr.c (gfc_conv_variable): Dereference in case of association
67 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
68 (gfc_sym_type): Return pointer type for association to scalar vars.
69 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
70 (trans_associate_var): New method.
71 (gfc_trans_deferred_vars): Handle association symbols.
73 2010-08-16 Joseph Myers <joseph@codesourcery.com>
75 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
77 (MMDX): Change back to MMD. Mark NoDriverArg instead of
79 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
82 2010-08-16 Joseph Myers <joseph@codesourcery.com>
84 * lang.opt (MDX, MMDX): Mark RejectDriver.
86 2010-08-15 Janus Weil <janus@gcc.gnu.org>
88 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
89 vtabs for generics any more).
91 2010-08-15 Daniel Kraft <d@domob.eu>
94 * gfortran.h (gfc_find_proc_namespace): New method.
95 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
96 around with namespace.
97 * symbol.c (gfc_find_proc_namespace): New method.
98 * trans-decl.c (gfc_build_qualified_array): Use it for correct
100 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
101 * parse.c (parse_associate): Removed assignment-generation here...
102 * resolve.c (resolve_block_construct): ...and added it here.
103 (resolve_variable): Handle names that are arrays but were not parsed
104 as such because of association.
105 (resolve_code): Fix BLOCK resolution.
106 (resolve_symbol): Generate array-spec for associate-names.
108 2010-08-15 Tobias Burnus <burnus@net-b.de>
111 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
112 (verify_c_interop): Handle unresolved DT with bind(C).
114 2010-08-15 Tobias Burnus <burnus@net-b.de>
116 * trans-expr.c (gfc_conv_expr_present): Regard nullified
117 pointer arrays as absent.
118 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
119 dummys as absent argument.
120 * interface.c (compare_actual_formal,compare_parameter):
123 2010-08-15 Tobias Burnus <burnus@net-b.de>
125 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
126 dummies with intent(in).
128 2010-08-15 Daniel Kraft <d@domob.eu>
131 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
132 routines not IMPURE also as PURE.
133 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
134 `NO_CLASS' in `CLASS_IMPURE'.
135 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
136 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
137 (add_functions): Ditto.
138 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
139 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
140 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
141 are not ALLOCATABLE and have their INTENT specified.
143 2010-08-13 Daniel Kraft <d@domob.eu>
145 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
146 * array.c (gfc_match_array_spec): Match implied-shape specification and
147 handle AS_IMPLIED_SHAPE correctly otherwise.
148 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
149 (variable_decl): Some checks for implied-shape declaration.
150 * resolve.c (resolve_symbol): Assert that array-spec is no longer
151 AS_IMPLIED_SHAPE in any case.
153 2010-08-12 Joseph Myers <joseph@codesourcery.com>
155 * lang.opt (MD, MMD): Change to MDX and MMDX.
156 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
158 2010-08-11 Janus Weil <janus@gcc.gnu.org>
161 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
163 (check_arglist,check_specific): Add reference to 'name' field.
164 (init_arglist): Remove reference to 'name' field.
165 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
166 * check.c (variable_check): Reverse order of checks. Respect intent of
168 (int_or_proc_check): New function.
169 (coarray_check): New function.
170 (allocatable_check): New function.
171 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
172 (gfc_check_complex): Use 'int_or_real_check'.
173 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
174 gfc_check_ucobound): Use 'coarray_check'.
175 (gfc_check_pack): Use 'real_or_complex_check'.
176 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
178 (scalar_check,type_check,numeric_check,int_or_real_check,
179 real_or_complex_check,kind_check,double_check,logical_array_check,
180 array_check,same_type_check,rank_check,nonoptional_check,
181 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
182 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
183 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
184 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
185 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
186 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
187 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
190 2010-08-10 Daniel Kraft <d@domob.eu>
192 * gfortran.texi (Interoperability with C): Fix ordering in menu
193 and add new subsection about pointers.
194 (Interoperable Subroutines and Functions): Split off the pointer part.
195 (working with Pointers): New subsection with extended discussion
196 of pointers (especially procedure pointers).
198 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
201 * array.c (gfc_ref_dimen_size): Add end argument.
202 If end is non-NULL, calculate it.
203 (ref_size): Adjust call to gfc_ref_dimen_size.
204 (gfc_array_dimen_size): Likewise.
205 (gfc_array_res_shape): Likewise.
206 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
207 * resolve.c (resolve_array_ref): For stride not equal to -1,
208 fill in the lowest possible end.
210 2010-08-09 Janus Weil <janus@gcc.gnu.org>
212 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
214 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
216 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
218 (check_some_aliasing): Likewise.
219 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
220 (gfc_conv_intrinsic_int): Likewise.
221 (gfc_conv_intrinsic_lib_function): Likewise.
222 (gfc_conv_intrinsic_cmplx): Likewise.
223 (gfc_conv_intrinsic_ctime): Likewise.
224 (gfc_conv_intrinsic_fdate): Likewise.
225 (gfc_conv_intrinsic_ttynam): Likewise.
226 (gfc_conv_intrinsic_minmax): Likewise.
227 (gfc_conv_intrinsic_minmax_char): Likewise.
228 (gfc_conv_intrinsic_ishftc): Likewise.
229 (gfc_conv_intrinsic_index_scan_verify): Likewise.
230 (gfc_conv_intrinsic_merge): Likewise.
231 (gfc_conv_intrinsic_trim): Likewise.
232 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
234 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
237 * dependency.c (check_section_vs_section): Handle cases where
238 the start expression coincides with the lower or upper
241 2010-08-04 Janus Weil <janus@gcc.gnu.org>
246 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
247 container types. Do not artificially increase refs. Commit symbols one
249 * interface.c (compare_parameter): Make sure vtabs are present before
250 generating module variables.
251 * resolve.c (resolve_allocate_expr): Ditto.
253 2010-08-04 Tobias Burnus <burnus@net-b.de>
257 * resolve.c (resolve_structure_cons): Fix
260 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
264 * symbol.c (changed_syms): Made static again.
265 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
266 Changed conditional internal error into assert.
267 Rename function to ...
268 (gfc_enforce_clean_symbol_state): ... this.
269 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
270 Rename the former to the latter.
271 * parse.c (decode_statement, decode_omp_directive,
272 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
274 (changed_syms): Remove declaration.
275 (next_statement): Use gfc_enforce_clean_symbol_state.
277 2010-08-04 Tobias Burnus <burnus@net-b.de>
280 * resolve.c (resolve_structure_cons): Fix handling of
281 initialization structure constructors with character
282 elements of the wrong length.
283 * array.c (gfc_check_iter_variable): Add NULL check.
284 (gfc_resolve_character_array_constructor): Also truncate
287 2010-08-04 Tobias Burnus <burnus@net-b.de>
289 * trans-io.c (gfc_build_io_library_fndecls): Fix return
290 value of some libgfortran functions.
292 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
295 * dependency.c (gfc_deb_compare_expr): Remove any integer
296 conversion functions to larger types from both arguments.
297 Remove handling these functions futher down.
299 2010-08-03 Janus Weil <janus@gcc.gnu.org>
303 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
304 * resolve.c (resolve_tb_generic_targets): Check for errors.
306 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
309 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
312 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
315 * dependency.h: Add prototype for gfc_are_identical_variables.
316 * frontend-passes.c: Include depencency.h.
317 (optimimize_equality): Use gfc_are_identical_variables.
318 * dependency.c (identical_array_ref): New function.
319 (gfc_are_identical_variables): New function.
320 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
321 * dependency.c (gfc_check_section_vs_section). Rename gfc_
322 prefix from statc function.
323 (check_section_vs_section): Change arguments to gfc_array_ref,
324 adjust function body accordingly.
326 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
327 Janus Weil <janus@gcc.gnu.org>
332 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
333 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
334 gfc_copy_formal_args, gfc_copy_formal_args_intr,
335 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
336 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
337 Call reject_statement in case of error.
338 (match_deferred_characteritics): Call gfc_undo_symbols in case match
341 2010-08-01 Janus Weil <janus@gcc.gnu.org>
344 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
345 (gfc_find_derived_vtab): Make vtabs and vtypes public.
346 * module.c (read_module): When reading module files, always import
347 vtab and vtype symbols.
349 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
353 * symbol.c (changed_syms): Made non-static.
354 * parse.c (changed_syms): Declare new external.
355 (next_statement): Assert changed_syms is NULL at the beginning.
357 2010-07-30 Janus Weil <janus@gcc.gnu.org>
358 Steven G. Kargl <kargl@gcc.gnu.org>
361 * match.c (match_type_spec): Try to parse derived types before
364 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
366 * gfortran.h (gfc_release_symbol): New prototype.
367 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
368 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
369 Use gfc_release_symbol.
370 * parse.c (gfc_fixup_sibling_symbols): Ditto.
371 * resolve.c (resolve_symbol): Ditto.
373 2010-07-29 Tobias Burnus <burnus@net-b.de>
377 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
378 external procedure declarations in modules.
379 (gfc_get_symbol_decl): Modify assert.
381 2010-07-29 Janus Weil <janus@gcc.gnu.org>
384 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
386 2010-07-29 Janus Weil <janus@gcc.gnu.org>
389 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
390 (gfc_trans_class_assign): Modified prototype.
391 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
392 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
393 (gfc_trans_class_assign): ... here. Modified actual arguments.
394 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
395 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
396 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
398 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
402 * class.c (gfc_find_derived_vtab): Accept or discard newly created
403 symbols before returning.
405 2010-07-29 Joseph Myers <joseph@codesourcery.com>
407 * lang.opt (cpp): Remove Joined and Separate markers.
408 (cpp=): New internal option.
409 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
410 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
413 2010-07-29 Daniel Kraft <d@domob.eu>
416 * array.c (resolve_array_bound): Fix error message to properly handle
417 non-variable expressions.
419 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
421 * decl.c (free_value): Also free repeat field.
422 * data.c (gfc_assign_data_value): Always free offset before returning.
424 2010-07-28 Daniel Kraft <d@domob.eu>
426 * gfortran.h (gfc_build_intrinsic_call): New method.
427 * expr.c (gfc_build_intrinsic_call): New method.
428 * simplify.c (range_check): Ignore non-constant value.
429 (simplify_bound_dim): Handle non-variable expressions and
430 fix memory leak with non-free'ed expression.
431 (simplify_bound): Handle non-variable expressions.
432 (gfc_simplify_shape): Ditto.
433 (gfc_simplify_size): Ditto, but only in certain cases possible.
435 2010-07-28 Joseph Myers <joseph@codesourcery.com>
437 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
440 2010-07-28 Tobias Burnus <burnus@net-b.de>
443 * trans-types.c (gfc_get_derived_type): Fix DT declaration
444 from modules for whole-file mode.
446 2010-07-27 Joseph Myers <joseph@codesourcery.com>
448 * gfortran.h (gfc_handle_option): Update prototype and return
450 * options.c (gfc_handle_option): Update prototype and return value
453 2010-07-27 Joseph Myers <joseph@codesourcery.com>
455 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
456 decoded options in allocating deferred_opt.
457 * cpp.h (gfc_cpp_init_options): Update prototype.
458 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
459 * gfortran.h (gfc_option_lang_mask): New.
460 (gfc_init_options): Update prototype.
461 * options.c (gfc_option_lang_mask): New.
462 (gfc_init_options): Update prototype. Pass new arguments to
463 gfc_cpp_init_options.
465 2010-07-26 Tobias Burnus <burnus@net-b.de>
468 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
469 for functions which are later in the same file.
470 (gfc_create_function_decl, build_function_decl,
471 build_entry_thunks): Add global argument.
472 * trans.c (gfc_generate_module_code): Update
473 gfc_create_function_decl call.
474 * trans.h (gfc_create_function_decl): Update prototype.
475 * resolve.c (resolve_global_procedure): Also resolve for
478 2010-07-26 Richard Henderson <rth@redhat.com>
481 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
482 (gfc_write_global_declarations): New.
484 2010-07-26 Tobias Burnus <burnus@net-b.de>
487 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
488 for call to transfer_namelist_element.
489 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
492 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
495 * Make-lang.in: Add fortran/frontend-passes.o.
496 * gfortran.h: Add prototype for gfc_run_passes.
497 * resolve.c (gfc_resolve): Call gfc_run_passes.
498 * frontend-passes.c: New file.
500 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
503 * scanner.c (gfc_next_char_literal): Enable truncation warning for
506 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
509 * gfortran.h (gfc_namespace): New field old_equiv.
510 (gfc_free_equiv_until): New prototype.
511 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
512 a parameterized stop condition.
513 (gfc_free_equiv): Use gfc_free_equiv_until.
514 * parse.c (next_statement): Save equivalence list.
515 (reject_statement): Restore equivalence list.
517 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
520 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
521 in the function so that it does not get missed by early exits.
522 (load_line): Add checks for quoted strings and free form comments to
523 disable warnings on comments. Add check for ampersand as first
524 character after truncation and don't warn for this case, but warn if
525 there are subsequent non-whitespace characters.
527 2010-07-24 Tobias Burnus <burnus@net-b.de>
530 * parse.c (gfc_parse_file): Do not override
531 gfc_global_ns_list items.
533 2010-07-24 Tobias Burnus <burnus@net-b.de>
535 * options.c (gfc_init_options): Enable -fwhole-file by default.
536 * interface.c (compare_parameter): Assume a Hollerith constant is
537 compatible with all other argument types.
539 2010-07-23 Tobias Burnus <burnus@net-b.de>
542 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
543 -fwhole-file also for derived types.
544 * trans-types.c (copy_dt_decls_ifequal): Remove static and
545 rename to gfc_copy_dt_decls_ifequal.
546 (gfc_get_derived_type): Update call.
547 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
549 2010-07-23 Tobias Burnus <burnus@net-b.de>
552 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
554 2010-07-23 Jakub Jelinek <jakub@redhat.com>
556 * trans-types.c (gfc_get_array_descriptor_base,
557 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
558 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
559 instead of clearing DECL_NAME.
560 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
562 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
565 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
567 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
568 reverse the scalarization loop.
569 gfc_conv_resolve_dependencies: Pass the reverse field of the
570 loopinfo to gfc_dep_resolver.
571 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
572 assignment by resetting loop.reverse.
573 gfortran.h : Add the gfc_reverse enum.
574 trans.h : Add the reverse field to gfc_loopinfo.
575 dependency.c (gfc_check_dependency): Pass null to the new arg
577 (gfc_check_section_vs_section): Check for reverse dependencies.
578 (gfc_dep_resolver): Add reverse argument and deal with the loop
580 dependency.h : Modify prototype for gfc_dep_resolver to include
583 2010-07-23 Daniel Kraft <d@domob.eu>
586 * gfortran.h (gfc_find_symtree_in_proc): New method.
587 * symbol.c (gfc_find_symtree_in_proc): New method.
588 * match.c (match_exit_cycle): Look for loop name also in parent
589 namespaces within current procedure.
591 2010-07-22 Tobias Burnus <burnus@net-b.de>
594 * dependency.c (gfc_check_dependency): Add argument alising check.
595 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
597 2010-07-22 Daniel Kraft <d@domob.eu>
599 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
600 now in the correct place.
602 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
605 * Revert my commit r162325.
607 2010-07-21 Daniel Kraft <d@domob.eu>
609 * trans.h (gfc_get_return_label): Removed.
610 (gfc_generate_return): New method.
611 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
612 returning a tree directly.
613 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
614 (gfc_trans_block_construct): Update for new interface to
615 `gfc_trans_deferred_vars'.
616 * trans-decl.c (current_function_return_label): Removed.
617 (current_procedure_symbol): New variable.
618 (gfc_get_return_label): Removed.
619 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
620 returning a tree directly.
621 (get_proc_result), (gfc_generate_return): New methods.
622 (gfc_generate_function_code): Clean up and do init/cleanup here
623 also with gfc_wrapped_block. Remove return-label but rather
626 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
629 * fortran/match.c (match_type_spec): Check for derived type before
632 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
635 * interface.c (matching_typebound_op): Add argument for the
636 return of the generic name for the procedure.
637 (build_compcall_for_operator): Add an argument for the generic
638 name of an operator procedure and supply it to the expression.
639 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
640 calls to the above procedures.
641 * resolve.c (resolve_typebound_function): Catch procedure
642 component calls for CLASS objects, check that the vtable is
643 complete and insert the $vptr and procedure components, to make
645 (resolve_typebound_function): The same.
646 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
647 an allocatable scalar if it is a result.
649 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
652 * match.c (gfc_match_iterator): Reverted.
654 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
657 * match.c (gfc_match_iterator): Remove error that iterator
658 cannot be INTENT(IN).
660 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
662 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
663 Access subscript through the "dim" field index.
664 (gfc_trans_create_temp_array): Access ss info through the "dim" field
666 (gfc_conv_array_index_offset): Ditto.
667 (gfc_conv_loop_setup): Ditto.
668 (gfc_conv_expr_descriptor): Ditto.
669 (gfc_conv_ss_startstride): Ditto. Update call to
670 gfc_conv_section_startstride.
671 (gfc_conv_section_startstride): Set values along the array dimension.
672 Get array dimension directly from the argument.
674 2010-07-15 Jakub Jelinek <jakub@redhat.com>
676 * trans.h (gfc_string_to_single_character): New prototype.
677 * trans-expr.c (string_to_single_character): Renamed to ...
678 (gfc_string_to_single_character): ... this. No longer static.
679 (gfc_conv_scalar_char_value, gfc_build_compare_string,
680 gfc_trans_string_copy): Adjust callers.
681 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
682 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
683 (select_struct): Move to toplevel, add GTY(()).
684 (gfc_trans_character_select): Optimize SELECT CASE
685 with character length 1.
687 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
689 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
690 * trans-common.c: Likewise.
691 * trans-decl.c: Likewise.
692 * trans-types.c: Likewise.
695 2010-07-15 Janus Weil <janus@gcc.gnu.org>
698 * resolve.c (resolve_typebound_generic_call): Resolve generic
699 non-polymorphic type-bound procedure calls to the correct specific
701 (resolve_typebound_subroutine): Remove superfluous code.
703 2010-07-15 Daniel Kraft <d@domob.eu>
706 * trans.h (struct gfc_wrapped_block): New struct.
707 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
708 (gfc_finish_wrapped_block): New method.
709 (gfc_init_default_dt): Add new init code to block rather than
711 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
712 (gfc_trans_dummy_array_bias): Ditto.
713 (gfc_trans_g77_array): Ditto.
714 (gfc_trans_deferred_array): Ditto.
715 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
716 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
717 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
718 (gfc_finish_wrapped_block): New method.
719 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
720 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
721 (gfc_trans_deferred_array): Ditto.
722 * trans-decl.c (gfc_trans_dummy_character): Ditto.
723 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
724 (init_intent_out_dt): Ditto.
725 (gfc_init_default_dt): Add new init code to block rather than
727 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
728 and cleanup code and put it all together.
730 2010-07-15 Jakub Jelinek <jakub@redhat.com>
732 * trans.h (gfc_build_compare_string): Add CODE argument.
733 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
734 gfc_build_compare_string.
735 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
736 gfc_build_compare_string.
737 (string_to_single_character): Rename len variable to length.
738 (gfc_optimize_len_trim): New function.
739 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
740 or NE_EXPR and one of the strings is string literal with LEN_TRIM
741 bigger than the length of the other string, they compare unequal.
744 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
745 in CASE_LABEL_EXPR and use NULL for low for the default case.
747 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
749 * trans-array.c (gfc_conv_section_upper_bound): Remove
750 (gfc_conv_section_startstride): Don't set the upper bound in the
751 vector subscript case.
752 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
754 2010-07-14 Janus Weil <janus@gcc.gnu.org>
757 * gfortran.h (gfc_is_data_pointer): Remove prototype.
758 * dependency.c (gfc_is_data_pointer): Make it static.
759 * intrinsic.texi: Update documentation on C_LOC.
760 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
761 and add a check for polymorphic variables.
763 2010-07-14 Jakub Jelinek <jakub@redhat.com>
765 * trans-expr.c (string_to_single_character): Also optimize
766 string literals containing a single char followed only by spaces.
767 (gfc_trans_string_copy): Remove redundant string_to_single_character
770 * trans-decl.c (gfc_build_intrinsic_function_decls,
771 gfc_build_builtin_function_decls): Mark functions as
772 DECL_PURE_P or TREE_READONLY.
774 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
776 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
777 instead of build_function_call_expr.
778 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
780 2010-07-13 Tobias Burnus <burnus@net-b.de>
781 Daniel Franke <franke.daniel@gmail.com>
784 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
785 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
787 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
789 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
790 Tobias Burnus <burnus@net-b.de>
793 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
794 noclobber/noescape annotations to function calls.
795 (gfc_build_builtin_function_decls): Likewise.
797 2010-07-13 Janus Weil <janus@gcc.gnu.org>
803 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
804 * class.c (gfc_build_class_symbol): Modified call to
805 'gfc_find_derived_vtab'.
806 (add_proc_component): Removed, moved code into 'add_proc_comp'.
807 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
809 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
810 Removed treatment of generics.
811 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
812 Call 'add_proc_comp' instead of duplicating code.
813 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
815 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
816 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
817 Removed treatment of generics.
818 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
819 'gfc_find_derived_vtab'.
820 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
821 Removed treatment of generics.
822 (resolve_select_type,resolve_fl_derived): Modified call to
823 'gfc_find_derived_vtab'.
824 * trans-decl.c (gfc_get_symbol_decl): Ditto.
825 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
827 * trans-stmt.c (gfc_trans_allocate): Ditto.
829 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
832 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
835 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
837 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
838 * resolve.c (build_default_init_expr): Ditto.
840 2010-07-11 Tobias Burnus <burnus@net-b.de>
843 * module.c (sort_iso_c_rename_list): Remove.
844 (import_iso_c_binding_module,use_iso_fortran_env_module):
845 Allow multiple imports of the same symbol.
847 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
849 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
851 2010-07-11 Janus Weil <janus@gcc.gnu.org>
854 * decl.c (build_sym,attr_decl1): Only build the class container if the
855 symbol has sufficient attributes.
856 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
857 pointer attribute for classes.
858 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
859 * module.c (MOD_VERSION): Bump.
860 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
861 (mio_symbol_attribute): Handle class_pointer attribute.
862 * parse.c (parse_derived): Use class_pointer instead of pointer
863 attribute for classes.
864 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
865 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
866 resolve_allocate_expr,resolve_fl_derived): Ditto.
867 (resolve_fl_var_and_proc): Check for class_ok attribute.
869 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
871 * trans-io.c (gfc_build_st_parameter): Update calls to
872 gfc_add_field_to_struct.
873 * trans-stmt.c (ADD_FIELD): Ditto.
875 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
877 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
878 fieldlist, remove fieldlist from argument list.
879 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
880 and remove fieldlist from argument list.
881 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
882 gfc_get_mixed_entry_union): Move setting
883 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
884 * trans-types.h (gfc_add_field_to_struct): Update prototype.
886 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
889 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
890 if the lhs has never been host associated, as well as not being
891 use associated, a pointer or a target.
892 * resolve.c (resolve_variable): Mark variables that are host
894 * gfortran.h: Add the host_assoc bit to the symbol_attribute
897 2010-07-09 Janus Weil <janus@gcc.gnu.org>
899 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
900 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
903 2010-07-08 Janus Weil <janus@gcc.gnu.org>
906 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
907 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
908 gfc_resolve_storage_size): New prototypes.
909 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
910 * intrinsic.c (add_functions): Add STORAGE_SIZE.
911 * iresolve.c (gfc_resolve_storage_size): New function.
912 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
914 (gfc_conv_intrinsic_storage_size): New function.
915 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
917 2010-07-08 Jakub Jelinek <jakub@redhat.com>
920 * match.c (match_exit_cycle): Error on EXIT also from collapsed
921 !$omp do loops. Error on CYCLE to non-innermost collapsed
924 2010-07-08 Tobias Burnus <burnus@net-b.de>
927 * array.c (gfc_match_array_ref): Better error message for
928 coarrays with too few ranks.
929 (match_subscript): Move one diagnostic to caller.
930 * gfortran.h (gfc_get_corank): Add prottype.
931 * expr.c (gfc_get_corank): New function.
932 * iresolve.c (resolve_bound): Fix rank for cobounds.
933 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
934 gfc_resolve_ucobound, gfc_resolve_this_image): Update
937 2010-07-06 Tobias Burnus <burnus@net-b.de>
940 * array.c (gfc_expand_constructor): Add optional diagnostic.
941 * gfortran.h (gfc_expand_constructor): Update prototype.
942 * expr.c (gfc_simplify_expr, check_init_expr,
943 gfc_reduce_init_expr): Update gfc_expand_constructor call.
944 * resolve.c (gfc_resolve_expr): Ditto.
946 2010-07-06 Tobias Burnus <burnus@net-b.de>
948 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
949 * trans-intrinsic.c: Ditto.
950 * trans-types.c: Ditto.
951 * convert.c: Include diagnostic-core.h instead of toplev.h.
953 * trans-array.c: Ditto.
954 * trans-const.c: Ditto.
955 * trans-expr.c: Ditto.
957 * trans-openmp.c: Ditto.
960 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
963 * check.c (dim_rank_check): Also check intrinsic functions.
964 Adjust permissible rank for functions which reduce the rank of
965 their argument. Spread is an exception, where DIM can
966 be one larger than the rank of array.
968 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
971 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
973 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
976 * trans-types.c (gfc_get_derived_type): Derived type fields
977 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
978 but build_pointer_type_for_mode must be used for this.
980 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
982 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
983 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
984 type of gfc_conv_procedure_call.
985 (conv_generic_with_optional_char_arg): Likewise.
986 * trans-stmt.c (gfc_trans_call): Likewise.
987 * trans-expr.c (gfc_conv_function_expr): Likewise.
988 (gfc_conv_procedure_call): Use build_call_vec instead of
991 2010-07-04 Daniel Kraft <d@domob.eu>
993 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
995 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
999 * trans-types.c (gfc_get_derived_type): Derived type fields
1000 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
1002 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
1005 * decl.c (match_procedure_in_type): Clear structure before using.
1006 (gfc_match_generic): Ditto.
1008 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
1010 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
1011 * trans-types.c (gfc_add_field_to_struct_1): New function, most
1012 of which comes from...
1013 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
1014 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
1016 (gfc_get_array_descriptor_base): Likewise.
1017 (gfc_get_mixed_entry_union): Likewise.
1018 (gfc_get_derived_type): Add extra chain parameter for
1019 gfc_add_field_to_struct.
1020 * trans-stmt.c (gfc_trans_character_select): Likewise.
1021 * trans-io.c (gfc_build_st_parameter): Likewise.
1023 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1026 * resolve.c (is_external_proc): Prevent procedure pointers from being
1027 regarded as external procedures.
1029 2010-06-29 Janus Weil <janus@gcc.gnu.org>
1032 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
1033 passed as second argument of ASSOCIATED.
1035 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
1038 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
1039 to determine if a function assignment can be made without a
1041 (gfc_trans_arrayfunc_assign): Move all the conditions that
1042 suppress the direct function call to the above new functon and
1045 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
1048 * interface.c (argument_rank_mismatch): New function.
1049 (compare_parameter): Call new function instead of generating
1052 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
1054 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
1055 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
1058 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1060 * Make-lang.in: Update dependencies.
1062 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
1064 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
1065 and exit_label fields.
1066 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
1068 * trans-stmt.c (gfc_trans_simple_do): Likewise.
1069 (gfc_trans_do): Likewise.
1070 (gfc_trans_do_while): Likewise.
1071 (gfc_trans_cycle): Use cycle_label directly.
1072 (gfc_trans_exit): Use exit_label directly.
1074 2010-06-27 Daniel Kraft <d@domob.eu>
1076 * dump-parse-tree.c (show_symbol): Dump target-expression for
1078 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
1079 (show_namespace): Use show_level for correct indentation of
1080 "inner namespaces" (contained procedures or BLOCK).
1082 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1085 * dump-parse-tree.c (show_code_node): Show namespace for
1088 2010-06-26 Tobias Burnus <burnus@net-b.de>
1090 * decl.c (gfc_match_decl_type_spec): Support
1091 TYPE(intrinsic-type-spec).
1093 2010-06-25 Tobias Burnus <burnus@net-b.de>
1095 * intrinsic.h (gfc_check_selected_real_kind,
1096 gfc_simplify_selected_real_kind): Update prototypes.
1097 * intrinsic.c (add_functions): Add radix support to
1099 * check.c (gfc_check_selected_real_kind): Ditto.
1100 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
1101 * trans-decl.c (gfc_build_intrinsic_function_decls):
1102 Change call from selected_real_kind to selected_real_kind2008.
1103 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
1104 (PRECISION, RANGE, RADIX): Add cross @refs.
1106 2010-06-25 Tobias Burnus <burnus@net-b.de>
1108 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
1109 * gfortran.texi (_gfortran_set_options): Update for
1110 GFC_STD_F2008_OBS addition.
1111 * libgfortran.h: Add GFC_STD_F2008_OBS.
1112 * options.c (set_default_std_flags, gfc_handle_option): Handle
1114 io.c (check_format): Fix allow_std check.
1116 2010-06-25 Tobias Burnus <burnus@net-b.de>
1118 * decl.c (gfc_match_entry): Allow END besides
1119 END SUBROUTINE/END FUNCTION for contained procedures.
1121 2010-06-25 Tobias Burnus <burnus@net-b.de>
1123 * parse.c (next_free, next_fixed): Allow ";" as first character.
1125 2010-06-24 Tobias Burnus <burnus@net-b.de>
1128 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
1130 2010-06-22 Janus Weil <janus@gcc.gnu.org>
1133 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
1136 2010-06-21 Tobias Burnus <burnus@net-b.de>
1139 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
1141 * symbol.c (gfc_add_contiguous): New function.
1142 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
1143 * decl.c (match_attr_spec): Ditto.
1144 (gfc_match_contiguous): New function.
1145 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
1147 * gfortran.h (symbol_attribute): Add contiguous.
1148 (gfc_is_simply_contiguous): Add prototype.
1149 (gfc_add_contiguous): Add prototype.
1150 * match.h (gfc_match_contiguous): Add prototype.
1151 * parse.c (decode_specification_statement,
1152 decode_statement): Handle contiguous attribute.
1153 * expr.c (gfc_is_simply_contiguous): New function.
1154 * dump-parse-tree.c (show_attr): Handle contiguous.
1155 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
1157 * trans-expr.c (gfc_add_interface_mapping): Copy
1159 * trans-array.c (gfc_conv_descriptor_stride_get,
1160 gfc_conv_array_parameter): Handle contiguous arrays.
1161 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
1162 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
1164 * trans.h (gfc_array_kind): Ditto.
1165 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1167 2010-06-20 Joseph Myers <joseph@codesourcery.com>
1169 * options.c (gfc_handle_option): Don't handle N_OPTS.
1171 2010-06-19 Janus Weil <janus@gcc.gnu.org>
1174 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
1177 2010-06-18 Tobias Burnus <burnus@net-b.de>
1180 * resolve.c (resolve_allocate_deallocate): Properly check
1181 part-refs in stat=/errmsg= for invalid use.
1183 2010-06-17 Janus Weil <janus@gcc.gnu.org>
1186 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1187 Return directly in case of an error.
1189 2010-06-16 Janus Weil <janus@gcc.gnu.org>
1192 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
1193 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
1194 structure to each procedure in a procedure list.
1195 * module.c (mio_typebound_proc): Add NULL argument to
1196 'gfc_get_typebound_proc'.
1197 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
1198 to initialize the new structure.
1200 2010-06-15 Janus Weil <janus@gcc.gnu.org>
1203 * gfortran.h (gfc_expr): Add new member 'mold'.
1204 * match.c (gfc_match_allocate): Implement the MOLD tag.
1205 * resolve.c (resolve_allocate_expr): Ditto.
1206 * trans-stmt.c (gfc_trans_allocate): Ditto.
1208 2010-06-15 Jakub Jelinek <jakub@redhat.com>
1211 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
1212 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
1213 GFC_DECL_SAVED_DESCRIPTOR set.
1214 (gfc_omp_report_decl): New function.
1215 * trans.h (gfc_omp_report_decl): New prototype.
1216 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
1218 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
1222 * gfortranspec.c (lang_specific_driver): Removed deprecation
1224 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
1225 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
1226 * cpp.h (gfc_cpp_makedep): New.
1227 (gfc_cpp_add_dep): New.
1228 (gfc_cpp_add_target): New.
1229 * cpp.c (gfc_cpp_option): Add deps* members.
1230 (gfc_cpp_makedep): New.
1231 (gfc_cpp_add_dep): New.
1232 (gfc_cpp_add_target): New.
1233 (gfc_cpp_init_options): Initialize new options.
1234 (gfc_cpp_handle_option): Handle new options.
1235 (gfc_cpp_post_options): Map new options to libcpp-options.
1236 (gfc_cpp_init): Handle deferred -MQ and -MT options.
1237 (gfc_cpp_done): If requested, write dependencies to file.
1238 * module.c (gfc_dump_module): Add a module filename as target.
1239 * scanner.c (open_included_file): New parameter system; add the
1240 included file as dependency.
1241 (gfc_open_included_file): Add the included file as dependency.
1242 (gfc_open_intrinsic_module): Likewise.
1243 * invoke.texi: Removed deprecation warning for -M.
1244 * gfortran.texi: Removed Makefile-dependencies project.
1246 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
1248 * resolve.c (resolve_global_procedure): Improved checking if an
1249 explicit interface is required.
1251 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1253 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
1255 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
1256 (gfc_conv_intrinsic_ttynam): Likewise.
1257 (gfc_conv_intrinsic_trim): Likewise.
1259 2010-06-12 Janus Weil <janus@gcc.gnu.org>
1262 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
1264 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1266 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
1268 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1270 * mathbuiltins.def: Add builtins that do not directly correspond
1271 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
1272 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
1273 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
1274 code_{r,c}{4,8,10,16} fields. Add
1275 {,complex}{float,double,long_double}_built_in fields.
1276 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
1277 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
1278 definition of OTHER_BUILTIN.
1279 (real_compnt_info): Remove unused struct.
1280 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
1282 (build_round_expr): Call builtin_decl_for_precision instead of
1284 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
1285 instead of a switch.
1286 (gfc_build_intrinsic_lib_fndecls): Match
1287 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
1288 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
1290 (gfc_conv_intrinsic_lib_function): Go through all the extended
1292 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
1293 instead of a switch.
1294 (gfc_conv_intrinsic_abs): Likewise.
1295 (gfc_conv_intrinsic_mod): Likewise.
1296 (gfc_conv_intrinsic_sign): Likewise.
1297 (gfc_conv_intrinsic_fraction): Likewise.
1298 (gfc_conv_intrinsic_nearest): Likewise.
1299 (gfc_conv_intrinsic_spacing): Likewise.
1300 (gfc_conv_intrinsic_rrspacing): Likewise.
1301 (gfc_conv_intrinsic_scale): Likewise.
1302 (gfc_conv_intrinsic_set_exponent): Likewise.
1304 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
1308 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
1309 functions with CLASS formal arguments.
1311 2010-06-10 Janus Weil <janus@gcc.gnu.org>
1314 * resolve.c (conformable_arrays): Handle allocatable components.
1316 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1319 * gfortran.texi: Document that Cray pointers cannot be function
1322 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1325 * gfortran.texi: Document lack of support for syntax
1326 "complex FUNCTION name*16()", and existence of alternative
1327 legacy syntax "complex*16 FUNCTION name()".
1329 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1332 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
1333 POSIX's fsync(), and how to call the latter from Fortran code.
1335 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
1338 * interface.c (compare_actual_formal): Reject actual arguments with
1339 array subscript passed to ASYNCHRONOUS dummys.
1341 2010-06-10 Daniel Kraft <d@domob.eu>
1344 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
1345 (struct gfc_symbol): New field `assoc'.
1346 (struct gfc_association_list): New struct.
1347 (struct gfc_code): New struct `block' in union, move `ns' there
1348 and add association list.
1349 (gfc_free_association_list): New method.
1350 (gfc_has_vector_subscript): Made public;
1351 * match.h (gfc_match_associate): New method.
1352 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
1353 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
1354 * interface.c (gfc_has_vector_subscript): Made public.
1355 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
1356 * match.c (gfc_match_associate): New method.
1357 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
1358 * primary.c (match_variable): Don't allow names associated to expr here.
1359 * parse.c (decode_statement): Try matching ASSOCIATE statement.
1360 (case_exec_markers, case_end): Add ASSOCIATE statement.
1361 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
1362 (parse_associate): New method.
1363 (parse_executable): Handle ST_ASSOCIATE.
1364 (parse_block_construct): Change reference to gfc_code's `ns' field.
1365 * resolve.c (resolve_select_type): Ditto.
1366 (resolve_code): Ditto.
1367 (resolve_block_construct): Ditto and add comment.
1368 (resolve_select_type): Set association list in generated BLOCK to NULL.
1369 (resolve_symbol): Resolve associate names.
1370 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
1371 and free association list.
1372 (gfc_free_association_list): New method.
1373 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
1374 * trans-stmt.c (gfc_trans_block_construct): Change reference to
1375 gfc_code's `ns' field.
1377 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
1379 * error.c (error_print): Pre-initialize loc by NULL.
1380 * openmp.c (resolve_omp_clauses): Add explicit
1381 braces to avoid ambigous else.
1382 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
1384 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
1386 * gfc-internals.texi: Move to GFDL 1.3.
1387 * gfortran.texi: Ditto.
1388 * intrinsic.texi: Ditto.
1389 * invoke.texi: Ditto.
1391 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1394 * check.c (gfc_check_selected_real_kind): Verify that the
1395 actual arguments are scalar.
1397 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
1400 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
1402 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1405 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
1407 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1409 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
1411 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1413 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
1414 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
1415 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
1416 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
1418 * fortran/check.c (nonnegative_check, less_than_bitsize1,
1419 less_than_bitsize2): New functions.
1420 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
1421 nonnegative_check and less_than_bitsize1.
1422 (gfc_check_ibclr, gfc_check_ibset): Removed.
1423 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
1426 2010-06-09 Janus Weil <janus@gcc.gnu.org>
1429 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1432 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
1434 * resolve.c (resolve_deallocate_expr): Avoid warning
1435 about possible use of iunitialized sym.
1436 (resolve_allocate_expr): Pre-initialize sym by NULL.
1438 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1441 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
1443 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1445 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
1447 (gfc_get_array_type_bounds): Likewise.
1449 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
1450 (gfc_find_module): Likewise.
1452 * f95-lang.c (pushlevel): Likewise.
1454 * trans.h (struct lang_type): Add variable_size GTY option.
1455 (struct lang_decl): Likewise.
1457 2010-06-08 Tobias Burnus <burnus@net-b.de>
1460 * symbol.c (check_conflict): Move protected--external/procedure check ...
1461 * resolve.c (resolve_select_type): ... to the resolution stage.
1463 2010-06-07 Tobias Burnus <burnus@net-b.de>
1465 * options.c (gfc_handle_option): Fix -fno-recursive.
1467 2010-06-07 Tobias Burnus <burnus@net-b.de>
1469 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
1470 * gfortran.texi (copyrights-gfortran): Ditto.
1472 2010-06-07 Joseph Myers <joseph@codesourcery.com>
1474 * lang.opt (fshort-enums): Define using Var and VarExists.
1475 * options.c (gfc_handle_option): Don't set flag_short_enums here.
1477 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1478 Janus Weil <janus@gcc.gnu.org>
1481 * resolve.c (get_declared_from_expr): Move to before
1482 resolve_typebound_generic_call. Make new_ref and class_ref
1483 ignorable if set to NULL.
1484 (resolve_typebound_generic_call): Once we have resolved the
1485 generic call, check that the specific instance is that which
1486 is bound to the declared type.
1487 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
1488 freeing 'class_ref->next' twice.
1490 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
1493 * trans-array.c (structure_alloc_comps): Dereference scalar
1494 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
1497 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1499 * gfortranspec.c (append_arg, lang_specific_driver): Use
1500 GCC-specific formats in diagnostics.
1502 2010-06-02 Tobias Burnus <burnus@net-b.de>
1505 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
1508 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1511 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
1514 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
1516 * fortran/gfortran.texi: Fix typos in description of variable-format-
1519 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1522 * dependency.c (gfc_check_section_vs_section): Check
1523 for interleaving array assignments without conflicts.
1525 2010-05-30 Janus Weil <janus@gcc.gnu.org>
1527 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
1528 $data component of a class container.
1529 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
1530 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
1531 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
1532 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
1533 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
1534 * gcc/fortran/parse.c (parse_derived): Ditto.
1535 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
1536 gfc_expr_attr): Ditto.
1537 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
1538 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
1539 resolve_fl_var_and_proc, resolve_typebound_procedure,
1540 resolve_fl_derived): Ditto.
1541 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
1542 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
1544 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
1545 gfc_trans_deferred_vars): Ditto.
1546 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
1548 2010-05-28 Tobias Burnus <burnus@net-b.de>
1550 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
1552 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1554 * gfortranspec.c (append_arg, lang_specific_driver): Use
1555 fatal_error instead of fatal. Use warning instead of fprintf for
1558 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1560 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
1561 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
1562 xstrerror instead of strerror.
1564 2010-05-26 Joseph Myers <joseph@codesourcery.com>
1566 * cpp.c (cb_cpp_error): Save and restore
1567 global_dc->warn_system_headers, not variable warn_system_headers.
1569 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1571 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
1573 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1575 * trans-common.c: Do not include rtl.h, include output.h instead.
1576 * trans-decl.c: Likewise.
1578 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
1581 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
1582 namespace before trying to reorder the gsymbols.
1584 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
1589 * resolve.c (resolve_global_procedure): Add check for global
1590 procedures with implicit interfaces and assumed-shape or optional
1591 dummy arguments. Verify that function return type, kind and string
1594 2010-05-21 Tobias Burnus <burnus@net-b.de>
1596 * gfortran.h: Do not include system.h.
1597 * bbt.c: Include system.h.
1599 * dependency.c: Ditto.
1600 * dump-parse-tree.c: Ditto.
1601 * arith.h: Do not include gfortran.h.
1602 * constructor.h: Do not include gfortran.h and splay-tree.h.
1603 * match.h: Do not include gfortran.h.
1605 * target-memory.h: Ditto.
1606 * openmp.c: Do not include toplev.h and target.h.
1607 * trans-stmt.c: Ditto not include toplev.h.
1609 * trans-common.c: Tell why toplev.h is needed. And
1610 do not include target.h.
1611 * trans-expr.c: Tell why toplev.h is needed.
1612 * trans-array.c: Ditto.
1613 * trans-openmp.c: Ditto.
1614 * trans-const.c: Ditto.
1616 * trans-types.c: Ditto.
1617 * trans-io.c: Ditto.
1618 * trans-decl.c: Ditto.
1621 * trans-intrinsic.c: Ditto.
1624 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1627 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
1628 before returning MATCH_ERROR. Add check for scalar. Add check for
1629 default integer kind.
1631 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1634 * match.c (gfc_match_select_type): On error jump back out of the local
1636 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
1637 stage, more precisely to ...
1638 * resolve.c (resolve_fl_derived): ... this place.
1640 2010-05-22 Janus Weil <janus@gcc.gnu.org>
1643 * resolve.c (ensure_not_abstract): Allow abstract types with
1644 non-abstract ancestors.
1646 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1648 * trans-const.c: Include realmpfr.h.
1649 * Make-lang.in: Update dependencies.
1651 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1653 * trans-const.c, trans-types.c, trans-intrinsic.c:
1654 Clean up redundant includes.
1656 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
1659 * lang.opt (Wunused-dummy-argument): New option.
1660 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
1661 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
1662 (set_Wall): Enable warn_unused_dummy_argument.
1663 (gfc_handle_option): Set warn_unused_dummy_argument according to
1665 * trans-decl.c (generate_local_decl): Separate warnings about
1666 unused variables and unused dummy arguments.
1667 * invoke.texi: Documented new option.
1669 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
1671 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
1672 (gfc_conv_string_tmp): Do not assert type comparibilty.
1673 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
1674 (gfc_conv_expr_descriptor): Remove assert.
1675 * trans-common.c: Clarify why rtl.h and tm.h are included.
1676 * trans-openmp.c: Do not include ggc.h and real.h.
1677 Explain why gimple.h is included.
1678 * trans-const.c: Do not include ggc.h.
1679 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
1680 * trans.c: Do not include ggc.h and real.h.
1681 Explain why gimple.h is included.
1682 * trans-types.c: Do not include tm.h. Explain why langhooks.h
1683 and dwarf2out.h are included.
1684 * trans-io.c: Do not include gimple.h and real.h.
1685 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
1686 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
1689 2010-05-20 Tobias Burnus <burnus@net-b.de>
1691 * options.c (gfc_init_options,gfc_post_options): Enable
1692 flag_associative_math by default.
1694 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1697 * trans-stmt.c (gfc_trans_stop): Add generation of call to
1698 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
1699 blank STOP, handling a null expression. (gfc_trans_pause): Use
1700 pause_string for blank PAUSE.
1701 * trans.h: Add external function declaration for error_stop_numeric.
1702 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
1703 the declaration for the library call. Adjust whitespaces.
1704 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
1705 signal no stop code. Match the expression following the stop and pass
1706 that to the translators. Remove the old use of digit matching. Add
1707 checks that the stop_code expression is INTEGER or CHARACTER, constant,
1708 and if CHARACTER, default character KIND.
1710 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1713 * lang.opt (Wconversion-extra): New option.
1714 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
1715 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
1716 (set_Wall): Enable -Wconversion.
1717 (gfc_handle_option): Set warn_conversion_extra.
1718 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
1719 introduced for -Wconversion if -Wconversion-extra is present.
1720 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
1721 -Wconversion; document -Wconversion-extra.
1723 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1726 * gfortran.h (gfc_has_default_initializer): New.
1727 * expr.c (gfc_has_default_initializer): New.
1728 * resolve.c (has_default_initializer): Removed, use
1729 gfc_has_default_initializer() instead. Updated all callers.
1730 * trans-array.c (has_default_initializer): Removed, use
1731 gfc_has_default_initializer() instead. Updated all callers.
1732 * trans-decl.c (generate_local_decl): Do not check the
1733 first component only to check for initializers, but use
1734 gfc_has_default_initializer() instead.
1736 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1739 * primary.c (match_string_constant): Move start_locus just inside
1741 * data.c (create_character_intializer): Clarified truncation warning.
1743 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
1746 * intrinsic.h (gfc_check_float): New prototype.
1747 (gfc_check_sngl): New prototype.
1748 * check.c (gfc_check_float): New.
1749 (gfc_check_sngl): New.
1750 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
1751 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
1753 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
1754 added them to the list of specifics of REAL instead.
1756 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1759 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
1760 This is now handled via 'gfc_class_null_initializer'.
1762 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1764 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
1765 gfc_build_class_symbol,add_proc_component,add_proc_comps,
1766 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1767 add_procs_to_declared_vtab,add_generic_specifics,
1768 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1769 find_typebound_proc_uop,gfc_find_typebound_proc,
1770 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1771 gfc_get_tbp_symtree): Moved here from other places.
1772 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
1774 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
1775 gfc_find_typebound_proc,gfc_find_typebound_user_op,
1776 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
1777 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
1778 * Make-lang.in: Add class.o.
1779 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
1780 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
1781 add_procs_to_declared_vtab,add_generic_specifics,
1782 add_generics_to_declared_vtab,gfc_find_derived_vtab,
1783 find_typebound_proc_uop,gfc_find_typebound_proc,
1784 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
1785 gfc_get_tbp_symtree): Move to class.c.
1787 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1789 * trans-types.c (gfc_init_types): Use build_function_type_list.
1790 (gfc_get_ppc_type): Likewise.
1791 * trans-decl.c (gfc_generate_constructors): Likewise.
1792 * f95-lang.c (build_builtin_fntypes): Likewise.
1793 (gfc_init_builtin_functions): Likewise.
1794 (DEF_FUNCTION_TYPE_0): Likewise.
1795 (DEF_FUNCTION_TYPE_1): Likewise.
1796 (DEF_FUNCTION_TYPE_2): Likewise.
1797 (DEF_FUNCTION_TYPE_3): Likewise.
1798 (DEF_FUNCTION_TYPE_4): Likewise.
1799 (DEF_FUNCTION_TYPE_5): Likewise.
1800 (DEF_FUNCTION_TYPE_6): Likewise.
1801 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
1802 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
1804 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
1806 * trans-array.c (gfc_trans_array_constructor_value): Use
1807 build_constructor instead of build_constructor_from_list.
1808 (gfc_build_constant_array_constructor): Likewise.
1809 * trans-decl.c (create_main_function): Likewise.
1810 * trans-stmt.c (gfc_trans_character_select): Likewise.
1812 2010-05-17 Janus Weil <janus@gcc.gnu.org>
1815 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
1816 (resolve_fl_variable_derived): ... this place.
1817 (resolve_symbol): Make sure function symbols (and their result
1818 variables) are not resolved twice.
1820 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
1823 * array.c (match_array_list): Revert change from 2010-05-13.
1825 2010-05-16 Richard Guenther <rguenther@suse.de>
1827 * trans-decl.c (module_htab_decls_hash): Revert last change.
1829 2010-05-16 Richard Guenther <rguenther@suse.de>
1831 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
1833 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1835 * options.c (set_Wall): Remove special logic for Wuninitialized
1838 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1842 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
1845 2010-05-15 Janus Weil <janus@gcc.gnu.org>
1849 * gfortran.h (gfc_class_null_initializer): New prototype.
1850 * expr.c (gfc_class_null_initializer): New function to build a NULL
1851 initializer for CLASS pointers.
1852 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
1853 containers. Remove default NULL initialization of $data component.
1854 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
1856 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
1857 Use new function 'gfc_class_null_initializer'.
1858 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
1861 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
1864 * fortran/interface.c (get_sym_storage_size): Use signed instead of
1865 unsigned mpz_get_?i routines.
1867 2010-05-14 Jakub Jelinek <jakub@redhat.com>
1869 * trans.c (trans_code): Set backend locus early.
1870 * trans-decl.c (gfc_get_fake_result_decl): Use source location
1871 of the function instead of current input_location.
1873 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
1876 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
1878 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
1879 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
1882 2010-05-13 Jakub Jelinek <jakub@redhat.com>
1885 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
1887 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
1888 by reference dummy procedures or non-dummy procedure pointers.
1889 (gfc_omp_predetermined_sharing): Return
1890 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
1892 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1895 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
1896 after OMP statement.
1897 (gfc_match_omp_critical): Likewise.
1898 (gfc_match_omp_flush): Likewise.
1899 (gfc_match_omp_workshare): Likewise.
1900 (gfc_match_omp_master): Likewise.
1901 (gfc_match_omp_ordered): Likewise.
1902 (gfc_match_omp_atomic): Likewise.
1903 (gfc_match_omp_barrier): Likewise.
1904 (gfc_match_omp_end_nowait): Likewise.
1906 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
1909 * resolve.c (validate_case_label_expr): Removed FIXME.
1910 (resolve_select): Raise default warning on case labels out of range
1911 of the case expression.
1913 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
1918 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
1919 about conversion warnings.
1921 2010-05-10 Janus Weil <janus@gcc.gnu.org>
1924 * match.c (gfc_match_select_type): Move error message to
1925 resolve_select_type.
1926 * resolve.c (resolve_select_type): Error message moved here from
1927 gfc_match_select_type. Correctly set type of temporary.
1929 2010-05-10 Richard Guenther <rguenther@suse.de>
1931 * trans-decl.c (gfc_build_library_function_decl): Split out
1933 (build_library_function_decl_1): ... this new function.
1934 Set a fnspec attribute if a specification was provided.
1935 (gfc_build_library_function_decl_with_spec): New function.
1936 (gfc_build_intrinsic_function_decls): Annotate internal_pack
1937 and internal_unpack.
1939 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
1942 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
1945 2010-05-07 Jason Merrill <jason@redhat.com>
1947 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
1948 to avoid -Wc++-compat warning.
1950 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
1953 * options.c (gfc_handle_option): Add argument kind.
1954 * gfortran.h (gfc_handle_option): Update declaration.
1956 2010-05-06 Tobias Burnus <burnus@net-b.de>
1959 * trans-types.c (gfc_sym_type): Mark Cray pointees as
1962 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1965 * resolve.c (traverse_data_list): Rephrase error message for
1966 non-constant bounds in data-implied-do.
1968 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
1971 * gfortran.h: Removed repeat count from constructor, removed
1973 * data.h (gfc_assign_data_value_range): Changed return value from
1975 * data.c (gfc_assign_data_value): Add location to constructor element.
1976 (gfc_assign_data_value_range): Call gfc_assign_data_value()
1977 for each element in range. Return early if an error was generated.
1978 * resolve.c (check_data_variable): Stop early if range assignment
1981 2010-05-05 Janus Weil <janus@gcc.gnu.org>
1984 * resolve.c (resolve_fl_derived): Some fixes for class variables.
1985 * symbol.c (gfc_build_class_symbol): Add separate class container for
1988 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
1991 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
1993 2010-05-02 Tobias Burnus <burnus@net-b.de>
1996 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
1997 for lcobound, ucobound, image_index and this_image.
1998 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
1999 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
2000 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
2001 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
2003 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
2005 2010-04-30 Tobias Burnus <burnus@net-b.de>
2009 * trans-types.c (gfc_get_array_descriptor_base): Fix index
2010 calculation for array descriptor types.
2012 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2015 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
2016 initializers for PPC members of the vtabs.
2018 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2021 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
2022 attribute for all PPC members of the vtypes.
2023 (copy_vtab_proc_comps): Copy the correct interface.
2024 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
2025 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
2026 a dummy argument and make sure all PPC members of the vtab are
2027 initialized correctly.
2028 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
2029 in call to gfc_trans_assign_vtab_procs.
2030 * trans-stmt.c (gfc_trans_allocate): Ditto.
2032 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2035 * resolve.c (resolve_typebound_function): Renamed
2036 resolve_class_compcall.Do all the detection of class references
2038 (resolve_typebound_subroutine): resolve_class_typebound_call
2039 renamed. Otherwise same as resolve_typebound_function.
2040 (gfc_resolve_expr): Call resolve_typebound_function.
2041 (resolve_code): Call resolve_typebound_subroutine.
2043 2010-04-29 Janus Weil <janus@gcc.gnu.org>
2046 * resolve.c (resolve_typebound_generic_call): For CLASS methods
2047 pass back the specific symtree name, rather than the target
2050 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2053 * resolve.c (resolve_structure_cons): Make the initializer of
2054 the vtab component 'extends' the same type as the component.
2056 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2059 * interface.c (check_interface1): Pass symbol name rather than NULL to
2060 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
2061 trap MULL. (gfc_compare_derived_types): Revert previous change
2062 incorporated incorrectly during merge from trunk, r155778.
2063 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2064 than NULL to gfc_compare_interfaces.
2065 * symbol.c (add_generic_specifics): Likewise.
2067 2010-02-29 Janus Weil <janus@gcc.gnu.org>
2070 * interface.c (gfc_compare_derived_types): Add condition for vtype.
2071 * symbol.c (gfc_find_derived_vtab): Sey access to private.
2072 (gfc_find_derived_vtab): Likewise.
2073 * module.c (ab_attribute): Add enumerator AB_VTAB.
2074 (mio_symbol_attribute): Use new attribute, AB_VTAB.
2075 (check_for_ambiguous): Likewise.
2077 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
2078 Janus Weil <janus@gcc.gnu.org>
2081 * trans-expr.c (select_class_proc): Remove function.
2082 (conv_function_val): Delete reference to previous.
2083 (gfc_conv_derived_to_class): Add second argument to the call to
2084 gfc_find_derived_vtab.
2085 (gfc_conv_structure): Exclude proc_pointer components when
2086 accessing $data field of class objects.
2087 (gfc_trans_assign_vtab_procs): New function.
2088 (gfc_trans_class_assign): Add second argument to the call to
2089 gfc_find_derived_vtab.
2090 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
2091 implement holding off searching for the vptr derived type.
2092 (add_proc_component): New function.
2093 (add_proc_comps): New function.
2094 (add_procs_to_declared_vtab1): New function.
2095 (copy_vtab_proc_comps): New function.
2096 (add_procs_to_declared_vtab): New function.
2097 (void add_generic_specifics): New function.
2098 (add_generics_to_declared_vtab): New function.
2099 (gfc_find_derived_vtab): Add second argument to the call to
2100 gfc_find_derived_vtab. Add the calls to
2101 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
2102 * decl.c (build_sym, build_struct): Use new arg in calls to
2103 gfc_build_class_symbol.
2104 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
2105 definition of struct gfc_class_esym_list. Modify prototypes
2106 of gfc_build_class_symbol and gfc_find_derived_vtab.
2107 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
2108 call to gfc_find_derived_vtab.
2109 * module.c : Add the vtype attribute.
2110 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
2111 * resolve.c (resolve_typebound_generic_call): Add second arg
2112 to pass along the generic name for class methods.
2113 (resolve_typebound_call): The same.
2114 (resolve_compcall): Use the second arg to carry the generic
2115 name from the above. Remove the reference to class_esym.
2116 (check_members, check_class_members, resolve_class_esym,
2117 hash_value_expr): Remove functions.
2118 (resolve_class_compcall, resolve_class_typebound_call): Modify
2119 to use vtable rather than member by member calls.
2120 (gfc_resolve_expr): Modify second arg in call to
2122 (resolve_select_type): Add second arg in call to
2123 gfc_find_derived_vtab.
2124 (resolve_code): Add second arg in call resolve_typebound_call.
2125 (resolve_fl_derived): Exclude vtypes from check for late
2126 procedure definitions. Likewise for checking of explicit
2127 interface and checking of pass arg.
2128 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
2129 calls to gfc_find_derived_vtab.
2130 * match.c (select_type_set_tmp): Use new arg in call to
2131 gfc_build_class_symbol.
2132 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
2134 * parse.c (endType): Finish incomplete classes.
2136 2010-04-28 Tobias Burnus <burnus@net-b.de>
2140 * simplify.c (simplify_cobound): Handle scalar coarrays.
2142 2010-04-27 Tobias Burnus <burnus@net-b.de>
2144 * gfc-internals.texi: Update copyright year.
2145 * gfortran.texi: Ditto.
2146 * invoke.texi: Ditto.
2148 2010-04-27 Tobias Burnus <burnus@net-b.de>
2151 * resolve.c (resolve_allocate_expr): Allow array coarrays.
2152 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
2153 * trans-types.c (gfc_get_array_type_bounds,
2154 gfc_get_array_descriptor_base): Add corank argument.
2155 * trans-array.c (gfc_array_init_size): Handle corank.
2156 (gfc_trans_create_temp_array, gfc_array_allocate,
2157 gfc_conv_expr_descriptor): Add corank argument to call.
2158 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
2160 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
2164 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
2165 of mucking with a tree directly.
2167 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2170 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
2171 gfc_error with new error message.
2173 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
2177 * trans-expr.c (gfc_conv_expr): Supply an address expression for
2179 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
2181 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
2182 than the address of a GFC_SS_REFERENCE.
2183 * trans.h : Change comment on GFC_SS_REFERENCE.
2185 2010-04-22 Richard Guenther <rguenther@suse.de>
2188 * resolve.c (gfc_resolve_index): Wrap around ...
2189 (gfc_resolve_index_1): ... this. Add parameter to allow
2190 any integer kind index type.
2191 (resolve_array_ref): Allow any integer kind for the start
2192 index of an array ref.
2194 2010-04-21 Jakub Jelinek <jakub@redhat.com>
2197 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
2200 2010-04-20 Harald Anlauf <anlauf@gmx.de>
2202 * intrinsic.c (sort_actual): Remove 'is' in error message.
2204 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
2207 * resolve.c (resolve_fl_derived): If a component character
2208 length has not been resolved, do so now.
2209 (resolve_symbol): The same as above for a symbol character
2211 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
2212 not needed for a character valued, procedure pointer.
2215 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
2216 not found, return FAILURE rather than ICEing.
2218 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2221 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
2222 sequential loops private in the innermost containing task region.
2224 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2226 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
2227 to build_common_tree_nodes.
2229 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
2232 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
2233 gfc_msg_bounds by using 'Array bound mismatch' directly.
2234 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
2235 error message to include the mismatch in the extent of array bound.
2236 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
2237 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
2239 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2241 * gfortran.texi: Update information on temporary file locations.
2243 2010-04-16 Jakub Jelinek <jakub@redhat.com>
2245 * trans-decl.c (gfc_build_qualified_array): Ensure
2246 ubound.N and lbound.N artificial variable names don't appear
2249 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
2252 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
2253 block of code. Set name to the variable associated with the descriptor.
2255 2010-04-15 Jakub Jelinek <jakub@redhat.com>
2257 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
2258 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
2260 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
2262 * intrinsic.texi: Add the missing specific name of intrinsic
2263 procedure where the specific name is identical to the generic name.
2264 Fix inconsistent or mismatch in the argument names in intrinsic
2265 procedure descriptions. Add the SCALAR allocatable description to
2268 2010-04-14 Tobias Burnus <burnus@net-b.de>
2271 * array.c (gfc_find_array_ref): Handle codimensions.
2272 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
2273 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
2274 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
2276 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
2277 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
2279 * intrinsic.h (add_functions): Add this_image, image_index,
2280 lcobound and ucobound intrinsics.
2281 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
2282 gfc_check_image_index, gfc_check_this_image,
2283 gfc_simplify_image_index, gfc_simplify_lcobound,
2284 gfc_simplify_this_image, gfc_simplify_ucobound):
2285 New function prototypes.
2286 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
2287 IMAGE_INDEX): Document new intrinsic functions.
2288 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
2290 * simplify.c (simplify_bound_dim): Handle coarrays.
2291 (simplify_bound): Update simplify_bound_dim call.
2292 (gfc_simplify_num_images): Add -fcoarray=none check.
2293 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
2294 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
2296 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2299 * constructor.c: Fix typo in comment.
2300 * expr.c (find_array_section): Add check for max array limit.
2302 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
2305 * gfortranspec.c (lookup_option): Check for -static and return
2307 (lang_specific_driver): Break when OPTION_static is discovered.
2309 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2311 * array.c (extract_element): Restore function from trunk.
2312 (gfc_get_array_element): Restore function from trunk.
2313 (gfc_expand_constructor): Restore check against
2314 flag_max_array_constructor.
2315 * constructor.c (node_copy_and_append): Delete unused.
2316 * gfortran.h: Delete comment and extra include.
2317 * constructor.h: Bump copyright and clean up TODO comments.
2318 * resolve.c: Whitespace.
2320 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2322 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
2323 with direct access access to elements. Adjusted prototype, fixed all
2325 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
2327 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
2328 (gfc_simplify_spread): Removed workaround, directly insert elements
2329 at a given array position.
2330 (gfc_simplify_transpose): Likewise.
2331 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
2333 (gfc_simplify_unpack): Likewise.
2335 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2337 * simplify.c (only_convert_cmplx_boz): Renamed to ...
2338 (convert_boz): ... this and moved to start of file.
2339 (gfc_simplify_abs): Whitespace fix.
2340 (gfc_simplify_acos): Whitespace fix.
2341 (gfc_simplify_acosh): Whitespace fix.
2342 (gfc_simplify_aint): Whitespace fix.
2343 (gfc_simplify_dint): Whitespace fix.
2344 (gfc_simplify_anint): Whitespace fix.
2345 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
2346 (gfc_simplify_dnint): Whitespace fix.
2347 (gfc_simplify_asin): Whitespace fix.
2348 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
2349 (gfc_simplify_atan): Likewise.
2350 (gfc_simplify_atanh): Whitespace fix.
2351 (gfc_simplify_atan2): Whitespace fix.
2352 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
2353 (gfc_simplify_bessel_j1): Likewise.
2354 (gfc_simplify_bessel_jn): Likewise.
2355 (gfc_simplify_bessel_y0): Likewise.
2356 (gfc_simplify_bessel_y1): Likewise.
2357 (gfc_simplify_bessel_yn): Likewise.
2358 (gfc_simplify_ceiling): Reorderd statements.
2359 (simplify_cmplx): Use convert_boz(), check for constant arguments.
2361 (gfc_simplify_cmplx): Use correct default kind. Removed check for
2363 (gfc_simplify_complex): Replaced if-gate. Removed check for
2365 (gfc_simplify_conjg): Whitespace fix.
2366 (gfc_simplify_cos): Whitespace fix.
2367 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
2368 (gfc_simplify_dcmplx): Removed check for constant arguments.
2369 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
2370 (gfc_simplify_digits): Whitespace fix.
2371 (gfc_simplify_dim): Whitespace fix.
2372 (gfc_simplify_dprod): Reordered statements.
2373 (gfc_simplify_erf): Whitespace fix.
2374 (gfc_simplify_erfc): Whitespace fix.
2375 (gfc_simplify_epsilon): Whitespace fix.
2376 (gfc_simplify_exp): Whitespace fix.
2377 (gfc_simplify_exponent): Use convert_boz().
2378 (gfc_simplify_floor): Reorderd statements.
2379 (gfc_simplify_gamma): Whitespace fix.
2380 (gfc_simplify_huge): Whitespace fix.
2381 (gfc_simplify_iand): Whitespace fix.
2382 (gfc_simplify_ieor): Whitespace fix.
2383 (simplify_intconv): Use gfc_convert_constant().
2384 (gfc_simplify_int): Use simplify_intconv().
2385 (gfc_simplify_int2): Reorderd statements.
2386 (gfc_simplify_idint): Reorderd statements.
2387 (gfc_simplify_ior): Whitespace fix.
2388 (gfc_simplify_ishftc): Removed duplicate type check.
2389 (gfc_simplify_len): Use range_check() instead of manual range check.
2390 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
2391 (gfc_simplify_log): Whitespace fix.
2392 (gfc_simplify_log10): Whitespace fix.
2393 (gfc_simplify_minval): Whitespace fix.
2394 (gfc_simplify_maxval): Whitespace fix.
2395 (gfc_simplify_mod): Whitespace fix.
2396 (gfc_simplify_modulo): Whitespace fix.
2397 (simplify_nint): Reorderd statements.
2398 (gfc_simplify_not): Whitespace fix.
2399 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
2400 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
2401 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
2402 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
2403 (gfc_simplify_realpart): Whitespace fix.
2404 (gfc_simplify_selected_char_kind): Removed unused result-variable.
2405 (gfc_simplify_selected_int_kind): Removed unused result-variable.
2406 (gfc_simplify_selected_real_kind): Removed unused result-variable.
2407 (gfc_simplify_sign): Whitespace fix.
2408 (gfc_simplify_sin): Whitespace fix.
2409 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
2410 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
2411 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
2412 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
2413 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
2415 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2417 * gfortran.h (gfc_start_constructor): Removed.
2418 (gfc_get_array_element): Removed.
2419 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
2420 instead. Fixed all callers.
2421 (extract_element): Removed.
2422 (gfc_expand_constructor): Temporarily removed check for
2423 max-array-constructor. Will be re-introduced later if still required.
2424 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
2425 instead. Fixed all callers.
2426 * expr.c (find_array_section): Replaced manual lookup of elements
2427 by gfc_constructor_lookup.
2429 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2431 * gfortran.h (gfc_get_null_expr): New prototype.
2432 (gfc_get_operator_expr): New prototype.
2433 (gfc_get_character_expr): New prototype.
2434 (gfc_get_iokind_expr): New prototype.
2435 * expr.c (gfc_get_null_expr): New.
2436 (gfc_get_character_expr): New.
2437 (gfc_get_iokind_expr): New.
2438 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
2439 * matchexp.c (build_node): Renamed and moved to
2440 expr.c (gfc_get_operator_expr). Reordered arguments to match
2441 other functions. Fixed all callers.
2442 (gfc_get_parentheses): Use specific function to build expr.
2443 * array.c (gfc_match_array_constructor): Likewise.
2444 * arith.c (eval_intrinsic): Likewise.
2445 (gfc_hollerith2int): Likewise.
2446 (gfc_hollerith2real): Likewise.
2447 (gfc_hollerith2complex): Likewise.
2448 (gfc_hollerith2logical): Likewise.
2449 * data.c (create_character_intializer): Likewise.
2450 * decl.c (gfc_match_null): Likewise.
2451 (enum_initializer): Likewise.
2452 * io.c (gfc_match_format): Likewise.
2453 (match_io): Likewise.
2454 * match.c (gfc_match_nullify): Likewise.
2455 * primary.c (match_string_constant): Likewise.
2456 (match_logical_constant): Likewise.
2457 (build_actual_constructor): Likewise.
2458 * resolve.c (build_default_init_expr): Likewise.
2459 * symbol.c (generate_isocbinding_symbol): Likewise.
2460 (gfc_build_class_symbol): Likewise.
2461 (gfc_find_derived_vtab): Likewise.
2462 * simplify.c (simplify_achar_char): Likewise.
2463 (gfc_simplify_adjustl): Likewise.
2464 (gfc_simplify_adjustr): Likewise.
2465 (gfc_simplify_and): Likewise.
2466 (gfc_simplify_bit_size): Likewise.
2467 (gfc_simplify_is_iostat_end): Likewise.
2468 (gfc_simplify_is_iostat_eor): Likewise.
2469 (gfc_simplify_isnan): Likewise.
2470 (simplify_bound): Likewise.
2471 (gfc_simplify_leadz): Likewise.
2472 (gfc_simplify_len_trim): Likewise.
2473 (gfc_simplify_logical): Likewise.
2474 (gfc_simplify_maxexponent): Likewise.
2475 (gfc_simplify_minexponent): Likewise.
2476 (gfc_simplify_new_line): Likewise.
2477 (gfc_simplify_null): Likewise.
2478 (gfc_simplify_or): Likewise.
2479 (gfc_simplify_precision): Likewise.
2480 (gfc_simplify_repeat): Likewise.
2481 (gfc_simplify_scan): Likewise.
2482 (gfc_simplify_size): Likewise.
2483 (gfc_simplify_trailz): Likewise.
2484 (gfc_simplify_trim): Likewise.
2485 (gfc_simplify_verify): Likewise.
2486 (gfc_simplify_xor): Likewise.
2487 * trans-io.c (build_dt): Likewise.
2488 (gfc_new_nml_name_expr): Removed.
2490 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2492 * arith.h (gfc_constant_result): Removed prototype.
2493 * constructor.h (gfc_build_array_expr): Removed prototype.
2494 (gfc_build_structure_constructor_expr): Removed prototype.
2495 * gfortran.h (gfc_int_expr): Removed prototype.
2496 (gfc_logical_expr): Removed prototype.
2497 (gfc_get_array_expr): New prototype.
2498 (gfc_get_structure_constructor_expr): New prototype.
2499 (gfc_get_constant_expr): New prototype.
2500 (gfc_get_int_expr): New prototype.
2501 (gfc_get_logical_expr): New prototype.
2502 * arith.c (gfc_constant_result): Moved and renamed to
2503 expr.c (gfc_get_constant_expr). Fixed all callers.
2504 * constructor.c (gfc_build_array_expr): Moved and renamed to
2505 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
2506 and kind. Fixed all callers.
2507 (gfc_build_structure_constructor_expr): Moved and renamed to
2508 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
2509 to type and kind. Fixed all callers.
2510 * expr.c (gfc_logical_expr): Renamed to ...
2511 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
2512 (gfc_int_expr): Renamed to ...
2513 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
2515 (gfc_get_constant_expr): New.
2516 (gfc_get_array_expr): New.
2517 (gfc_get_structure_constructor_expr): New.
2518 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
2521 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
2523 * constructor.h: New.
2524 * constructor.c: New.
2525 * Make-lang.in: Add new files to F95_PARSER_OBJS.
2526 * arith.c (reducy_unary): Use constructor API.
2527 (reduce_binary_ac): Likewise.
2528 (reduce_binary_ca): Likewise.
2529 (reduce_binary_aa): Likewise.
2530 * check.c (gfc_check_pack): Likewise.
2531 (gfc_check_reshape): Likewise.
2532 (gfc_check_unpack): Likewise.
2533 * decl.c (add_init_expr_to_sym): Likewise.
2534 (build_struct): Likewise.
2535 * dependency.c (gfc_check_dependency): Likewise.
2536 (contains_forall_index_p): Likewise.
2537 * dump-parse-tree.c (show_constructor): Likewise.
2538 * expr.c (free_expr0): Likewise.
2539 (gfc_copy_expr): Likewise.
2540 (gfc_is_constant_expr): Likewise.
2541 (simplify_constructor): Likewise.
2542 (find_array_element): Likewise.
2543 (find_component_ref): Likewise.
2544 (find_array_section): Likewise.
2545 (find_substring_ref): Likewise.
2546 (simplify_const_ref): Likewise.
2547 (scalarize_intrinsic_call): Likewise.
2548 (check_alloc_comp_init): Likewise.
2549 (gfc_default_initializer): Likewise.
2550 (gfc_traverse_expr): Likewise.
2551 * iresolve.c (check_charlen_present): Likewise.
2552 (gfc_resolve_reshape): Likewise.
2553 (gfc_resolve_transfer): Likewise.
2554 * module.c (mio_constructor): Likewise.
2555 * primary.c (build_actual_constructor): Likewise.
2556 (gfc_match_structure_constructor): Likewise.
2557 * resolve.c (resolve_structure_cons): Likewise.
2558 * simplify.c (is_constant_array_expr): Likewise.
2559 (init_result_expr): Likewise.
2560 (transformational_result): Likewise.
2561 (simplify_transformation_to_scalar): Likewise.
2562 (simplify_transformation_to_array): Likewise.
2563 (gfc_simplify_dot_product): Likewise.
2564 (simplify_bound): Likewise.
2565 (simplify_matmul): Likewise.
2566 (simplify_minval_maxval): Likewise.
2567 (gfc_simplify_pack): Likewise.
2568 (gfc_simplify_reshape): Likewise.
2569 (gfc_simplify_shape): Likewise.
2570 (gfc_simplify_spread): Likewise.
2571 (gfc_simplify_transpose): Likewise.
2572 (gfc_simplify_unpack): Likewise.q
2573 (gfc_convert_constant): Likewise.
2574 (gfc_convert_char_constant): Likewise.
2575 * target-memory.c (size_array): Likewise.
2576 (encode_array): Likewise.
2577 (encode_derived): Likewise.
2578 (interpret_array): Likewise.
2579 (gfc_interpret_derived): Likewise.
2580 (expr_to_char): Likewise.
2581 (gfc_merge_initializers): Likewise.
2582 * trans-array.c (gfc_get_array_constructor_size): Likewise.
2583 (gfc_trans_array_constructor_value): Likewise.
2584 (get_array_ctor_strlen): Likewise.
2585 (gfc_constant_array_constructor_p): Likewise.
2586 (gfc_build_constant_array_constructor): Likewise.
2587 (gfc_trans_array_constructor): Likewise.
2588 (gfc_conv_array_initializer): Likewise.
2589 * trans-decl.c (check_constant_initializer): Likewise.
2590 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
2591 (gfc_apply_interface_mapping_to_cons): Likewise.
2592 (gfc_trans_structure_assign): Likewise.
2593 (gfc_conv_structure): Likewise.
2594 * array.c (check_duplicate_iterator): Likewise.
2595 (match_array_list): Likewise.
2596 (match_array_cons_element): Likewise.
2597 (gfc_match_array_constructor): Likewise.
2598 (check_constructor_type): Likewise.
2599 (check_constructor): Likewise.
2601 (expand_constructor): Likewise.
2602 (extract_element): Likewise.
2603 (gfc_expanded_ac): Likewise.
2604 (resolve_array_list): Likewise.
2605 (gfc_resolve_character_array_constructor): Likewise.
2606 (copy_iterator): Renamed to ...
2607 (gfc_copy_iterator): ... this.
2608 (gfc_append_constructor): Removed.
2609 (gfc_insert_constructor): Removed unused function.
2610 (gfc_get_constructor): Removed.
2611 (gfc_free_constructor): Removed.
2612 (qgfc_copy_constructor): Removed.
2613 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
2614 Removed all references. Replaced constructor list by splay-tree.
2615 (struct gfc_constructor): Removed member 'next', moved 'offset' from
2616 the inner struct, added member 'base'.
2617 (gfc_append_constructor): Removed prototype.
2618 (gfc_insert_constructor): Removed prototype.
2619 (gfc_get_constructor): Removed prototype.
2620 (gfc_free_constructor): Removed prototype.
2621 (qgfc_copy_constructor): Removed prototype.
2622 (gfc_copy_iterator): New prototype.
2623 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
2625 2010-04-10 Tobias Burnus <burnus@net-b.de>
2628 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
2629 proc-pointers and type-bound procedures.
2630 (gfc_specification_expr): Check proc-pointers for pureness.
2632 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
2635 * gfortranspec.c (lang_specific_driver): Do not expose vars
2636 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
2639 2010-04-09 Tobias Burnus <burnus@net-b.de>
2642 * decl.c (variable_decl, match_attr_spec): Fix setting the array
2644 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
2645 * data.c (gfc_assign_data_value): Ditto.
2646 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
2647 (gfc_traverse_expr): Traverse also through codimension expressions.
2648 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2649 gfc_has_ultimate_pointer): New functions.
2650 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
2651 (gfc_array_ref): Add codimen.
2652 (gfc_array_ref): Add in_allocate.
2653 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
2654 gfc_has_ultimate_pointer): Add prototypes.
2655 * interface.c (compare_parameter, compare_actual_formal,
2656 check_intents): Add coarray constraints.
2657 * match.c (gfc_match_iterator): Add coarray constraint.
2658 * match.h (gfc_match_array_ref): Update interface.
2659 * primary.c (gfc_match_varspec): Handle codimensions.
2660 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
2661 (check_class_members): Return gfc_try instead for error recovery.
2662 (resolve_typebound_function,resolve_typebound_subroutine,
2663 check_members): Handle return value of check_class_members.
2664 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
2665 check_dimension, compare_spec_to_ref, resolve_array_ref,
2666 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
2667 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
2669 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
2670 Skip over coarray refs.
2671 (gfc_array_allocate) Add support for references containing coindexes.
2672 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
2673 (gfc_map_intrinsic_function): Ignore codimensions.
2675 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
2678 * io.c (check_format_string): Added check for additional non
2679 blank characters after the format string was successfully
2681 * io.c (check_format): Changed the error messages for positive
2682 int required and period required to drop through the error logic
2683 and report with gfc_error instead of gfc_error_now. Corrected
2684 format postion for hollerith strings.
2686 2010-04-08 Tobias Burnus <burnus@net-b.de>
2688 * module.c (use_iso_fortran_env_module): Fix standard check.
2690 2010-04-07 Jakub Jelinek <jakub@redhat.com>
2692 * parse.c (parse_derived, parse_enum): Avoid set but not used
2695 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
2698 * gfortran.texi: Add section about representation of
2701 2010-04-07 Simon Baldwin <simonb@google.com>
2703 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
2704 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
2706 2010-04-07 Richard Guenther <rguenther@suse.de>
2708 * options.c (gfc_init_options): Do not set.
2710 2010-04-06 Tobias Burnus <burnus@net-b.de>
2713 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
2714 * match.c (gfc_match_critical, sync_statement): Ditto.
2715 * gfortran.h (gfc_fcoarray): New enum.
2716 (gfc_option_t): Use it.
2717 * lang.opt (fcoarray): Add new flag.
2718 * invoke.texi (fcoarray): Document it.
2719 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
2720 (gfc_handle_coarray_option): New function.
2722 2010-04-06 Tobias Burnus <burnus@net-b.de>
2725 * gfortran.h (gfc_array_spec): Add cotype.
2726 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
2727 and defer error diagnostic.
2728 * resolve.c (resolve_fl_derived): Add missing check.
2729 (resolve_symbol): Add cotype/type check.
2730 * parse.c (parse_derived): Fix setting of coarray_comp.
2732 2010-04-06 Tobias Burnus <burnus@net-b.de>
2735 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
2736 match_array_element_spec,gfc_copy_array_spec,
2737 gfc_compare_array_spec): Include corank.
2738 (match_array_element_spec,gfc_set_array_spec): Support codimension.
2739 * decl.c (build_sym,build_struct,variable_decl,
2740 match_attr_spec,attr_decl1,cray_pointer_decl,
2741 gfc_match_volatile): Add codimension.
2742 (gfc_match_codimension): New function.
2743 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
2744 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
2745 (gfc_add_codimension): New function prototype.
2746 * match.h (gfc_match_codimension): New function prototype.
2747 (gfc_match_array_spec): Update prototype
2748 * match.c (gfc_match_common): Update gfc_match_array_spec call.
2749 * module.c (MOD_VERSION): Bump.
2750 (mio_symbol_attribute): Support coarray attributes.
2751 (mio_array_spec): Add corank support.
2752 * parse.c (decode_specification_statement,decode_statement,
2753 parse_derived): Add coarray support.
2754 * resolve.c (resolve_formal_arglist, was_declared,
2755 is_non_constant_shape_array, resolve_fl_variable,
2756 resolve_fl_derived, resolve_symbol): Add coarray support.
2757 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
2758 gfc_build_class_symbol): Add coarray support.
2759 (gfc_add_codimension): New function.
2761 2010-04-06 Tobias Burnus <burnus@net-b.de>
2764 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
2765 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
2766 stat_locked_other_image, stat_stopped_image and stat_unlocked of
2768 * intrinsic.texi (iso_fortran_env): Ditto.
2769 * libgfortran.h (libgfortran_stat_codes): New enum.
2770 * module.c (use_iso_fortran_env_module): Honour -std= when loading
2771 constants from the intrinsic module.
2773 2010-04-06 Tobias Burnus <burnus@net-b.de>
2776 * intrinsic.c (add_functions): Add num_images.
2777 * decl.c (gfc_match_end): Handle END CRITICAL.
2778 * intrinsic.h (gfc_simplify_num_images): Add prototype.
2779 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
2781 * gfortran.h (gfc_statement): Add enum items for those.
2782 (gfc_exec_op) Ditto.
2783 (gfc_isym_id): Add num_images.
2784 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
2785 (gfc_trans_sync,gfc_trans_critical): New functions.
2786 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
2787 gfc_trans_critical): Add/update prototypes.
2788 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
2789 and SYNC statements.
2790 * trans.h (gfor_fndecl_error_stop_string) Add variable.
2791 * resolve.c (resolve_sync): Add function.
2792 (gfc_resolve_blocks): Handle CRITICAL.
2793 (resolve_code): Handle CRITICAL, ERROR STOP,
2794 (resolve_branch): Add CRITICAL constraint check.
2795 and SYNC statements.
2796 * st.c (gfc_free_statement): Add new statements.
2797 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
2798 (gfc_build_builtin_function_decls): Initialize it.
2799 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
2800 (gfc_match_critical, gfc_match_error_stop, sync_statement,
2801 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
2803 (match_exit_cycle): Handle CRITICAL constraint.
2804 (gfc_match_stopcode): Handle ERROR STOP.
2805 * match.h (gfc_match_critical, gfc_match_error_stop,
2806 gfc_match_sync_all, gfc_match_sync_images,
2807 gfc_match_sync_memory): Add prototype.
2808 * parse.c (decode_statement, gfc_ascii_statement,
2809 parse_executable): Handle new statements.
2810 (parse_critical_block): New function.
2811 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
2812 * intrinsic.texi (num_images): Document new function.
2813 * simplify.c (gfc_simplify_num_images): Add function.
2815 2010-04-06 Tobias Burnus <burnus@net-b.de>
2818 * trans-array.c (gfc_conv_expr_descriptor): Update
2819 gfc_trans_scalar_assign call.
2820 (has_default_initializer): New function.
2821 (gfc_trans_deferred_array): Nullify less often.
2822 * trans-expr.c (gfc_conv_subref_array_arg,
2823 gfc_trans_subcomponent_assign): Update call to
2824 gfc_trans_scalar_assign.
2825 (gfc_trans_scalar_assign): Add parameter and pass it on.
2826 (gfc_trans_assignment_1): Optionally, do not dealloc before
2828 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
2829 call to gfc_trans_scalar_assign.
2830 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
2831 initializer to static variables.
2832 (gfc_init_default_dt): Add dealloc parameter and pass it on.
2833 * trans-stmt.c (forall_make_variable_temp,
2834 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2835 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
2836 gfc_trans_allocate): Update gfc_trans_assignment call.
2837 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
2838 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
2839 parameter to prototype.
2841 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
2843 * ioparm.def : Update copyright.
2845 * trans-array.c : ditto
2846 * trans-array.h : ditto
2848 * trans-types.c: ditto
2849 * dependency.c : ditto
2850 * gfortran.h : ditto
2852 * trans-io.c : ditto
2853 * trans-intrinsic.c : ditto
2854 * libgfortran.h : ditto
2855 * invoke.texi : ditto
2856 * intrinsic.texi : ditto
2859 * intrinsic.c : ditto
2860 * interface.c : ditto
2861 * iresolve.c : ditto
2862 * trans-stmt.c : ditto
2863 * trans-stmt.h : ditto
2868 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
2871 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
2872 do not assert the context of derived types.
2874 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2877 * ioparm.def: Change inquire size variable to type pointer to
2880 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
2883 * trans-expr.c (conv_parent_component_references): Ensure that
2884 'dt' has a backend_decl.
2887 * trans-expr.c (gfc_conv_structure): Ensure that the derived
2888 type has a backend_decl.
2891 * resolve.c (resolve_global_procedure): Check that the 'cl'
2892 structure is not NULL.
2894 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
2896 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
2899 2010-03-17 Tobias Burnus <burnus@net-b.de>
2902 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
2903 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
2905 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
2906 pointees as having explizit size.
2907 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
2909 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
2910 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
2911 * resolve.c (resolve_symbol): Handle cp_was_assumed.
2912 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
2913 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
2916 2010-03-14 Tobias Burnus <burnus@net-b.de>
2919 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
2920 (resolve_ordinary_assign): Add check to avoid segfault.
2922 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
2926 * resolve.c (resolve_compcall): Add new boolean dummy argument
2927 'class_members'. Only resolve expression at end if false.
2928 Remove redundant, static variable 'class_object'.
2929 (check_class_members): Add extra argument to call of
2931 (resolve_typebound_function): Renamed resolve_class_compcall.
2932 Do all the detection of class references here. Correct calls to
2933 resolve_compcall for extra argument.
2934 (resolve_typebound_subroutine): resolve_class_typebound_call
2935 renamed. Otherwise same as resolve_typebound_function.
2936 (gfc_resolve_expr): Call resolve_typebound_function.
2937 (resolve_code): Call resolve_typebound_subroutine.
2939 2010-03-10 Tobias Burnus <burnus@net-b.de
2942 * symbol.c (get_iso_c_sym): Set sym->result.
2944 2010-03-08 Janus Weil <janus@gcc.gnu.org>
2947 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
2948 for TBPs, otherwise they will not be resolved properly.
2949 (resolve_function): Use 'value.function.esym' instead of
2950 'value.function.name' to check if we're dealing with a TBP.
2951 (check_class_members): Set correct type of passed object for all TBPs,
2952 not only generic ones, except if the type is abstract.
2954 2010-03-04 Janus Weil <janus@gcc.gnu.org>
2957 * decl.c (gfc_match_final_decl): Make sure variable names starting with
2958 'final...' are not misinterpreted as FINAL statements.
2960 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
2963 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2964 allocatable ultimate components do not need temporaries, whilst
2965 ultimate pointer components do.
2967 2010-03-03 Janus Weil <janus@gcc.gnu.org>
2970 * resolve.c (resolve_code): Correctly set gfc_current_ns for
2972 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
2975 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
2978 * trans-array.c (gfc_conv_array_parameter): A full array of
2979 derived type need not be restricted to a symbol without an
2980 array spec to use the call to gfc_conv_expr_descriptor.
2983 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
2984 allocatable arrays do not need temporaries.
2986 2010-03-01 Tobias Burnus <burnus@net-b.de>
2989 * resolve.c (find_array_spec): Handle REF_COMPONENT with
2992 2010-02-28 Tobias Burnus <burnus@net-b.de>
2995 * trans-expr.c (is_zero_initializer_p): Move up in the file.
2996 (gfc_conv_initializer): Handle zero initializer as special case.
2998 2010-02-27 Tobias Burnus <burnus@net-b.de>
3001 * resolve.c (resolve_fl_variable_derived): Imply SAVE
3002 for module variables for Fortran 2008.
3004 2010-02-25 Jakub Jelinek <jakub@redhat.com>
3007 * trans-common.c (build_common_decl): Also update DECL_MODE,
3008 and DECL_SIZE when encountering a larger common block and call
3011 2010-02-24 Tobias Burnus <burnus@net-b.de>
3014 * trans-expr.c (gfc_conv_initializer): Call directly
3015 gfc_conv_constant for C_NULL_(FUN)PTR.
3017 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
3020 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
3021 checking the rest of the dimensions for elements.
3023 2010-02-21 Tobias Burnus <burnus@net-b.de>
3026 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
3028 * option.c (gfc_init_options,gfc_handle_option): Ditto.
3029 * trans-expr.c (gfc_conv_expr_op): Use the flag.
3030 * invoke.texi: Document new -fno-protect-parens flag.
3032 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
3038 * dependency.c (gfc_check_argument_var_dependency): Use enum
3039 value instead of arithmetic vaue for 'elemental'.
3040 (check_data_pointer_types): New function.
3041 (gfc_check_dependency): Call check_data_pointer_types.
3042 * trans-array.h : Change fourth argument of
3043 gfc_conv_array_parameter to boolean.
3044 * trans-array.c (gfc_conv_array_parameter): A contiguous array
3045 can be a dummy but it must not be assumed shape or deferred.
3046 Change fourth argument to boolean. Array constructor exprs will
3047 always be contiguous and do not need packing and unpacking.
3048 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
3049 space and change fourth argument of gfc_conv_array_parameter
3051 (gfc_trans_arrayfunc_assign): Change fourth argument of
3052 gfc_conv_array_parameter to boolean.
3053 * trans-io.c (gfc_convert_array_to_string): The same.
3054 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
3056 2010-02-20 Tobias Burnus <burnus@net-b.de>
3059 * libgfortran.h: Add GFC_RTCHECK_MEM.
3060 * invoke.texi (-fcheck=): Document -fcheck=mem.
3061 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
3062 and enable malloc-success check only with -fcheck=mem.
3063 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
3065 2010-02-16 Tobias Burnus <burnus@net-b.de>
3068 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
3069 * intrinsic.c (add_functions): Ditto.
3070 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
3071 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
3073 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3076 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
3077 gfc_trans_do prototype.
3078 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
3079 a loop exit condition. If exit condition is given, build the loop exit
3080 code, checking IO results of implied do loops in READ and WRITE.
3081 (gfc_trans_do): Likewise.
3082 * trans.c (trans_code): New static work function, previously
3083 gfc_trans_code. Passes exit condition to gfc_trans_do.
3084 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
3085 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
3086 * trans-io.c (build_dt): Build an exit condition to allow checking IO
3087 result status bits in the dtparm structure. Use this condition in call
3088 to gfc_trans_code_cond.
3090 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
3094 * trans-array.c (gfc_conv_array_parameter): Use
3095 gfc_full_array_ref_p to detect full and contiguous variable
3096 arrays. Full array components and contiguous arrays do not need
3097 internal_pack and internal_unpack.
3099 2010-02-11 Jakub Jelinek <jakub@redhat.com>
3102 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
3105 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
3107 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
3110 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
3111 Tobias Burnus <burnus@net-b.de>
3114 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
3116 2010-02-10 Tobias Burnus <burnus@net-b.de>
3119 * trans-decl.c (gfc_generate_function_code): Only check
3120 actual-vs.-dummy character bounds if not bind(C).
3122 2010-02-10 Jakub Jelinek <jakub@redhat.com>
3125 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
3126 info->dimen after info has been freed.
3128 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3131 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
3134 2010-02-09 Jakub Jelinek <jakub@redhat.com>
3136 * module.c (fix_mio_expr): Declare sym.
3138 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
3141 * module.c (fix_mio_expr): Fix for private generic procedures.
3143 2010-02-09 Daniel Kraft <d@domob.eu>
3146 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
3147 length to be correct and issue only with -Wsurprising.
3148 * invoke.texi (Wsurprising): Mention this new warning that is
3149 turned on by -Wsurprising.
3151 2010-02-09 Daniel Kraft <d@domob.eu>
3154 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
3155 can be CHARACTER type.
3156 (MINVAL), (MAXLOC), (MINLOC): Ditto.
3158 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
3161 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
3162 'formal_ptr'. If this is true, give returned descriptor unity
3163 lbounds, in all dimensions, and the appropriate offset.
3164 (gfc_conv_procedure_call); If formal is a pointer, set the last
3165 argument of gfc_conv_subref_array_arg to true.
3166 * trans.h : Add last argument for gfc_conv_subref_array_arg.
3167 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
3168 new arg of gfc_conv_subref_array_arg to false.
3169 * trans-stmt.c (forall_make_variable_temp): The same.
3171 2010-02-03 Tobias Burnus <burnus@net-b.de>
3174 * interface.c (compare_parameter): Disable rank-checking
3177 2010-02-02 Tobias Burnus <burnus@net-b.de>
3180 * parse.c (decode_specification_statement): Use sym->result not sym.
3182 2010-02-01 Tobias Burnus <burnus@net-b.de>
3185 * decl.c (variable_decl): Allow default initializer in
3186 TYPE declarations in PURE functions.
3188 2010-01-31 Janus Weil <janus@gcc.gnu.org>
3191 * resolve.c (resolve_allocate_expr): Move default initialization code
3192 here from gfc_trans_allocate.
3193 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
3195 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
3196 of CLASS variables via memcpy.
3197 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
3198 to resolve_allocate_expr.
3200 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
3203 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
3204 * gfortran.h : Add prototype for above.
3205 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
3206 (gfc_trans_subcomponent_assign): Call new function to replace
3207 the code to deal with allocatable components.
3208 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
3209 gfc_get_full_arrayspec_from_expr to replace existing code.
3211 2010-01-25 Tobias Burnus <burnus@net-b.de>
3214 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
3217 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
3221 * expr.c (remove_subobject_ref): If the constructor is NULL use
3222 the expression as the source.
3223 (simplify_const_ref): Change the type of expression if
3224 there are component references. Allow for substring to be at
3225 the end of an arbitrarily long chain of references. If an
3226 element is found that is not in an EXPR_ARRAY, assume that this
3227 is scalar initialization of array. Call remove_subobject_ref in
3228 this case with NULL second argument.
3230 2010-01-24 Tobias Burnus <burnus@net-b.de>
3233 * array.c (gfc_array_dimen_size): Use correct specific
3234 function in the check.
3236 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
3239 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
3240 is required, turn any trailing array elements after a range
3241 into ranges so that offsets can be calculated.
3243 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
3245 * module.c (mio_f2k_derived): Use enumerator as initializer of
3249 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
3250 bitfield of width 2.
3252 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3255 * resolve.c (extract_compcall_passed_object): Set locus for
3256 passed-object argument.
3257 (extract_ppc_passed_object): Set locus and correctly remove PPC
3260 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
3263 * trans-decl.c (add_argument_checking): Do not use the backend
3264 decl directly to test for the presence of an optional dummy
3265 argument. Use gfc_conv_expr_present, remembering to set the
3269 * trans-decl.c (gfc_generate_function_code): Small white space
3270 changes. If 'recurcheckvar' is NULL do not try to reset it.
3272 2010-01-19 Janus Weil <janus@gcc.gnu.org>
3275 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
3276 component for extended types.
3277 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
3278 and take care of parent component accessibility.
3280 2010-01-17 Janus Weil <janus@gcc.gnu.org>
3283 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
3284 * interface.c (check_interface1): Move a warning message here from
3285 resolve_fl_procedure.
3286 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
3287 * module.c (read_module): Remove call to gfc_check_interfaces, since
3288 this comes too early here.
3289 * resolve.c (resolve_fl_procedure): Move warning message to
3292 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3295 * interface.c (check_interface1): Pass symbol name rather than NULL to
3296 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
3298 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3299 than NULL to gfc_compare_interfaces.
3301 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3304 * trans-array.c (duplicate_allocatable): Static version of
3305 gfc_duplicate_allocatable with provision to handle scalar
3306 components. New boolean argument to switch off call to malloc
3308 (gfc_duplicate_allocatable): New function to call above with
3310 (gfc_copy_allocatable_data): New function to call above with
3312 (structure_alloc_comps): Do not apply indirect reference to
3313 scalar pointers. Add new section to copy allocatable components
3314 of arrays. Extend copying of allocatable components to include
3316 (gfc_copy_only_alloc_comp): New function to copy allocatable
3317 component derived types, without allocating the base structure.
3318 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
3319 Add primitive for gfc_copy_only_alloc_comp.
3320 * trans-expr.c (gfc_conv_procedure_call): After calls to
3321 transformational functions with results that are derived types
3322 with allocatable components, copy the components in the result.
3323 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
3324 of lhs derived types before allocation.
3326 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
3329 * module.c (load_generic_interfaces): If a procedure that is
3330 use associated but not generic is given an interface that
3331 includes itself, then make it generic.
3333 2010-01-11 Joseph Myers <joseph@codesourcery.com>
3334 Shujing Zhao <pearly.zhao@oracle.com>
3336 PR translation/42469
3337 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
3338 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
3339 character between option name and help text.
3341 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3345 * trans-array.c (gfc_conv_array_initializer): Change call to
3346 gfc_error_now to call to gfc_fatal_error.
3347 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
3348 (is_constant_element): Changed name from constant_element.
3349 (gfc_constant_ac): Only use expand_construuctor for expression
3350 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
3351 call gfc_is_constant_expr.