1 2010-11-23 Tobias Burnus <burnus@net-b.de>
4 * gfortran.texi (KIND Type Parameters): Quadmath and F2008 changes.
6 2010-11-22 Michael Matz <matz@suse.de>
8 * gfortranspec.c (library): New global, moved from ...
9 (lang_specific_driver): ... here.
10 (lang_specific_pre_link): Test it here before including
13 2010-11-21 Michael Matz <matz@suse.de>
14 Tobias Burnus <burnus@net-b.de>
17 * gfortranspec.c (lang_specific_driver,
18 lang_specific_pre_link): Load libgfortran.spec in
19 lang_specific_pre_link unless found in the -L path.
21 2010-11-20 Janne Blomqvist <jb@gcc.gnu.org>
23 * f95-lang.c (gfc_init_decl_processing): Set size_type_node as
24 unsigned int of pointer size and set sizetype based on that.
25 * trans-types.c (gfc_init_types): Don't set size_type_node to an
28 2010-11-17 Joseph Myers <joseph@codesourcery.com>
30 * f95-lang.c (gfc_be_parse_file): Take no arguments.
32 2010-11-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
33 Tobias Burnus <burnus@net-b.de>
36 * gfortranspec.c (find_spec_file): New function.
37 (lang_specific_driver): Try to find .spec file and use it.
38 * trans-io.c (iocall): Define IOCALL_X_REAL128/COMPLEX128(,write).
39 (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
40 (transfer_expr): Call __float128 I/O functions.
41 * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
44 2010-11-15 Tobias Burnus <burnus@net.b.de>
47 * check.c (variable_check): Don't treat functions calls as variables;
48 optionally accept function themselves.
49 (gfc_check_all_any, gfc_check_loc, gfc_check_move_alloc,
50 gfc_check_null, gfc_check_present, gfc_check_cpu_time,
51 gfc_check_date_and_time, gfc_check_mvbits, gfc_check_random_number,
52 gfc_check_random_seed, gfc_check_system_clock,
53 gfc_check_dtime_etime, gfc_check_dtime_etime_sub,
54 gfc_check_itime_idate,gfc_check_ltime_gmtime): Update call.
56 2010-11-13 Tobias Burnus <burnus@net-b.de>
59 * trans-common.c (build_field): Add TREE_SIDE_EFFECTS for volatile.
60 * trans-decl.c (gfc_finish_var_decl): Ditto.
61 (create_function_arglist): Handle volatile dummy arguments.
63 2010-11-12 Joseph Myers <joseph@codesourcery.com>
65 * Make-lang.in (gfortranspec.o): Use $(OPTS_H).
66 * gfortran.h (gfc_handle_option): Take location_t parameter.
67 * options.c (gfc_handle_option): Take location_t parameter.
69 2010-11-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
72 trans-expr.c (gfc_conv_procedure_call): Avoid NULL array spec.
74 2010-11-11 Nathan Froyd <froydnj@codesourcery.com>
77 * options.c (gfc_post_options): Initialize gfc_option.max_errors.
78 (gfc_handle_option) [OPT_fmax_errors_]: Remove.
79 * lang.opt (fmax-errors=): Remove.
81 2010-11-11 Steven G. Kargl <kargl@gcc.gnu.org>
83 * symbol.c (verify_bind_c_derived_type): Accept BIND(C) on an empty
86 2010-11-11 Jan Hubicka <jh@suse.cz>
88 * options.c (gfc_post_options): Remove flag_whopr.
90 2010-11-11 Tobias Burnus <burnus@net-b.de>
93 * resolve.c (resolve_transfer): Reject I/O transfer of
97 * resolve.c (resolve_code): Reject nonscalar FORALL masks.
99 2010-11-11 Janus Weil <janus@gcc.gnu.org>
101 * resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
103 2010-11-10 Joseph Myers <joseph@codesourcery.com>
105 * trans-array.c (gfc_trans_deferred_array): Use "front-end"
106 spelling in diagnostic.
107 * trans.c (gfc_allocate_array_with_status): Add missing space in
110 2010-11-10 Joseph Myers <joseph@codesourcery.com>
112 * cpp.c (asm_file_name): Don't declare here.
114 2010-11-10 Tobias Burnus <burnus@net-b.de>
117 * intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure
118 and not for attr.elemental.
119 * intrinsic.texi (move_alloc): Document as being pure.
121 2010-11-10 Tobias Burnus <burnus@net-b.de>
124 * resolve.c (resolve_fl_derived): Don't allow CLASS in
125 sequence/BIND(C) types.
127 2010-11-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
128 Mikael Morin <mikael@gcc.gnu.org>
131 * intrinsic.c: Correctly set the pure attributes for intrinsic
133 * expr.c (check_specification_function): Remove this function and move
134 its code into gfc_is_constant_expr. (gfc_is_constant_expr): Change the
135 order of checks by checking for non-constant arguments first. Then,
136 check for initialization functions, followed by intrinsics.
138 2010-11-09 Janus Weil <janus@gcc.gnu.org>
141 * gfortran.h (gfc_add_data_component,gfc_add_vptr_component,
142 gfc_add_hash_component,gfc_add_size_component,
143 gfc_add_def_init_component): New macros.
144 * class.c (gfc_add_component_ref): Renamed data component.
145 (get_unique_type_string): New function.
146 (gfc_build_class_symbol): Use 'get_unique_type_string' to construct
147 uniques names for the class containers. Rename components.
148 (gfc_find_derived_vtab): Use 'get_unique_type_string' to construct
149 uniques names for the vtab symbols. Rename components.
150 * decl.c (attr_decl1): Renamed class container components.
151 * iresolve.c (gfc_resolve_extends_type_of): Ditto.
152 * match.c (select_type_set_tmp): Renamed temporaries.
153 * module.c (read_module): Renamed vtab and vtype symbols.
154 * resolve.c (resolve_structure_cons,resolve_typebound_function,
155 resolve_typebound_subroutine,resolve_deallocate_expr,
156 resolve_select_type,resolve_fl_derived): Renamed class container and
158 * trans-array.c (structure_alloc_comps): Ditto.
159 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
160 * trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure,
161 gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto.
162 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof,
163 gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated,
164 gfc_conv_same_type_as): Ditto.
165 * trans-stmt.c (gfc_trans_allocate): Ditto.
167 2010-11-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
170 * trans-decl.c (generate_local_decl): Do not generate unused warning
171 for variables in namelists.
173 2010-11-08 Janus Weil <janus@gcc.gnu.org>
176 * decl.c (build_struct): Build vtab immediately if derived type
177 has already been declared.
179 2010-11-08 Janus Weil <janus@gcc.gnu.org>
182 * trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
184 2010-11-06 Janus Weil <janus@gcc.gnu.org>
187 * trans-expr.c (gfc_trans_class_assign): Find 'vtab' symbol in correct
190 2010-11-05 Janus Weil <janus@gcc.gnu.org>
194 * class.c (gfc_find_derived_vtab): Improved search for existing vtab.
195 Add component '$copy' to vtype symbol for polymorphic deep copying.
196 * expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
197 during resolution stage.
198 * resolve.c (resolve_codes): Don't resolve code if namespace is already
200 * trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
201 polymorphic ALLOCATE statements with SOURCE.
203 2010-11-03 Thomas Koenig <tkoenig@gcc.gnu.org>
204 Paul Thomas <pault@gcc.gnu.org>
206 * dump-parse-tree.c (code_indent): Take label into acount
207 when calculating indent.
208 (show_typespec): Also display class.
209 (show_attr): Add module name to argument.
210 Don't show UNKNOWN for flavor, access and save. Don't show
211 SAVE_NONE. Don't show INTENT_UNKNOWN. Show module for use
212 association. Show intent only for dummy arguments.
213 Set length of shown symbol names to minimum of 12.
214 Show attributes header.
215 (show_symbol): Adjust show_level.
216 (show_symtree): Clear up display for ambiguous. Show if symbol
217 was imported from namespace.
218 (show_code_node): Clear up indenting. Traverse symtree and
219 show code directly instead of calling show_namespace.
221 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
223 * trans-decl.c (add_argument_checking): Use build_zero_cst instead of
225 * trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
226 * trans-stmt.c (gfc_trans_do): Likewise.
228 2010-11-02 Steven G. Kargl < kargl@gcc.gnu.org>
229 Tobias Burnus <burnus@net-b.de>
232 * array.c (gfc_match_array_constructor): Reject deferred type
233 parameter (DTP) in type-spec.
234 * decl.c (char_len_param_value, match_char_length,
235 gfc_match_char_spec, build_sym, variable_decl,
236 enumerator_decl): Support DTP.
237 * expr.c (check_inquiry): Fix check due to support for DTP.
238 * gfortran.h (gfc_typespec): Add Boolean 'deferred'.
239 * misc.c (gfc_clear_ts): Set it to false.
240 * match.c (gfc_match_allocate): Support DTP.
241 * resolve.c (resolve_allocate_expr): Not-implemented error for DTP.
242 (resolve_fl_variable): Add DTP constraint check.
243 * trans-decl.c (gfc_trans_deferred_vars): Add not-implemented
246 2010-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
249 * fortran/match.c (match_derived_type_spec): Reoplace gfc_match_symbol
250 with a gfc_find_symbol to prevent namespace pollution. Remove dead
252 (match_type_spec): Remove parsing of '::'. Collapse character
253 kind checking to one location.
254 (gfc_match_allocate): Use correct locus in error message.
256 2010-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
258 * gfortran.h (gfc_option_t): Replace dump_parse_tree by
259 dump_fortran_original and add dump_fortran_optimized.
260 * lang.opt: Add fdump-fortran-original and
261 fdump-fortran-optimized. Document that fdump-parse-tree is
263 * gfortran.texi: Add -fdump-fortran-original and
264 -fdump-fortran-optimized. -fdump-parse-tree is deprecated.
265 * frontend-passes.c (gfc_run_passes): If optimizing and
266 if gfc_option.dump_fortran_optimized is set, dump the parse tree
268 * parse.c: Rename gfc_option.dump_parse_tree to
269 gfc_option.dump_fortran_original.
270 * options.c (gfc_init_options): Rename gfc_option.dump_parse_tree
271 to gfc_option.dump_fortran_original and handle
272 gfc_option.dump_fortran_optimize.
273 (gfc_post_options): Rename gfc_option.dump_parse_tree
274 to gfc_option.dump_fortran_original.
275 (gfc_handle_option): Rename OPT_fdump_parse_tree to
276 OPT_fdump_fortran_original and gfc_option.dump_parse_tree
277 to gfc_option.dump_fortran_original. Handle
278 OPT_fdump_fortran_optimized.
280 2010-10-30 Janus Weil <janus@gcc.gnu.org>
285 * interface.c (count_types_test): Symmetrize type check.
286 (generic_correspondence): Ditto.
288 2010-10-27 Janus Weil <janus@gcc.gnu.org>
291 * interface.c (compare_allocatable): Handle polymorphic allocatables.
292 (compare_parameter): Add two error messages for polymorphic dummies.
294 2010-10-26 Janus Weil <janus@gcc.gnu.org>
297 * trans.h (gfc_deallocate_scalar_with_status): New prototype.
298 * trans.c (gfc_deallocate_scalar_with_status): New function for
299 deallocation of allocatable scalars.
300 * trans-array.c (structure_alloc_comps): Call it here ...
301 * trans-decl.c (gfc_trans_deferred_vars): ... here ...
302 * trans-stmt.c (gfc_trans_deallocate): ... and here.
304 2010-10-26 Tobias Burnus <burnus@net-b.de>
307 * trans-stmt.c (gfc_trans_allocate): Do a deep-copy for SOURCE=.
310 * trans-array.c (duplicate_allocatable): Use size of type and not
311 the size of the pointer to the type.
313 2010-10-25 Steven G. Kargl <kargl@gcc.gnu.org>
316 * fortran/scanner.c (include_line): Check return value of load_file.
318 2010-10-23 Tobias Burnus <burnus@net-b.de>
321 * expr.c (gfc_check_vardef_context): Fix PROTECTED check.
323 2010-10-21 Janus Weil <janus@gcc.gnu.org>
326 * match.h (gfc_matching_ptr_assignment): New global variable to indicate
327 we're currently matching a (non-proc-)pointer assignment.
328 * decl.c (match_pointer_init): Set it.
329 * match.c (gfc_match_pointer_assignment): Ditto.
330 * primary.c (matching_actual_arglist): New global variable to indicate
331 we're currently matching an actual argument list.
332 (gfc_match_actual_arglist): Set it.
333 (gfc_match_varspec): Reject procedure pointer component calls with
334 missing argument list.
336 2010-10-21 Janus Weil <janus@gcc.gnu.org>
339 * interface.c (gfc_compare_interfaces): Switch arguments of type
340 comparison (important for polymorphic variables).
342 2010-10-21 Tobias Burnus <burnus@net-b.de>
345 * expr.c (gfc_check_vardef_context): Treat pointer functions
348 2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
351 * trans_stmt.c (gfc_trans_stop): Fix whitespace. Build a call to new
352 F08 numeric stop function.
353 * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
354 * trans-decl.c (gfc_build_builtin_function_decls): Build declaration
355 for stop_numeric_f08.
357 2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
359 * gfortran.h: Remove definition of bt enumerator.
360 * libgfortran.h: Add bt enumerator type alighned with defintion.
361 Remove the dtype enumerator, no longer used.
362 previously given in libgfortran/io.h
363 * trans-types.c: Use new bt enumerator.
364 * trans-io.c: Likewise.
366 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
368 * trans-io.c (gfc_build_io_library_fndecls):
369 Array descriptor arguments to transfer_array can be
370 dereferenced recursively.
372 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
377 * trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
378 IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
379 IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
380 IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
381 (gfc_build_io_library_fndecls): Add corresponding function
383 (transfer_expr): If the current transfer is a READ, use
384 the iocall with the original version, otherwise the version
386 (transfer_array_desc): Likewise.
388 2010-10-15 Tobias Burnus <burnus@net-b.de>
391 * trans.h (gfc_add_modify_loc, gfc_evaluate_now_loc): New prototypes.
392 (gfc_trans_runtime_error_vararg): Remove prototype.
393 * trans.c (gfc_add_modify_loc, gfc_evaluate_now_loc): New functions.
394 (gfc_add_modify, gfc_evaluate_now): Use them.
395 (trans_runtime_error_vararg): Renamed from
396 gfc_trans_runtime_error_vararg, made static and use locus.
397 (gfc_trans_runtime_error): Use it.
398 (gfc_trans_runtime_check): Ditto and make use of locus.
399 * trans-stmt.c (gfc_trans_if_1, gfc_trans_simple_do,
400 gfc_trans_do, gfc_trans_do_while): Improve line number
401 associated with generated expressions.
403 2010-10-12 Daniel Kraft <d@domob.eu>
406 * parse.c (parse_associate): Set typespec of associate-name if that of
407 the target is already available.
409 2010-10-10 Janus Weil <janus@gcc.gnu.org>
412 * resolve.c (resolve_typebound_function): Bugfix for type-bound
415 2010-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
417 * frontend-passes.c: Include opts.h.
418 (optimize_comparison): Renamed from optimize_equality.
419 Change second argument to operation to be compared.
420 Use flag_finite_math_only to avoid comparing REAL and
421 COMPLEX only when NANs are honored. Simplify comparing
422 of string concatenations where left or right operands are
423 equal. Simplify all comparison operations, based on the result
424 of gfc_dep_compare_expr.
425 * dependency.c: Include arith.h.
426 (gfc_are_identical_variables): Volatile variables should not
427 compare equal to themselves.
428 (gfc_dep_compare_expr): Handle string constants and string
431 2010-10-08 Joseph Myers <joseph@codesourcery.com>
433 * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
434 * gfortran.h (gfc_init_options_struct): Declare.
435 * options.c (gfc_init_options_struct): New. Split out from
438 2010-10-07 Janus Weil <janus@gcc.gnu.org>
441 * resolve.c (resolve_typebound_function): Use correct declared type
442 for type-bound operators.
444 2010-10-07 Mikael Morin <mikael@gcc.gnu.org>
447 Revert revision 165026:
448 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
450 * decl.c (match_procedure_in_type): Assertify if conditions.
452 2010-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
455 * resolve.c (resolve_transfer): Use expression inside parenthesis to
456 find acutal component to be transgferred.
458 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
460 * trans-stmt.c (gfc_trans_allocate): free lhs expr.
462 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
464 * trans-array.c (gfc_free_ss_chain): Made non-static.
465 * trans-array.h (gfc_free_ss_chain): New prototype.
466 * trans-stmt.c (gfc_trans_where_2): Free ss chains.
468 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
470 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
473 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
475 * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
477 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
479 * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
480 before calling gfc_free_expr.
482 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
484 * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
485 gfc_advance_se_ss_chain.
486 * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
487 gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
488 calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
489 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
490 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
492 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
494 * trans.c (gfc_restore_backend_locus): New function.
495 (gfc_get_backend_locus): Renamed to ...
496 (gfc_save_backend_locus): ... this.
497 * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
498 gfc_save_backend_locus): Same.
499 * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
500 gfc_trans_deferred_array): Rename gfc_get_backend_locus to
501 gfc_save_backend_locus.
502 (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
504 (gfc_trans_g77_array, gfc_trans_deferred_array): Use
505 gfc_restore_backend_locus instead of gfc_set_backend_locus.
506 (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
508 * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
509 gfc_trans_deferred_vars):
510 Rename gfc_get_backend_locus to gfc_save_backend_locus.
511 Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
513 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
515 * trans-array.c (gfc_build_constant_array_constructor): Free array
518 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
520 * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
521 before overwriting it.
523 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
525 * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
526 * symbol.c (gen_shape_param): Ditto.
528 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
530 * symbol.c (free_entry_list): New function.
531 (gfc_free_namespace): Free list of entries.
533 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
535 * symbol.c (free_components): Free list of formal args and formal
538 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
540 * simplify.c (gfc_simplify_size): Clear temporary mpz int before
543 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
545 * resolve.c (add_dt_to_dt_list): Remove unneeded if.
547 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
549 * resolve.c (check_typebound_baseobject): Free local expr before
552 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
554 * primary.c (gfc_match_structure_constructor): Invert the assert logic.
556 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
558 * primary.c (gfc_free_structure_ctor_component): Also free the
559 component structure itself.
561 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
563 * module.c (gfc_use_module): Free atom_string when done with it.
565 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
567 * module.c (read_module): Remove useless string duplication.
569 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
571 * gfortranspec.c (append_arg): Remove commented code.
573 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
575 * decl.c (match_procedure_in_type): Assertify if conditions.
577 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
579 * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
580 preprocessing is disabled.
582 2010-10-06 Jakub Jelinek <jakub@redhat.com>
585 * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
586 ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
587 (gfc_define_builtin): Change last argument to int bitmask from bool,
588 control addition of TREE_NOTHROW and leaf attribute as well.
589 (DO_DEFINE_MATH_BUILTIN): Adjust callers.
590 (gfc_init_builtin_functions): Likewise. Remove
591 ATTR_{,CONST_}NOTHROW_LIST enum.
593 2010-10-04 Andi Kleen <ak@linux.intel.com>
595 * Make-lang.in (gfortran, f951): Add + to build rule.
597 2010-10-04 Richard Guenther <rguenther@suse.de>
599 * f95-lang.c (current_translation_unit): New global variable.
600 (gfc_create_decls): Build a translation-unit decl.
601 (pushdecl): In the global binding-level use the
602 translation-unit decl as DECL_CONTEXT.
603 * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
604 (build_function_decl): Likewise. Delay setting the assembler
605 name, leave setting of DECL_CONTEXT to pushdecl.
606 (trans_function_start): Use DECL_FILE_SCOPE_P.
607 (gfc_create_module_variable): Likewise. Remove questionable
609 * trans.c (gfc_generate_module_code): Likewise.
611 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
613 * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
614 instead of duplicating code.
615 * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
618 2010-10-02 Janus Weil <janus@gcc.gnu.org>
621 * resolve.c (resolve_formal_arglist): Avoid setting default type for
622 formal arguments of intrinsic procedures.
624 2010-09-30 Janus Weil <janus@gcc.gnu.org>
627 * resolve.c (resolve_allocate_expr): Do not use
628 'gfc_has_default_initializer'.
630 2010-09-30 Tobias Burnus <burnus@net-b.de>
632 * gfortran.tex (Fortran 2008 status): Update list of
633 implemented features.
635 2010-09-29 Joseph Myers <joseph@codesourcery.com>
637 * lang.opt: Don't use VarExists.
639 2010-09-29 Joseph Myers <joseph@codesourcery.com>
641 * cpp.c (cpp_define_builtins): Update names of gfc_option_t
643 (gfc_cpp_post_options): Update names of cpp_options members.
644 (cb_cpp_error): Update names of diagnostic_context members.
645 * f95-lang.c (gfc_init_builtin_functions): Update names of
646 gfc_option_t members.
647 * gfortran.h (gfc_option_t): Rename warn_conversion and
649 * intrinsic.c (gfc_convert_type_warn): Update names of
650 gfc_option_t members.
651 * options.c (gfc_init_options, gfc_post_options, set_Wall,
652 gfc_handle_option): Update names of gfc_option_t members.
653 * parse.c (next_free, next_fixed): Update names of gfc_option_t
655 * scanner.c (pedantic): Remove extern declaration.
656 (skip_free_comments, skip_fixed_comments, include_line): Update
657 names of gfc_option_t members.
658 * trans-decl.c (gfc_generate_function_code): Update names of
659 gfc_option_t members.
661 2010-09-28 Tobias Burnus <burnus@net-b.de>
665 * intrinsic.c (add_functions): Make compiler_version and
666 compiler_options CLASS_INQUIRY.
667 * gfortran.h (gfc_get_option_string): New prototype.
668 * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
670 (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
671 (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
672 (ISO_C_BINDING): Refer to C_SIZEOF.
673 * options.c (gfc_get_option_string): New function.
674 * simplify.c (gfc_simplify_compiler_options): Use it.
675 (gfc_simplify_compiler_version): Include compiler name.
677 2010-09-28 Jan Hubicka <jh@suse.cz>
679 * f95-lang.c (gfc_define_builtin): Make leaf.
680 (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
681 and ATTR_NOTHROW_LEAF_LIST.
682 (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
683 (DEF_GOMP_BUILTIN): Likewise.
685 2010-09-28 Tobias Burnus <burnus@net-b.de>
688 * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
691 2010-09-27 Tobias Burnus <burnus@net-b.de>
695 * intrinsic.h (gfc_simplify_compiler_options,
696 gfc_simplify_compiler_version): New prototypes.
697 * intrinsic.c (gfc_intrinsic_function_by_id,
698 make_from_module): New functions.
699 (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
700 gfc_specific_intrinsic): Don't return module intrinsics.
701 (add_functions): Add compiler_options, compiler_version.
702 (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
703 * symbol.c (std_for_isocbinding_symbol): Add version check for
705 * iso-fortran-env.def: Add compiler_options, compiler_version.
706 * iso-c-binding.def: Add c_sizeof.
707 * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
708 (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
709 (gfc_intrinsic_function_by_id): New prototype.
710 * module.c (create_intrinsic_function): New function.
711 (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
712 * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
713 * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
715 * simplify.c (gfc_simplify_compiler_options,
716 gfc_simplify_compiler_version): New functions.
718 2010-09-26 Daniel Kraft <d@domob.eu>
722 * resolve.c (resolve_select_type): Clarify code.
723 (resolve_assoc_var): Only set typespec if it is currently unknown.
725 2010-09-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
728 * module.c (create_int_parameter_array): Set the array value shape.
730 2010-09-25 Tobias Burnus <burnus@net-b.de>
732 * gfortran.texi: Re-add accidently removed \input line.
734 2010-09-25 Daniel Kraft <d@domob.eu>
737 * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
738 * io.c (resolve_tag): F2008 check for NEWUNIT and variable
739 definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
740 (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
741 `extra_comma' with changed semantics.
742 (gfc_resolve_dt): Check variable definitions.
743 (match_io_element): Remove INTENT and PURE checks here and
744 initialize code->ext.dt member.
745 (match_io): Set dt->dt_io_kind.
746 (gfc_resolve_inquire): Check variable definition for all tags
747 except UNIT, FILE and ID.
748 * resolve.c (resolve_transfer): Variable definition check.
750 2010-09-25 Tobias Burnus <burnus@net-b.de>
752 * interface.c (gfc_match_end_interface): Constify char pointer
755 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>
757 * interface.c (gfc_match_end_interface): Deal with user defined
758 operators that overload rational operators and C1202.
760 2010-09-24 Tobias Burnus <burnus@net-b.de>
762 * gfortran.texi: Add second space after end-of-sentence period;
763 change / to /@/ to allow hyphenation of URLs.
764 (Standards): Remove duplicated OpenMP, update wording given that
765 Fortran 2008 now released.
766 (Fortran 2008 status): Update and add list of implemented features.
768 2010-09-24 Tobias Burnus <burnus@net-b.de>
771 * iso-fortran-env.def: Add NAMED_KINDARRAY with
772 character_kinds, integer_kinds, logical_kinds and
774 * gfortran.h: Add them to iso_fortran_env_symbol.
775 * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
776 LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
777 libgfortran_stat_codes to libgfortran_error_codes.
778 * module.c (create_int_parameter_array): New function.
779 (use_iso_fortran_env_module): Use it for
780 NAMED_KINDARRAY of iso-fortran-env.def.
781 * trans-decl.c (gfc_get_symbol_decl): Parameter
782 arrays of intrinsics modules become local static variables.
783 * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
784 integer_kinds, logical_kinds and real_kinds.
786 2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
789 * frontend-passes.c (optimize_binop_array_assignment):
790 Only re-use lhs as intermediate storage if kind and type
793 2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
797 * trans-array.c (gfc_conv_expr_descriptor): Handle
798 ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
800 2010-09-23 Tobias Burnus <burnus@net-b.de>
802 * intrinsic.texi (OpenMP modules): Add named constants of
805 2010-09-23 Daniel Kraft <d@domob.eu>
810 * gfortran.h (gfc_check_vardef_context): New method.
811 (struct symbol_attribute): New flag `select_type_temporary'.
812 * primary.c (gfc_variable_attr): Clarify initialization of ref.
813 (match_variable): Remove PROTECTED check and assignment check
814 for PARAMETERs (this is now done later).
815 * match.c (gfc_match_iterator): Remove INTENT(IN) check.
816 (gfc_match_associate): Defer initialization of newAssoc->variable.
817 (gfc_match_nullify): Remove PURE definability check.
818 (select_type_set_tmp): Set new `select_type_temporary' flag.
819 * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
820 (gfc_check_pointer_assign): Ditto (and other checks removed).
821 (gfc_check_vardef_context): New method.
822 * interface.c (compare_parameter_protected): Removed.
823 (compare_actual_formal): Use `gfc_check_vardef_context' for checks
824 related to INTENT([IN]OUT) arguments.
825 * intrinsic.c (check_arglist): Check INTENT for intrinsics.
826 * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
827 (remove_last_array_ref): New method.
828 (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
829 (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
830 (resolve_assoc_var): Remove checks for definability here.
831 (resolve_select_type): Handle resolving of code->block here.
832 (resolve_ordinary_assign): Remove PURE check.
833 (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
834 Use `gfc_check_vardef_context' for assignments and pointer-assignments.
836 2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
838 * gfortran.texi (Argument list functions): Allow URL to wrap.
839 * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
840 (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
841 (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
842 code markups in the text.
843 * invoke.texi (Fortran Dialect Options)
844 (Error and Warning Options, Directory Options, Code Gen Options):
845 Likewise. Remove @code inside @smallexample.
847 2010-09-22 Joseph Myers <joseph@codesourcery.com>
849 * gfortranspec.c (lang_specific_driver): Handle OPT__version and
850 OPT__help instead of OPT_fversion and OPT_fhelp.
851 * lang.opt (-all-warnings, -assert, -assert=, -comments,
852 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
853 -dump, -dump=, -include-barrier, -include-directory,
854 -include-directory=, -include-directory-after,
855 -include-directory-after=, -include-prefix, -include-prefix=,
856 -no-line-commands, -no-standard-includes, -output, -output=,
857 -preprocess, -print-missing-file-dependencies, -trace-includes,
858 -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
859 -write-dependencies, -write-user-dependencies): New.
861 2010-09-21 Jason Blevins <jrblevin@sdf.org>
863 * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
864 execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
867 2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
870 * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
874 * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
875 accessing dimensions in reversed order.
878 * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
879 intrinsic function call.
881 * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
882 Update asserts accordingly.
885 * trans.h (gfc_se): New field force_tmp.
886 * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
887 and set parmse.force_tmp if some alias is found.
888 * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
889 if se->force_tmp is set.
891 2010-09-20 Janus Weil <janus@gcc.gnu.org>
894 * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
895 TBPs, PPCs and pointer/allocatable components.
897 2010-09-20 Paul Thomas <pault@gcc.gnu.org>
900 * simplify.c (is_constant_array_expr): Allow structure array
901 elements as well as constants.
902 (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
903 gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
904 type of source to the result.
906 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
908 * frontend-passes.c (gfc_expr_walker): Also
909 handle EXPR_SUBSTRING.
911 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
913 * frontend-passes.c (gfc_expr_walker): Handle
914 constructors and references.
916 2010-09-16 Tobias Burnus <burnus@net-b.de>
919 * trans-types.c (create_fn_spec): New function.
920 (gfc_get_function_type): Call it.
922 2010-09-16 Jakub Jelinek <jakub@redhat.com>
924 * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
925 (gfc_expr_walker, gfc_code_walker): New prototypes.
926 * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
927 (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
928 (optimize_namespace): Use gfc_code_walker.
929 (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
930 (optimize_expr_0, optimize_code_node,
931 optimize_actual_arglist): Removed.
932 (optimize_assignment): Don't call optimize_expr_0.
934 2010-09-16 Janus Weil <janus@gcc.gnu.org>
937 * interface.c (compare_parameter): Create vtab for actual argument,
938 instead of formal (if needed).
940 2010-09-15 Janus Weil <janus@gcc.gnu.org>
943 * resolve.c (resolve_allocate_expr): Do default initialization via
946 2010-09-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
948 * mathbuiltins.def: Do not defined huge_val built-in.
949 * trans-const.c (gfc_build_inf_or_huge): New function.
950 * trans-const.h (gfc_build_inf_or_huge): New prototype.
951 * f95-lang.c (gfc_init_builtin_functions): Don't defined
953 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
954 have functions of type (*) (void) anymore.
955 (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
956 (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
957 of generating a call to huge_val().
959 2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
961 * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
962 * dependency.c (gfc_check_dependency): Don't depend on
963 expr's inline_noncopying_intrinsic_attribute.
964 * dependency.c (gfc_check_argument_var_dependency,
965 gfc_check_argument_dependency): Ditto. Recursively check dependency
966 as NOT_ELEMENTAL in the non-copying (=transpose) case.
967 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
968 * resolve.c (find_noncopying_intrinsics): Remove.
969 (resolve_function, resolve_call): Remove call to
970 find_noncopying_intrinsics.
972 * trans-array.c (gfc_conv_array_transpose): Remove.
973 (gfc_walk_subexpr): Make non-static. Move prototype...
974 * trans-array.h (gfc_walk_subexpr): ... here.
975 * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
977 (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
978 gfc_inline_intrinsic_function_p): New.
979 (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
980 Remove transpose from the libcall list.
981 (gfc_walk_intrinsic_function): Special case inline intrinsic.
982 * trans.h (gfc_inline_intrinsic_function_p): New prototype.
984 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
986 * trans-expr.c (expr_is_variable): New function taking non-copying
987 intrinsic functions into account.
988 (gfc_trans_assignment_1): Use expr_is_variable.
990 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
992 * trans-array.c (gfc_conv_loop_setup): Access the shape along the
993 real array dimension instead of the scalarizer (loop) dimension.
995 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
997 * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
998 transposed references.
1000 2010-09-10 Tobias Burnus <burnus@net-b.de>
1003 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
1004 build4_stat_loc): New inline functions.
1005 (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
1006 (build1_v, build2_v, build3_v, build4_v): Use input_location
1008 * trans-array.c (gfc_trans_scalarized_loop_end,
1009 gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
1010 * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
1011 gfc_finish_wrapped_block): Ditto.
1012 * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
1013 * trans-expr.c (gfc_conv_missing_dummy,
1014 gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
1015 * trans-openmp.c (gfc_omp_clause_default_ctor,
1016 gfc_trans_omp_critical, gfc_trans_omp_parallel,
1017 gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
1018 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
1019 gfc_trans_omp_single, gfc_trans_omp_task,
1020 gfc_trans_omp_workshare): Ditto.
1022 2010-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
1024 * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
1025 for dummy argument that appears in a specification statement.
1027 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1029 * trans-array.c (gfc_get_array_ref_dim): New function.
1030 (gfc_trans_create_temp_array): Reconstruct array
1031 bounds from loop bounds. Use array bounds instead of loop bounds.
1033 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1035 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1036 Get the array dimension from the dim array.
1038 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1040 * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
1041 dim array to get the stride in the innermost loop.
1043 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1045 * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
1046 (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
1047 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1049 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1051 * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
1052 and info dimension are the same. Loop over loop dimension.
1053 * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
1055 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
1057 * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
1060 2010-09-09 Tobias Burnus <burnus@net-b.de>
1063 * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
1064 STAT): Show also syntax for the function version.
1065 * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
1066 add_sym_3s_intent): Remove function.
1067 (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
1069 (add_sym_2_intent): New function.
1070 (add_functions): Set intent for functions which modify
1071 the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
1072 argument name of hostnm from "a" to "c"
1073 (add_subroutines): Change add_sym_*s_intent to
1074 add_sym_*s and add intent to the add_sym_*s calls.
1076 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1079 * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
1080 MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
1081 * gfortran.h: Define ISYM values for above intrinsics.
1082 * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1083 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
1084 gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1085 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1086 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1087 gfc_simplify_merge_bits, gfc_simplify_rshift,
1088 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
1089 gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
1090 gfc_resolve_shift): New prototypes.
1091 * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
1092 gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
1093 * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1094 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
1096 * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
1097 gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
1098 gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
1100 (gfc_conv_intrinsic_function): Call above static functions.
1101 * intrinsic.texi: Document new intrinsics.
1102 * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1103 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1104 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1105 gfc_simplify_merge_bits, gfc_simplify_rshift,
1106 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
1109 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1111 * frontend-passes.c (optimize_code_node): Walk block chain by default.
1114 * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
1115 instead of code->block.
1118 * openmp.c (resolve_omp_do): Report not enough do loops for
1119 collapse even if block->next is NULL.
1121 2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1124 * dependency.c (gfc_deb_compare_expr): Take missing optional
1125 arguments into account.
1127 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1129 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1130 * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1131 (gfc_build_intrinsic_function_decls): Don't build the
1132 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
1133 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
1134 gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
1135 of calling clz128/ctz128 library functions.
1137 2010-09-07 Jan Hubicka <jh@suse.cz>
1139 * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
1142 2010-09-07 Tobias Burnus <burnus@net-b.de>
1145 * intrinsic.texi (COS): Remove superfluous "n".
1147 2010-09-07 Tobias Burnus <burnus@net-b.de>
1150 * trans-array.c (gfc_conv_descriptor_data_get,
1151 gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
1152 gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
1153 gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
1154 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
1155 gfc_conv_shift_descriptor_lbound,
1156 gfc_set_loop_bounds_from_array_spec,
1157 gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
1158 gfc_conv_array_transpose, gfc_get_iteration_count,
1159 gfc_grow_array, gfc_trans_array_ctor_element,
1160 gfc_trans_array_constructor_subarray,
1161 gfc_trans_array_constructor_value,
1162 constant_array_constructor_loop_size, gfc_trans_array_constructor,
1163 gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
1164 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1165 gfc_conv_array_ref, gfc_trans_preloop_setup,
1166 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1167 gfc_conv_loop_setup, gfc_conv_array_extent_dim,
1168 gfc_conv_descriptor_size, gfc_array_init_size,
1169 gfc_array_allocate, gfc_array_deallocate,
1170 gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
1171 gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
1172 get_array_charlen, gfc_conv_expr_descriptor,
1173 array_parameter_size, gfc_conv_array_parameter,
1174 gfc_trans_dealloc_allocated, get_full_array_size,
1175 duplicate_allocatable,
1176 structure_alloc_comps): Change fold_build[0-9] to
1177 fold_build[0-9]_loc.
1178 (duplicate_allocatable, structure_alloc_comps,
1179 gfc_duplicate_allocatable): Add space after function name.
1181 2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
1183 * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
1184 checking string length value.
1185 * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
1186 gfc_charlen_type_node type.
1189 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
1190 length to gfc_charlen_type_node.
1192 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1195 * frontend-passes.c (optimize_binop_array_assignment): New
1197 (optimize_assignment): Call it.
1199 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1202 * trans-expr.c (gfc_conv_substring): If start and end
1203 of the string reference are equal, set the length to one.
1205 2010-09-06 Tobias Burnus <burnus@net-b.de>
1208 * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
1210 2010-09-06 Tobias Burnus <burnus@net-b.de>
1213 * dump-parse-tree.c (gfc_debug_expr): New function.
1215 2010-09-06 Tobias Burnus <burnus@net-b.de>
1218 * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
1219 (check_specific): Special case for those intrinsics.
1220 * gfortran.h (gfc_isym_id): Add new intrinsics
1221 * intrinsic.h (gfc_check_transf_bit_intrins,
1222 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1223 gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
1225 * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
1226 gfc_resolve_iparity, resolve_transformational): New functions.
1227 (gfc_resolve_product, gfc_resolve_sum,
1228 gfc_resolve_parity): Use resolve_transformational.
1229 * check.c (gfc_check_transf_bit_intrins): New function.
1230 * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
1231 gfc_simplify_iparity, do_bit_any, do_bit_ior,
1232 do_bit_xor, simplify_transformation): New functions.
1233 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
1234 gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
1235 * trans-intrinsic.c (gfc_conv_intrinsic_arith,
1236 gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
1237 Handle IALL, IANY and IPARITY intrinsics.
1238 * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
1240 (IALL, IANY, IPARITY): Document new intrinsics.
1242 2010-09-05 Tobias Burnus <burnus@net-b.de>
1245 * f95-lang.c (gfc_truthvalue_conversion): Use
1246 fold_build[0-9]_loc instead of fold_build[0-9].
1247 * convert.c (convert): Ditto.
1248 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1249 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1250 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1251 gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
1252 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
1253 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1254 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1255 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
1256 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1257 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1258 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
1259 gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
1260 gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
1261 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1262 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
1263 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1264 gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
1265 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
1266 gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
1267 gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
1268 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
1269 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
1270 size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
1271 gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
1272 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
1273 gfc_conv_associated, gfc_conv_same_type_as,
1274 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
1276 2010-09-04 Tobias Burnus <burnus@net-b.de>
1279 * resolve.c (resolve_fl_namelist): Change constraint checking
1280 order to prevent endless loop.
1282 2010-09-04 Janus Weil <janus@gcc.gnu.org>
1285 * resolve.c (resolve_allocate_expr): Generate default initializers
1286 already at this point, resolve them and put them into expr3, ...
1287 * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
1290 2010-09-03 Tobias Burnus <burnus@net-b.de>
1293 * trans-intrinsic.c (gfc_conv_intrinsic_sign,
1294 gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
1296 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1297 gfc_conv_string_length, gfc_conv_substring,
1298 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1299 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1300 gfc_conv_expr_op, gfc_build_compare_string,
1301 gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
1302 gfc_conv_derived_to_class, conv_isocbinding_procedure,
1303 gfc_conv_procedure_call, fill_with_spaces,
1304 gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
1305 gfc_trans_structure_assign, gfc_trans_pointer_assignment,
1306 gfc_trans_scalar_assign, gfc_trans_zero_assign,
1307 gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
1308 fold_build[0-9] to fold_build[0-9]_loc.
1309 * trans-io.c (set_parameter_const, set_parameter_value,
1310 set_parameter_ref, gfc_convert_array_to_string, set_string,
1311 set_internal_unit, io_result, set_error_locus,
1312 nml_get_addr_expr, build_dt): Ditto.
1313 * trans-openmp.c (gfc_omp_clause_default_ctor,
1314 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1315 gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
1316 gfc_trans_omp_do): Ditto.
1317 * trans.c (gfc_add_modify, gfc_build_addr_expr,
1318 gfc_build_array_ref, gfc_trans_runtime_error_vararg,
1319 gfc_trans_runtime_check, gfc_call_malloc,
1320 gfc_allocate_with_status, gfc_allocate_array_with_status,
1321 gfc_call_free, gfc_deallocate_with_status,
1322 gfc_call_realloc): Ditto.
1324 2010-09-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1327 * dependency.c (gfc_deb_compare_expr): Compare equal for equal
1328 arglists for pure user functions, or for those intrinsic
1329 functions which are also pure.
1330 * intrinsics.c (add_conv): Mark conversion functions as pure.
1331 (add_char_conversions): Likewise.
1333 2010-09-03 Daniel Kraft <d@domob.eu>
1336 * resolve.c (resolve_actual_arglist): Allow internal procedure
1337 as actual argument with Fortran 2008.
1339 2010-09-03 Daniel Kraft <d@domob.eu>
1342 * gfortran.h (struct gfc_code): Renamed `whichloop' to
1343 `which_construct' as this is no longer restricted to loops.
1344 * parse.h (struct gfc_state_data): New field `construct'.
1345 * match.c (match_exit_cycle): Handle EXIT from non-loops.
1346 * parse.c (push_state): Set `construct' field.
1347 * resolve.c (resolve_select_type): Extend comment.
1348 * trans-stmt.c (gfc_trans_if): Add exit label.
1349 (gfc_trans_block_construct), (gfc_trans_select): Ditto.
1350 (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
1351 (gfc_trans_do), (gfc_trans_do_while): Ditto.
1352 (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
1353 (gfc_trans_cycle): Ditto.
1354 (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
1356 2010-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1358 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
1359 (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
1360 (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
1361 * intrinsic.texi (RSHIFT): Fix documentation.
1363 2010-09-02 Tobias Burnus <burnus@net-b.de>
1366 * trans-common.c (create_common): Change build[0-9] to
1368 * trans-const.c (gfc_conv_constant_to_tree,
1369 gfc_conv_constant_to_tree): Ditto.
1370 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1371 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1372 add_argument_checking, create_main_function,
1373 gfc_generate_return): Ditto.
1374 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
1375 * trans-stmt.c (allocate_temp_for_forall_nest_1,
1376 compute_inner_temp_size, compute_overall_iter_number,
1377 generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
1378 gfc_conv_elemental_dependencies, gfc_do_allocate,
1379 gfc_evaluate_where_mask, gfc_trans_allocate,
1380 gfc_trans_arithmetic_if, gfc_trans_call,
1381 gfc_trans_character_select, gfc_trans_deallocate,
1382 gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
1383 gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
1384 gfc_trans_integer_select, gfc_trans_logical_select,
1385 gfc_trans_pointer_assign_need_temp, gfc_trans_return,
1386 gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
1387 gfc_trans_where_assign) Ditto.
1389 2010-09-02 Janus Weil <janus@gcc.gnu.org>
1392 * resolve.c (resolve_symbol): Correct check for attributes of CLASS
1395 2010-09-02 Tobias Burnus <burnus@net-b.de>
1398 * resolve.c (apply_default_init): Mark symbol as referenced,
1399 if it is initialized.
1400 (resolve_symbol): Change intialized check for BT_DERIVED such
1401 that also function results get initialized; remove now obsolete
1402 gfc_set_sym_referenced for BT_CLASS.
1404 2010-09-01 Janus Weil <janus@gcc.gnu.org>
1407 * class.c (gfc_find_derived_vtab): Add component '$def_init'.
1408 * resolve.c (resolve_allocate_expr): Defer handling of default
1409 initialization to 'gfc_trans_allocate'.
1410 (apply_default_init,resolve_symbol): Handle polymorphic dummies.
1411 (resolve_fl_derived): Suppress error messages for vtypes.
1412 * trans-stmt.c (gfc_trans_allocate): Handle initialization via
1413 polymorphic MOLD expression.
1414 * trans-expr.c (gfc_trans_class_init_assign): Now only used for
1415 dummy initialization.
1417 2010-09-01 Tobias Burnus <burnus@net-b.de>
1419 * gfortran.texi (preprocessing): Update URL to COCO.
1421 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1423 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
1424 array quad_decls. Remove unnecessary assignment.
1426 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1428 * trans-expr.c (gfc_conv_power_op): Handle floating-point types
1429 other than long double.
1430 * mathbuiltins.def: Add builtins from the POW and CPOW family.
1431 * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
1432 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
1433 prefix to function name.
1434 (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
1435 (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
1437 (gfc_conv_intrinsic_exponent): Likewise.
1438 (gfc_conv_intrinsic_abs): Likewise.
1439 (gfc_conv_intrinsic_mod): Likewise.
1440 (gfc_conv_intrinsic_sign): Likewise.
1441 (gfc_conv_intrinsic_arith): Likewise.
1442 (gfc_conv_intrinsic_fraction): Likewise.
1443 (gfc_conv_intrinsic_nearest): Likewise.
1444 (gfc_conv_intrinsic_spacing): Likewise.
1445 (gfc_conv_intrinsic_rrspacing): Likewise.
1446 (gfc_conv_intrinsic_scale): Likewise.
1447 (gfc_conv_intrinsic_set_exponent): Likewise.
1449 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1451 * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
1452 * intrinsic.h (gfc_resolve_execute_command_line): New function.
1453 * iresolve.c (gfc_resolve_execute_command_line): New function.
1454 * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
1455 * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1457 2010-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1460 * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1461 and parity{,l,ll} builtins.
1462 * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1463 (gfc_conv_intrinsic_function): Call above new functions.
1464 * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1466 * intrinsic.texi: Document POPCNT and POPPAR.
1468 2010-08-30 Janus Weil <janus@gcc.gnu.org>
1471 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1473 2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1475 * Make-lang.in: Add frontend-passes.o dependencies.
1477 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1480 * resolve.c (resolve_structure_cons): For derived types, make sure the
1481 type has been resolved.
1482 (resolve_typebound_procedures): Make sure the vtab has been generated.
1484 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1487 * match.c (gfc_match_select_type): Give the associate-name the
1488 FL_VARIABLE attribute.
1490 2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1492 * simplify.c (gfc_simplify_bessel_n2): Fix indention
1495 2010-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1498 * trans-types.c (gfc_init_kinds): Disable TFmode.
1500 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1503 * match.c (gfc_match_allocate): Avoid double free on error.
1505 2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1508 * gfortran.h (gfc_real_info): Add c_float128 field.
1509 * mathbuiltins.def: Indicate which builtins are const.
1510 * trans-types.h (float128_type_node, complex_float128_type_node,
1511 gfc_real16_is_float128): New variables.
1512 * trans-types.c (float128_type_node, complex_float128_type_node,
1513 gfc_real16_is_float128): New variables.
1514 (gfc_init_kinds): Allow TFmode.
1515 (gfc_build_real_type): Mark __float128 types as such.
1516 (gfc_init_types): Initialize float128_type_node and
1517 complex_float128_type_node
1518 * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1519 argument of OTHER_BUILTIN macro.
1520 * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1521 (builtin_decl_for_precision): Special case for __float128.
1522 (builtin_decl_for_float_kind): Likewise.
1523 (define_quad_builtin): New function.
1524 (gfc_build_intrinsic_lib_fndecls): Create all __float128
1525 library decls if necessary. Store them in the real16_decl and
1526 complex16_decl builtin map fields.
1527 (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1528 library function names.
1530 2010-08-27 Tobias Burnus <burnus@net-b.de>
1533 * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1534 * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1535 gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1536 gfc_resolve_parity): New prototypes.
1537 * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1538 GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1539 * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1540 gfc_resolve_parity): New functions.
1541 * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1543 * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1544 gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1545 * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1546 * gcc/fortran/simplify.c (simplify_transformation_to_array):
1547 Add post-processing opterator.
1548 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1549 gfc_simplify_product, gfc_simplify_sum): Update call.
1550 (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1551 gfc_simplify_parity): New functions.
1553 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1556 * match.c (select_type_set_tmp): Add the possibility to reset the
1558 (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1560 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1563 * dependency.c (check_section_vs_section): Single test for
1564 identical strides which takes into account that only one
1565 of the strides may be NULL.
1567 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1570 * primary.c (match_hollerith_constant): Calculate padding needed to
1571 fill default integer and allocate string for that size. Set pad bytes
1573 * gfortran.h: Add hollerith pad value to type spec union.
1574 * data.c (create_character_initializer): Fix spelling of function name.
1575 Use hollerith pad value to calculate length.
1576 * arith.c (hollerith2representation); Use hollerith pad value to
1579 2010-08-26 Daniel Kraft <d@domob.eu>
1584 * gfortran.h (struct gfc_association_list): New flag `dangling'.
1585 (gfc_build_block_ns): Declared here...
1586 * parse.h (gfc_build_block_ns): ...instead of here.
1587 * trans.h (gfc_process_block_locals): Expect additionally the
1588 gfc_association_list of BLOCK (if present).
1589 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1590 * resolve.c (resolve_variable): Only check for invalid *array*
1591 references on associate-names.
1592 (resolve_assoc_var): New method with code previously in resolve_symbol.
1593 (resolve_select_type): Use association to give the selector and
1594 temporaries their values instead of ordinary assignment.
1595 (resolve_fl_var_and_proc): Allow CLASS associate-names.
1596 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1597 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1598 to `gfc_process_block_locals' to match new interface.
1599 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1601 (gfc_process_block_locals): Defer them rather here when linked to
1602 from the BLOCK's association list.
1604 2010-08-25 Jakub Jelinek <jakub@redhat.com>
1606 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1607 TREE_NOTHROW on fndecls that can't throw. Set
1608 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1609 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1610 gfor_fndecl_associated.
1612 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
1615 * frontend-passes.c (optimize_equality): Don't optimize array equality
1617 2010-08-23 Janus Weil <janus@gcc.gnu.org>
1620 * resolve.c (resolve_procedure_interface): New function split off from
1622 (resolve_formal_arglist): Call it here ...
1623 (resolve_symbol): ... and here.
1625 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1627 * Make-lang.in (gfortranspec.o): Update dependencies.
1628 * gfortranspec.c: Include coretypes.h before gcc.h. Include
1630 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1631 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1632 (g77_xargc): Make unsigned.
1633 (g77_xargv): Change to g77_x_decoded_options.
1634 (g77_newargc): Make unsigned.
1635 (g77_newargv): Change to g77_new_decoded_options.
1636 (strings_same, options_same): New.
1637 (append_arg): Use cl_decoded_option structures.
1638 (append_option): New.
1639 (add_arg_libgfortran): New.
1640 (lang_specific_driver): Use cl_decoded_option structures.
1642 2010-08-21 Janus Weil <janus@gcc.gnu.org>
1646 * class.c (add_proc_comp): Add static initializer for PPCs.
1647 (add_procs_to_declared_vtab): Modified comment.
1648 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1649 initializer if the component is part of a vtype.
1650 (mio_component_list): Add argument 'vtype', pass it on to
1652 (mio_symbol): Modified call to 'mio_component_list'.
1653 * trans.h (gfc_conv_initializer): Modified prototype.
1654 (gfc_trans_assign_vtab_procs): Removed.
1655 * trans-common.c (create_common): Modified call to
1656 'gfc_conv_initializer'.
1657 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1658 gfc_emit_parameter_debug_info): Modified call to
1659 'gfc_conv_initializer'.
1660 (build_function_decl): Remove assertion.
1661 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1662 Removed call to 'gfc_trans_assign_vtab_procs'.
1663 (gfc_conv_initializer): Add argument 'procptr'.
1664 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1665 (gfc_trans_assign_vtab_procs): Removed.
1666 * trans-stmt.c (gfc_trans_allocate): Removed call to
1667 'gfc_trans_assign_vtab_procs'.
1669 2010-08-21 Tobias Burnus <burnus@net-b.de>
1673 * intrinsic.c (add_sym): Init value attribute.
1674 (set_attr_value): New function.
1675 (add_functions) Use it and add JN/YN resolvers.
1676 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1677 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1678 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1679 * iresolve.c (gfc_resolve_bessel_n2): New function.
1680 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1682 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1683 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1684 * simplify.c (): For YN set to -INF if previous values
1686 * trans-expr.c (gfc_conv_procedure_call): Don't crash
1688 * iresolve.c (gfc_resolve_extends_type_of): Set the
1689 type of the dummy argument to the one of the actual.
1691 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1693 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1695 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1697 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1700 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1702 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1704 2010-08-19 Daniel Kraft <d@domob.eu>
1708 * trans.h (struct gfc_se): New flag `byref_noassign'.
1709 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1710 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1711 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1712 and check for compile-time errors with those.
1713 * trans-decl.c (trans_associate_var): Use new routine
1714 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1715 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1716 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1717 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1718 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1719 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1720 rank remapping for assignment.
1722 2010-08-19 Tobias Burnus <burnus@net-b.de>
1724 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1725 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1728 2010-08-19 Tobias Burnus <burnus@net-b.de>
1732 * check.c (gfc_check_bessel_n2): New function.
1733 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1734 * intrinsic.c (add_functions): Add transformational version
1735 of the Bessel_jn/yn intrinsics.
1736 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1737 gfc_simplify_bessel_yn2): New prototypes.
1738 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1739 transformational variant.
1740 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1741 Check for negative order.
1742 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1743 gfc_simplify_bessel_yn2): New functions.
1745 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1748 * resolve.c (resolve_transfer): Traverse operands and set expression
1749 to be checked to a non EXPR_OP type.
1751 2010-08-19 Janus Weil <janus@gcc.gnu.org>
1754 * gfortran.h (gfc_add_save): Modified prototype.
1755 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1756 (match_pointer_init): New function to match F08 pointer initialization.
1757 (variable_decl,match_procedure_decl,match_ppc_decl): Use
1758 'match_pointer_init'.
1759 (match_attr_spec): Module variables are implicitly SAVE.
1760 (gfc_match_save): Modified call to 'gfc_add_save'.
1761 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1763 * primary.c (gfc_variable_attr): Handle SAVE attribute.
1764 * resolve.c (resolve_structure_cons): Add new argument and do pointer
1765 initialization checks.
1766 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1767 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1768 (resolve_fl_variable): Handle SAVE_IMPLICIT.
1769 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1771 * trans-decl.c (gfc_create_module_variable): Module variables with
1772 TARGET can already exist.
1773 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1774 (gfc_conv_initializer): Implement non-NULL pointer
1777 2010-08-18 Tobias Burnus <burnus@net-b.de>
1780 * intrinsic.texi (selected_char_kind): Document ISO_10646
1783 2010-08-17 Jakub Jelinek <jakub@redhat.com>
1786 * trans-decl.c (build_library_function_decl_1): Chain on
1787 void_list_node instead of creating a new TREE_LIST.
1788 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1789 * trans-types.c (gfc_get_function_type): Likewise. Set
1790 typelist to void_list_node for the main program.
1792 2010-08-17 Daniel Kraft <d@domob.eu>
1795 * gfortran.h (struct gfc_association_list): New member `where'.
1796 (gfc_is_associate_pointer) New method.
1797 * match.c (gfc_match_associate): Remember locus for each associate
1798 name matched and do not try to set variable flag.
1799 * parse.c (parse_associate): Use remembered locus for symbols.
1800 * primary.c (match_variable): Instead of variable-flag check for
1801 associate names set it for all such names used.
1802 * symbol.c (gfc_is_associate_pointer): New method.
1803 * resolve.c (resolve_block_construct): Don't generate assignments
1804 to give associate-names their values.
1805 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1806 (resolve_symbol): Set some more attributes for associate variables,
1807 set variable flag here and check it and don't try to build an
1808 explicitely shaped array-spec for array associate variables.
1809 * trans-expr.c (gfc_conv_variable): Dereference in case of association
1811 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1812 (gfc_sym_type): Return pointer type for association to scalar vars.
1813 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1814 (trans_associate_var): New method.
1815 (gfc_trans_deferred_vars): Handle association symbols.
1817 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1819 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
1821 (MMDX): Change back to MMD. Mark NoDriverArg instead of
1823 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1824 OPT_MDX and OPT_MMDX.
1826 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1828 * lang.opt (MDX, MMDX): Mark RejectDriver.
1830 2010-08-15 Janus Weil <janus@gcc.gnu.org>
1832 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1833 vtabs for generics any more).
1835 2010-08-15 Daniel Kraft <d@domob.eu>
1838 * gfortran.h (gfc_find_proc_namespace): New method.
1839 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1840 around with namespace.
1841 * symbol.c (gfc_find_proc_namespace): New method.
1842 * trans-decl.c (gfc_build_qualified_array): Use it for correct
1844 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1845 * parse.c (parse_associate): Removed assignment-generation here...
1846 * resolve.c (resolve_block_construct): ...and added it here.
1847 (resolve_variable): Handle names that are arrays but were not parsed
1848 as such because of association.
1849 (resolve_code): Fix BLOCK resolution.
1850 (resolve_symbol): Generate array-spec for associate-names.
1852 2010-08-15 Tobias Burnus <burnus@net-b.de>
1855 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1856 (verify_c_interop): Handle unresolved DT with bind(C).
1858 2010-08-15 Tobias Burnus <burnus@net-b.de>
1860 * trans-expr.c (gfc_conv_expr_present): Regard nullified
1861 pointer arrays as absent.
1862 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1863 dummys as absent argument.
1864 * interface.c (compare_actual_formal,compare_parameter):
1867 2010-08-15 Tobias Burnus <burnus@net-b.de>
1869 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1870 dummies with intent(in).
1872 2010-08-15 Daniel Kraft <d@domob.eu>
1875 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1876 routines not IMPURE also as PURE.
1877 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1878 `NO_CLASS' in `CLASS_IMPURE'.
1879 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1880 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1881 (add_functions): Ditto.
1882 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1883 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1884 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1885 are not ALLOCATABLE and have their INTENT specified.
1887 2010-08-13 Daniel Kraft <d@domob.eu>
1889 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1890 * array.c (gfc_match_array_spec): Match implied-shape specification and
1891 handle AS_IMPLIED_SHAPE correctly otherwise.
1892 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1893 (variable_decl): Some checks for implied-shape declaration.
1894 * resolve.c (resolve_symbol): Assert that array-spec is no longer
1895 AS_IMPLIED_SHAPE in any case.
1897 2010-08-12 Joseph Myers <joseph@codesourcery.com>
1899 * lang.opt (MD, MMD): Change to MDX and MMDX.
1900 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1902 2010-08-11 Janus Weil <janus@gcc.gnu.org>
1905 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1906 'gfc_intrinsic_arg'.
1907 (check_arglist,check_specific): Add reference to 'name' field.
1908 (init_arglist): Remove reference to 'name' field.
1909 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1910 * check.c (variable_check): Reverse order of checks. Respect intent of
1912 (int_or_proc_check): New function.
1913 (coarray_check): New function.
1914 (allocatable_check): New function.
1915 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1916 (gfc_check_complex): Use 'int_or_real_check'.
1917 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1918 gfc_check_ucobound): Use 'coarray_check'.
1919 (gfc_check_pack): Use 'real_or_complex_check'.
1920 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1921 'int_or_proc_check'.
1922 (scalar_check,type_check,numeric_check,int_or_real_check,
1923 real_or_complex_check,kind_check,double_check,logical_array_check,
1924 array_check,same_type_check,rank_check,nonoptional_check,
1925 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1926 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1927 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1928 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1929 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1930 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1931 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1934 2010-08-10 Daniel Kraft <d@domob.eu>
1936 * gfortran.texi (Interoperability with C): Fix ordering in menu
1937 and add new subsection about pointers.
1938 (Interoperable Subroutines and Functions): Split off the pointer part.
1939 (working with Pointers): New subsection with extended discussion
1940 of pointers (especially procedure pointers).
1942 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1945 * array.c (gfc_ref_dimen_size): Add end argument.
1946 If end is non-NULL, calculate it.
1947 (ref_size): Adjust call to gfc_ref_dimen_size.
1948 (gfc_array_dimen_size): Likewise.
1949 (gfc_array_res_shape): Likewise.
1950 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
1951 * resolve.c (resolve_array_ref): For stride not equal to -1,
1952 fill in the lowest possible end.
1954 2010-08-09 Janus Weil <janus@gcc.gnu.org>
1956 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1958 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1960 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1962 (check_some_aliasing): Likewise.
1963 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1964 (gfc_conv_intrinsic_int): Likewise.
1965 (gfc_conv_intrinsic_lib_function): Likewise.
1966 (gfc_conv_intrinsic_cmplx): Likewise.
1967 (gfc_conv_intrinsic_ctime): Likewise.
1968 (gfc_conv_intrinsic_fdate): Likewise.
1969 (gfc_conv_intrinsic_ttynam): Likewise.
1970 (gfc_conv_intrinsic_minmax): Likewise.
1971 (gfc_conv_intrinsic_minmax_char): Likewise.
1972 (gfc_conv_intrinsic_ishftc): Likewise.
1973 (gfc_conv_intrinsic_index_scan_verify): Likewise.
1974 (gfc_conv_intrinsic_merge): Likewise.
1975 (gfc_conv_intrinsic_trim): Likewise.
1976 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
1978 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1981 * dependency.c (check_section_vs_section): Handle cases where
1982 the start expression coincides with the lower or upper
1985 2010-08-04 Janus Weil <janus@gcc.gnu.org>
1990 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
1991 container types. Do not artificially increase refs. Commit symbols one
1993 * interface.c (compare_parameter): Make sure vtabs are present before
1994 generating module variables.
1995 * resolve.c (resolve_allocate_expr): Ditto.
1997 2010-08-04 Tobias Burnus <burnus@net-b.de>
2001 * resolve.c (resolve_structure_cons): Fix
2004 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
2008 * symbol.c (changed_syms): Made static again.
2009 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
2010 Changed conditional internal error into assert.
2011 Rename function to ...
2012 (gfc_enforce_clean_symbol_state): ... this.
2013 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
2014 Rename the former to the latter.
2015 * parse.c (decode_statement, decode_omp_directive,
2016 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
2018 (changed_syms): Remove declaration.
2019 (next_statement): Use gfc_enforce_clean_symbol_state.
2021 2010-08-04 Tobias Burnus <burnus@net-b.de>
2024 * resolve.c (resolve_structure_cons): Fix handling of
2025 initialization structure constructors with character
2026 elements of the wrong length.
2027 * array.c (gfc_check_iter_variable): Add NULL check.
2028 (gfc_resolve_character_array_constructor): Also truncate
2031 2010-08-04 Tobias Burnus <burnus@net-b.de>
2033 * trans-io.c (gfc_build_io_library_fndecls): Fix return
2034 value of some libgfortran functions.
2036 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2039 * dependency.c (gfc_deb_compare_expr): Remove any integer
2040 conversion functions to larger types from both arguments.
2041 Remove handling these functions futher down.
2043 2010-08-03 Janus Weil <janus@gcc.gnu.org>
2047 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
2048 * resolve.c (resolve_tb_generic_targets): Check for errors.
2050 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2053 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
2056 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2059 * dependency.h: Add prototype for gfc_are_identical_variables.
2060 * frontend-passes.c: Include depencency.h.
2061 (optimimize_equality): Use gfc_are_identical_variables.
2062 * dependency.c (identical_array_ref): New function.
2063 (gfc_are_identical_variables): New function.
2064 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
2065 * dependency.c (gfc_check_section_vs_section). Rename gfc_
2066 prefix from statc function.
2067 (check_section_vs_section): Change arguments to gfc_array_ref,
2068 adjust function body accordingly.
2070 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
2071 Janus Weil <janus@gcc.gnu.org>
2076 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
2077 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
2078 gfc_copy_formal_args, gfc_copy_formal_args_intr,
2079 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
2080 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
2081 Call reject_statement in case of error.
2082 (match_deferred_characteritics): Call gfc_undo_symbols in case match
2085 2010-08-01 Janus Weil <janus@gcc.gnu.org>
2088 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
2089 (gfc_find_derived_vtab): Make vtabs and vtypes public.
2090 * module.c (read_module): When reading module files, always import
2091 vtab and vtype symbols.
2093 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
2097 * symbol.c (changed_syms): Made non-static.
2098 * parse.c (changed_syms): Declare new external.
2099 (next_statement): Assert changed_syms is NULL at the beginning.
2101 2010-07-30 Janus Weil <janus@gcc.gnu.org>
2102 Steven G. Kargl <kargl@gcc.gnu.org>
2105 * match.c (match_type_spec): Try to parse derived types before
2108 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
2110 * gfortran.h (gfc_release_symbol): New prototype.
2111 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
2112 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
2113 Use gfc_release_symbol.
2114 * parse.c (gfc_fixup_sibling_symbols): Ditto.
2115 * resolve.c (resolve_symbol): Ditto.
2117 2010-07-29 Tobias Burnus <burnus@net-b.de>
2121 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
2122 external procedure declarations in modules.
2123 (gfc_get_symbol_decl): Modify assert.
2125 2010-07-29 Janus Weil <janus@gcc.gnu.org>
2128 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
2130 2010-07-29 Janus Weil <janus@gcc.gnu.org>
2133 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
2134 (gfc_trans_class_assign): Modified prototype.
2135 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
2136 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
2137 (gfc_trans_class_assign): ... here. Modified actual arguments.
2138 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
2139 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
2140 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
2142 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
2146 * class.c (gfc_find_derived_vtab): Accept or discard newly created
2147 symbols before returning.
2149 2010-07-29 Joseph Myers <joseph@codesourcery.com>
2151 * lang.opt (cpp): Remove Joined and Separate markers.
2152 (cpp=): New internal option.
2153 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
2154 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
2157 2010-07-29 Daniel Kraft <d@domob.eu>
2160 * array.c (resolve_array_bound): Fix error message to properly handle
2161 non-variable expressions.
2163 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
2165 * decl.c (free_value): Also free repeat field.
2166 * data.c (gfc_assign_data_value): Always free offset before returning.
2168 2010-07-28 Daniel Kraft <d@domob.eu>
2170 * gfortran.h (gfc_build_intrinsic_call): New method.
2171 * expr.c (gfc_build_intrinsic_call): New method.
2172 * simplify.c (range_check): Ignore non-constant value.
2173 (simplify_bound_dim): Handle non-variable expressions and
2174 fix memory leak with non-free'ed expression.
2175 (simplify_bound): Handle non-variable expressions.
2176 (gfc_simplify_shape): Ditto.
2177 (gfc_simplify_size): Ditto, but only in certain cases possible.
2179 2010-07-28 Joseph Myers <joseph@codesourcery.com>
2181 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
2184 2010-07-28 Tobias Burnus <burnus@net-b.de>
2187 * trans-types.c (gfc_get_derived_type): Fix DT declaration
2188 from modules for whole-file mode.
2190 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2192 * gfortran.h (gfc_handle_option): Update prototype and return
2194 * options.c (gfc_handle_option): Update prototype and return value
2197 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2199 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
2200 decoded options in allocating deferred_opt.
2201 * cpp.h (gfc_cpp_init_options): Update prototype.
2202 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
2203 * gfortran.h (gfc_option_lang_mask): New.
2204 (gfc_init_options): Update prototype.
2205 * options.c (gfc_option_lang_mask): New.
2206 (gfc_init_options): Update prototype. Pass new arguments to
2207 gfc_cpp_init_options.
2209 2010-07-26 Tobias Burnus <burnus@net-b.de>
2212 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
2213 for functions which are later in the same file.
2214 (gfc_create_function_decl, build_function_decl,
2215 build_entry_thunks): Add global argument.
2216 * trans.c (gfc_generate_module_code): Update
2217 gfc_create_function_decl call.
2218 * trans.h (gfc_create_function_decl): Update prototype.
2219 * resolve.c (resolve_global_procedure): Also resolve for
2222 2010-07-26 Richard Henderson <rth@redhat.com>
2225 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
2226 (gfc_write_global_declarations): New.
2228 2010-07-26 Tobias Burnus <burnus@net-b.de>
2231 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
2232 for call to transfer_namelist_element.
2233 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
2236 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
2239 * Make-lang.in: Add fortran/frontend-passes.o.
2240 * gfortran.h: Add prototype for gfc_run_passes.
2241 * resolve.c (gfc_resolve): Call gfc_run_passes.
2242 * frontend-passes.c: New file.
2244 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2247 * scanner.c (gfc_next_char_literal): Enable truncation warning for
2250 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
2253 * gfortran.h (gfc_namespace): New field old_equiv.
2254 (gfc_free_equiv_until): New prototype.
2255 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
2256 a parameterized stop condition.
2257 (gfc_free_equiv): Use gfc_free_equiv_until.
2258 * parse.c (next_statement): Save equivalence list.
2259 (reject_statement): Restore equivalence list.
2261 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2264 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
2265 in the function so that it does not get missed by early exits.
2266 (load_line): Add checks for quoted strings and free form comments to
2267 disable warnings on comments. Add check for ampersand as first
2268 character after truncation and don't warn for this case, but warn if
2269 there are subsequent non-whitespace characters.
2271 2010-07-24 Tobias Burnus <burnus@net-b.de>
2274 * parse.c (gfc_parse_file): Do not override
2275 gfc_global_ns_list items.
2277 2010-07-24 Tobias Burnus <burnus@net-b.de>
2279 * options.c (gfc_init_options): Enable -fwhole-file by default.
2280 * interface.c (compare_parameter): Assume a Hollerith constant is
2281 compatible with all other argument types.
2283 2010-07-23 Tobias Burnus <burnus@net-b.de>
2286 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
2287 -fwhole-file also for derived types.
2288 * trans-types.c (copy_dt_decls_ifequal): Remove static and
2289 rename to gfc_copy_dt_decls_ifequal.
2290 (gfc_get_derived_type): Update call.
2291 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
2293 2010-07-23 Tobias Burnus <burnus@net-b.de>
2296 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
2298 2010-07-23 Jakub Jelinek <jakub@redhat.com>
2300 * trans-types.c (gfc_get_array_descriptor_base,
2301 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
2302 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
2303 instead of clearing DECL_NAME.
2304 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
2306 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
2309 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
2311 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
2312 reverse the scalarization loop.
2313 gfc_conv_resolve_dependencies: Pass the reverse field of the
2314 loopinfo to gfc_dep_resolver.
2315 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
2316 assignment by resetting loop.reverse.
2317 gfortran.h : Add the gfc_reverse enum.
2318 trans.h : Add the reverse field to gfc_loopinfo.
2319 dependency.c (gfc_check_dependency): Pass null to the new arg
2320 of gfc_dep_resolver.
2321 (gfc_check_section_vs_section): Check for reverse dependencies.
2322 (gfc_dep_resolver): Add reverse argument and deal with the loop
2324 dependency.h : Modify prototype for gfc_dep_resolver to include
2327 2010-07-23 Daniel Kraft <d@domob.eu>
2330 * gfortran.h (gfc_find_symtree_in_proc): New method.
2331 * symbol.c (gfc_find_symtree_in_proc): New method.
2332 * match.c (match_exit_cycle): Look for loop name also in parent
2333 namespaces within current procedure.
2335 2010-07-22 Tobias Burnus <burnus@net-b.de>
2338 * dependency.c (gfc_check_dependency): Add argument alising check.
2339 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
2341 2010-07-22 Daniel Kraft <d@domob.eu>
2343 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
2344 now in the correct place.
2346 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2349 * Revert my commit r162325.
2351 2010-07-21 Daniel Kraft <d@domob.eu>
2353 * trans.h (gfc_get_return_label): Removed.
2354 (gfc_generate_return): New method.
2355 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2356 returning a tree directly.
2357 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
2358 (gfc_trans_block_construct): Update for new interface to
2359 `gfc_trans_deferred_vars'.
2360 * trans-decl.c (current_function_return_label): Removed.
2361 (current_procedure_symbol): New variable.
2362 (gfc_get_return_label): Removed.
2363 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2364 returning a tree directly.
2365 (get_proc_result), (gfc_generate_return): New methods.
2366 (gfc_generate_function_code): Clean up and do init/cleanup here
2367 also with gfc_wrapped_block. Remove return-label but rather
2370 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
2373 * fortran/match.c (match_type_spec): Check for derived type before
2376 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2379 * interface.c (matching_typebound_op): Add argument for the
2380 return of the generic name for the procedure.
2381 (build_compcall_for_operator): Add an argument for the generic
2382 name of an operator procedure and supply it to the expression.
2383 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
2384 calls to the above procedures.
2385 * resolve.c (resolve_typebound_function): Catch procedure
2386 component calls for CLASS objects, check that the vtable is
2387 complete and insert the $vptr and procedure components, to make
2389 (resolve_typebound_function): The same.
2390 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
2391 an allocatable scalar if it is a result.
2393 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2396 * match.c (gfc_match_iterator): Reverted.
2398 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
2401 * match.c (gfc_match_iterator): Remove error that iterator
2402 cannot be INTENT(IN).
2404 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
2406 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
2407 Access subscript through the "dim" field index.
2408 (gfc_trans_create_temp_array): Access ss info through the "dim" field
2410 (gfc_conv_array_index_offset): Ditto.
2411 (gfc_conv_loop_setup): Ditto.
2412 (gfc_conv_expr_descriptor): Ditto.
2413 (gfc_conv_ss_startstride): Ditto. Update call to
2414 gfc_conv_section_startstride.
2415 (gfc_conv_section_startstride): Set values along the array dimension.
2416 Get array dimension directly from the argument.
2418 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2420 * trans.h (gfc_string_to_single_character): New prototype.
2421 * trans-expr.c (string_to_single_character): Renamed to ...
2422 (gfc_string_to_single_character): ... this. No longer static.
2423 (gfc_conv_scalar_char_value, gfc_build_compare_string,
2424 gfc_trans_string_copy): Adjust callers.
2425 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
2426 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
2427 (select_struct): Move to toplevel, add GTY(()).
2428 (gfc_trans_character_select): Optimize SELECT CASE
2429 with character length 1.
2431 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
2433 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2434 * trans-common.c: Likewise.
2435 * trans-decl.c: Likewise.
2436 * trans-types.c: Likewise.
2437 * trans.c: Likewise.
2439 2010-07-15 Janus Weil <janus@gcc.gnu.org>
2442 * resolve.c (resolve_typebound_generic_call): Resolve generic
2443 non-polymorphic type-bound procedure calls to the correct specific
2445 (resolve_typebound_subroutine): Remove superfluous code.
2447 2010-07-15 Daniel Kraft <d@domob.eu>
2450 * trans.h (struct gfc_wrapped_block): New struct.
2451 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2452 (gfc_finish_wrapped_block): New method.
2453 (gfc_init_default_dt): Add new init code to block rather than
2455 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
2456 (gfc_trans_dummy_array_bias): Ditto.
2457 (gfc_trans_g77_array): Ditto.
2458 (gfc_trans_deferred_array): Ditto.
2459 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2460 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2461 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2462 (gfc_finish_wrapped_block): New method.
2463 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2464 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2465 (gfc_trans_deferred_array): Ditto.
2466 * trans-decl.c (gfc_trans_dummy_character): Ditto.
2467 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2468 (init_intent_out_dt): Ditto.
2469 (gfc_init_default_dt): Add new init code to block rather than
2471 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2472 and cleanup code and put it all together.
2474 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2476 * trans.h (gfc_build_compare_string): Add CODE argument.
2477 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2478 gfc_build_compare_string.
2479 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2480 gfc_build_compare_string.
2481 (string_to_single_character): Rename len variable to length.
2482 (gfc_optimize_len_trim): New function.
2483 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
2484 or NE_EXPR and one of the strings is string literal with LEN_TRIM
2485 bigger than the length of the other string, they compare unequal.
2488 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2489 in CASE_LABEL_EXPR and use NULL for low for the default case.
2491 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
2493 * trans-array.c (gfc_conv_section_upper_bound): Remove
2494 (gfc_conv_section_startstride): Don't set the upper bound in the
2495 vector subscript case.
2496 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2498 2010-07-14 Janus Weil <janus@gcc.gnu.org>
2501 * gfortran.h (gfc_is_data_pointer): Remove prototype.
2502 * dependency.c (gfc_is_data_pointer): Make it static.
2503 * intrinsic.texi: Update documentation on C_LOC.
2504 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2505 and add a check for polymorphic variables.
2507 2010-07-14 Jakub Jelinek <jakub@redhat.com>
2509 * trans-expr.c (string_to_single_character): Also optimize
2510 string literals containing a single char followed only by spaces.
2511 (gfc_trans_string_copy): Remove redundant string_to_single_character
2514 * trans-decl.c (gfc_build_intrinsic_function_decls,
2515 gfc_build_builtin_function_decls): Mark functions as
2516 DECL_PURE_P or TREE_READONLY.
2518 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
2520 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2521 instead of build_function_call_expr.
2522 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2524 2010-07-13 Tobias Burnus <burnus@net-b.de>
2525 Daniel Franke <franke.daniel@gmail.com>
2528 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2529 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2531 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2533 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
2534 Tobias Burnus <burnus@net-b.de>
2537 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2538 noclobber/noescape annotations to function calls.
2539 (gfc_build_builtin_function_decls): Likewise.
2541 2010-07-13 Janus Weil <janus@gcc.gnu.org>
2547 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2548 * class.c (gfc_build_class_symbol): Modified call to
2549 'gfc_find_derived_vtab'.
2550 (add_proc_component): Removed, moved code into 'add_proc_comp'.
2551 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2553 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2554 Removed treatment of generics.
2555 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2556 Call 'add_proc_comp' instead of duplicating code.
2557 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2559 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2560 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2561 Removed treatment of generics.
2562 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2563 'gfc_find_derived_vtab'.
2564 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2565 Removed treatment of generics.
2566 (resolve_select_type,resolve_fl_derived): Modified call to
2567 'gfc_find_derived_vtab'.
2568 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2569 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2571 * trans-stmt.c (gfc_trans_allocate): Ditto.
2573 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2576 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2579 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
2581 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2582 * resolve.c (build_default_init_expr): Ditto.
2584 2010-07-11 Tobias Burnus <burnus@net-b.de>
2587 * module.c (sort_iso_c_rename_list): Remove.
2588 (import_iso_c_binding_module,use_iso_fortran_env_module):
2589 Allow multiple imports of the same symbol.
2591 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
2593 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2595 2010-07-11 Janus Weil <janus@gcc.gnu.org>
2598 * decl.c (build_sym,attr_decl1): Only build the class container if the
2599 symbol has sufficient attributes.
2600 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2601 pointer attribute for classes.
2602 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2603 * module.c (MOD_VERSION): Bump.
2604 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2605 (mio_symbol_attribute): Handle class_pointer attribute.
2606 * parse.c (parse_derived): Use class_pointer instead of pointer
2607 attribute for classes.
2608 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2609 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2610 resolve_allocate_expr,resolve_fl_derived): Ditto.
2611 (resolve_fl_var_and_proc): Check for class_ok attribute.
2613 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
2615 * trans-io.c (gfc_build_st_parameter): Update calls to
2616 gfc_add_field_to_struct.
2617 * trans-stmt.c (ADD_FIELD): Ditto.
2619 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2621 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2622 fieldlist, remove fieldlist from argument list.
2623 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2624 and remove fieldlist from argument list.
2625 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2626 gfc_get_mixed_entry_union): Move setting
2627 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2628 * trans-types.h (gfc_add_field_to_struct): Update prototype.
2630 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
2633 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2634 if the lhs has never been host associated, as well as not being
2635 use associated, a pointer or a target.
2636 * resolve.c (resolve_variable): Mark variables that are host
2638 * gfortran.h: Add the host_assoc bit to the symbol_attribute
2641 2010-07-09 Janus Weil <janus@gcc.gnu.org>
2643 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2644 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2645 SIZEOF and C_SIZEOF.
2647 2010-07-08 Janus Weil <janus@gcc.gnu.org>
2650 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2651 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2652 gfc_resolve_storage_size): New prototypes.
2653 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2654 * intrinsic.c (add_functions): Add STORAGE_SIZE.
2655 * iresolve.c (gfc_resolve_storage_size): New function.
2656 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2658 (gfc_conv_intrinsic_storage_size): New function.
2659 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2661 2010-07-08 Jakub Jelinek <jakub@redhat.com>
2664 * match.c (match_exit_cycle): Error on EXIT also from collapsed
2665 !$omp do loops. Error on CYCLE to non-innermost collapsed
2668 2010-07-08 Tobias Burnus <burnus@net-b.de>
2671 * array.c (gfc_match_array_ref): Better error message for
2672 coarrays with too few ranks.
2673 (match_subscript): Move one diagnostic to caller.
2674 * gfortran.h (gfc_get_corank): Add prottype.
2675 * expr.c (gfc_get_corank): New function.
2676 * iresolve.c (resolve_bound): Fix rank for cobounds.
2677 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2678 gfc_resolve_ucobound, gfc_resolve_this_image): Update
2681 2010-07-06 Tobias Burnus <burnus@net-b.de>
2684 * array.c (gfc_expand_constructor): Add optional diagnostic.
2685 * gfortran.h (gfc_expand_constructor): Update prototype.
2686 * expr.c (gfc_simplify_expr, check_init_expr,
2687 gfc_reduce_init_expr): Update gfc_expand_constructor call.
2688 * resolve.c (gfc_resolve_expr): Ditto.
2690 2010-07-06 Tobias Burnus <burnus@net-b.de>
2692 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2693 * trans-intrinsic.c: Ditto.
2694 * trans-types.c: Ditto.
2695 * convert.c: Include diagnostic-core.h instead of toplev.h.
2697 * trans-array.c: Ditto.
2698 * trans-const.c: Ditto.
2699 * trans-expr.c: Ditto.
2700 * trans-io.c: Ditto.
2701 * trans-openmp.c: Ditto.
2704 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2707 * check.c (dim_rank_check): Also check intrinsic functions.
2708 Adjust permissible rank for functions which reduce the rank of
2709 their argument. Spread is an exception, where DIM can
2710 be one larger than the rank of array.
2712 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
2715 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2717 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
2720 * trans-types.c (gfc_get_derived_type): Derived type fields
2721 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2722 but build_pointer_type_for_mode must be used for this.
2724 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2726 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2727 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2728 type of gfc_conv_procedure_call.
2729 (conv_generic_with_optional_char_arg): Likewise.
2730 * trans-stmt.c (gfc_trans_call): Likewise.
2731 * trans-expr.c (gfc_conv_function_expr): Likewise.
2732 (gfc_conv_procedure_call): Use build_call_vec instead of
2735 2010-07-04 Daniel Kraft <d@domob.eu>
2737 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2739 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
2743 * trans-types.c (gfc_get_derived_type): Derived type fields
2744 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2746 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
2749 * decl.c (match_procedure_in_type): Clear structure before using.
2750 (gfc_match_generic): Ditto.
2752 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
2754 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2755 * trans-types.c (gfc_add_field_to_struct_1): New function, most
2756 of which comes from...
2757 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
2758 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2760 (gfc_get_array_descriptor_base): Likewise.
2761 (gfc_get_mixed_entry_union): Likewise.
2762 (gfc_get_derived_type): Add extra chain parameter for
2763 gfc_add_field_to_struct.
2764 * trans-stmt.c (gfc_trans_character_select): Likewise.
2765 * trans-io.c (gfc_build_st_parameter): Likewise.
2767 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2770 * resolve.c (is_external_proc): Prevent procedure pointers from being
2771 regarded as external procedures.
2773 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2776 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2777 passed as second argument of ASSOCIATED.
2779 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
2782 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2783 to determine if a function assignment can be made without a
2785 (gfc_trans_arrayfunc_assign): Move all the conditions that
2786 suppress the direct function call to the above new functon and
2789 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
2792 * interface.c (argument_rank_mismatch): New function.
2793 (compare_parameter): Call new function instead of generating
2796 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
2798 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
2799 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2802 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2804 * Make-lang.in: Update dependencies.
2806 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
2808 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2809 and exit_label fields.
2810 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2812 * trans-stmt.c (gfc_trans_simple_do): Likewise.
2813 (gfc_trans_do): Likewise.
2814 (gfc_trans_do_while): Likewise.
2815 (gfc_trans_cycle): Use cycle_label directly.
2816 (gfc_trans_exit): Use exit_label directly.
2818 2010-06-27 Daniel Kraft <d@domob.eu>
2820 * dump-parse-tree.c (show_symbol): Dump target-expression for
2822 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2823 (show_namespace): Use show_level for correct indentation of
2824 "inner namespaces" (contained procedures or BLOCK).
2826 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2829 * dump-parse-tree.c (show_code_node): Show namespace for
2832 2010-06-26 Tobias Burnus <burnus@net-b.de>
2834 * decl.c (gfc_match_decl_type_spec): Support
2835 TYPE(intrinsic-type-spec).
2837 2010-06-25 Tobias Burnus <burnus@net-b.de>
2839 * intrinsic.h (gfc_check_selected_real_kind,
2840 gfc_simplify_selected_real_kind): Update prototypes.
2841 * intrinsic.c (add_functions): Add radix support to
2843 * check.c (gfc_check_selected_real_kind): Ditto.
2844 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2845 * trans-decl.c (gfc_build_intrinsic_function_decls):
2846 Change call from selected_real_kind to selected_real_kind2008.
2847 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2848 (PRECISION, RANGE, RADIX): Add cross @refs.
2850 2010-06-25 Tobias Burnus <burnus@net-b.de>
2852 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2853 * gfortran.texi (_gfortran_set_options): Update for
2854 GFC_STD_F2008_OBS addition.
2855 * libgfortran.h: Add GFC_STD_F2008_OBS.
2856 * options.c (set_default_std_flags, gfc_handle_option): Handle
2858 io.c (check_format): Fix allow_std check.
2860 2010-06-25 Tobias Burnus <burnus@net-b.de>
2862 * decl.c (gfc_match_entry): Allow END besides
2863 END SUBROUTINE/END FUNCTION for contained procedures.
2865 2010-06-25 Tobias Burnus <burnus@net-b.de>
2867 * parse.c (next_free, next_fixed): Allow ";" as first character.
2869 2010-06-24 Tobias Burnus <burnus@net-b.de>
2872 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2874 2010-06-22 Janus Weil <janus@gcc.gnu.org>
2877 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2880 2010-06-21 Tobias Burnus <burnus@net-b.de>
2883 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2885 * symbol.c (gfc_add_contiguous): New function.
2886 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2887 * decl.c (match_attr_spec): Ditto.
2888 (gfc_match_contiguous): New function.
2889 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2891 * gfortran.h (symbol_attribute): Add contiguous.
2892 (gfc_is_simply_contiguous): Add prototype.
2893 (gfc_add_contiguous): Add prototype.
2894 * match.h (gfc_match_contiguous): Add prototype.
2895 * parse.c (decode_specification_statement,
2896 decode_statement): Handle contiguous attribute.
2897 * expr.c (gfc_is_simply_contiguous): New function.
2898 * dump-parse-tree.c (show_attr): Handle contiguous.
2899 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2901 * trans-expr.c (gfc_add_interface_mapping): Copy
2903 * trans-array.c (gfc_conv_descriptor_stride_get,
2904 gfc_conv_array_parameter): Handle contiguous arrays.
2905 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2906 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2908 * trans.h (gfc_array_kind): Ditto.
2909 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2911 2010-06-20 Joseph Myers <joseph@codesourcery.com>
2913 * options.c (gfc_handle_option): Don't handle N_OPTS.
2915 2010-06-19 Janus Weil <janus@gcc.gnu.org>
2918 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2921 2010-06-18 Tobias Burnus <burnus@net-b.de>
2924 * resolve.c (resolve_allocate_deallocate): Properly check
2925 part-refs in stat=/errmsg= for invalid use.
2927 2010-06-17 Janus Weil <janus@gcc.gnu.org>
2930 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2931 Return directly in case of an error.
2933 2010-06-16 Janus Weil <janus@gcc.gnu.org>
2936 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2937 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2938 structure to each procedure in a procedure list.
2939 * module.c (mio_typebound_proc): Add NULL argument to
2940 'gfc_get_typebound_proc'.
2941 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2942 to initialize the new structure.
2944 2010-06-15 Janus Weil <janus@gcc.gnu.org>
2947 * gfortran.h (gfc_expr): Add new member 'mold'.
2948 * match.c (gfc_match_allocate): Implement the MOLD tag.
2949 * resolve.c (resolve_allocate_expr): Ditto.
2950 * trans-stmt.c (gfc_trans_allocate): Ditto.
2952 2010-06-15 Jakub Jelinek <jakub@redhat.com>
2955 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2956 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2957 GFC_DECL_SAVED_DESCRIPTOR set.
2958 (gfc_omp_report_decl): New function.
2959 * trans.h (gfc_omp_report_decl): New prototype.
2960 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2962 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
2966 * gfortranspec.c (lang_specific_driver): Removed deprecation
2968 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2969 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2970 * cpp.h (gfc_cpp_makedep): New.
2971 (gfc_cpp_add_dep): New.
2972 (gfc_cpp_add_target): New.
2973 * cpp.c (gfc_cpp_option): Add deps* members.
2974 (gfc_cpp_makedep): New.
2975 (gfc_cpp_add_dep): New.
2976 (gfc_cpp_add_target): New.
2977 (gfc_cpp_init_options): Initialize new options.
2978 (gfc_cpp_handle_option): Handle new options.
2979 (gfc_cpp_post_options): Map new options to libcpp-options.
2980 (gfc_cpp_init): Handle deferred -MQ and -MT options.
2981 (gfc_cpp_done): If requested, write dependencies to file.
2982 * module.c (gfc_dump_module): Add a module filename as target.
2983 * scanner.c (open_included_file): New parameter system; add the
2984 included file as dependency.
2985 (gfc_open_included_file): Add the included file as dependency.
2986 (gfc_open_intrinsic_module): Likewise.
2987 * invoke.texi: Removed deprecation warning for -M.
2988 * gfortran.texi: Removed Makefile-dependencies project.
2990 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
2992 * resolve.c (resolve_global_procedure): Improved checking if an
2993 explicit interface is required.
2995 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2997 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
2999 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
3000 (gfc_conv_intrinsic_ttynam): Likewise.
3001 (gfc_conv_intrinsic_trim): Likewise.
3003 2010-06-12 Janus Weil <janus@gcc.gnu.org>
3006 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
3008 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3010 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
3012 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3014 * mathbuiltins.def: Add builtins that do not directly correspond
3015 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
3016 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
3017 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
3018 code_{r,c}{4,8,10,16} fields. Add
3019 {,complex}{float,double,long_double}_built_in fields.
3020 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
3021 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
3022 definition of OTHER_BUILTIN.
3023 (real_compnt_info): Remove unused struct.
3024 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
3026 (build_round_expr): Call builtin_decl_for_precision instead of
3028 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
3029 instead of a switch.
3030 (gfc_build_intrinsic_lib_fndecls): Match
3031 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
3032 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
3034 (gfc_conv_intrinsic_lib_function): Go through all the extended
3036 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
3037 instead of a switch.
3038 (gfc_conv_intrinsic_abs): Likewise.
3039 (gfc_conv_intrinsic_mod): Likewise.
3040 (gfc_conv_intrinsic_sign): Likewise.
3041 (gfc_conv_intrinsic_fraction): Likewise.
3042 (gfc_conv_intrinsic_nearest): Likewise.
3043 (gfc_conv_intrinsic_spacing): Likewise.
3044 (gfc_conv_intrinsic_rrspacing): Likewise.
3045 (gfc_conv_intrinsic_scale): Likewise.
3046 (gfc_conv_intrinsic_set_exponent): Likewise.
3048 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
3052 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
3053 functions with CLASS formal arguments.
3055 2010-06-10 Janus Weil <janus@gcc.gnu.org>
3058 * resolve.c (conformable_arrays): Handle allocatable components.
3060 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3063 * gfortran.texi: Document that Cray pointers cannot be function
3066 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3069 * gfortran.texi: Document lack of support for syntax
3070 "complex FUNCTION name*16()", and existence of alternative
3071 legacy syntax "complex*16 FUNCTION name()".
3073 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3076 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
3077 POSIX's fsync(), and how to call the latter from Fortran code.
3079 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
3082 * interface.c (compare_actual_formal): Reject actual arguments with
3083 array subscript passed to ASYNCHRONOUS dummys.
3085 2010-06-10 Daniel Kraft <d@domob.eu>
3088 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
3089 (struct gfc_symbol): New field `assoc'.
3090 (struct gfc_association_list): New struct.
3091 (struct gfc_code): New struct `block' in union, move `ns' there
3092 and add association list.
3093 (gfc_free_association_list): New method.
3094 (gfc_has_vector_subscript): Made public;
3095 * match.h (gfc_match_associate): New method.
3096 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
3097 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
3098 * interface.c (gfc_has_vector_subscript): Made public.
3099 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
3100 * match.c (gfc_match_associate): New method.
3101 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
3102 * primary.c (match_variable): Don't allow names associated to expr here.
3103 * parse.c (decode_statement): Try matching ASSOCIATE statement.
3104 (case_exec_markers, case_end): Add ASSOCIATE statement.
3105 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
3106 (parse_associate): New method.
3107 (parse_executable): Handle ST_ASSOCIATE.
3108 (parse_block_construct): Change reference to gfc_code's `ns' field.
3109 * resolve.c (resolve_select_type): Ditto.
3110 (resolve_code): Ditto.
3111 (resolve_block_construct): Ditto and add comment.
3112 (resolve_select_type): Set association list in generated BLOCK to NULL.
3113 (resolve_symbol): Resolve associate names.
3114 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
3115 and free association list.
3116 (gfc_free_association_list): New method.
3117 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
3118 * trans-stmt.c (gfc_trans_block_construct): Change reference to
3119 gfc_code's `ns' field.
3121 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
3123 * error.c (error_print): Pre-initialize loc by NULL.
3124 * openmp.c (resolve_omp_clauses): Add explicit
3125 braces to avoid ambigous else.
3126 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
3128 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
3130 * gfc-internals.texi: Move to GFDL 1.3.
3131 * gfortran.texi: Ditto.
3132 * intrinsic.texi: Ditto.
3133 * invoke.texi: Ditto.
3135 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
3138 * check.c (gfc_check_selected_real_kind): Verify that the
3139 actual arguments are scalar.
3141 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
3144 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
3146 2010-06-09 Janus Weil <janus@gcc.gnu.org>
3149 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
3151 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3153 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
3155 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3157 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
3158 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
3159 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
3160 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
3162 * fortran/check.c (nonnegative_check, less_than_bitsize1,
3163 less_than_bitsize2): New functions.
3164 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
3165 nonnegative_check and less_than_bitsize1.
3166 (gfc_check_ibclr, gfc_check_ibset): Removed.
3167 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
3170 2010-06-09 Janus Weil <janus@gcc.gnu.org>
3173 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
3176 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
3178 * resolve.c (resolve_deallocate_expr): Avoid warning
3179 about possible use of iunitialized sym.
3180 (resolve_allocate_expr): Pre-initialize sym by NULL.
3182 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3185 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
3187 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3189 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
3191 (gfc_get_array_type_bounds): Likewise.
3193 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
3194 (gfc_find_module): Likewise.
3196 * f95-lang.c (pushlevel): Likewise.
3198 * trans.h (struct lang_type): Add variable_size GTY option.
3199 (struct lang_decl): Likewise.
3201 2010-06-08 Tobias Burnus <burnus@net-b.de>
3204 * symbol.c (check_conflict): Move protected--external/procedure check ...
3205 * resolve.c (resolve_select_type): ... to the resolution stage.
3207 2010-06-07 Tobias Burnus <burnus@net-b.de>
3209 * options.c (gfc_handle_option): Fix -fno-recursive.
3211 2010-06-07 Tobias Burnus <burnus@net-b.de>
3213 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
3214 * gfortran.texi (copyrights-gfortran): Ditto.
3216 2010-06-07 Joseph Myers <joseph@codesourcery.com>
3218 * lang.opt (fshort-enums): Define using Var and VarExists.
3219 * options.c (gfc_handle_option): Don't set flag_short_enums here.
3221 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
3222 Janus Weil <janus@gcc.gnu.org>
3225 * resolve.c (get_declared_from_expr): Move to before
3226 resolve_typebound_generic_call. Make new_ref and class_ref
3227 ignorable if set to NULL.
3228 (resolve_typebound_generic_call): Once we have resolved the
3229 generic call, check that the specific instance is that which
3230 is bound to the declared type.
3231 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
3232 freeing 'class_ref->next' twice.
3234 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
3237 * trans-array.c (structure_alloc_comps): Dereference scalar
3238 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
3241 2010-06-04 Joseph Myers <joseph@codesourcery.com>
3243 * gfortranspec.c (append_arg, lang_specific_driver): Use
3244 GCC-specific formats in diagnostics.
3246 2010-06-02 Tobias Burnus <burnus@net-b.de>
3249 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
3252 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3255 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
3258 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
3260 * fortran/gfortran.texi: Fix typos in description of variable-format-
3263 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
3266 * dependency.c (gfc_check_section_vs_section): Check
3267 for interleaving array assignments without conflicts.
3269 2010-05-30 Janus Weil <janus@gcc.gnu.org>
3271 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
3272 $data component of a class container.
3273 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
3274 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
3275 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
3276 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
3277 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
3278 * gcc/fortran/parse.c (parse_derived): Ditto.
3279 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
3280 gfc_expr_attr): Ditto.
3281 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
3282 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
3283 resolve_fl_var_and_proc, resolve_typebound_procedure,
3284 resolve_fl_derived): Ditto.
3285 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
3286 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
3288 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
3289 gfc_trans_deferred_vars): Ditto.
3290 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
3292 2010-05-28 Tobias Burnus <burnus@net-b.de>
3294 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
3296 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3298 * gfortranspec.c (append_arg, lang_specific_driver): Use
3299 fatal_error instead of fatal. Use warning instead of fprintf for
3302 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3304 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
3305 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
3306 xstrerror instead of strerror.
3308 2010-05-26 Joseph Myers <joseph@codesourcery.com>
3310 * cpp.c (cb_cpp_error): Save and restore
3311 global_dc->warn_system_headers, not variable warn_system_headers.
3313 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3315 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
3317 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3319 * trans-common.c: Do not include rtl.h, include output.h instead.
3320 * trans-decl.c: Likewise.
3322 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
3325 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
3326 namespace before trying to reorder the gsymbols.
3328 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
3333 * resolve.c (resolve_global_procedure): Add check for global
3334 procedures with implicit interfaces and assumed-shape or optional
3335 dummy arguments. Verify that function return type, kind and string
3338 2010-05-21 Tobias Burnus <burnus@net-b.de>
3340 * gfortran.h: Do not include system.h.
3341 * bbt.c: Include system.h.
3343 * dependency.c: Ditto.
3344 * dump-parse-tree.c: Ditto.
3345 * arith.h: Do not include gfortran.h.
3346 * constructor.h: Do not include gfortran.h and splay-tree.h.
3347 * match.h: Do not include gfortran.h.
3349 * target-memory.h: Ditto.
3350 * openmp.c: Do not include toplev.h and target.h.
3351 * trans-stmt.c: Ditto not include toplev.h.
3353 * trans-common.c: Tell why toplev.h is needed. And
3354 do not include target.h.
3355 * trans-expr.c: Tell why toplev.h is needed.
3356 * trans-array.c: Ditto.
3357 * trans-openmp.c: Ditto.
3358 * trans-const.c: Ditto.
3360 * trans-types.c: Ditto.
3361 * trans-io.c: Ditto.
3362 * trans-decl.c: Ditto.
3365 * trans-intrinsic.c: Ditto.
3368 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3371 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
3372 before returning MATCH_ERROR. Add check for scalar. Add check for
3373 default integer kind.
3375 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3378 * match.c (gfc_match_select_type): On error jump back out of the local
3380 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
3381 stage, more precisely to ...
3382 * resolve.c (resolve_fl_derived): ... this place.
3384 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3387 * resolve.c (ensure_not_abstract): Allow abstract types with
3388 non-abstract ancestors.
3390 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3392 * trans-const.c: Include realmpfr.h.
3393 * Make-lang.in: Update dependencies.
3395 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3397 * trans-const.c, trans-types.c, trans-intrinsic.c:
3398 Clean up redundant includes.
3400 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
3403 * lang.opt (Wunused-dummy-argument): New option.
3404 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
3405 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
3406 (set_Wall): Enable warn_unused_dummy_argument.
3407 (gfc_handle_option): Set warn_unused_dummy_argument according to
3409 * trans-decl.c (generate_local_decl): Separate warnings about
3410 unused variables and unused dummy arguments.
3411 * invoke.texi: Documented new option.
3413 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
3415 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
3416 (gfc_conv_string_tmp): Do not assert type comparibilty.
3417 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
3418 (gfc_conv_expr_descriptor): Remove assert.
3419 * trans-common.c: Clarify why rtl.h and tm.h are included.
3420 * trans-openmp.c: Do not include ggc.h and real.h.
3421 Explain why gimple.h is included.
3422 * trans-const.c: Do not include ggc.h.
3423 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
3424 * trans.c: Do not include ggc.h and real.h.
3425 Explain why gimple.h is included.
3426 * trans-types.c: Do not include tm.h. Explain why langhooks.h
3427 and dwarf2out.h are included.
3428 * trans-io.c: Do not include gimple.h and real.h.
3429 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
3430 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
3433 2010-05-20 Tobias Burnus <burnus@net-b.de>
3435 * options.c (gfc_init_options,gfc_post_options): Enable
3436 flag_associative_math by default.
3438 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3441 * trans-stmt.c (gfc_trans_stop): Add generation of call to
3442 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
3443 blank STOP, handling a null expression. (gfc_trans_pause): Use
3444 pause_string for blank PAUSE.
3445 * trans.h: Add external function declaration for error_stop_numeric.
3446 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
3447 the declaration for the library call. Adjust whitespaces.
3448 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
3449 signal no stop code. Match the expression following the stop and pass
3450 that to the translators. Remove the old use of digit matching. Add
3451 checks that the stop_code expression is INTEGER or CHARACTER, constant,
3452 and if CHARACTER, default character KIND.
3454 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3457 * lang.opt (Wconversion-extra): New option.
3458 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
3459 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
3460 (set_Wall): Enable -Wconversion.
3461 (gfc_handle_option): Set warn_conversion_extra.
3462 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
3463 introduced for -Wconversion if -Wconversion-extra is present.
3464 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
3465 -Wconversion; document -Wconversion-extra.
3467 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3470 * gfortran.h (gfc_has_default_initializer): New.
3471 * expr.c (gfc_has_default_initializer): New.
3472 * resolve.c (has_default_initializer): Removed, use
3473 gfc_has_default_initializer() instead. Updated all callers.
3474 * trans-array.c (has_default_initializer): Removed, use
3475 gfc_has_default_initializer() instead. Updated all callers.
3476 * trans-decl.c (generate_local_decl): Do not check the
3477 first component only to check for initializers, but use
3478 gfc_has_default_initializer() instead.
3480 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3483 * primary.c (match_string_constant): Move start_locus just inside
3485 * data.c (create_character_intializer): Clarified truncation warning.
3487 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3490 * intrinsic.h (gfc_check_float): New prototype.
3491 (gfc_check_sngl): New prototype.
3492 * check.c (gfc_check_float): New.
3493 (gfc_check_sngl): New.
3494 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
3495 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
3497 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
3498 added them to the list of specifics of REAL instead.
3500 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3503 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
3504 This is now handled via 'gfc_class_null_initializer'.
3506 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3508 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
3509 gfc_build_class_symbol,add_proc_component,add_proc_comps,
3510 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3511 add_procs_to_declared_vtab,add_generic_specifics,
3512 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3513 find_typebound_proc_uop,gfc_find_typebound_proc,
3514 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3515 gfc_get_tbp_symtree): Moved here from other places.
3516 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
3518 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
3519 gfc_find_typebound_proc,gfc_find_typebound_user_op,
3520 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
3521 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
3522 * Make-lang.in: Add class.o.
3523 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
3524 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3525 add_procs_to_declared_vtab,add_generic_specifics,
3526 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3527 find_typebound_proc_uop,gfc_find_typebound_proc,
3528 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3529 gfc_get_tbp_symtree): Move to class.c.
3531 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3533 * trans-types.c (gfc_init_types): Use build_function_type_list.
3534 (gfc_get_ppc_type): Likewise.
3535 * trans-decl.c (gfc_generate_constructors): Likewise.
3536 * f95-lang.c (build_builtin_fntypes): Likewise.
3537 (gfc_init_builtin_functions): Likewise.
3538 (DEF_FUNCTION_TYPE_0): Likewise.
3539 (DEF_FUNCTION_TYPE_1): Likewise.
3540 (DEF_FUNCTION_TYPE_2): Likewise.
3541 (DEF_FUNCTION_TYPE_3): Likewise.
3542 (DEF_FUNCTION_TYPE_4): Likewise.
3543 (DEF_FUNCTION_TYPE_5): Likewise.
3544 (DEF_FUNCTION_TYPE_6): Likewise.
3545 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
3546 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
3548 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3550 * trans-array.c (gfc_trans_array_constructor_value): Use
3551 build_constructor instead of build_constructor_from_list.
3552 (gfc_build_constant_array_constructor): Likewise.
3553 * trans-decl.c (create_main_function): Likewise.
3554 * trans-stmt.c (gfc_trans_character_select): Likewise.
3556 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3559 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
3560 (resolve_fl_variable_derived): ... this place.
3561 (resolve_symbol): Make sure function symbols (and their result
3562 variables) are not resolved twice.
3564 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
3567 * array.c (match_array_list): Revert change from 2010-05-13.
3569 2010-05-16 Richard Guenther <rguenther@suse.de>
3571 * trans-decl.c (module_htab_decls_hash): Revert last change.
3573 2010-05-16 Richard Guenther <rguenther@suse.de>
3575 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
3577 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3579 * options.c (set_Wall): Remove special logic for Wuninitialized
3582 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3586 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
3589 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3593 * gfortran.h (gfc_class_null_initializer): New prototype.
3594 * expr.c (gfc_class_null_initializer): New function to build a NULL
3595 initializer for CLASS pointers.
3596 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
3597 containers. Remove default NULL initialization of $data component.
3598 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
3600 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
3601 Use new function 'gfc_class_null_initializer'.
3602 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
3605 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
3608 * fortran/interface.c (get_sym_storage_size): Use signed instead of
3609 unsigned mpz_get_?i routines.
3611 2010-05-14 Jakub Jelinek <jakub@redhat.com>
3613 * trans.c (trans_code): Set backend locus early.
3614 * trans-decl.c (gfc_get_fake_result_decl): Use source location
3615 of the function instead of current input_location.
3617 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
3620 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
3622 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
3623 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
3626 2010-05-13 Jakub Jelinek <jakub@redhat.com>
3629 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
3631 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
3632 by reference dummy procedures or non-dummy procedure pointers.
3633 (gfc_omp_predetermined_sharing): Return
3634 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
3636 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3639 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
3640 after OMP statement.
3641 (gfc_match_omp_critical): Likewise.
3642 (gfc_match_omp_flush): Likewise.
3643 (gfc_match_omp_workshare): Likewise.
3644 (gfc_match_omp_master): Likewise.
3645 (gfc_match_omp_ordered): Likewise.
3646 (gfc_match_omp_atomic): Likewise.
3647 (gfc_match_omp_barrier): Likewise.
3648 (gfc_match_omp_end_nowait): Likewise.
3650 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3653 * resolve.c (validate_case_label_expr): Removed FIXME.
3654 (resolve_select): Raise default warning on case labels out of range
3655 of the case expression.
3657 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
3662 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
3663 about conversion warnings.
3665 2010-05-10 Janus Weil <janus@gcc.gnu.org>
3668 * match.c (gfc_match_select_type): Move error message to
3669 resolve_select_type.
3670 * resolve.c (resolve_select_type): Error message moved here from
3671 gfc_match_select_type. Correctly set type of temporary.
3673 2010-05-10 Richard Guenther <rguenther@suse.de>
3675 * trans-decl.c (gfc_build_library_function_decl): Split out
3677 (build_library_function_decl_1): ... this new function.
3678 Set a fnspec attribute if a specification was provided.
3679 (gfc_build_library_function_decl_with_spec): New function.
3680 (gfc_build_intrinsic_function_decls): Annotate internal_pack
3681 and internal_unpack.
3683 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
3686 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
3689 2010-05-07 Jason Merrill <jason@redhat.com>
3691 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3692 to avoid -Wc++-compat warning.
3694 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
3697 * options.c (gfc_handle_option): Add argument kind.
3698 * gfortran.h (gfc_handle_option): Update declaration.
3700 2010-05-06 Tobias Burnus <burnus@net-b.de>
3703 * trans-types.c (gfc_sym_type): Mark Cray pointees as
3706 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3709 * resolve.c (traverse_data_list): Rephrase error message for
3710 non-constant bounds in data-implied-do.
3712 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3715 * gfortran.h: Removed repeat count from constructor, removed
3717 * data.h (gfc_assign_data_value_range): Changed return value from
3719 * data.c (gfc_assign_data_value): Add location to constructor element.
3720 (gfc_assign_data_value_range): Call gfc_assign_data_value()
3721 for each element in range. Return early if an error was generated.
3722 * resolve.c (check_data_variable): Stop early if range assignment
3725 2010-05-05 Janus Weil <janus@gcc.gnu.org>
3728 * resolve.c (resolve_fl_derived): Some fixes for class variables.
3729 * symbol.c (gfc_build_class_symbol): Add separate class container for
3732 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
3735 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3737 2010-05-02 Tobias Burnus <burnus@net-b.de>
3740 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3741 for lcobound, ucobound, image_index and this_image.
3742 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3743 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3744 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3745 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3747 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3749 2010-04-30 Tobias Burnus <burnus@net-b.de>
3753 * trans-types.c (gfc_get_array_descriptor_base): Fix index
3754 calculation for array descriptor types.
3756 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3759 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3760 initializers for PPC members of the vtabs.
3762 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3765 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3766 attribute for all PPC members of the vtypes.
3767 (copy_vtab_proc_comps): Copy the correct interface.
3768 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3769 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3770 a dummy argument and make sure all PPC members of the vtab are
3771 initialized correctly.
3772 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3773 in call to gfc_trans_assign_vtab_procs.
3774 * trans-stmt.c (gfc_trans_allocate): Ditto.
3776 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3779 * resolve.c (resolve_typebound_function): Renamed
3780 resolve_class_compcall.Do all the detection of class references
3782 (resolve_typebound_subroutine): resolve_class_typebound_call
3783 renamed. Otherwise same as resolve_typebound_function.
3784 (gfc_resolve_expr): Call resolve_typebound_function.
3785 (resolve_code): Call resolve_typebound_subroutine.
3787 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3790 * resolve.c (resolve_typebound_generic_call): For CLASS methods
3791 pass back the specific symtree name, rather than the target
3794 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3797 * resolve.c (resolve_structure_cons): Make the initializer of
3798 the vtab component 'extends' the same type as the component.
3800 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3803 * interface.c (check_interface1): Pass symbol name rather than NULL to
3804 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3805 trap MULL. (gfc_compare_derived_types): Revert previous change
3806 incorporated incorrectly during merge from trunk, r155778.
3807 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3808 than NULL to gfc_compare_interfaces.
3809 * symbol.c (add_generic_specifics): Likewise.
3811 2010-02-29 Janus Weil <janus@gcc.gnu.org>
3814 * interface.c (gfc_compare_derived_types): Add condition for vtype.
3815 * symbol.c (gfc_find_derived_vtab): Sey access to private.
3816 (gfc_find_derived_vtab): Likewise.
3817 * module.c (ab_attribute): Add enumerator AB_VTAB.
3818 (mio_symbol_attribute): Use new attribute, AB_VTAB.
3819 (check_for_ambiguous): Likewise.
3821 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3822 Janus Weil <janus@gcc.gnu.org>
3825 * trans-expr.c (select_class_proc): Remove function.
3826 (conv_function_val): Delete reference to previous.
3827 (gfc_conv_derived_to_class): Add second argument to the call to
3828 gfc_find_derived_vtab.
3829 (gfc_conv_structure): Exclude proc_pointer components when
3830 accessing $data field of class objects.
3831 (gfc_trans_assign_vtab_procs): New function.
3832 (gfc_trans_class_assign): Add second argument to the call to
3833 gfc_find_derived_vtab.
3834 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3835 implement holding off searching for the vptr derived type.
3836 (add_proc_component): New function.
3837 (add_proc_comps): New function.
3838 (add_procs_to_declared_vtab1): New function.
3839 (copy_vtab_proc_comps): New function.
3840 (add_procs_to_declared_vtab): New function.
3841 (void add_generic_specifics): New function.
3842 (add_generics_to_declared_vtab): New function.
3843 (gfc_find_derived_vtab): Add second argument to the call to
3844 gfc_find_derived_vtab. Add the calls to
3845 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3846 * decl.c (build_sym, build_struct): Use new arg in calls to
3847 gfc_build_class_symbol.
3848 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3849 definition of struct gfc_class_esym_list. Modify prototypes
3850 of gfc_build_class_symbol and gfc_find_derived_vtab.
3851 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3852 call to gfc_find_derived_vtab.
3853 * module.c : Add the vtype attribute.
3854 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3855 * resolve.c (resolve_typebound_generic_call): Add second arg
3856 to pass along the generic name for class methods.
3857 (resolve_typebound_call): The same.
3858 (resolve_compcall): Use the second arg to carry the generic
3859 name from the above. Remove the reference to class_esym.
3860 (check_members, check_class_members, resolve_class_esym,
3861 hash_value_expr): Remove functions.
3862 (resolve_class_compcall, resolve_class_typebound_call): Modify
3863 to use vtable rather than member by member calls.
3864 (gfc_resolve_expr): Modify second arg in call to
3866 (resolve_select_type): Add second arg in call to
3867 gfc_find_derived_vtab.
3868 (resolve_code): Add second arg in call resolve_typebound_call.
3869 (resolve_fl_derived): Exclude vtypes from check for late
3870 procedure definitions. Likewise for checking of explicit
3871 interface and checking of pass arg.
3872 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3873 calls to gfc_find_derived_vtab.
3874 * match.c (select_type_set_tmp): Use new arg in call to
3875 gfc_build_class_symbol.
3876 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3878 * parse.c (endType): Finish incomplete classes.
3880 2010-04-28 Tobias Burnus <burnus@net-b.de>
3884 * simplify.c (simplify_cobound): Handle scalar coarrays.
3886 2010-04-27 Tobias Burnus <burnus@net-b.de>
3888 * gfc-internals.texi: Update copyright year.
3889 * gfortran.texi: Ditto.
3890 * invoke.texi: Ditto.
3892 2010-04-27 Tobias Burnus <burnus@net-b.de>
3895 * resolve.c (resolve_allocate_expr): Allow array coarrays.
3896 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3897 * trans-types.c (gfc_get_array_type_bounds,
3898 gfc_get_array_descriptor_base): Add corank argument.
3899 * trans-array.c (gfc_array_init_size): Handle corank.
3900 (gfc_trans_create_temp_array, gfc_array_allocate,
3901 gfc_conv_expr_descriptor): Add corank argument to call.
3902 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3904 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
3908 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3909 of mucking with a tree directly.
3911 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3914 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3915 gfc_error with new error message.
3917 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
3921 * trans-expr.c (gfc_conv_expr): Supply an address expression for
3923 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3925 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3926 than the address of a GFC_SS_REFERENCE.
3927 * trans.h : Change comment on GFC_SS_REFERENCE.
3929 2010-04-22 Richard Guenther <rguenther@suse.de>
3932 * resolve.c (gfc_resolve_index): Wrap around ...
3933 (gfc_resolve_index_1): ... this. Add parameter to allow
3934 any integer kind index type.
3935 (resolve_array_ref): Allow any integer kind for the start
3936 index of an array ref.
3938 2010-04-21 Jakub Jelinek <jakub@redhat.com>
3941 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3944 2010-04-20 Harald Anlauf <anlauf@gmx.de>
3946 * intrinsic.c (sort_actual): Remove 'is' in error message.
3948 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
3951 * resolve.c (resolve_fl_derived): If a component character
3952 length has not been resolved, do so now.
3953 (resolve_symbol): The same as above for a symbol character
3955 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3956 not needed for a character valued, procedure pointer.
3959 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3960 not found, return FAILURE rather than ICEing.
3962 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3965 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3966 sequential loops private in the innermost containing task region.
3968 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3970 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3971 to build_common_tree_nodes.
3973 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
3976 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
3977 gfc_msg_bounds by using 'Array bound mismatch' directly.
3978 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
3979 error message to include the mismatch in the extent of array bound.
3980 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
3981 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
3983 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3985 * gfortran.texi: Update information on temporary file locations.
3987 2010-04-16 Jakub Jelinek <jakub@redhat.com>
3989 * trans-decl.c (gfc_build_qualified_array): Ensure
3990 ubound.N and lbound.N artificial variable names don't appear
3993 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
3996 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
3997 block of code. Set name to the variable associated with the descriptor.
3999 2010-04-15 Jakub Jelinek <jakub@redhat.com>
4001 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
4002 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
4004 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
4006 * intrinsic.texi: Add the missing specific name of intrinsic
4007 procedure where the specific name is identical to the generic name.
4008 Fix inconsistent or mismatch in the argument names in intrinsic
4009 procedure descriptions. Add the SCALAR allocatable description to
4012 2010-04-14 Tobias Burnus <burnus@net-b.de>
4015 * array.c (gfc_find_array_ref): Handle codimensions.
4016 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
4017 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
4018 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
4020 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
4021 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
4023 * intrinsic.h (add_functions): Add this_image, image_index,
4024 lcobound and ucobound intrinsics.
4025 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
4026 gfc_check_image_index, gfc_check_this_image,
4027 gfc_simplify_image_index, gfc_simplify_lcobound,
4028 gfc_simplify_this_image, gfc_simplify_ucobound):
4029 New function prototypes.
4030 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
4031 IMAGE_INDEX): Document new intrinsic functions.
4032 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
4034 * simplify.c (simplify_bound_dim): Handle coarrays.
4035 (simplify_bound): Update simplify_bound_dim call.
4036 (gfc_simplify_num_images): Add -fcoarray=none check.
4037 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
4038 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
4040 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4043 * constructor.c: Fix typo in comment.
4044 * expr.c (find_array_section): Add check for max array limit.
4046 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
4049 * gfortranspec.c (lookup_option): Check for -static and return
4051 (lang_specific_driver): Break when OPTION_static is discovered.
4053 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4055 * array.c (extract_element): Restore function from trunk.
4056 (gfc_get_array_element): Restore function from trunk.
4057 (gfc_expand_constructor): Restore check against
4058 flag_max_array_constructor.
4059 * constructor.c (node_copy_and_append): Delete unused.
4060 * gfortran.h: Delete comment and extra include.
4061 * constructor.h: Bump copyright and clean up TODO comments.
4062 * resolve.c: Whitespace.
4064 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4066 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
4067 with direct access access to elements. Adjusted prototype, fixed all
4069 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
4071 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
4072 (gfc_simplify_spread): Removed workaround, directly insert elements
4073 at a given array position.
4074 (gfc_simplify_transpose): Likewise.
4075 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
4077 (gfc_simplify_unpack): Likewise.
4079 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4081 * simplify.c (only_convert_cmplx_boz): Renamed to ...
4082 (convert_boz): ... this and moved to start of file.
4083 (gfc_simplify_abs): Whitespace fix.
4084 (gfc_simplify_acos): Whitespace fix.
4085 (gfc_simplify_acosh): Whitespace fix.
4086 (gfc_simplify_aint): Whitespace fix.
4087 (gfc_simplify_dint): Whitespace fix.
4088 (gfc_simplify_anint): Whitespace fix.
4089 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
4090 (gfc_simplify_dnint): Whitespace fix.
4091 (gfc_simplify_asin): Whitespace fix.
4092 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
4093 (gfc_simplify_atan): Likewise.
4094 (gfc_simplify_atanh): Whitespace fix.
4095 (gfc_simplify_atan2): Whitespace fix.
4096 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
4097 (gfc_simplify_bessel_j1): Likewise.
4098 (gfc_simplify_bessel_jn): Likewise.
4099 (gfc_simplify_bessel_y0): Likewise.
4100 (gfc_simplify_bessel_y1): Likewise.
4101 (gfc_simplify_bessel_yn): Likewise.
4102 (gfc_simplify_ceiling): Reorderd statements.
4103 (simplify_cmplx): Use convert_boz(), check for constant arguments.
4105 (gfc_simplify_cmplx): Use correct default kind. Removed check for
4107 (gfc_simplify_complex): Replaced if-gate. Removed check for
4109 (gfc_simplify_conjg): Whitespace fix.
4110 (gfc_simplify_cos): Whitespace fix.
4111 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
4112 (gfc_simplify_dcmplx): Removed check for constant arguments.
4113 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
4114 (gfc_simplify_digits): Whitespace fix.
4115 (gfc_simplify_dim): Whitespace fix.
4116 (gfc_simplify_dprod): Reordered statements.
4117 (gfc_simplify_erf): Whitespace fix.
4118 (gfc_simplify_erfc): Whitespace fix.
4119 (gfc_simplify_epsilon): Whitespace fix.
4120 (gfc_simplify_exp): Whitespace fix.
4121 (gfc_simplify_exponent): Use convert_boz().
4122 (gfc_simplify_floor): Reorderd statements.
4123 (gfc_simplify_gamma): Whitespace fix.
4124 (gfc_simplify_huge): Whitespace fix.
4125 (gfc_simplify_iand): Whitespace fix.
4126 (gfc_simplify_ieor): Whitespace fix.
4127 (simplify_intconv): Use gfc_convert_constant().
4128 (gfc_simplify_int): Use simplify_intconv().
4129 (gfc_simplify_int2): Reorderd statements.
4130 (gfc_simplify_idint): Reorderd statements.
4131 (gfc_simplify_ior): Whitespace fix.
4132 (gfc_simplify_ishftc): Removed duplicate type check.
4133 (gfc_simplify_len): Use range_check() instead of manual range check.
4134 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
4135 (gfc_simplify_log): Whitespace fix.
4136 (gfc_simplify_log10): Whitespace fix.
4137 (gfc_simplify_minval): Whitespace fix.
4138 (gfc_simplify_maxval): Whitespace fix.
4139 (gfc_simplify_mod): Whitespace fix.
4140 (gfc_simplify_modulo): Whitespace fix.
4141 (simplify_nint): Reorderd statements.
4142 (gfc_simplify_not): Whitespace fix.
4143 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
4144 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
4145 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
4146 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
4147 (gfc_simplify_realpart): Whitespace fix.
4148 (gfc_simplify_selected_char_kind): Removed unused result-variable.
4149 (gfc_simplify_selected_int_kind): Removed unused result-variable.
4150 (gfc_simplify_selected_real_kind): Removed unused result-variable.
4151 (gfc_simplify_sign): Whitespace fix.
4152 (gfc_simplify_sin): Whitespace fix.
4153 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
4154 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
4155 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
4156 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
4157 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
4159 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4161 * gfortran.h (gfc_start_constructor): Removed.
4162 (gfc_get_array_element): Removed.
4163 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
4164 instead. Fixed all callers.
4165 (extract_element): Removed.
4166 (gfc_expand_constructor): Temporarily removed check for
4167 max-array-constructor. Will be re-introduced later if still required.
4168 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
4169 instead. Fixed all callers.
4170 * expr.c (find_array_section): Replaced manual lookup of elements
4171 by gfc_constructor_lookup.
4173 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4175 * gfortran.h (gfc_get_null_expr): New prototype.
4176 (gfc_get_operator_expr): New prototype.
4177 (gfc_get_character_expr): New prototype.
4178 (gfc_get_iokind_expr): New prototype.
4179 * expr.c (gfc_get_null_expr): New.
4180 (gfc_get_character_expr): New.
4181 (gfc_get_iokind_expr): New.
4182 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
4183 * matchexp.c (build_node): Renamed and moved to
4184 expr.c (gfc_get_operator_expr). Reordered arguments to match
4185 other functions. Fixed all callers.
4186 (gfc_get_parentheses): Use specific function to build expr.
4187 * array.c (gfc_match_array_constructor): Likewise.
4188 * arith.c (eval_intrinsic): Likewise.
4189 (gfc_hollerith2int): Likewise.
4190 (gfc_hollerith2real): Likewise.
4191 (gfc_hollerith2complex): Likewise.
4192 (gfc_hollerith2logical): Likewise.
4193 * data.c (create_character_intializer): Likewise.
4194 * decl.c (gfc_match_null): Likewise.
4195 (enum_initializer): Likewise.
4196 * io.c (gfc_match_format): Likewise.
4197 (match_io): Likewise.
4198 * match.c (gfc_match_nullify): Likewise.
4199 * primary.c (match_string_constant): Likewise.
4200 (match_logical_constant): Likewise.
4201 (build_actual_constructor): Likewise.
4202 * resolve.c (build_default_init_expr): Likewise.
4203 * symbol.c (generate_isocbinding_symbol): Likewise.
4204 (gfc_build_class_symbol): Likewise.
4205 (gfc_find_derived_vtab): Likewise.
4206 * simplify.c (simplify_achar_char): Likewise.
4207 (gfc_simplify_adjustl): Likewise.
4208 (gfc_simplify_adjustr): Likewise.
4209 (gfc_simplify_and): Likewise.
4210 (gfc_simplify_bit_size): Likewise.
4211 (gfc_simplify_is_iostat_end): Likewise.
4212 (gfc_simplify_is_iostat_eor): Likewise.
4213 (gfc_simplify_isnan): Likewise.
4214 (simplify_bound): Likewise.
4215 (gfc_simplify_leadz): Likewise.
4216 (gfc_simplify_len_trim): Likewise.
4217 (gfc_simplify_logical): Likewise.
4218 (gfc_simplify_maxexponent): Likewise.
4219 (gfc_simplify_minexponent): Likewise.
4220 (gfc_simplify_new_line): Likewise.
4221 (gfc_simplify_null): Likewise.
4222 (gfc_simplify_or): Likewise.
4223 (gfc_simplify_precision): Likewise.
4224 (gfc_simplify_repeat): Likewise.
4225 (gfc_simplify_scan): Likewise.
4226 (gfc_simplify_size): Likewise.
4227 (gfc_simplify_trailz): Likewise.
4228 (gfc_simplify_trim): Likewise.
4229 (gfc_simplify_verify): Likewise.
4230 (gfc_simplify_xor): Likewise.
4231 * trans-io.c (build_dt): Likewise.
4232 (gfc_new_nml_name_expr): Removed.
4234 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4236 * arith.h (gfc_constant_result): Removed prototype.
4237 * constructor.h (gfc_build_array_expr): Removed prototype.
4238 (gfc_build_structure_constructor_expr): Removed prototype.
4239 * gfortran.h (gfc_int_expr): Removed prototype.
4240 (gfc_logical_expr): Removed prototype.
4241 (gfc_get_array_expr): New prototype.
4242 (gfc_get_structure_constructor_expr): New prototype.
4243 (gfc_get_constant_expr): New prototype.
4244 (gfc_get_int_expr): New prototype.
4245 (gfc_get_logical_expr): New prototype.
4246 * arith.c (gfc_constant_result): Moved and renamed to
4247 expr.c (gfc_get_constant_expr). Fixed all callers.
4248 * constructor.c (gfc_build_array_expr): Moved and renamed to
4249 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
4250 and kind. Fixed all callers.
4251 (gfc_build_structure_constructor_expr): Moved and renamed to
4252 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
4253 to type and kind. Fixed all callers.
4254 * expr.c (gfc_logical_expr): Renamed to ...
4255 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
4256 (gfc_int_expr): Renamed to ...
4257 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
4259 (gfc_get_constant_expr): New.
4260 (gfc_get_array_expr): New.
4261 (gfc_get_structure_constructor_expr): New.
4262 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
4265 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4267 * constructor.h: New.
4268 * constructor.c: New.
4269 * Make-lang.in: Add new files to F95_PARSER_OBJS.
4270 * arith.c (reducy_unary): Use constructor API.
4271 (reduce_binary_ac): Likewise.
4272 (reduce_binary_ca): Likewise.
4273 (reduce_binary_aa): Likewise.
4274 * check.c (gfc_check_pack): Likewise.
4275 (gfc_check_reshape): Likewise.
4276 (gfc_check_unpack): Likewise.
4277 * decl.c (add_init_expr_to_sym): Likewise.
4278 (build_struct): Likewise.
4279 * dependency.c (gfc_check_dependency): Likewise.
4280 (contains_forall_index_p): Likewise.
4281 * dump-parse-tree.c (show_constructor): Likewise.
4282 * expr.c (free_expr0): Likewise.
4283 (gfc_copy_expr): Likewise.
4284 (gfc_is_constant_expr): Likewise.
4285 (simplify_constructor): Likewise.
4286 (find_array_element): Likewise.
4287 (find_component_ref): Likewise.
4288 (find_array_section): Likewise.
4289 (find_substring_ref): Likewise.
4290 (simplify_const_ref): Likewise.
4291 (scalarize_intrinsic_call): Likewise.
4292 (check_alloc_comp_init): Likewise.
4293 (gfc_default_initializer): Likewise.
4294 (gfc_traverse_expr): Likewise.
4295 * iresolve.c (check_charlen_present): Likewise.
4296 (gfc_resolve_reshape): Likewise.
4297 (gfc_resolve_transfer): Likewise.
4298 * module.c (mio_constructor): Likewise.
4299 * primary.c (build_actual_constructor): Likewise.
4300 (gfc_match_structure_constructor): Likewise.
4301 * resolve.c (resolve_structure_cons): Likewise.
4302 * simplify.c (is_constant_array_expr): Likewise.
4303 (init_result_expr): Likewise.
4304 (transformational_result): Likewise.
4305 (simplify_transformation_to_scalar): Likewise.
4306 (simplify_transformation_to_array): Likewise.
4307 (gfc_simplify_dot_product): Likewise.
4308 (simplify_bound): Likewise.
4309 (simplify_matmul): Likewise.
4310 (simplify_minval_maxval): Likewise.
4311 (gfc_simplify_pack): Likewise.
4312 (gfc_simplify_reshape): Likewise.
4313 (gfc_simplify_shape): Likewise.
4314 (gfc_simplify_spread): Likewise.
4315 (gfc_simplify_transpose): Likewise.
4316 (gfc_simplify_unpack): Likewise.q
4317 (gfc_convert_constant): Likewise.
4318 (gfc_convert_char_constant): Likewise.
4319 * target-memory.c (size_array): Likewise.
4320 (encode_array): Likewise.
4321 (encode_derived): Likewise.
4322 (interpret_array): Likewise.
4323 (gfc_interpret_derived): Likewise.
4324 (expr_to_char): Likewise.
4325 (gfc_merge_initializers): Likewise.
4326 * trans-array.c (gfc_get_array_constructor_size): Likewise.
4327 (gfc_trans_array_constructor_value): Likewise.
4328 (get_array_ctor_strlen): Likewise.
4329 (gfc_constant_array_constructor_p): Likewise.
4330 (gfc_build_constant_array_constructor): Likewise.
4331 (gfc_trans_array_constructor): Likewise.
4332 (gfc_conv_array_initializer): Likewise.
4333 * trans-decl.c (check_constant_initializer): Likewise.
4334 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
4335 (gfc_apply_interface_mapping_to_cons): Likewise.
4336 (gfc_trans_structure_assign): Likewise.
4337 (gfc_conv_structure): Likewise.
4338 * array.c (check_duplicate_iterator): Likewise.
4339 (match_array_list): Likewise.
4340 (match_array_cons_element): Likewise.
4341 (gfc_match_array_constructor): Likewise.
4342 (check_constructor_type): Likewise.
4343 (check_constructor): Likewise.
4345 (expand_constructor): Likewise.
4346 (extract_element): Likewise.
4347 (gfc_expanded_ac): Likewise.
4348 (resolve_array_list): Likewise.
4349 (gfc_resolve_character_array_constructor): Likewise.
4350 (copy_iterator): Renamed to ...
4351 (gfc_copy_iterator): ... this.
4352 (gfc_append_constructor): Removed.
4353 (gfc_insert_constructor): Removed unused function.
4354 (gfc_get_constructor): Removed.
4355 (gfc_free_constructor): Removed.
4356 (qgfc_copy_constructor): Removed.
4357 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
4358 Removed all references. Replaced constructor list by splay-tree.
4359 (struct gfc_constructor): Removed member 'next', moved 'offset' from
4360 the inner struct, added member 'base'.
4361 (gfc_append_constructor): Removed prototype.
4362 (gfc_insert_constructor): Removed prototype.
4363 (gfc_get_constructor): Removed prototype.
4364 (gfc_free_constructor): Removed prototype.
4365 (qgfc_copy_constructor): Removed prototype.
4366 (gfc_copy_iterator): New prototype.
4367 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
4369 2010-04-10 Tobias Burnus <burnus@net-b.de>
4372 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
4373 proc-pointers and type-bound procedures.
4374 (gfc_specification_expr): Check proc-pointers for pureness.
4376 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
4379 * gfortranspec.c (lang_specific_driver): Do not expose vars
4380 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
4383 2010-04-09 Tobias Burnus <burnus@net-b.de>
4386 * decl.c (variable_decl, match_attr_spec): Fix setting the array
4388 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
4389 * data.c (gfc_assign_data_value): Ditto.
4390 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
4391 (gfc_traverse_expr): Traverse also through codimension expressions.
4392 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4393 gfc_has_ultimate_pointer): New functions.
4394 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
4395 (gfc_array_ref): Add codimen.
4396 (gfc_array_ref): Add in_allocate.
4397 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4398 gfc_has_ultimate_pointer): Add prototypes.
4399 * interface.c (compare_parameter, compare_actual_formal,
4400 check_intents): Add coarray constraints.
4401 * match.c (gfc_match_iterator): Add coarray constraint.
4402 * match.h (gfc_match_array_ref): Update interface.
4403 * primary.c (gfc_match_varspec): Handle codimensions.
4404 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
4405 (check_class_members): Return gfc_try instead for error recovery.
4406 (resolve_typebound_function,resolve_typebound_subroutine,
4407 check_members): Handle return value of check_class_members.
4408 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
4409 check_dimension, compare_spec_to_ref, resolve_array_ref,
4410 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
4411 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
4413 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
4414 Skip over coarray refs.
4415 (gfc_array_allocate) Add support for references containing coindexes.
4416 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
4417 (gfc_map_intrinsic_function): Ignore codimensions.
4419 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
4422 * io.c (check_format_string): Added check for additional non
4423 blank characters after the format string was successfully
4425 * io.c (check_format): Changed the error messages for positive
4426 int required and period required to drop through the error logic
4427 and report with gfc_error instead of gfc_error_now. Corrected
4428 format postion for hollerith strings.
4430 2010-04-08 Tobias Burnus <burnus@net-b.de>
4432 * module.c (use_iso_fortran_env_module): Fix standard check.
4434 2010-04-07 Jakub Jelinek <jakub@redhat.com>
4436 * parse.c (parse_derived, parse_enum): Avoid set but not used
4439 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
4442 * gfortran.texi: Add section about representation of
4445 2010-04-07 Simon Baldwin <simonb@google.com>
4447 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
4448 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
4450 2010-04-07 Richard Guenther <rguenther@suse.de>
4452 * options.c (gfc_init_options): Do not set.
4454 2010-04-06 Tobias Burnus <burnus@net-b.de>
4457 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
4458 * match.c (gfc_match_critical, sync_statement): Ditto.
4459 * gfortran.h (gfc_fcoarray): New enum.
4460 (gfc_option_t): Use it.
4461 * lang.opt (fcoarray): Add new flag.
4462 * invoke.texi (fcoarray): Document it.
4463 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
4464 (gfc_handle_coarray_option): New function.
4466 2010-04-06 Tobias Burnus <burnus@net-b.de>
4469 * gfortran.h (gfc_array_spec): Add cotype.
4470 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
4471 and defer error diagnostic.
4472 * resolve.c (resolve_fl_derived): Add missing check.
4473 (resolve_symbol): Add cotype/type check.
4474 * parse.c (parse_derived): Fix setting of coarray_comp.
4476 2010-04-06 Tobias Burnus <burnus@net-b.de>
4479 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
4480 match_array_element_spec,gfc_copy_array_spec,
4481 gfc_compare_array_spec): Include corank.
4482 (match_array_element_spec,gfc_set_array_spec): Support codimension.
4483 * decl.c (build_sym,build_struct,variable_decl,
4484 match_attr_spec,attr_decl1,cray_pointer_decl,
4485 gfc_match_volatile): Add codimension.
4486 (gfc_match_codimension): New function.
4487 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
4488 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
4489 (gfc_add_codimension): New function prototype.
4490 * match.h (gfc_match_codimension): New function prototype.
4491 (gfc_match_array_spec): Update prototype
4492 * match.c (gfc_match_common): Update gfc_match_array_spec call.
4493 * module.c (MOD_VERSION): Bump.
4494 (mio_symbol_attribute): Support coarray attributes.
4495 (mio_array_spec): Add corank support.
4496 * parse.c (decode_specification_statement,decode_statement,
4497 parse_derived): Add coarray support.
4498 * resolve.c (resolve_formal_arglist, was_declared,
4499 is_non_constant_shape_array, resolve_fl_variable,
4500 resolve_fl_derived, resolve_symbol): Add coarray support.
4501 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
4502 gfc_build_class_symbol): Add coarray support.
4503 (gfc_add_codimension): New function.
4505 2010-04-06 Tobias Burnus <burnus@net-b.de>
4508 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
4509 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
4510 stat_locked_other_image, stat_stopped_image and stat_unlocked of
4512 * intrinsic.texi (iso_fortran_env): Ditto.
4513 * libgfortran.h (libgfortran_stat_codes): New enum.
4514 * module.c (use_iso_fortran_env_module): Honour -std= when loading
4515 constants from the intrinsic module.
4517 2010-04-06 Tobias Burnus <burnus@net-b.de>
4520 * intrinsic.c (add_functions): Add num_images.
4521 * decl.c (gfc_match_end): Handle END CRITICAL.
4522 * intrinsic.h (gfc_simplify_num_images): Add prototype.
4523 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
4525 * gfortran.h (gfc_statement): Add enum items for those.
4526 (gfc_exec_op) Ditto.
4527 (gfc_isym_id): Add num_images.
4528 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
4529 (gfc_trans_sync,gfc_trans_critical): New functions.
4530 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
4531 gfc_trans_critical): Add/update prototypes.
4532 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
4533 and SYNC statements.
4534 * trans.h (gfor_fndecl_error_stop_string) Add variable.
4535 * resolve.c (resolve_sync): Add function.
4536 (gfc_resolve_blocks): Handle CRITICAL.
4537 (resolve_code): Handle CRITICAL, ERROR STOP,
4538 (resolve_branch): Add CRITICAL constraint check.
4539 and SYNC statements.
4540 * st.c (gfc_free_statement): Add new statements.
4541 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
4542 (gfc_build_builtin_function_decls): Initialize it.
4543 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
4544 (gfc_match_critical, gfc_match_error_stop, sync_statement,
4545 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
4547 (match_exit_cycle): Handle CRITICAL constraint.
4548 (gfc_match_stopcode): Handle ERROR STOP.
4549 * match.h (gfc_match_critical, gfc_match_error_stop,
4550 gfc_match_sync_all, gfc_match_sync_images,
4551 gfc_match_sync_memory): Add prototype.
4552 * parse.c (decode_statement, gfc_ascii_statement,
4553 parse_executable): Handle new statements.
4554 (parse_critical_block): New function.
4555 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
4556 * intrinsic.texi (num_images): Document new function.
4557 * simplify.c (gfc_simplify_num_images): Add function.
4559 2010-04-06 Tobias Burnus <burnus@net-b.de>
4562 * trans-array.c (gfc_conv_expr_descriptor): Update
4563 gfc_trans_scalar_assign call.
4564 (has_default_initializer): New function.
4565 (gfc_trans_deferred_array): Nullify less often.
4566 * trans-expr.c (gfc_conv_subref_array_arg,
4567 gfc_trans_subcomponent_assign): Update call to
4568 gfc_trans_scalar_assign.
4569 (gfc_trans_scalar_assign): Add parameter and pass it on.
4570 (gfc_trans_assignment_1): Optionally, do not dealloc before
4572 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
4573 call to gfc_trans_scalar_assign.
4574 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
4575 initializer to static variables.
4576 (gfc_init_default_dt): Add dealloc parameter and pass it on.
4577 * trans-stmt.c (forall_make_variable_temp,
4578 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4579 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
4580 gfc_trans_allocate): Update gfc_trans_assignment call.
4581 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
4582 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
4583 parameter to prototype.
4585 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
4587 * ioparm.def : Update copyright.
4589 * trans-array.c : ditto
4590 * trans-array.h : ditto
4592 * trans-types.c: ditto
4593 * dependency.c : ditto
4594 * gfortran.h : ditto
4596 * trans-io.c : ditto
4597 * trans-intrinsic.c : ditto
4598 * libgfortran.h : ditto
4599 * invoke.texi : ditto
4600 * intrinsic.texi : ditto
4603 * intrinsic.c : ditto
4604 * interface.c : ditto
4605 * iresolve.c : ditto
4606 * trans-stmt.c : ditto
4607 * trans-stmt.h : ditto
4612 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
4615 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
4616 do not assert the context of derived types.
4618 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4621 * ioparm.def: Change inquire size variable to type pointer to
4624 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
4627 * trans-expr.c (conv_parent_component_references): Ensure that
4628 'dt' has a backend_decl.
4631 * trans-expr.c (gfc_conv_structure): Ensure that the derived
4632 type has a backend_decl.
4635 * resolve.c (resolve_global_procedure): Check that the 'cl'
4636 structure is not NULL.
4638 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
4640 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
4643 2010-03-17 Tobias Burnus <burnus@net-b.de>
4646 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
4647 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
4649 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
4650 pointees as having explizit size.
4651 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
4653 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
4654 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
4655 * resolve.c (resolve_symbol): Handle cp_was_assumed.
4656 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
4657 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
4660 2010-03-14 Tobias Burnus <burnus@net-b.de>
4663 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
4664 (resolve_ordinary_assign): Add check to avoid segfault.
4666 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
4670 * resolve.c (resolve_compcall): Add new boolean dummy argument
4671 'class_members'. Only resolve expression at end if false.
4672 Remove redundant, static variable 'class_object'.
4673 (check_class_members): Add extra argument to call of
4675 (resolve_typebound_function): Renamed resolve_class_compcall.
4676 Do all the detection of class references here. Correct calls to
4677 resolve_compcall for extra argument.
4678 (resolve_typebound_subroutine): resolve_class_typebound_call
4679 renamed. Otherwise same as resolve_typebound_function.
4680 (gfc_resolve_expr): Call resolve_typebound_function.
4681 (resolve_code): Call resolve_typebound_subroutine.
4683 2010-03-10 Tobias Burnus <burnus@net-b.de
4686 * symbol.c (get_iso_c_sym): Set sym->result.
4688 2010-03-08 Janus Weil <janus@gcc.gnu.org>
4691 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
4692 for TBPs, otherwise they will not be resolved properly.
4693 (resolve_function): Use 'value.function.esym' instead of
4694 'value.function.name' to check if we're dealing with a TBP.
4695 (check_class_members): Set correct type of passed object for all TBPs,
4696 not only generic ones, except if the type is abstract.
4698 2010-03-04 Janus Weil <janus@gcc.gnu.org>
4701 * decl.c (gfc_match_final_decl): Make sure variable names starting with
4702 'final...' are not misinterpreted as FINAL statements.
4704 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
4707 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4708 allocatable ultimate components do not need temporaries, whilst
4709 ultimate pointer components do.
4711 2010-03-03 Janus Weil <janus@gcc.gnu.org>
4714 * resolve.c (resolve_code): Correctly set gfc_current_ns for
4716 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
4719 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
4722 * trans-array.c (gfc_conv_array_parameter): A full array of
4723 derived type need not be restricted to a symbol without an
4724 array spec to use the call to gfc_conv_expr_descriptor.
4727 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4728 allocatable arrays do not need temporaries.
4730 2010-03-01 Tobias Burnus <burnus@net-b.de>
4733 * resolve.c (find_array_spec): Handle REF_COMPONENT with
4736 2010-02-28 Tobias Burnus <burnus@net-b.de>
4739 * trans-expr.c (is_zero_initializer_p): Move up in the file.
4740 (gfc_conv_initializer): Handle zero initializer as special case.
4742 2010-02-27 Tobias Burnus <burnus@net-b.de>
4745 * resolve.c (resolve_fl_variable_derived): Imply SAVE
4746 for module variables for Fortran 2008.
4748 2010-02-25 Jakub Jelinek <jakub@redhat.com>
4751 * trans-common.c (build_common_decl): Also update DECL_MODE,
4752 and DECL_SIZE when encountering a larger common block and call
4755 2010-02-24 Tobias Burnus <burnus@net-b.de>
4758 * trans-expr.c (gfc_conv_initializer): Call directly
4759 gfc_conv_constant for C_NULL_(FUN)PTR.
4761 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
4764 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
4765 checking the rest of the dimensions for elements.
4767 2010-02-21 Tobias Burnus <burnus@net-b.de>
4770 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
4772 * option.c (gfc_init_options,gfc_handle_option): Ditto.
4773 * trans-expr.c (gfc_conv_expr_op): Use the flag.
4774 * invoke.texi: Document new -fno-protect-parens flag.
4776 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
4782 * dependency.c (gfc_check_argument_var_dependency): Use enum
4783 value instead of arithmetic vaue for 'elemental'.
4784 (check_data_pointer_types): New function.
4785 (gfc_check_dependency): Call check_data_pointer_types.
4786 * trans-array.h : Change fourth argument of
4787 gfc_conv_array_parameter to boolean.
4788 * trans-array.c (gfc_conv_array_parameter): A contiguous array
4789 can be a dummy but it must not be assumed shape or deferred.
4790 Change fourth argument to boolean. Array constructor exprs will
4791 always be contiguous and do not need packing and unpacking.
4792 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
4793 space and change fourth argument of gfc_conv_array_parameter
4795 (gfc_trans_arrayfunc_assign): Change fourth argument of
4796 gfc_conv_array_parameter to boolean.
4797 * trans-io.c (gfc_convert_array_to_string): The same.
4798 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
4800 2010-02-20 Tobias Burnus <burnus@net-b.de>
4803 * libgfortran.h: Add GFC_RTCHECK_MEM.
4804 * invoke.texi (-fcheck=): Document -fcheck=mem.
4805 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
4806 and enable malloc-success check only with -fcheck=mem.
4807 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
4809 2010-02-16 Tobias Burnus <burnus@net-b.de>
4812 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
4813 * intrinsic.c (add_functions): Ditto.
4814 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
4815 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
4817 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4820 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
4821 gfc_trans_do prototype.
4822 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
4823 a loop exit condition. If exit condition is given, build the loop exit
4824 code, checking IO results of implied do loops in READ and WRITE.
4825 (gfc_trans_do): Likewise.
4826 * trans.c (trans_code): New static work function, previously
4827 gfc_trans_code. Passes exit condition to gfc_trans_do.
4828 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
4829 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
4830 * trans-io.c (build_dt): Build an exit condition to allow checking IO
4831 result status bits in the dtparm structure. Use this condition in call
4832 to gfc_trans_code_cond.
4834 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
4838 * trans-array.c (gfc_conv_array_parameter): Use
4839 gfc_full_array_ref_p to detect full and contiguous variable
4840 arrays. Full array components and contiguous arrays do not need
4841 internal_pack and internal_unpack.
4843 2010-02-11 Jakub Jelinek <jakub@redhat.com>
4846 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
4849 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
4851 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
4854 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
4855 Tobias Burnus <burnus@net-b.de>
4858 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
4860 2010-02-10 Tobias Burnus <burnus@net-b.de>
4863 * trans-decl.c (gfc_generate_function_code): Only check
4864 actual-vs.-dummy character bounds if not bind(C).
4866 2010-02-10 Jakub Jelinek <jakub@redhat.com>
4869 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
4870 info->dimen after info has been freed.
4872 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4875 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
4878 2010-02-09 Jakub Jelinek <jakub@redhat.com>
4880 * module.c (fix_mio_expr): Declare sym.
4882 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
4885 * module.c (fix_mio_expr): Fix for private generic procedures.
4887 2010-02-09 Daniel Kraft <d@domob.eu>
4890 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
4891 length to be correct and issue only with -Wsurprising.
4892 * invoke.texi (Wsurprising): Mention this new warning that is
4893 turned on by -Wsurprising.
4895 2010-02-09 Daniel Kraft <d@domob.eu>
4898 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
4899 can be CHARACTER type.
4900 (MINVAL), (MAXLOC), (MINLOC): Ditto.
4902 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
4905 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
4906 'formal_ptr'. If this is true, give returned descriptor unity
4907 lbounds, in all dimensions, and the appropriate offset.
4908 (gfc_conv_procedure_call); If formal is a pointer, set the last
4909 argument of gfc_conv_subref_array_arg to true.
4910 * trans.h : Add last argument for gfc_conv_subref_array_arg.
4911 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
4912 new arg of gfc_conv_subref_array_arg to false.
4913 * trans-stmt.c (forall_make_variable_temp): The same.
4915 2010-02-03 Tobias Burnus <burnus@net-b.de>
4918 * interface.c (compare_parameter): Disable rank-checking
4921 2010-02-02 Tobias Burnus <burnus@net-b.de>
4924 * parse.c (decode_specification_statement): Use sym->result not sym.
4926 2010-02-01 Tobias Burnus <burnus@net-b.de>
4929 * decl.c (variable_decl): Allow default initializer in
4930 TYPE declarations in PURE functions.
4932 2010-01-31 Janus Weil <janus@gcc.gnu.org>
4935 * resolve.c (resolve_allocate_expr): Move default initialization code
4936 here from gfc_trans_allocate.
4937 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
4939 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
4940 of CLASS variables via memcpy.
4941 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
4942 to resolve_allocate_expr.
4944 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
4947 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
4948 * gfortran.h : Add prototype for above.
4949 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
4950 (gfc_trans_subcomponent_assign): Call new function to replace
4951 the code to deal with allocatable components.
4952 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
4953 gfc_get_full_arrayspec_from_expr to replace existing code.
4955 2010-01-25 Tobias Burnus <burnus@net-b.de>
4958 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
4961 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
4965 * expr.c (remove_subobject_ref): If the constructor is NULL use
4966 the expression as the source.
4967 (simplify_const_ref): Change the type of expression if
4968 there are component references. Allow for substring to be at
4969 the end of an arbitrarily long chain of references. If an
4970 element is found that is not in an EXPR_ARRAY, assume that this
4971 is scalar initialization of array. Call remove_subobject_ref in
4972 this case with NULL second argument.
4974 2010-01-24 Tobias Burnus <burnus@net-b.de>
4977 * array.c (gfc_array_dimen_size): Use correct specific
4978 function in the check.
4980 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
4983 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
4984 is required, turn any trailing array elements after a range
4985 into ranges so that offsets can be calculated.
4987 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
4989 * module.c (mio_f2k_derived): Use enumerator as initializer of
4993 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
4994 bitfield of width 2.
4996 2010-01-19 Janus Weil <janus@gcc.gnu.org>
4999 * resolve.c (extract_compcall_passed_object): Set locus for
5000 passed-object argument.
5001 (extract_ppc_passed_object): Set locus and correctly remove PPC
5004 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
5007 * trans-decl.c (add_argument_checking): Do not use the backend
5008 decl directly to test for the presence of an optional dummy
5009 argument. Use gfc_conv_expr_present, remembering to set the
5013 * trans-decl.c (gfc_generate_function_code): Small white space
5014 changes. If 'recurcheckvar' is NULL do not try to reset it.
5016 2010-01-19 Janus Weil <janus@gcc.gnu.org>
5019 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
5020 component for extended types.
5021 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
5022 and take care of parent component accessibility.
5024 2010-01-17 Janus Weil <janus@gcc.gnu.org>
5027 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
5028 * interface.c (check_interface1): Move a warning message here from
5029 resolve_fl_procedure.
5030 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
5031 * module.c (read_module): Remove call to gfc_check_interfaces, since
5032 this comes too early here.
5033 * resolve.c (resolve_fl_procedure): Move warning message to
5036 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5039 * interface.c (check_interface1): Pass symbol name rather than NULL to
5040 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
5042 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
5043 than NULL to gfc_compare_interfaces.
5045 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
5048 * trans-array.c (duplicate_allocatable): Static version of
5049 gfc_duplicate_allocatable with provision to handle scalar
5050 components. New boolean argument to switch off call to malloc
5052 (gfc_duplicate_allocatable): New function to call above with
5054 (gfc_copy_allocatable_data): New function to call above with
5056 (structure_alloc_comps): Do not apply indirect reference to
5057 scalar pointers. Add new section to copy allocatable components
5058 of arrays. Extend copying of allocatable components to include
5060 (gfc_copy_only_alloc_comp): New function to copy allocatable
5061 component derived types, without allocating the base structure.
5062 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
5063 Add primitive for gfc_copy_only_alloc_comp.
5064 * trans-expr.c (gfc_conv_procedure_call): After calls to
5065 transformational functions with results that are derived types
5066 with allocatable components, copy the components in the result.
5067 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
5068 of lhs derived types before allocation.
5070 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
5073 * module.c (load_generic_interfaces): If a procedure that is
5074 use associated but not generic is given an interface that
5075 includes itself, then make it generic.
5077 2010-01-11 Joseph Myers <joseph@codesourcery.com>
5078 Shujing Zhao <pearly.zhao@oracle.com>
5080 PR translation/42469
5081 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
5082 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
5083 character between option name and help text.
5085 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5089 * trans-array.c (gfc_conv_array_initializer): Change call to
5090 gfc_error_now to call to gfc_fatal_error.
5091 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
5092 (is_constant_element): Changed name from constant_element.
5093 (gfc_constant_ac): Only use expand_construuctor for expression
5094 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
5095 call gfc_is_constant_expr.
5096 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
5098 * resolve.c (gfc_is_expandable_expr): New function that determiners if
5099 array expressions should have their constructors expanded.
5100 (gfc_resolve_expr): Use new function to determine whether or not to call
5101 gfc_expand_constructor.
5103 2010-01-09 Tobias Burnus <burnus@net-b.de>
5106 * trans-expr.c (gfc_trans_structure_assign): Handle
5108 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
5109 to the constructor for c_null_(fun)ptr.
5110 * resolve.c (resolve_structure_cons): Add special case
5111 for c_null_(fun)ptr.
5113 2010-01-09 Jakub Jelinek <jakub@redhat.com>
5115 * gfortranspec.c (lang_specific_driver): Update copyright notice
5118 2010-01-08 Tobias Burnus <burnus@net-b.de>
5121 * symbol.c (check_conflict, gfc_copy_attr): Add
5122 ASYNCHRONOUS support.
5123 (gfc_add_asynchronous): New function.
5124 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
5125 (gfc_match_asynchronous): New function.
5126 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
5127 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
5128 (gfc_add_asynchronous): New Prototype.
5129 * module.c (ab_attribute, mio_symbol_attribute): Add
5130 ASYNCHRONOUS support.
5131 * resolve.c (was_declared): Ditto.
5132 * match.h (gfc_match_asynchronous): New prototype.
5133 * parse.c (decode_specification_statement,decode_statement):
5134 Add ASYNCHRONOUS support.
5136 2010-01-07 Tobias Burnus <burnus@net-b.de>
5139 * trans-decl.c (get_proc_pointer_decl): Fix call to
5140 gfc_conv_initializer for array-valued proc-pointer funcs.
5142 2010-01-07 Tobias Burnus <burnus@net-b.de>
5145 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
5146 allocatable scalars with SAVE attribute.
5148 2010-01-05 Tobias Burnus <burnus@net-b.de>
5151 * options.c (gfc_post_options): Set -frecursion
5152 when -fopenmp is used.
5154 2010-01-05 Tobias Burnus <burnus@net-b.de>
5157 * trans-expr.c (gfc_conv_procedure_call): Nullify
5158 return value for allocatable-scalar character functions.
5160 2010-01-04 Tobias Burnus <burnus@net-b.de>
5163 * error.c (error_printf, gfc_warning, gfc_notify_std,
5164 gfc_warning_now, gfc_error, gfc_error_now,
5165 gfc_fatal_error): Change argument name from nocmsgid to
5166 gmsgid to enable (x)gettext's % checking.
5168 2010-01-04 Tobias Burnus <burnus@net-b.de>
5170 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
5172 2010-01-04 Tobias Burnus <burnus@net-b.de>
5175 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
5176 for functions returning allocatable scalars.
5177 * trans-stmt.c (gfc_trans_allocate): Emmit error when
5178 reallocating an allocatable scalar.
5179 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
5181 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
5182 allocatable scalars.
5183 (gfc_generate_function_code): Nullify result variable for
5184 allocatable scalars.
5187 * module.c (gfc_use_module): Fix warning string to allow
5191 * invoke.texi (-fcheck=recursion): Mention that the checking
5192 is also disabled for -frecursive.
5193 * trans-decl.c (gfc_generate_function_code): Disable
5194 -fcheck=recursion when -frecursive is used.
5196 * intrinsic.texi (iso_c_binding): Improve wording.
5199 Copyright (C) 2010 Free Software Foundation, Inc.
5201 Copying and distribution of this file, with or without modification,
5202 are permitted in any medium without royalty provided the copyright
5203 notice and this notice are preserved.