1 2010-11-11 Nathan Froyd <froydnj@codesourcery.com>
4 * options.c (gfc_post_options): Initialize gfc_option.max_errors.
5 (gfc_handle_option) [OPT_fmax_errors_]: Remove.
6 * lang.opt (fmax-errors=): Remove.
8 2010-11-11 Steven G. Kargl <kargl@gcc.gnu.org>
10 * symbol.c (verify_bind_c_derived_type): Accept BIND(C) on an empty
13 2010-11-11 Jan Hubicka <jh@suse.cz>
15 * options.c (gfc_post_options): Remove flag_whopr.
17 2010-11-11 Tobias Burnus <burnus@net-b.de>
20 * resolve.c (resolve_transfer): Reject I/O transfer of
24 * resolve.c (resolve_code): Reject nonscalar FORALL masks.
26 2010-11-11 Janus Weil <janus@gcc.gnu.org>
28 * resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
30 2010-11-10 Joseph Myers <joseph@codesourcery.com>
32 * trans-array.c (gfc_trans_deferred_array): Use "front-end"
33 spelling in diagnostic.
34 * trans.c (gfc_allocate_array_with_status): Add missing space in
37 2010-11-10 Joseph Myers <joseph@codesourcery.com>
39 * cpp.c (asm_file_name): Don't declare here.
41 2010-11-10 Tobias Burnus <burnus@net-b.de>
44 * intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure
45 and not for attr.elemental.
46 * intrinsic.texi (move_alloc): Document as being pure.
48 2010-11-10 Tobias Burnus <burnus@net-b.de>
51 * resolve.c (resolve_fl_derived): Don't allow CLASS in
52 sequence/BIND(C) types.
54 2010-11-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
55 Mikael Morin <mikael@gcc.gnu.org>
58 * intrinsic.c: Correctly set the pure attributes for intrinsic
60 * expr.c (check_specification_function): Remove this function and move
61 its code into gfc_is_constant_expr. (gfc_is_constant_expr): Change the
62 order of checks by checking for non-constant arguments first. Then,
63 check for initialization functions, followed by intrinsics.
65 2010-11-09 Janus Weil <janus@gcc.gnu.org>
68 * gfortran.h (gfc_add_data_component,gfc_add_vptr_component,
69 gfc_add_hash_component,gfc_add_size_component,
70 gfc_add_def_init_component): New macros.
71 * class.c (gfc_add_component_ref): Renamed data component.
72 (get_unique_type_string): New function.
73 (gfc_build_class_symbol): Use 'get_unique_type_string' to construct
74 uniques names for the class containers. Rename components.
75 (gfc_find_derived_vtab): Use 'get_unique_type_string' to construct
76 uniques names for the vtab symbols. Rename components.
77 * decl.c (attr_decl1): Renamed class container components.
78 * iresolve.c (gfc_resolve_extends_type_of): Ditto.
79 * match.c (select_type_set_tmp): Renamed temporaries.
80 * module.c (read_module): Renamed vtab and vtype symbols.
81 * resolve.c (resolve_structure_cons,resolve_typebound_function,
82 resolve_typebound_subroutine,resolve_deallocate_expr,
83 resolve_select_type,resolve_fl_derived): Renamed class container and
85 * trans-array.c (structure_alloc_comps): Ditto.
86 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
87 * trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure,
88 gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto.
89 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof,
90 gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated,
91 gfc_conv_same_type_as): Ditto.
92 * trans-stmt.c (gfc_trans_allocate): Ditto.
94 2010-11-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
97 * trans-decl.c (generate_local_decl): Do not generate unused warning
98 for variables in namelists.
100 2010-11-08 Janus Weil <janus@gcc.gnu.org>
103 * decl.c (build_struct): Build vtab immediately if derived type
104 has already been declared.
106 2010-11-08 Janus Weil <janus@gcc.gnu.org>
109 * trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
111 2010-11-06 Janus Weil <janus@gcc.gnu.org>
114 * trans-expr.c (gfc_trans_class_assign): Find 'vtab' symbol in correct
117 2010-11-05 Janus Weil <janus@gcc.gnu.org>
121 * class.c (gfc_find_derived_vtab): Improved search for existing vtab.
122 Add component '$copy' to vtype symbol for polymorphic deep copying.
123 * expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
124 during resolution stage.
125 * resolve.c (resolve_codes): Don't resolve code if namespace is already
127 * trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
128 polymorphic ALLOCATE statements with SOURCE.
130 2010-11-03 Thomas Koenig <tkoenig@gcc.gnu.org>
131 Paul Thomas <pault@gcc.gnu.org>
133 * dump-parse-tree.c (code_indent): Take label into acount
134 when calculating indent.
135 (show_typespec): Also display class.
136 (show_attr): Add module name to argument.
137 Don't show UNKNOWN for flavor, access and save. Don't show
138 SAVE_NONE. Don't show INTENT_UNKNOWN. Show module for use
139 association. Show intent only for dummy arguments.
140 Set length of shown symbol names to minimum of 12.
141 Show attributes header.
142 (show_symbol): Adjust show_level.
143 (show_symtree): Clear up display for ambiguous. Show if symbol
144 was imported from namespace.
145 (show_code_node): Clear up indenting. Traverse symtree and
146 show code directly instead of calling show_namespace.
148 2010-11-02 Nathan Froyd <froydnj@codesourcery.com>
150 * trans-decl.c (add_argument_checking): Use build_zero_cst instead of
152 * trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
153 * trans-stmt.c (gfc_trans_do): Likewise.
155 2010-11-02 Steven G. Kargl < kargl@gcc.gnu.org>
156 Tobias Burnus <burnus@net-b.de>
159 * array.c (gfc_match_array_constructor): Reject deferred type
160 parameter (DTP) in type-spec.
161 * decl.c (char_len_param_value, match_char_length,
162 gfc_match_char_spec, build_sym, variable_decl,
163 enumerator_decl): Support DTP.
164 * expr.c (check_inquiry): Fix check due to support for DTP.
165 * gfortran.h (gfc_typespec): Add Boolean 'deferred'.
166 * misc.c (gfc_clear_ts): Set it to false.
167 * match.c (gfc_match_allocate): Support DTP.
168 * resolve.c (resolve_allocate_expr): Not-implemented error for DTP.
169 (resolve_fl_variable): Add DTP constraint check.
170 * trans-decl.c (gfc_trans_deferred_vars): Add not-implemented
173 2010-11-01 Steven G. Kargl <kargl@gcc.gnu.org>
176 * fortran/match.c (match_derived_type_spec): Reoplace gfc_match_symbol
177 with a gfc_find_symbol to prevent namespace pollution. Remove dead
179 (match_type_spec): Remove parsing of '::'. Collapse character
180 kind checking to one location.
181 (gfc_match_allocate): Use correct locus in error message.
183 2010-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
185 * gfortran.h (gfc_option_t): Replace dump_parse_tree by
186 dump_fortran_original and add dump_fortran_optimized.
187 * lang.opt: Add fdump-fortran-original and
188 fdump-fortran-optimized. Document that fdump-parse-tree is
190 * gfortran.texi: Add -fdump-fortran-original and
191 -fdump-fortran-optimized. -fdump-parse-tree is deprecated.
192 * frontend-passes.c (gfc_run_passes): If optimizing and
193 if gfc_option.dump_fortran_optimized is set, dump the parse tree
195 * parse.c: Rename gfc_option.dump_parse_tree to
196 gfc_option.dump_fortran_original.
197 * options.c (gfc_init_options): Rename gfc_option.dump_parse_tree
198 to gfc_option.dump_fortran_original and handle
199 gfc_option.dump_fortran_optimize.
200 (gfc_post_options): Rename gfc_option.dump_parse_tree
201 to gfc_option.dump_fortran_original.
202 (gfc_handle_option): Rename OPT_fdump_parse_tree to
203 OPT_fdump_fortran_original and gfc_option.dump_parse_tree
204 to gfc_option.dump_fortran_original. Handle
205 OPT_fdump_fortran_optimized.
207 2010-10-30 Janus Weil <janus@gcc.gnu.org>
212 * interface.c (count_types_test): Symmetrize type check.
213 (generic_correspondence): Ditto.
215 2010-10-27 Janus Weil <janus@gcc.gnu.org>
218 * interface.c (compare_allocatable): Handle polymorphic allocatables.
219 (compare_parameter): Add two error messages for polymorphic dummies.
221 2010-10-26 Janus Weil <janus@gcc.gnu.org>
224 * trans.h (gfc_deallocate_scalar_with_status): New prototype.
225 * trans.c (gfc_deallocate_scalar_with_status): New function for
226 deallocation of allocatable scalars.
227 * trans-array.c (structure_alloc_comps): Call it here ...
228 * trans-decl.c (gfc_trans_deferred_vars): ... here ...
229 * trans-stmt.c (gfc_trans_deallocate): ... and here.
231 2010-10-26 Tobias Burnus <burnus@net-b.de>
234 * trans-stmt.c (gfc_trans_allocate): Do a deep-copy for SOURCE=.
237 * trans-array.c (duplicate_allocatable): Use size of type and not
238 the size of the pointer to the type.
240 2010-10-25 Steven G. Kargl <kargl@gcc.gnu.org>
243 * fortran/scanner.c (include_line): Check return value of load_file.
245 2010-10-23 Tobias Burnus <burnus@net-b.de>
248 * expr.c (gfc_check_vardef_context): Fix PROTECTED check.
250 2010-10-21 Janus Weil <janus@gcc.gnu.org>
253 * match.h (gfc_matching_ptr_assignment): New global variable to indicate
254 we're currently matching a (non-proc-)pointer assignment.
255 * decl.c (match_pointer_init): Set it.
256 * match.c (gfc_match_pointer_assignment): Ditto.
257 * primary.c (matching_actual_arglist): New global variable to indicate
258 we're currently matching an actual argument list.
259 (gfc_match_actual_arglist): Set it.
260 (gfc_match_varspec): Reject procedure pointer component calls with
261 missing argument list.
263 2010-10-21 Janus Weil <janus@gcc.gnu.org>
266 * interface.c (gfc_compare_interfaces): Switch arguments of type
267 comparison (important for polymorphic variables).
269 2010-10-21 Tobias Burnus <burnus@net-b.de>
272 * expr.c (gfc_check_vardef_context): Treat pointer functions
275 2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
278 * trans_stmt.c (gfc_trans_stop): Fix whitespace. Build a call to new
279 F08 numeric stop function.
280 * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
281 * trans-decl.c (gfc_build_builtin_function_decls): Build declaration
282 for stop_numeric_f08.
284 2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
286 * gfortran.h: Remove definition of bt enumerator.
287 * libgfortran.h: Add bt enumerator type alighned with defintion.
288 Remove the dtype enumerator, no longer used.
289 previously given in libgfortran/io.h
290 * trans-types.c: Use new bt enumerator.
291 * trans-io.c: Likewise.
293 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
295 * trans-io.c (gfc_build_io_library_fndecls):
296 Array descriptor arguments to transfer_array can be
297 dereferenced recursively.
299 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
304 * trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
305 IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
306 IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
307 IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
308 (gfc_build_io_library_fndecls): Add corresponding function
310 (transfer_expr): If the current transfer is a READ, use
311 the iocall with the original version, otherwise the version
313 (transfer_array_desc): Likewise.
315 2010-10-15 Tobias Burnus <burnus@net-b.de>
318 * trans.h (gfc_add_modify_loc, gfc_evaluate_now_loc): New prototypes.
319 (gfc_trans_runtime_error_vararg): Remove prototype.
320 * trans.c (gfc_add_modify_loc, gfc_evaluate_now_loc): New functions.
321 (gfc_add_modify, gfc_evaluate_now): Use them.
322 (trans_runtime_error_vararg): Renamed from
323 gfc_trans_runtime_error_vararg, made static and use locus.
324 (gfc_trans_runtime_error): Use it.
325 (gfc_trans_runtime_check): Ditto and make use of locus.
326 * trans-stmt.c (gfc_trans_if_1, gfc_trans_simple_do,
327 gfc_trans_do, gfc_trans_do_while): Improve line number
328 associated with generated expressions.
330 2010-10-12 Daniel Kraft <d@domob.eu>
333 * parse.c (parse_associate): Set typespec of associate-name if that of
334 the target is already available.
336 2010-10-10 Janus Weil <janus@gcc.gnu.org>
339 * resolve.c (resolve_typebound_function): Bugfix for type-bound
342 2010-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
344 * frontend-passes.c: Include opts.h.
345 (optimize_comparison): Renamed from optimize_equality.
346 Change second argument to operation to be compared.
347 Use flag_finite_math_only to avoid comparing REAL and
348 COMPLEX only when NANs are honored. Simplify comparing
349 of string concatenations where left or right operands are
350 equal. Simplify all comparison operations, based on the result
351 of gfc_dep_compare_expr.
352 * dependency.c: Include arith.h.
353 (gfc_are_identical_variables): Volatile variables should not
354 compare equal to themselves.
355 (gfc_dep_compare_expr): Handle string constants and string
358 2010-10-08 Joseph Myers <joseph@codesourcery.com>
360 * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
361 * gfortran.h (gfc_init_options_struct): Declare.
362 * options.c (gfc_init_options_struct): New. Split out from
365 2010-10-07 Janus Weil <janus@gcc.gnu.org>
368 * resolve.c (resolve_typebound_function): Use correct declared type
369 for type-bound operators.
371 2010-10-07 Mikael Morin <mikael@gcc.gnu.org>
374 Revert revision 165026:
375 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
377 * decl.c (match_procedure_in_type): Assertify if conditions.
379 2010-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
382 * resolve.c (resolve_transfer): Use expression inside parenthesis to
383 find acutal component to be transgferred.
385 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
387 * trans-stmt.c (gfc_trans_allocate): free lhs expr.
389 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
391 * trans-array.c (gfc_free_ss_chain): Made non-static.
392 * trans-array.h (gfc_free_ss_chain): New prototype.
393 * trans-stmt.c (gfc_trans_where_2): Free ss chains.
395 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
397 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
400 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
402 * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
404 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
406 * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
407 before calling gfc_free_expr.
409 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
411 * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
412 gfc_advance_se_ss_chain.
413 * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
414 gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
415 calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
416 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
417 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
419 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
421 * trans.c (gfc_restore_backend_locus): New function.
422 (gfc_get_backend_locus): Renamed to ...
423 (gfc_save_backend_locus): ... this.
424 * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
425 gfc_save_backend_locus): Same.
426 * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
427 gfc_trans_deferred_array): Rename gfc_get_backend_locus to
428 gfc_save_backend_locus.
429 (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
431 (gfc_trans_g77_array, gfc_trans_deferred_array): Use
432 gfc_restore_backend_locus instead of gfc_set_backend_locus.
433 (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
435 * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
436 gfc_trans_deferred_vars):
437 Rename gfc_get_backend_locus to gfc_save_backend_locus.
438 Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
440 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
442 * trans-array.c (gfc_build_constant_array_constructor): Free array
445 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
447 * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
448 before overwriting it.
450 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
452 * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
453 * symbol.c (gen_shape_param): Ditto.
455 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
457 * symbol.c (free_entry_list): New function.
458 (gfc_free_namespace): Free list of entries.
460 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
462 * symbol.c (free_components): Free list of formal args and formal
465 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
467 * simplify.c (gfc_simplify_size): Clear temporary mpz int before
470 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
472 * resolve.c (add_dt_to_dt_list): Remove unneeded if.
474 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
476 * resolve.c (check_typebound_baseobject): Free local expr before
479 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
481 * primary.c (gfc_match_structure_constructor): Invert the assert logic.
483 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
485 * primary.c (gfc_free_structure_ctor_component): Also free the
486 component structure itself.
488 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
490 * module.c (gfc_use_module): Free atom_string when done with it.
492 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
494 * module.c (read_module): Remove useless string duplication.
496 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
498 * gfortranspec.c (append_arg): Remove commented code.
500 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
502 * decl.c (match_procedure_in_type): Assertify if conditions.
504 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
506 * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
507 preprocessing is disabled.
509 2010-10-06 Jakub Jelinek <jakub@redhat.com>
512 * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
513 ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
514 (gfc_define_builtin): Change last argument to int bitmask from bool,
515 control addition of TREE_NOTHROW and leaf attribute as well.
516 (DO_DEFINE_MATH_BUILTIN): Adjust callers.
517 (gfc_init_builtin_functions): Likewise. Remove
518 ATTR_{,CONST_}NOTHROW_LIST enum.
520 2010-10-04 Andi Kleen <ak@linux.intel.com>
522 * Make-lang.in (gfortran, f951): Add + to build rule.
524 2010-10-04 Richard Guenther <rguenther@suse.de>
526 * f95-lang.c (current_translation_unit): New global variable.
527 (gfc_create_decls): Build a translation-unit decl.
528 (pushdecl): In the global binding-level use the
529 translation-unit decl as DECL_CONTEXT.
530 * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
531 (build_function_decl): Likewise. Delay setting the assembler
532 name, leave setting of DECL_CONTEXT to pushdecl.
533 (trans_function_start): Use DECL_FILE_SCOPE_P.
534 (gfc_create_module_variable): Likewise. Remove questionable
536 * trans.c (gfc_generate_module_code): Likewise.
538 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
540 * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
541 instead of duplicating code.
542 * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
545 2010-10-02 Janus Weil <janus@gcc.gnu.org>
548 * resolve.c (resolve_formal_arglist): Avoid setting default type for
549 formal arguments of intrinsic procedures.
551 2010-09-30 Janus Weil <janus@gcc.gnu.org>
554 * resolve.c (resolve_allocate_expr): Do not use
555 'gfc_has_default_initializer'.
557 2010-09-30 Tobias Burnus <burnus@net-b.de>
559 * gfortran.tex (Fortran 2008 status): Update list of
560 implemented features.
562 2010-09-29 Joseph Myers <joseph@codesourcery.com>
564 * lang.opt: Don't use VarExists.
566 2010-09-29 Joseph Myers <joseph@codesourcery.com>
568 * cpp.c (cpp_define_builtins): Update names of gfc_option_t
570 (gfc_cpp_post_options): Update names of cpp_options members.
571 (cb_cpp_error): Update names of diagnostic_context members.
572 * f95-lang.c (gfc_init_builtin_functions): Update names of
573 gfc_option_t members.
574 * gfortran.h (gfc_option_t): Rename warn_conversion and
576 * intrinsic.c (gfc_convert_type_warn): Update names of
577 gfc_option_t members.
578 * options.c (gfc_init_options, gfc_post_options, set_Wall,
579 gfc_handle_option): Update names of gfc_option_t members.
580 * parse.c (next_free, next_fixed): Update names of gfc_option_t
582 * scanner.c (pedantic): Remove extern declaration.
583 (skip_free_comments, skip_fixed_comments, include_line): Update
584 names of gfc_option_t members.
585 * trans-decl.c (gfc_generate_function_code): Update names of
586 gfc_option_t members.
588 2010-09-28 Tobias Burnus <burnus@net-b.de>
592 * intrinsic.c (add_functions): Make compiler_version and
593 compiler_options CLASS_INQUIRY.
594 * gfortran.h (gfc_get_option_string): New prototype.
595 * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
597 (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
598 (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
599 (ISO_C_BINDING): Refer to C_SIZEOF.
600 * options.c (gfc_get_option_string): New function.
601 * simplify.c (gfc_simplify_compiler_options): Use it.
602 (gfc_simplify_compiler_version): Include compiler name.
604 2010-09-28 Jan Hubicka <jh@suse.cz>
606 * f95-lang.c (gfc_define_builtin): Make leaf.
607 (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
608 and ATTR_NOTHROW_LEAF_LIST.
609 (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
610 (DEF_GOMP_BUILTIN): Likewise.
612 2010-09-28 Tobias Burnus <burnus@net-b.de>
615 * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
618 2010-09-27 Tobias Burnus <burnus@net-b.de>
622 * intrinsic.h (gfc_simplify_compiler_options,
623 gfc_simplify_compiler_version): New prototypes.
624 * intrinsic.c (gfc_intrinsic_function_by_id,
625 make_from_module): New functions.
626 (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
627 gfc_specific_intrinsic): Don't return module intrinsics.
628 (add_functions): Add compiler_options, compiler_version.
629 (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
630 * symbol.c (std_for_isocbinding_symbol): Add version check for
632 * iso-fortran-env.def: Add compiler_options, compiler_version.
633 * iso-c-binding.def: Add c_sizeof.
634 * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
635 (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
636 (gfc_intrinsic_function_by_id): New prototype.
637 * module.c (create_intrinsic_function): New function.
638 (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
639 * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
640 * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
642 * simplify.c (gfc_simplify_compiler_options,
643 gfc_simplify_compiler_version): New functions.
645 2010-09-26 Daniel Kraft <d@domob.eu>
649 * resolve.c (resolve_select_type): Clarify code.
650 (resolve_assoc_var): Only set typespec if it is currently unknown.
652 2010-09-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
655 * module.c (create_int_parameter_array): Set the array value shape.
657 2010-09-25 Tobias Burnus <burnus@net-b.de>
659 * gfortran.texi: Re-add accidently removed \input line.
661 2010-09-25 Daniel Kraft <d@domob.eu>
664 * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
665 * io.c (resolve_tag): F2008 check for NEWUNIT and variable
666 definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
667 (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
668 `extra_comma' with changed semantics.
669 (gfc_resolve_dt): Check variable definitions.
670 (match_io_element): Remove INTENT and PURE checks here and
671 initialize code->ext.dt member.
672 (match_io): Set dt->dt_io_kind.
673 (gfc_resolve_inquire): Check variable definition for all tags
674 except UNIT, FILE and ID.
675 * resolve.c (resolve_transfer): Variable definition check.
677 2010-09-25 Tobias Burnus <burnus@net-b.de>
679 * interface.c (gfc_match_end_interface): Constify char pointer
682 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>
684 * interface.c (gfc_match_end_interface): Deal with user defined
685 operators that overload rational operators and C1202.
687 2010-09-24 Tobias Burnus <burnus@net-b.de>
689 * gfortran.texi: Add second space after end-of-sentence period;
690 change / to /@/ to allow hyphenation of URLs.
691 (Standards): Remove duplicated OpenMP, update wording given that
692 Fortran 2008 now released.
693 (Fortran 2008 status): Update and add list of implemented features.
695 2010-09-24 Tobias Burnus <burnus@net-b.de>
698 * iso-fortran-env.def: Add NAMED_KINDARRAY with
699 character_kinds, integer_kinds, logical_kinds and
701 * gfortran.h: Add them to iso_fortran_env_symbol.
702 * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
703 LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
704 libgfortran_stat_codes to libgfortran_error_codes.
705 * module.c (create_int_parameter_array): New function.
706 (use_iso_fortran_env_module): Use it for
707 NAMED_KINDARRAY of iso-fortran-env.def.
708 * trans-decl.c (gfc_get_symbol_decl): Parameter
709 arrays of intrinsics modules become local static variables.
710 * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
711 integer_kinds, logical_kinds and real_kinds.
713 2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
716 * frontend-passes.c (optimize_binop_array_assignment):
717 Only re-use lhs as intermediate storage if kind and type
720 2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
724 * trans-array.c (gfc_conv_expr_descriptor): Handle
725 ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
727 2010-09-23 Tobias Burnus <burnus@net-b.de>
729 * intrinsic.texi (OpenMP modules): Add named constants of
732 2010-09-23 Daniel Kraft <d@domob.eu>
737 * gfortran.h (gfc_check_vardef_context): New method.
738 (struct symbol_attribute): New flag `select_type_temporary'.
739 * primary.c (gfc_variable_attr): Clarify initialization of ref.
740 (match_variable): Remove PROTECTED check and assignment check
741 for PARAMETERs (this is now done later).
742 * match.c (gfc_match_iterator): Remove INTENT(IN) check.
743 (gfc_match_associate): Defer initialization of newAssoc->variable.
744 (gfc_match_nullify): Remove PURE definability check.
745 (select_type_set_tmp): Set new `select_type_temporary' flag.
746 * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
747 (gfc_check_pointer_assign): Ditto (and other checks removed).
748 (gfc_check_vardef_context): New method.
749 * interface.c (compare_parameter_protected): Removed.
750 (compare_actual_formal): Use `gfc_check_vardef_context' for checks
751 related to INTENT([IN]OUT) arguments.
752 * intrinsic.c (check_arglist): Check INTENT for intrinsics.
753 * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
754 (remove_last_array_ref): New method.
755 (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
756 (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
757 (resolve_assoc_var): Remove checks for definability here.
758 (resolve_select_type): Handle resolving of code->block here.
759 (resolve_ordinary_assign): Remove PURE check.
760 (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
761 Use `gfc_check_vardef_context' for assignments and pointer-assignments.
763 2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
765 * gfortran.texi (Argument list functions): Allow URL to wrap.
766 * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
767 (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
768 (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
769 code markups in the text.
770 * invoke.texi (Fortran Dialect Options)
771 (Error and Warning Options, Directory Options, Code Gen Options):
772 Likewise. Remove @code inside @smallexample.
774 2010-09-22 Joseph Myers <joseph@codesourcery.com>
776 * gfortranspec.c (lang_specific_driver): Handle OPT__version and
777 OPT__help instead of OPT_fversion and OPT_fhelp.
778 * lang.opt (-all-warnings, -assert, -assert=, -comments,
779 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
780 -dump, -dump=, -include-barrier, -include-directory,
781 -include-directory=, -include-directory-after,
782 -include-directory-after=, -include-prefix, -include-prefix=,
783 -no-line-commands, -no-standard-includes, -output, -output=,
784 -preprocess, -print-missing-file-dependencies, -trace-includes,
785 -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
786 -write-dependencies, -write-user-dependencies): New.
788 2010-09-21 Jason Blevins <jrblevin@sdf.org>
790 * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
791 execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
794 2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
797 * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
801 * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
802 accessing dimensions in reversed order.
805 * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
806 intrinsic function call.
808 * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
809 Update asserts accordingly.
812 * trans.h (gfc_se): New field force_tmp.
813 * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
814 and set parmse.force_tmp if some alias is found.
815 * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
816 if se->force_tmp is set.
818 2010-09-20 Janus Weil <janus@gcc.gnu.org>
821 * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
822 TBPs, PPCs and pointer/allocatable components.
824 2010-09-20 Paul Thomas <pault@gcc.gnu.org>
827 * simplify.c (is_constant_array_expr): Allow structure array
828 elements as well as constants.
829 (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
830 gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
831 type of source to the result.
833 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
835 * frontend-passes.c (gfc_expr_walker): Also
836 handle EXPR_SUBSTRING.
838 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
840 * frontend-passes.c (gfc_expr_walker): Handle
841 constructors and references.
843 2010-09-16 Tobias Burnus <burnus@net-b.de>
846 * trans-types.c (create_fn_spec): New function.
847 (gfc_get_function_type): Call it.
849 2010-09-16 Jakub Jelinek <jakub@redhat.com>
851 * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
852 (gfc_expr_walker, gfc_code_walker): New prototypes.
853 * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
854 (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
855 (optimize_namespace): Use gfc_code_walker.
856 (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
857 (optimize_expr_0, optimize_code_node,
858 optimize_actual_arglist): Removed.
859 (optimize_assignment): Don't call optimize_expr_0.
861 2010-09-16 Janus Weil <janus@gcc.gnu.org>
864 * interface.c (compare_parameter): Create vtab for actual argument,
865 instead of formal (if needed).
867 2010-09-15 Janus Weil <janus@gcc.gnu.org>
870 * resolve.c (resolve_allocate_expr): Do default initialization via
873 2010-09-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
875 * mathbuiltins.def: Do not defined huge_val built-in.
876 * trans-const.c (gfc_build_inf_or_huge): New function.
877 * trans-const.h (gfc_build_inf_or_huge): New prototype.
878 * f95-lang.c (gfc_init_builtin_functions): Don't defined
880 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
881 have functions of type (*) (void) anymore.
882 (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
883 (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
884 of generating a call to huge_val().
886 2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
888 * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
889 * dependency.c (gfc_check_dependency): Don't depend on
890 expr's inline_noncopying_intrinsic_attribute.
891 * dependency.c (gfc_check_argument_var_dependency,
892 gfc_check_argument_dependency): Ditto. Recursively check dependency
893 as NOT_ELEMENTAL in the non-copying (=transpose) case.
894 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
895 * resolve.c (find_noncopying_intrinsics): Remove.
896 (resolve_function, resolve_call): Remove call to
897 find_noncopying_intrinsics.
899 * trans-array.c (gfc_conv_array_transpose): Remove.
900 (gfc_walk_subexpr): Make non-static. Move prototype...
901 * trans-array.h (gfc_walk_subexpr): ... here.
902 * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
904 (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
905 gfc_inline_intrinsic_function_p): New.
906 (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
907 Remove transpose from the libcall list.
908 (gfc_walk_intrinsic_function): Special case inline intrinsic.
909 * trans.h (gfc_inline_intrinsic_function_p): New prototype.
911 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
913 * trans-expr.c (expr_is_variable): New function taking non-copying
914 intrinsic functions into account.
915 (gfc_trans_assignment_1): Use expr_is_variable.
917 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
919 * trans-array.c (gfc_conv_loop_setup): Access the shape along the
920 real array dimension instead of the scalarizer (loop) dimension.
922 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
924 * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
925 transposed references.
927 2010-09-10 Tobias Burnus <burnus@net-b.de>
930 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
931 build4_stat_loc): New inline functions.
932 (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
933 (build1_v, build2_v, build3_v, build4_v): Use input_location
935 * trans-array.c (gfc_trans_scalarized_loop_end,
936 gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
937 * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
938 gfc_finish_wrapped_block): Ditto.
939 * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
940 * trans-expr.c (gfc_conv_missing_dummy,
941 gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
942 * trans-openmp.c (gfc_omp_clause_default_ctor,
943 gfc_trans_omp_critical, gfc_trans_omp_parallel,
944 gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
945 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
946 gfc_trans_omp_single, gfc_trans_omp_task,
947 gfc_trans_omp_workshare): Ditto.
949 2010-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
951 * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
952 for dummy argument that appears in a specification statement.
954 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
956 * trans-array.c (gfc_get_array_ref_dim): New function.
957 (gfc_trans_create_temp_array): Reconstruct array
958 bounds from loop bounds. Use array bounds instead of loop bounds.
960 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
962 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
963 Get the array dimension from the dim array.
965 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
967 * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
968 dim array to get the stride in the innermost loop.
970 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
972 * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
973 (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
974 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
976 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
978 * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
979 and info dimension are the same. Loop over loop dimension.
980 * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
982 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
984 * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
987 2010-09-09 Tobias Burnus <burnus@net-b.de>
990 * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
991 STAT): Show also syntax for the function version.
992 * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
993 add_sym_3s_intent): Remove function.
994 (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
996 (add_sym_2_intent): New function.
997 (add_functions): Set intent for functions which modify
998 the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
999 argument name of hostnm from "a" to "c"
1000 (add_subroutines): Change add_sym_*s_intent to
1001 add_sym_*s and add intent to the add_sym_*s calls.
1003 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1006 * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
1007 MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
1008 * gfortran.h: Define ISYM values for above intrinsics.
1009 * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1010 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
1011 gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1012 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1013 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1014 gfc_simplify_merge_bits, gfc_simplify_rshift,
1015 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
1016 gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
1017 gfc_resolve_shift): New prototypes.
1018 * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
1019 gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
1020 * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1021 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
1023 * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
1024 gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
1025 gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
1027 (gfc_conv_intrinsic_function): Call above static functions.
1028 * intrinsic.texi: Document new intrinsics.
1029 * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1030 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1031 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1032 gfc_simplify_merge_bits, gfc_simplify_rshift,
1033 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
1036 2010-09-08 Jakub Jelinek <jakub@redhat.com>
1038 * frontend-passes.c (optimize_code_node): Walk block chain by default.
1041 * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
1042 instead of code->block.
1045 * openmp.c (resolve_omp_do): Report not enough do loops for
1046 collapse even if block->next is NULL.
1048 2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1051 * dependency.c (gfc_deb_compare_expr): Take missing optional
1052 arguments into account.
1054 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1056 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1057 * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1058 (gfc_build_intrinsic_function_decls): Don't build the
1059 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
1060 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
1061 gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
1062 of calling clz128/ctz128 library functions.
1064 2010-09-07 Jan Hubicka <jh@suse.cz>
1066 * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
1069 2010-09-07 Tobias Burnus <burnus@net-b.de>
1072 * intrinsic.texi (COS): Remove superfluous "n".
1074 2010-09-07 Tobias Burnus <burnus@net-b.de>
1077 * trans-array.c (gfc_conv_descriptor_data_get,
1078 gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
1079 gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
1080 gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
1081 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
1082 gfc_conv_shift_descriptor_lbound,
1083 gfc_set_loop_bounds_from_array_spec,
1084 gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
1085 gfc_conv_array_transpose, gfc_get_iteration_count,
1086 gfc_grow_array, gfc_trans_array_ctor_element,
1087 gfc_trans_array_constructor_subarray,
1088 gfc_trans_array_constructor_value,
1089 constant_array_constructor_loop_size, gfc_trans_array_constructor,
1090 gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
1091 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1092 gfc_conv_array_ref, gfc_trans_preloop_setup,
1093 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1094 gfc_conv_loop_setup, gfc_conv_array_extent_dim,
1095 gfc_conv_descriptor_size, gfc_array_init_size,
1096 gfc_array_allocate, gfc_array_deallocate,
1097 gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
1098 gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
1099 get_array_charlen, gfc_conv_expr_descriptor,
1100 array_parameter_size, gfc_conv_array_parameter,
1101 gfc_trans_dealloc_allocated, get_full_array_size,
1102 duplicate_allocatable,
1103 structure_alloc_comps): Change fold_build[0-9] to
1104 fold_build[0-9]_loc.
1105 (duplicate_allocatable, structure_alloc_comps,
1106 gfc_duplicate_allocatable): Add space after function name.
1108 2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
1110 * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
1111 checking string length value.
1112 * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
1113 gfc_charlen_type_node type.
1116 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
1117 length to gfc_charlen_type_node.
1119 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1122 * frontend-passes.c (optimize_binop_array_assignment): New
1124 (optimize_assignment): Call it.
1126 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1129 * trans-expr.c (gfc_conv_substring): If start and end
1130 of the string reference are equal, set the length to one.
1132 2010-09-06 Tobias Burnus <burnus@net-b.de>
1135 * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
1137 2010-09-06 Tobias Burnus <burnus@net-b.de>
1140 * dump-parse-tree.c (gfc_debug_expr): New function.
1142 2010-09-06 Tobias Burnus <burnus@net-b.de>
1145 * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
1146 (check_specific): Special case for those intrinsics.
1147 * gfortran.h (gfc_isym_id): Add new intrinsics
1148 * intrinsic.h (gfc_check_transf_bit_intrins,
1149 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1150 gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
1152 * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
1153 gfc_resolve_iparity, resolve_transformational): New functions.
1154 (gfc_resolve_product, gfc_resolve_sum,
1155 gfc_resolve_parity): Use resolve_transformational.
1156 * check.c (gfc_check_transf_bit_intrins): New function.
1157 * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
1158 gfc_simplify_iparity, do_bit_any, do_bit_ior,
1159 do_bit_xor, simplify_transformation): New functions.
1160 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
1161 gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
1162 * trans-intrinsic.c (gfc_conv_intrinsic_arith,
1163 gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
1164 Handle IALL, IANY and IPARITY intrinsics.
1165 * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
1167 (IALL, IANY, IPARITY): Document new intrinsics.
1169 2010-09-05 Tobias Burnus <burnus@net-b.de>
1172 * f95-lang.c (gfc_truthvalue_conversion): Use
1173 fold_build[0-9]_loc instead of fold_build[0-9].
1174 * convert.c (convert): Ditto.
1175 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1176 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1177 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1178 gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
1179 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
1180 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1181 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1182 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
1183 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1184 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1185 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
1186 gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
1187 gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
1188 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1189 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
1190 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1191 gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
1192 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
1193 gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
1194 gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
1195 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
1196 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
1197 size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
1198 gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
1199 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
1200 gfc_conv_associated, gfc_conv_same_type_as,
1201 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
1203 2010-09-04 Tobias Burnus <burnus@net-b.de>
1206 * resolve.c (resolve_fl_namelist): Change constraint checking
1207 order to prevent endless loop.
1209 2010-09-04 Janus Weil <janus@gcc.gnu.org>
1212 * resolve.c (resolve_allocate_expr): Generate default initializers
1213 already at this point, resolve them and put them into expr3, ...
1214 * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
1217 2010-09-03 Tobias Burnus <burnus@net-b.de>
1220 * trans-intrinsic.c (gfc_conv_intrinsic_sign,
1221 gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
1223 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1224 gfc_conv_string_length, gfc_conv_substring,
1225 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1226 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1227 gfc_conv_expr_op, gfc_build_compare_string,
1228 gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
1229 gfc_conv_derived_to_class, conv_isocbinding_procedure,
1230 gfc_conv_procedure_call, fill_with_spaces,
1231 gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
1232 gfc_trans_structure_assign, gfc_trans_pointer_assignment,
1233 gfc_trans_scalar_assign, gfc_trans_zero_assign,
1234 gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
1235 fold_build[0-9] to fold_build[0-9]_loc.
1236 * trans-io.c (set_parameter_const, set_parameter_value,
1237 set_parameter_ref, gfc_convert_array_to_string, set_string,
1238 set_internal_unit, io_result, set_error_locus,
1239 nml_get_addr_expr, build_dt): Ditto.
1240 * trans-openmp.c (gfc_omp_clause_default_ctor,
1241 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1242 gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
1243 gfc_trans_omp_do): Ditto.
1244 * trans.c (gfc_add_modify, gfc_build_addr_expr,
1245 gfc_build_array_ref, gfc_trans_runtime_error_vararg,
1246 gfc_trans_runtime_check, gfc_call_malloc,
1247 gfc_allocate_with_status, gfc_allocate_array_with_status,
1248 gfc_call_free, gfc_deallocate_with_status,
1249 gfc_call_realloc): Ditto.
1251 2010-09-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1254 * dependency.c (gfc_deb_compare_expr): Compare equal for equal
1255 arglists for pure user functions, or for those intrinsic
1256 functions which are also pure.
1257 * intrinsics.c (add_conv): Mark conversion functions as pure.
1258 (add_char_conversions): Likewise.
1260 2010-09-03 Daniel Kraft <d@domob.eu>
1263 * resolve.c (resolve_actual_arglist): Allow internal procedure
1264 as actual argument with Fortran 2008.
1266 2010-09-03 Daniel Kraft <d@domob.eu>
1269 * gfortran.h (struct gfc_code): Renamed `whichloop' to
1270 `which_construct' as this is no longer restricted to loops.
1271 * parse.h (struct gfc_state_data): New field `construct'.
1272 * match.c (match_exit_cycle): Handle EXIT from non-loops.
1273 * parse.c (push_state): Set `construct' field.
1274 * resolve.c (resolve_select_type): Extend comment.
1275 * trans-stmt.c (gfc_trans_if): Add exit label.
1276 (gfc_trans_block_construct), (gfc_trans_select): Ditto.
1277 (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
1278 (gfc_trans_do), (gfc_trans_do_while): Ditto.
1279 (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
1280 (gfc_trans_cycle): Ditto.
1281 (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
1283 2010-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1285 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
1286 (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
1287 (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
1288 * intrinsic.texi (RSHIFT): Fix documentation.
1290 2010-09-02 Tobias Burnus <burnus@net-b.de>
1293 * trans-common.c (create_common): Change build[0-9] to
1295 * trans-const.c (gfc_conv_constant_to_tree,
1296 gfc_conv_constant_to_tree): Ditto.
1297 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1298 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1299 add_argument_checking, create_main_function,
1300 gfc_generate_return): Ditto.
1301 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
1302 * trans-stmt.c (allocate_temp_for_forall_nest_1,
1303 compute_inner_temp_size, compute_overall_iter_number,
1304 generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
1305 gfc_conv_elemental_dependencies, gfc_do_allocate,
1306 gfc_evaluate_where_mask, gfc_trans_allocate,
1307 gfc_trans_arithmetic_if, gfc_trans_call,
1308 gfc_trans_character_select, gfc_trans_deallocate,
1309 gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
1310 gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
1311 gfc_trans_integer_select, gfc_trans_logical_select,
1312 gfc_trans_pointer_assign_need_temp, gfc_trans_return,
1313 gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
1314 gfc_trans_where_assign) Ditto.
1316 2010-09-02 Janus Weil <janus@gcc.gnu.org>
1319 * resolve.c (resolve_symbol): Correct check for attributes of CLASS
1322 2010-09-02 Tobias Burnus <burnus@net-b.de>
1325 * resolve.c (apply_default_init): Mark symbol as referenced,
1326 if it is initialized.
1327 (resolve_symbol): Change intialized check for BT_DERIVED such
1328 that also function results get initialized; remove now obsolete
1329 gfc_set_sym_referenced for BT_CLASS.
1331 2010-09-01 Janus Weil <janus@gcc.gnu.org>
1334 * class.c (gfc_find_derived_vtab): Add component '$def_init'.
1335 * resolve.c (resolve_allocate_expr): Defer handling of default
1336 initialization to 'gfc_trans_allocate'.
1337 (apply_default_init,resolve_symbol): Handle polymorphic dummies.
1338 (resolve_fl_derived): Suppress error messages for vtypes.
1339 * trans-stmt.c (gfc_trans_allocate): Handle initialization via
1340 polymorphic MOLD expression.
1341 * trans-expr.c (gfc_trans_class_init_assign): Now only used for
1342 dummy initialization.
1344 2010-09-01 Tobias Burnus <burnus@net-b.de>
1346 * gfortran.texi (preprocessing): Update URL to COCO.
1348 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1350 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
1351 array quad_decls. Remove unnecessary assignment.
1353 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1355 * trans-expr.c (gfc_conv_power_op): Handle floating-point types
1356 other than long double.
1357 * mathbuiltins.def: Add builtins from the POW and CPOW family.
1358 * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
1359 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
1360 prefix to function name.
1361 (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
1362 (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
1364 (gfc_conv_intrinsic_exponent): Likewise.
1365 (gfc_conv_intrinsic_abs): Likewise.
1366 (gfc_conv_intrinsic_mod): Likewise.
1367 (gfc_conv_intrinsic_sign): Likewise.
1368 (gfc_conv_intrinsic_arith): Likewise.
1369 (gfc_conv_intrinsic_fraction): Likewise.
1370 (gfc_conv_intrinsic_nearest): Likewise.
1371 (gfc_conv_intrinsic_spacing): Likewise.
1372 (gfc_conv_intrinsic_rrspacing): Likewise.
1373 (gfc_conv_intrinsic_scale): Likewise.
1374 (gfc_conv_intrinsic_set_exponent): Likewise.
1376 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1378 * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
1379 * intrinsic.h (gfc_resolve_execute_command_line): New function.
1380 * iresolve.c (gfc_resolve_execute_command_line): New function.
1381 * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
1382 * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1384 2010-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1387 * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1388 and parity{,l,ll} builtins.
1389 * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1390 (gfc_conv_intrinsic_function): Call above new functions.
1391 * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1393 * intrinsic.texi: Document POPCNT and POPPAR.
1395 2010-08-30 Janus Weil <janus@gcc.gnu.org>
1398 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1400 2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1402 * Make-lang.in: Add frontend-passes.o dependencies.
1404 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1407 * resolve.c (resolve_structure_cons): For derived types, make sure the
1408 type has been resolved.
1409 (resolve_typebound_procedures): Make sure the vtab has been generated.
1411 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1414 * match.c (gfc_match_select_type): Give the associate-name the
1415 FL_VARIABLE attribute.
1417 2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1419 * simplify.c (gfc_simplify_bessel_n2): Fix indention
1422 2010-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1425 * trans-types.c (gfc_init_kinds): Disable TFmode.
1427 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1430 * match.c (gfc_match_allocate): Avoid double free on error.
1432 2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1435 * gfortran.h (gfc_real_info): Add c_float128 field.
1436 * mathbuiltins.def: Indicate which builtins are const.
1437 * trans-types.h (float128_type_node, complex_float128_type_node,
1438 gfc_real16_is_float128): New variables.
1439 * trans-types.c (float128_type_node, complex_float128_type_node,
1440 gfc_real16_is_float128): New variables.
1441 (gfc_init_kinds): Allow TFmode.
1442 (gfc_build_real_type): Mark __float128 types as such.
1443 (gfc_init_types): Initialize float128_type_node and
1444 complex_float128_type_node
1445 * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1446 argument of OTHER_BUILTIN macro.
1447 * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1448 (builtin_decl_for_precision): Special case for __float128.
1449 (builtin_decl_for_float_kind): Likewise.
1450 (define_quad_builtin): New function.
1451 (gfc_build_intrinsic_lib_fndecls): Create all __float128
1452 library decls if necessary. Store them in the real16_decl and
1453 complex16_decl builtin map fields.
1454 (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1455 library function names.
1457 2010-08-27 Tobias Burnus <burnus@net-b.de>
1460 * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1461 * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1462 gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1463 gfc_resolve_parity): New prototypes.
1464 * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1465 GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1466 * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1467 gfc_resolve_parity): New functions.
1468 * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1470 * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1471 gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1472 * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1473 * gcc/fortran/simplify.c (simplify_transformation_to_array):
1474 Add post-processing opterator.
1475 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1476 gfc_simplify_product, gfc_simplify_sum): Update call.
1477 (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1478 gfc_simplify_parity): New functions.
1480 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1483 * match.c (select_type_set_tmp): Add the possibility to reset the
1485 (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1487 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1490 * dependency.c (check_section_vs_section): Single test for
1491 identical strides which takes into account that only one
1492 of the strides may be NULL.
1494 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1497 * primary.c (match_hollerith_constant): Calculate padding needed to
1498 fill default integer and allocate string for that size. Set pad bytes
1500 * gfortran.h: Add hollerith pad value to type spec union.
1501 * data.c (create_character_initializer): Fix spelling of function name.
1502 Use hollerith pad value to calculate length.
1503 * arith.c (hollerith2representation); Use hollerith pad value to
1506 2010-08-26 Daniel Kraft <d@domob.eu>
1511 * gfortran.h (struct gfc_association_list): New flag `dangling'.
1512 (gfc_build_block_ns): Declared here...
1513 * parse.h (gfc_build_block_ns): ...instead of here.
1514 * trans.h (gfc_process_block_locals): Expect additionally the
1515 gfc_association_list of BLOCK (if present).
1516 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1517 * resolve.c (resolve_variable): Only check for invalid *array*
1518 references on associate-names.
1519 (resolve_assoc_var): New method with code previously in resolve_symbol.
1520 (resolve_select_type): Use association to give the selector and
1521 temporaries their values instead of ordinary assignment.
1522 (resolve_fl_var_and_proc): Allow CLASS associate-names.
1523 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1524 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1525 to `gfc_process_block_locals' to match new interface.
1526 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1528 (gfc_process_block_locals): Defer them rather here when linked to
1529 from the BLOCK's association list.
1531 2010-08-25 Jakub Jelinek <jakub@redhat.com>
1533 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1534 TREE_NOTHROW on fndecls that can't throw. Set
1535 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1536 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1537 gfor_fndecl_associated.
1539 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
1542 * frontend-passes.c (optimize_equality): Don't optimize array equality
1544 2010-08-23 Janus Weil <janus@gcc.gnu.org>
1547 * resolve.c (resolve_procedure_interface): New function split off from
1549 (resolve_formal_arglist): Call it here ...
1550 (resolve_symbol): ... and here.
1552 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1554 * Make-lang.in (gfortranspec.o): Update dependencies.
1555 * gfortranspec.c: Include coretypes.h before gcc.h. Include
1557 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1558 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1559 (g77_xargc): Make unsigned.
1560 (g77_xargv): Change to g77_x_decoded_options.
1561 (g77_newargc): Make unsigned.
1562 (g77_newargv): Change to g77_new_decoded_options.
1563 (strings_same, options_same): New.
1564 (append_arg): Use cl_decoded_option structures.
1565 (append_option): New.
1566 (add_arg_libgfortran): New.
1567 (lang_specific_driver): Use cl_decoded_option structures.
1569 2010-08-21 Janus Weil <janus@gcc.gnu.org>
1573 * class.c (add_proc_comp): Add static initializer for PPCs.
1574 (add_procs_to_declared_vtab): Modified comment.
1575 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1576 initializer if the component is part of a vtype.
1577 (mio_component_list): Add argument 'vtype', pass it on to
1579 (mio_symbol): Modified call to 'mio_component_list'.
1580 * trans.h (gfc_conv_initializer): Modified prototype.
1581 (gfc_trans_assign_vtab_procs): Removed.
1582 * trans-common.c (create_common): Modified call to
1583 'gfc_conv_initializer'.
1584 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1585 gfc_emit_parameter_debug_info): Modified call to
1586 'gfc_conv_initializer'.
1587 (build_function_decl): Remove assertion.
1588 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1589 Removed call to 'gfc_trans_assign_vtab_procs'.
1590 (gfc_conv_initializer): Add argument 'procptr'.
1591 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1592 (gfc_trans_assign_vtab_procs): Removed.
1593 * trans-stmt.c (gfc_trans_allocate): Removed call to
1594 'gfc_trans_assign_vtab_procs'.
1596 2010-08-21 Tobias Burnus <burnus@net-b.de>
1600 * intrinsic.c (add_sym): Init value attribute.
1601 (set_attr_value): New function.
1602 (add_functions) Use it and add JN/YN resolvers.
1603 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1604 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1605 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1606 * iresolve.c (gfc_resolve_bessel_n2): New function.
1607 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1609 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1610 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1611 * simplify.c (): For YN set to -INF if previous values
1613 * trans-expr.c (gfc_conv_procedure_call): Don't crash
1615 * iresolve.c (gfc_resolve_extends_type_of): Set the
1616 type of the dummy argument to the one of the actual.
1618 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1620 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1622 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1624 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1627 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1629 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1631 2010-08-19 Daniel Kraft <d@domob.eu>
1635 * trans.h (struct gfc_se): New flag `byref_noassign'.
1636 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1637 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1638 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1639 and check for compile-time errors with those.
1640 * trans-decl.c (trans_associate_var): Use new routine
1641 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1642 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1643 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1644 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1645 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1646 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1647 rank remapping for assignment.
1649 2010-08-19 Tobias Burnus <burnus@net-b.de>
1651 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1652 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1655 2010-08-19 Tobias Burnus <burnus@net-b.de>
1659 * check.c (gfc_check_bessel_n2): New function.
1660 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1661 * intrinsic.c (add_functions): Add transformational version
1662 of the Bessel_jn/yn intrinsics.
1663 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1664 gfc_simplify_bessel_yn2): New prototypes.
1665 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1666 transformational variant.
1667 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1668 Check for negative order.
1669 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1670 gfc_simplify_bessel_yn2): New functions.
1672 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1675 * resolve.c (resolve_transfer): Traverse operands and set expression
1676 to be checked to a non EXPR_OP type.
1678 2010-08-19 Janus Weil <janus@gcc.gnu.org>
1681 * gfortran.h (gfc_add_save): Modified prototype.
1682 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1683 (match_pointer_init): New function to match F08 pointer initialization.
1684 (variable_decl,match_procedure_decl,match_ppc_decl): Use
1685 'match_pointer_init'.
1686 (match_attr_spec): Module variables are implicitly SAVE.
1687 (gfc_match_save): Modified call to 'gfc_add_save'.
1688 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1690 * primary.c (gfc_variable_attr): Handle SAVE attribute.
1691 * resolve.c (resolve_structure_cons): Add new argument and do pointer
1692 initialization checks.
1693 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1694 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1695 (resolve_fl_variable): Handle SAVE_IMPLICIT.
1696 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1698 * trans-decl.c (gfc_create_module_variable): Module variables with
1699 TARGET can already exist.
1700 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1701 (gfc_conv_initializer): Implement non-NULL pointer
1704 2010-08-18 Tobias Burnus <burnus@net-b.de>
1707 * intrinsic.texi (selected_char_kind): Document ISO_10646
1710 2010-08-17 Jakub Jelinek <jakub@redhat.com>
1713 * trans-decl.c (build_library_function_decl_1): Chain on
1714 void_list_node instead of creating a new TREE_LIST.
1715 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1716 * trans-types.c (gfc_get_function_type): Likewise. Set
1717 typelist to void_list_node for the main program.
1719 2010-08-17 Daniel Kraft <d@domob.eu>
1722 * gfortran.h (struct gfc_association_list): New member `where'.
1723 (gfc_is_associate_pointer) New method.
1724 * match.c (gfc_match_associate): Remember locus for each associate
1725 name matched and do not try to set variable flag.
1726 * parse.c (parse_associate): Use remembered locus for symbols.
1727 * primary.c (match_variable): Instead of variable-flag check for
1728 associate names set it for all such names used.
1729 * symbol.c (gfc_is_associate_pointer): New method.
1730 * resolve.c (resolve_block_construct): Don't generate assignments
1731 to give associate-names their values.
1732 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1733 (resolve_symbol): Set some more attributes for associate variables,
1734 set variable flag here and check it and don't try to build an
1735 explicitely shaped array-spec for array associate variables.
1736 * trans-expr.c (gfc_conv_variable): Dereference in case of association
1738 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1739 (gfc_sym_type): Return pointer type for association to scalar vars.
1740 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1741 (trans_associate_var): New method.
1742 (gfc_trans_deferred_vars): Handle association symbols.
1744 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1746 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
1748 (MMDX): Change back to MMD. Mark NoDriverArg instead of
1750 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1751 OPT_MDX and OPT_MMDX.
1753 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1755 * lang.opt (MDX, MMDX): Mark RejectDriver.
1757 2010-08-15 Janus Weil <janus@gcc.gnu.org>
1759 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1760 vtabs for generics any more).
1762 2010-08-15 Daniel Kraft <d@domob.eu>
1765 * gfortran.h (gfc_find_proc_namespace): New method.
1766 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1767 around with namespace.
1768 * symbol.c (gfc_find_proc_namespace): New method.
1769 * trans-decl.c (gfc_build_qualified_array): Use it for correct
1771 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1772 * parse.c (parse_associate): Removed assignment-generation here...
1773 * resolve.c (resolve_block_construct): ...and added it here.
1774 (resolve_variable): Handle names that are arrays but were not parsed
1775 as such because of association.
1776 (resolve_code): Fix BLOCK resolution.
1777 (resolve_symbol): Generate array-spec for associate-names.
1779 2010-08-15 Tobias Burnus <burnus@net-b.de>
1782 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1783 (verify_c_interop): Handle unresolved DT with bind(C).
1785 2010-08-15 Tobias Burnus <burnus@net-b.de>
1787 * trans-expr.c (gfc_conv_expr_present): Regard nullified
1788 pointer arrays as absent.
1789 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1790 dummys as absent argument.
1791 * interface.c (compare_actual_formal,compare_parameter):
1794 2010-08-15 Tobias Burnus <burnus@net-b.de>
1796 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1797 dummies with intent(in).
1799 2010-08-15 Daniel Kraft <d@domob.eu>
1802 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1803 routines not IMPURE also as PURE.
1804 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1805 `NO_CLASS' in `CLASS_IMPURE'.
1806 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1807 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1808 (add_functions): Ditto.
1809 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1810 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1811 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1812 are not ALLOCATABLE and have their INTENT specified.
1814 2010-08-13 Daniel Kraft <d@domob.eu>
1816 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1817 * array.c (gfc_match_array_spec): Match implied-shape specification and
1818 handle AS_IMPLIED_SHAPE correctly otherwise.
1819 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1820 (variable_decl): Some checks for implied-shape declaration.
1821 * resolve.c (resolve_symbol): Assert that array-spec is no longer
1822 AS_IMPLIED_SHAPE in any case.
1824 2010-08-12 Joseph Myers <joseph@codesourcery.com>
1826 * lang.opt (MD, MMD): Change to MDX and MMDX.
1827 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1829 2010-08-11 Janus Weil <janus@gcc.gnu.org>
1832 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1833 'gfc_intrinsic_arg'.
1834 (check_arglist,check_specific): Add reference to 'name' field.
1835 (init_arglist): Remove reference to 'name' field.
1836 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1837 * check.c (variable_check): Reverse order of checks. Respect intent of
1839 (int_or_proc_check): New function.
1840 (coarray_check): New function.
1841 (allocatable_check): New function.
1842 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1843 (gfc_check_complex): Use 'int_or_real_check'.
1844 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1845 gfc_check_ucobound): Use 'coarray_check'.
1846 (gfc_check_pack): Use 'real_or_complex_check'.
1847 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1848 'int_or_proc_check'.
1849 (scalar_check,type_check,numeric_check,int_or_real_check,
1850 real_or_complex_check,kind_check,double_check,logical_array_check,
1851 array_check,same_type_check,rank_check,nonoptional_check,
1852 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1853 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1854 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1855 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1856 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1857 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1858 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1861 2010-08-10 Daniel Kraft <d@domob.eu>
1863 * gfortran.texi (Interoperability with C): Fix ordering in menu
1864 and add new subsection about pointers.
1865 (Interoperable Subroutines and Functions): Split off the pointer part.
1866 (working with Pointers): New subsection with extended discussion
1867 of pointers (especially procedure pointers).
1869 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1872 * array.c (gfc_ref_dimen_size): Add end argument.
1873 If end is non-NULL, calculate it.
1874 (ref_size): Adjust call to gfc_ref_dimen_size.
1875 (gfc_array_dimen_size): Likewise.
1876 (gfc_array_res_shape): Likewise.
1877 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
1878 * resolve.c (resolve_array_ref): For stride not equal to -1,
1879 fill in the lowest possible end.
1881 2010-08-09 Janus Weil <janus@gcc.gnu.org>
1883 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1885 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1887 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1889 (check_some_aliasing): Likewise.
1890 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1891 (gfc_conv_intrinsic_int): Likewise.
1892 (gfc_conv_intrinsic_lib_function): Likewise.
1893 (gfc_conv_intrinsic_cmplx): Likewise.
1894 (gfc_conv_intrinsic_ctime): Likewise.
1895 (gfc_conv_intrinsic_fdate): Likewise.
1896 (gfc_conv_intrinsic_ttynam): Likewise.
1897 (gfc_conv_intrinsic_minmax): Likewise.
1898 (gfc_conv_intrinsic_minmax_char): Likewise.
1899 (gfc_conv_intrinsic_ishftc): Likewise.
1900 (gfc_conv_intrinsic_index_scan_verify): Likewise.
1901 (gfc_conv_intrinsic_merge): Likewise.
1902 (gfc_conv_intrinsic_trim): Likewise.
1903 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
1905 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1908 * dependency.c (check_section_vs_section): Handle cases where
1909 the start expression coincides with the lower or upper
1912 2010-08-04 Janus Weil <janus@gcc.gnu.org>
1917 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
1918 container types. Do not artificially increase refs. Commit symbols one
1920 * interface.c (compare_parameter): Make sure vtabs are present before
1921 generating module variables.
1922 * resolve.c (resolve_allocate_expr): Ditto.
1924 2010-08-04 Tobias Burnus <burnus@net-b.de>
1928 * resolve.c (resolve_structure_cons): Fix
1931 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
1935 * symbol.c (changed_syms): Made static again.
1936 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
1937 Changed conditional internal error into assert.
1938 Rename function to ...
1939 (gfc_enforce_clean_symbol_state): ... this.
1940 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
1941 Rename the former to the latter.
1942 * parse.c (decode_statement, decode_omp_directive,
1943 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
1945 (changed_syms): Remove declaration.
1946 (next_statement): Use gfc_enforce_clean_symbol_state.
1948 2010-08-04 Tobias Burnus <burnus@net-b.de>
1951 * resolve.c (resolve_structure_cons): Fix handling of
1952 initialization structure constructors with character
1953 elements of the wrong length.
1954 * array.c (gfc_check_iter_variable): Add NULL check.
1955 (gfc_resolve_character_array_constructor): Also truncate
1958 2010-08-04 Tobias Burnus <burnus@net-b.de>
1960 * trans-io.c (gfc_build_io_library_fndecls): Fix return
1961 value of some libgfortran functions.
1963 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1966 * dependency.c (gfc_deb_compare_expr): Remove any integer
1967 conversion functions to larger types from both arguments.
1968 Remove handling these functions futher down.
1970 2010-08-03 Janus Weil <janus@gcc.gnu.org>
1974 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
1975 * resolve.c (resolve_tb_generic_targets): Check for errors.
1977 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1980 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
1983 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1986 * dependency.h: Add prototype for gfc_are_identical_variables.
1987 * frontend-passes.c: Include depencency.h.
1988 (optimimize_equality): Use gfc_are_identical_variables.
1989 * dependency.c (identical_array_ref): New function.
1990 (gfc_are_identical_variables): New function.
1991 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
1992 * dependency.c (gfc_check_section_vs_section). Rename gfc_
1993 prefix from statc function.
1994 (check_section_vs_section): Change arguments to gfc_array_ref,
1995 adjust function body accordingly.
1997 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
1998 Janus Weil <janus@gcc.gnu.org>
2003 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
2004 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
2005 gfc_copy_formal_args, gfc_copy_formal_args_intr,
2006 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
2007 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
2008 Call reject_statement in case of error.
2009 (match_deferred_characteritics): Call gfc_undo_symbols in case match
2012 2010-08-01 Janus Weil <janus@gcc.gnu.org>
2015 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
2016 (gfc_find_derived_vtab): Make vtabs and vtypes public.
2017 * module.c (read_module): When reading module files, always import
2018 vtab and vtype symbols.
2020 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
2024 * symbol.c (changed_syms): Made non-static.
2025 * parse.c (changed_syms): Declare new external.
2026 (next_statement): Assert changed_syms is NULL at the beginning.
2028 2010-07-30 Janus Weil <janus@gcc.gnu.org>
2029 Steven G. Kargl <kargl@gcc.gnu.org>
2032 * match.c (match_type_spec): Try to parse derived types before
2035 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
2037 * gfortran.h (gfc_release_symbol): New prototype.
2038 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
2039 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
2040 Use gfc_release_symbol.
2041 * parse.c (gfc_fixup_sibling_symbols): Ditto.
2042 * resolve.c (resolve_symbol): Ditto.
2044 2010-07-29 Tobias Burnus <burnus@net-b.de>
2048 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
2049 external procedure declarations in modules.
2050 (gfc_get_symbol_decl): Modify assert.
2052 2010-07-29 Janus Weil <janus@gcc.gnu.org>
2055 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
2057 2010-07-29 Janus Weil <janus@gcc.gnu.org>
2060 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
2061 (gfc_trans_class_assign): Modified prototype.
2062 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
2063 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
2064 (gfc_trans_class_assign): ... here. Modified actual arguments.
2065 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
2066 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
2067 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
2069 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
2073 * class.c (gfc_find_derived_vtab): Accept or discard newly created
2074 symbols before returning.
2076 2010-07-29 Joseph Myers <joseph@codesourcery.com>
2078 * lang.opt (cpp): Remove Joined and Separate markers.
2079 (cpp=): New internal option.
2080 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
2081 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
2084 2010-07-29 Daniel Kraft <d@domob.eu>
2087 * array.c (resolve_array_bound): Fix error message to properly handle
2088 non-variable expressions.
2090 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
2092 * decl.c (free_value): Also free repeat field.
2093 * data.c (gfc_assign_data_value): Always free offset before returning.
2095 2010-07-28 Daniel Kraft <d@domob.eu>
2097 * gfortran.h (gfc_build_intrinsic_call): New method.
2098 * expr.c (gfc_build_intrinsic_call): New method.
2099 * simplify.c (range_check): Ignore non-constant value.
2100 (simplify_bound_dim): Handle non-variable expressions and
2101 fix memory leak with non-free'ed expression.
2102 (simplify_bound): Handle non-variable expressions.
2103 (gfc_simplify_shape): Ditto.
2104 (gfc_simplify_size): Ditto, but only in certain cases possible.
2106 2010-07-28 Joseph Myers <joseph@codesourcery.com>
2108 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
2111 2010-07-28 Tobias Burnus <burnus@net-b.de>
2114 * trans-types.c (gfc_get_derived_type): Fix DT declaration
2115 from modules for whole-file mode.
2117 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2119 * gfortran.h (gfc_handle_option): Update prototype and return
2121 * options.c (gfc_handle_option): Update prototype and return value
2124 2010-07-27 Joseph Myers <joseph@codesourcery.com>
2126 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
2127 decoded options in allocating deferred_opt.
2128 * cpp.h (gfc_cpp_init_options): Update prototype.
2129 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
2130 * gfortran.h (gfc_option_lang_mask): New.
2131 (gfc_init_options): Update prototype.
2132 * options.c (gfc_option_lang_mask): New.
2133 (gfc_init_options): Update prototype. Pass new arguments to
2134 gfc_cpp_init_options.
2136 2010-07-26 Tobias Burnus <burnus@net-b.de>
2139 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
2140 for functions which are later in the same file.
2141 (gfc_create_function_decl, build_function_decl,
2142 build_entry_thunks): Add global argument.
2143 * trans.c (gfc_generate_module_code): Update
2144 gfc_create_function_decl call.
2145 * trans.h (gfc_create_function_decl): Update prototype.
2146 * resolve.c (resolve_global_procedure): Also resolve for
2149 2010-07-26 Richard Henderson <rth@redhat.com>
2152 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
2153 (gfc_write_global_declarations): New.
2155 2010-07-26 Tobias Burnus <burnus@net-b.de>
2158 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
2159 for call to transfer_namelist_element.
2160 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
2163 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
2166 * Make-lang.in: Add fortran/frontend-passes.o.
2167 * gfortran.h: Add prototype for gfc_run_passes.
2168 * resolve.c (gfc_resolve): Call gfc_run_passes.
2169 * frontend-passes.c: New file.
2171 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2174 * scanner.c (gfc_next_char_literal): Enable truncation warning for
2177 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
2180 * gfortran.h (gfc_namespace): New field old_equiv.
2181 (gfc_free_equiv_until): New prototype.
2182 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
2183 a parameterized stop condition.
2184 (gfc_free_equiv): Use gfc_free_equiv_until.
2185 * parse.c (next_statement): Save equivalence list.
2186 (reject_statement): Restore equivalence list.
2188 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2191 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
2192 in the function so that it does not get missed by early exits.
2193 (load_line): Add checks for quoted strings and free form comments to
2194 disable warnings on comments. Add check for ampersand as first
2195 character after truncation and don't warn for this case, but warn if
2196 there are subsequent non-whitespace characters.
2198 2010-07-24 Tobias Burnus <burnus@net-b.de>
2201 * parse.c (gfc_parse_file): Do not override
2202 gfc_global_ns_list items.
2204 2010-07-24 Tobias Burnus <burnus@net-b.de>
2206 * options.c (gfc_init_options): Enable -fwhole-file by default.
2207 * interface.c (compare_parameter): Assume a Hollerith constant is
2208 compatible with all other argument types.
2210 2010-07-23 Tobias Burnus <burnus@net-b.de>
2213 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
2214 -fwhole-file also for derived types.
2215 * trans-types.c (copy_dt_decls_ifequal): Remove static and
2216 rename to gfc_copy_dt_decls_ifequal.
2217 (gfc_get_derived_type): Update call.
2218 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
2220 2010-07-23 Tobias Burnus <burnus@net-b.de>
2223 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
2225 2010-07-23 Jakub Jelinek <jakub@redhat.com>
2227 * trans-types.c (gfc_get_array_descriptor_base,
2228 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
2229 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
2230 instead of clearing DECL_NAME.
2231 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
2233 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
2236 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
2238 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
2239 reverse the scalarization loop.
2240 gfc_conv_resolve_dependencies: Pass the reverse field of the
2241 loopinfo to gfc_dep_resolver.
2242 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
2243 assignment by resetting loop.reverse.
2244 gfortran.h : Add the gfc_reverse enum.
2245 trans.h : Add the reverse field to gfc_loopinfo.
2246 dependency.c (gfc_check_dependency): Pass null to the new arg
2247 of gfc_dep_resolver.
2248 (gfc_check_section_vs_section): Check for reverse dependencies.
2249 (gfc_dep_resolver): Add reverse argument and deal with the loop
2251 dependency.h : Modify prototype for gfc_dep_resolver to include
2254 2010-07-23 Daniel Kraft <d@domob.eu>
2257 * gfortran.h (gfc_find_symtree_in_proc): New method.
2258 * symbol.c (gfc_find_symtree_in_proc): New method.
2259 * match.c (match_exit_cycle): Look for loop name also in parent
2260 namespaces within current procedure.
2262 2010-07-22 Tobias Burnus <burnus@net-b.de>
2265 * dependency.c (gfc_check_dependency): Add argument alising check.
2266 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
2268 2010-07-22 Daniel Kraft <d@domob.eu>
2270 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
2271 now in the correct place.
2273 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2276 * Revert my commit r162325.
2278 2010-07-21 Daniel Kraft <d@domob.eu>
2280 * trans.h (gfc_get_return_label): Removed.
2281 (gfc_generate_return): New method.
2282 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2283 returning a tree directly.
2284 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
2285 (gfc_trans_block_construct): Update for new interface to
2286 `gfc_trans_deferred_vars'.
2287 * trans-decl.c (current_function_return_label): Removed.
2288 (current_procedure_symbol): New variable.
2289 (gfc_get_return_label): Removed.
2290 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2291 returning a tree directly.
2292 (get_proc_result), (gfc_generate_return): New methods.
2293 (gfc_generate_function_code): Clean up and do init/cleanup here
2294 also with gfc_wrapped_block. Remove return-label but rather
2297 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
2300 * fortran/match.c (match_type_spec): Check for derived type before
2303 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2306 * interface.c (matching_typebound_op): Add argument for the
2307 return of the generic name for the procedure.
2308 (build_compcall_for_operator): Add an argument for the generic
2309 name of an operator procedure and supply it to the expression.
2310 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
2311 calls to the above procedures.
2312 * resolve.c (resolve_typebound_function): Catch procedure
2313 component calls for CLASS objects, check that the vtable is
2314 complete and insert the $vptr and procedure components, to make
2316 (resolve_typebound_function): The same.
2317 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
2318 an allocatable scalar if it is a result.
2320 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2323 * match.c (gfc_match_iterator): Reverted.
2325 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
2328 * match.c (gfc_match_iterator): Remove error that iterator
2329 cannot be INTENT(IN).
2331 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
2333 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
2334 Access subscript through the "dim" field index.
2335 (gfc_trans_create_temp_array): Access ss info through the "dim" field
2337 (gfc_conv_array_index_offset): Ditto.
2338 (gfc_conv_loop_setup): Ditto.
2339 (gfc_conv_expr_descriptor): Ditto.
2340 (gfc_conv_ss_startstride): Ditto. Update call to
2341 gfc_conv_section_startstride.
2342 (gfc_conv_section_startstride): Set values along the array dimension.
2343 Get array dimension directly from the argument.
2345 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2347 * trans.h (gfc_string_to_single_character): New prototype.
2348 * trans-expr.c (string_to_single_character): Renamed to ...
2349 (gfc_string_to_single_character): ... this. No longer static.
2350 (gfc_conv_scalar_char_value, gfc_build_compare_string,
2351 gfc_trans_string_copy): Adjust callers.
2352 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
2353 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
2354 (select_struct): Move to toplevel, add GTY(()).
2355 (gfc_trans_character_select): Optimize SELECT CASE
2356 with character length 1.
2358 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
2360 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2361 * trans-common.c: Likewise.
2362 * trans-decl.c: Likewise.
2363 * trans-types.c: Likewise.
2364 * trans.c: Likewise.
2366 2010-07-15 Janus Weil <janus@gcc.gnu.org>
2369 * resolve.c (resolve_typebound_generic_call): Resolve generic
2370 non-polymorphic type-bound procedure calls to the correct specific
2372 (resolve_typebound_subroutine): Remove superfluous code.
2374 2010-07-15 Daniel Kraft <d@domob.eu>
2377 * trans.h (struct gfc_wrapped_block): New struct.
2378 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2379 (gfc_finish_wrapped_block): New method.
2380 (gfc_init_default_dt): Add new init code to block rather than
2382 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
2383 (gfc_trans_dummy_array_bias): Ditto.
2384 (gfc_trans_g77_array): Ditto.
2385 (gfc_trans_deferred_array): Ditto.
2386 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2387 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2388 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2389 (gfc_finish_wrapped_block): New method.
2390 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2391 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2392 (gfc_trans_deferred_array): Ditto.
2393 * trans-decl.c (gfc_trans_dummy_character): Ditto.
2394 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2395 (init_intent_out_dt): Ditto.
2396 (gfc_init_default_dt): Add new init code to block rather than
2398 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2399 and cleanup code and put it all together.
2401 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2403 * trans.h (gfc_build_compare_string): Add CODE argument.
2404 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2405 gfc_build_compare_string.
2406 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2407 gfc_build_compare_string.
2408 (string_to_single_character): Rename len variable to length.
2409 (gfc_optimize_len_trim): New function.
2410 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
2411 or NE_EXPR and one of the strings is string literal with LEN_TRIM
2412 bigger than the length of the other string, they compare unequal.
2415 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2416 in CASE_LABEL_EXPR and use NULL for low for the default case.
2418 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
2420 * trans-array.c (gfc_conv_section_upper_bound): Remove
2421 (gfc_conv_section_startstride): Don't set the upper bound in the
2422 vector subscript case.
2423 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2425 2010-07-14 Janus Weil <janus@gcc.gnu.org>
2428 * gfortran.h (gfc_is_data_pointer): Remove prototype.
2429 * dependency.c (gfc_is_data_pointer): Make it static.
2430 * intrinsic.texi: Update documentation on C_LOC.
2431 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2432 and add a check for polymorphic variables.
2434 2010-07-14 Jakub Jelinek <jakub@redhat.com>
2436 * trans-expr.c (string_to_single_character): Also optimize
2437 string literals containing a single char followed only by spaces.
2438 (gfc_trans_string_copy): Remove redundant string_to_single_character
2441 * trans-decl.c (gfc_build_intrinsic_function_decls,
2442 gfc_build_builtin_function_decls): Mark functions as
2443 DECL_PURE_P or TREE_READONLY.
2445 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
2447 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2448 instead of build_function_call_expr.
2449 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2451 2010-07-13 Tobias Burnus <burnus@net-b.de>
2452 Daniel Franke <franke.daniel@gmail.com>
2455 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2456 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2458 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2460 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
2461 Tobias Burnus <burnus@net-b.de>
2464 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2465 noclobber/noescape annotations to function calls.
2466 (gfc_build_builtin_function_decls): Likewise.
2468 2010-07-13 Janus Weil <janus@gcc.gnu.org>
2474 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2475 * class.c (gfc_build_class_symbol): Modified call to
2476 'gfc_find_derived_vtab'.
2477 (add_proc_component): Removed, moved code into 'add_proc_comp'.
2478 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2480 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2481 Removed treatment of generics.
2482 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2483 Call 'add_proc_comp' instead of duplicating code.
2484 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2486 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2487 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2488 Removed treatment of generics.
2489 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2490 'gfc_find_derived_vtab'.
2491 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2492 Removed treatment of generics.
2493 (resolve_select_type,resolve_fl_derived): Modified call to
2494 'gfc_find_derived_vtab'.
2495 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2496 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2498 * trans-stmt.c (gfc_trans_allocate): Ditto.
2500 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2503 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2506 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
2508 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2509 * resolve.c (build_default_init_expr): Ditto.
2511 2010-07-11 Tobias Burnus <burnus@net-b.de>
2514 * module.c (sort_iso_c_rename_list): Remove.
2515 (import_iso_c_binding_module,use_iso_fortran_env_module):
2516 Allow multiple imports of the same symbol.
2518 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
2520 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2522 2010-07-11 Janus Weil <janus@gcc.gnu.org>
2525 * decl.c (build_sym,attr_decl1): Only build the class container if the
2526 symbol has sufficient attributes.
2527 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2528 pointer attribute for classes.
2529 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2530 * module.c (MOD_VERSION): Bump.
2531 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2532 (mio_symbol_attribute): Handle class_pointer attribute.
2533 * parse.c (parse_derived): Use class_pointer instead of pointer
2534 attribute for classes.
2535 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2536 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2537 resolve_allocate_expr,resolve_fl_derived): Ditto.
2538 (resolve_fl_var_and_proc): Check for class_ok attribute.
2540 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
2542 * trans-io.c (gfc_build_st_parameter): Update calls to
2543 gfc_add_field_to_struct.
2544 * trans-stmt.c (ADD_FIELD): Ditto.
2546 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2548 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2549 fieldlist, remove fieldlist from argument list.
2550 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2551 and remove fieldlist from argument list.
2552 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2553 gfc_get_mixed_entry_union): Move setting
2554 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2555 * trans-types.h (gfc_add_field_to_struct): Update prototype.
2557 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
2560 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2561 if the lhs has never been host associated, as well as not being
2562 use associated, a pointer or a target.
2563 * resolve.c (resolve_variable): Mark variables that are host
2565 * gfortran.h: Add the host_assoc bit to the symbol_attribute
2568 2010-07-09 Janus Weil <janus@gcc.gnu.org>
2570 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2571 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2572 SIZEOF and C_SIZEOF.
2574 2010-07-08 Janus Weil <janus@gcc.gnu.org>
2577 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2578 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2579 gfc_resolve_storage_size): New prototypes.
2580 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2581 * intrinsic.c (add_functions): Add STORAGE_SIZE.
2582 * iresolve.c (gfc_resolve_storage_size): New function.
2583 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2585 (gfc_conv_intrinsic_storage_size): New function.
2586 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2588 2010-07-08 Jakub Jelinek <jakub@redhat.com>
2591 * match.c (match_exit_cycle): Error on EXIT also from collapsed
2592 !$omp do loops. Error on CYCLE to non-innermost collapsed
2595 2010-07-08 Tobias Burnus <burnus@net-b.de>
2598 * array.c (gfc_match_array_ref): Better error message for
2599 coarrays with too few ranks.
2600 (match_subscript): Move one diagnostic to caller.
2601 * gfortran.h (gfc_get_corank): Add prottype.
2602 * expr.c (gfc_get_corank): New function.
2603 * iresolve.c (resolve_bound): Fix rank for cobounds.
2604 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2605 gfc_resolve_ucobound, gfc_resolve_this_image): Update
2608 2010-07-06 Tobias Burnus <burnus@net-b.de>
2611 * array.c (gfc_expand_constructor): Add optional diagnostic.
2612 * gfortran.h (gfc_expand_constructor): Update prototype.
2613 * expr.c (gfc_simplify_expr, check_init_expr,
2614 gfc_reduce_init_expr): Update gfc_expand_constructor call.
2615 * resolve.c (gfc_resolve_expr): Ditto.
2617 2010-07-06 Tobias Burnus <burnus@net-b.de>
2619 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2620 * trans-intrinsic.c: Ditto.
2621 * trans-types.c: Ditto.
2622 * convert.c: Include diagnostic-core.h instead of toplev.h.
2624 * trans-array.c: Ditto.
2625 * trans-const.c: Ditto.
2626 * trans-expr.c: Ditto.
2627 * trans-io.c: Ditto.
2628 * trans-openmp.c: Ditto.
2631 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2634 * check.c (dim_rank_check): Also check intrinsic functions.
2635 Adjust permissible rank for functions which reduce the rank of
2636 their argument. Spread is an exception, where DIM can
2637 be one larger than the rank of array.
2639 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
2642 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2644 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
2647 * trans-types.c (gfc_get_derived_type): Derived type fields
2648 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2649 but build_pointer_type_for_mode must be used for this.
2651 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2653 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2654 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2655 type of gfc_conv_procedure_call.
2656 (conv_generic_with_optional_char_arg): Likewise.
2657 * trans-stmt.c (gfc_trans_call): Likewise.
2658 * trans-expr.c (gfc_conv_function_expr): Likewise.
2659 (gfc_conv_procedure_call): Use build_call_vec instead of
2662 2010-07-04 Daniel Kraft <d@domob.eu>
2664 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2666 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
2670 * trans-types.c (gfc_get_derived_type): Derived type fields
2671 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2673 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
2676 * decl.c (match_procedure_in_type): Clear structure before using.
2677 (gfc_match_generic): Ditto.
2679 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
2681 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2682 * trans-types.c (gfc_add_field_to_struct_1): New function, most
2683 of which comes from...
2684 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
2685 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2687 (gfc_get_array_descriptor_base): Likewise.
2688 (gfc_get_mixed_entry_union): Likewise.
2689 (gfc_get_derived_type): Add extra chain parameter for
2690 gfc_add_field_to_struct.
2691 * trans-stmt.c (gfc_trans_character_select): Likewise.
2692 * trans-io.c (gfc_build_st_parameter): Likewise.
2694 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2697 * resolve.c (is_external_proc): Prevent procedure pointers from being
2698 regarded as external procedures.
2700 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2703 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2704 passed as second argument of ASSOCIATED.
2706 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
2709 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2710 to determine if a function assignment can be made without a
2712 (gfc_trans_arrayfunc_assign): Move all the conditions that
2713 suppress the direct function call to the above new functon and
2716 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
2719 * interface.c (argument_rank_mismatch): New function.
2720 (compare_parameter): Call new function instead of generating
2723 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
2725 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
2726 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2729 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2731 * Make-lang.in: Update dependencies.
2733 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
2735 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2736 and exit_label fields.
2737 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2739 * trans-stmt.c (gfc_trans_simple_do): Likewise.
2740 (gfc_trans_do): Likewise.
2741 (gfc_trans_do_while): Likewise.
2742 (gfc_trans_cycle): Use cycle_label directly.
2743 (gfc_trans_exit): Use exit_label directly.
2745 2010-06-27 Daniel Kraft <d@domob.eu>
2747 * dump-parse-tree.c (show_symbol): Dump target-expression for
2749 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2750 (show_namespace): Use show_level for correct indentation of
2751 "inner namespaces" (contained procedures or BLOCK).
2753 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2756 * dump-parse-tree.c (show_code_node): Show namespace for
2759 2010-06-26 Tobias Burnus <burnus@net-b.de>
2761 * decl.c (gfc_match_decl_type_spec): Support
2762 TYPE(intrinsic-type-spec).
2764 2010-06-25 Tobias Burnus <burnus@net-b.de>
2766 * intrinsic.h (gfc_check_selected_real_kind,
2767 gfc_simplify_selected_real_kind): Update prototypes.
2768 * intrinsic.c (add_functions): Add radix support to
2770 * check.c (gfc_check_selected_real_kind): Ditto.
2771 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2772 * trans-decl.c (gfc_build_intrinsic_function_decls):
2773 Change call from selected_real_kind to selected_real_kind2008.
2774 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2775 (PRECISION, RANGE, RADIX): Add cross @refs.
2777 2010-06-25 Tobias Burnus <burnus@net-b.de>
2779 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2780 * gfortran.texi (_gfortran_set_options): Update for
2781 GFC_STD_F2008_OBS addition.
2782 * libgfortran.h: Add GFC_STD_F2008_OBS.
2783 * options.c (set_default_std_flags, gfc_handle_option): Handle
2785 io.c (check_format): Fix allow_std check.
2787 2010-06-25 Tobias Burnus <burnus@net-b.de>
2789 * decl.c (gfc_match_entry): Allow END besides
2790 END SUBROUTINE/END FUNCTION for contained procedures.
2792 2010-06-25 Tobias Burnus <burnus@net-b.de>
2794 * parse.c (next_free, next_fixed): Allow ";" as first character.
2796 2010-06-24 Tobias Burnus <burnus@net-b.de>
2799 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2801 2010-06-22 Janus Weil <janus@gcc.gnu.org>
2804 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2807 2010-06-21 Tobias Burnus <burnus@net-b.de>
2810 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2812 * symbol.c (gfc_add_contiguous): New function.
2813 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2814 * decl.c (match_attr_spec): Ditto.
2815 (gfc_match_contiguous): New function.
2816 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2818 * gfortran.h (symbol_attribute): Add contiguous.
2819 (gfc_is_simply_contiguous): Add prototype.
2820 (gfc_add_contiguous): Add prototype.
2821 * match.h (gfc_match_contiguous): Add prototype.
2822 * parse.c (decode_specification_statement,
2823 decode_statement): Handle contiguous attribute.
2824 * expr.c (gfc_is_simply_contiguous): New function.
2825 * dump-parse-tree.c (show_attr): Handle contiguous.
2826 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2828 * trans-expr.c (gfc_add_interface_mapping): Copy
2830 * trans-array.c (gfc_conv_descriptor_stride_get,
2831 gfc_conv_array_parameter): Handle contiguous arrays.
2832 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2833 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2835 * trans.h (gfc_array_kind): Ditto.
2836 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2838 2010-06-20 Joseph Myers <joseph@codesourcery.com>
2840 * options.c (gfc_handle_option): Don't handle N_OPTS.
2842 2010-06-19 Janus Weil <janus@gcc.gnu.org>
2845 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2848 2010-06-18 Tobias Burnus <burnus@net-b.de>
2851 * resolve.c (resolve_allocate_deallocate): Properly check
2852 part-refs in stat=/errmsg= for invalid use.
2854 2010-06-17 Janus Weil <janus@gcc.gnu.org>
2857 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2858 Return directly in case of an error.
2860 2010-06-16 Janus Weil <janus@gcc.gnu.org>
2863 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2864 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2865 structure to each procedure in a procedure list.
2866 * module.c (mio_typebound_proc): Add NULL argument to
2867 'gfc_get_typebound_proc'.
2868 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2869 to initialize the new structure.
2871 2010-06-15 Janus Weil <janus@gcc.gnu.org>
2874 * gfortran.h (gfc_expr): Add new member 'mold'.
2875 * match.c (gfc_match_allocate): Implement the MOLD tag.
2876 * resolve.c (resolve_allocate_expr): Ditto.
2877 * trans-stmt.c (gfc_trans_allocate): Ditto.
2879 2010-06-15 Jakub Jelinek <jakub@redhat.com>
2882 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2883 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2884 GFC_DECL_SAVED_DESCRIPTOR set.
2885 (gfc_omp_report_decl): New function.
2886 * trans.h (gfc_omp_report_decl): New prototype.
2887 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2889 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
2893 * gfortranspec.c (lang_specific_driver): Removed deprecation
2895 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2896 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2897 * cpp.h (gfc_cpp_makedep): New.
2898 (gfc_cpp_add_dep): New.
2899 (gfc_cpp_add_target): New.
2900 * cpp.c (gfc_cpp_option): Add deps* members.
2901 (gfc_cpp_makedep): New.
2902 (gfc_cpp_add_dep): New.
2903 (gfc_cpp_add_target): New.
2904 (gfc_cpp_init_options): Initialize new options.
2905 (gfc_cpp_handle_option): Handle new options.
2906 (gfc_cpp_post_options): Map new options to libcpp-options.
2907 (gfc_cpp_init): Handle deferred -MQ and -MT options.
2908 (gfc_cpp_done): If requested, write dependencies to file.
2909 * module.c (gfc_dump_module): Add a module filename as target.
2910 * scanner.c (open_included_file): New parameter system; add the
2911 included file as dependency.
2912 (gfc_open_included_file): Add the included file as dependency.
2913 (gfc_open_intrinsic_module): Likewise.
2914 * invoke.texi: Removed deprecation warning for -M.
2915 * gfortran.texi: Removed Makefile-dependencies project.
2917 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
2919 * resolve.c (resolve_global_procedure): Improved checking if an
2920 explicit interface is required.
2922 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2924 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
2926 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
2927 (gfc_conv_intrinsic_ttynam): Likewise.
2928 (gfc_conv_intrinsic_trim): Likewise.
2930 2010-06-12 Janus Weil <janus@gcc.gnu.org>
2933 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
2935 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2937 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
2939 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2941 * mathbuiltins.def: Add builtins that do not directly correspond
2942 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
2943 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
2944 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
2945 code_{r,c}{4,8,10,16} fields. Add
2946 {,complex}{float,double,long_double}_built_in fields.
2947 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
2948 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
2949 definition of OTHER_BUILTIN.
2950 (real_compnt_info): Remove unused struct.
2951 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
2953 (build_round_expr): Call builtin_decl_for_precision instead of
2955 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
2956 instead of a switch.
2957 (gfc_build_intrinsic_lib_fndecls): Match
2958 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
2959 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
2961 (gfc_conv_intrinsic_lib_function): Go through all the extended
2963 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
2964 instead of a switch.
2965 (gfc_conv_intrinsic_abs): Likewise.
2966 (gfc_conv_intrinsic_mod): Likewise.
2967 (gfc_conv_intrinsic_sign): Likewise.
2968 (gfc_conv_intrinsic_fraction): Likewise.
2969 (gfc_conv_intrinsic_nearest): Likewise.
2970 (gfc_conv_intrinsic_spacing): Likewise.
2971 (gfc_conv_intrinsic_rrspacing): Likewise.
2972 (gfc_conv_intrinsic_scale): Likewise.
2973 (gfc_conv_intrinsic_set_exponent): Likewise.
2975 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
2979 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
2980 functions with CLASS formal arguments.
2982 2010-06-10 Janus Weil <janus@gcc.gnu.org>
2985 * resolve.c (conformable_arrays): Handle allocatable components.
2987 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2990 * gfortran.texi: Document that Cray pointers cannot be function
2993 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2996 * gfortran.texi: Document lack of support for syntax
2997 "complex FUNCTION name*16()", and existence of alternative
2998 legacy syntax "complex*16 FUNCTION name()".
3000 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3003 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
3004 POSIX's fsync(), and how to call the latter from Fortran code.
3006 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
3009 * interface.c (compare_actual_formal): Reject actual arguments with
3010 array subscript passed to ASYNCHRONOUS dummys.
3012 2010-06-10 Daniel Kraft <d@domob.eu>
3015 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
3016 (struct gfc_symbol): New field `assoc'.
3017 (struct gfc_association_list): New struct.
3018 (struct gfc_code): New struct `block' in union, move `ns' there
3019 and add association list.
3020 (gfc_free_association_list): New method.
3021 (gfc_has_vector_subscript): Made public;
3022 * match.h (gfc_match_associate): New method.
3023 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
3024 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
3025 * interface.c (gfc_has_vector_subscript): Made public.
3026 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
3027 * match.c (gfc_match_associate): New method.
3028 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
3029 * primary.c (match_variable): Don't allow names associated to expr here.
3030 * parse.c (decode_statement): Try matching ASSOCIATE statement.
3031 (case_exec_markers, case_end): Add ASSOCIATE statement.
3032 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
3033 (parse_associate): New method.
3034 (parse_executable): Handle ST_ASSOCIATE.
3035 (parse_block_construct): Change reference to gfc_code's `ns' field.
3036 * resolve.c (resolve_select_type): Ditto.
3037 (resolve_code): Ditto.
3038 (resolve_block_construct): Ditto and add comment.
3039 (resolve_select_type): Set association list in generated BLOCK to NULL.
3040 (resolve_symbol): Resolve associate names.
3041 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
3042 and free association list.
3043 (gfc_free_association_list): New method.
3044 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
3045 * trans-stmt.c (gfc_trans_block_construct): Change reference to
3046 gfc_code's `ns' field.
3048 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
3050 * error.c (error_print): Pre-initialize loc by NULL.
3051 * openmp.c (resolve_omp_clauses): Add explicit
3052 braces to avoid ambigous else.
3053 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
3055 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
3057 * gfc-internals.texi: Move to GFDL 1.3.
3058 * gfortran.texi: Ditto.
3059 * intrinsic.texi: Ditto.
3060 * invoke.texi: Ditto.
3062 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
3065 * check.c (gfc_check_selected_real_kind): Verify that the
3066 actual arguments are scalar.
3068 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
3071 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
3073 2010-06-09 Janus Weil <janus@gcc.gnu.org>
3076 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
3078 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3080 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
3082 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
3084 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
3085 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
3086 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
3087 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
3089 * fortran/check.c (nonnegative_check, less_than_bitsize1,
3090 less_than_bitsize2): New functions.
3091 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
3092 nonnegative_check and less_than_bitsize1.
3093 (gfc_check_ibclr, gfc_check_ibset): Removed.
3094 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
3097 2010-06-09 Janus Weil <janus@gcc.gnu.org>
3100 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
3103 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
3105 * resolve.c (resolve_deallocate_expr): Avoid warning
3106 about possible use of iunitialized sym.
3107 (resolve_allocate_expr): Pre-initialize sym by NULL.
3109 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3112 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
3114 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
3116 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
3118 (gfc_get_array_type_bounds): Likewise.
3120 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
3121 (gfc_find_module): Likewise.
3123 * f95-lang.c (pushlevel): Likewise.
3125 * trans.h (struct lang_type): Add variable_size GTY option.
3126 (struct lang_decl): Likewise.
3128 2010-06-08 Tobias Burnus <burnus@net-b.de>
3131 * symbol.c (check_conflict): Move protected--external/procedure check ...
3132 * resolve.c (resolve_select_type): ... to the resolution stage.
3134 2010-06-07 Tobias Burnus <burnus@net-b.de>
3136 * options.c (gfc_handle_option): Fix -fno-recursive.
3138 2010-06-07 Tobias Burnus <burnus@net-b.de>
3140 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
3141 * gfortran.texi (copyrights-gfortran): Ditto.
3143 2010-06-07 Joseph Myers <joseph@codesourcery.com>
3145 * lang.opt (fshort-enums): Define using Var and VarExists.
3146 * options.c (gfc_handle_option): Don't set flag_short_enums here.
3148 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
3149 Janus Weil <janus@gcc.gnu.org>
3152 * resolve.c (get_declared_from_expr): Move to before
3153 resolve_typebound_generic_call. Make new_ref and class_ref
3154 ignorable if set to NULL.
3155 (resolve_typebound_generic_call): Once we have resolved the
3156 generic call, check that the specific instance is that which
3157 is bound to the declared type.
3158 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
3159 freeing 'class_ref->next' twice.
3161 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
3164 * trans-array.c (structure_alloc_comps): Dereference scalar
3165 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
3168 2010-06-04 Joseph Myers <joseph@codesourcery.com>
3170 * gfortranspec.c (append_arg, lang_specific_driver): Use
3171 GCC-specific formats in diagnostics.
3173 2010-06-02 Tobias Burnus <burnus@net-b.de>
3176 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
3179 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3182 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
3185 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
3187 * fortran/gfortran.texi: Fix typos in description of variable-format-
3190 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
3193 * dependency.c (gfc_check_section_vs_section): Check
3194 for interleaving array assignments without conflicts.
3196 2010-05-30 Janus Weil <janus@gcc.gnu.org>
3198 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
3199 $data component of a class container.
3200 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
3201 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
3202 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
3203 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
3204 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
3205 * gcc/fortran/parse.c (parse_derived): Ditto.
3206 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
3207 gfc_expr_attr): Ditto.
3208 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
3209 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
3210 resolve_fl_var_and_proc, resolve_typebound_procedure,
3211 resolve_fl_derived): Ditto.
3212 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
3213 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
3215 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
3216 gfc_trans_deferred_vars): Ditto.
3217 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
3219 2010-05-28 Tobias Burnus <burnus@net-b.de>
3221 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
3223 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3225 * gfortranspec.c (append_arg, lang_specific_driver): Use
3226 fatal_error instead of fatal. Use warning instead of fprintf for
3229 2010-05-28 Joseph Myers <joseph@codesourcery.com>
3231 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
3232 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
3233 xstrerror instead of strerror.
3235 2010-05-26 Joseph Myers <joseph@codesourcery.com>
3237 * cpp.c (cb_cpp_error): Save and restore
3238 global_dc->warn_system_headers, not variable warn_system_headers.
3240 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3242 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
3244 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
3246 * trans-common.c: Do not include rtl.h, include output.h instead.
3247 * trans-decl.c: Likewise.
3249 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
3252 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
3253 namespace before trying to reorder the gsymbols.
3255 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
3260 * resolve.c (resolve_global_procedure): Add check for global
3261 procedures with implicit interfaces and assumed-shape or optional
3262 dummy arguments. Verify that function return type, kind and string
3265 2010-05-21 Tobias Burnus <burnus@net-b.de>
3267 * gfortran.h: Do not include system.h.
3268 * bbt.c: Include system.h.
3270 * dependency.c: Ditto.
3271 * dump-parse-tree.c: Ditto.
3272 * arith.h: Do not include gfortran.h.
3273 * constructor.h: Do not include gfortran.h and splay-tree.h.
3274 * match.h: Do not include gfortran.h.
3276 * target-memory.h: Ditto.
3277 * openmp.c: Do not include toplev.h and target.h.
3278 * trans-stmt.c: Ditto not include toplev.h.
3280 * trans-common.c: Tell why toplev.h is needed. And
3281 do not include target.h.
3282 * trans-expr.c: Tell why toplev.h is needed.
3283 * trans-array.c: Ditto.
3284 * trans-openmp.c: Ditto.
3285 * trans-const.c: Ditto.
3287 * trans-types.c: Ditto.
3288 * trans-io.c: Ditto.
3289 * trans-decl.c: Ditto.
3292 * trans-intrinsic.c: Ditto.
3295 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3298 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
3299 before returning MATCH_ERROR. Add check for scalar. Add check for
3300 default integer kind.
3302 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3305 * match.c (gfc_match_select_type): On error jump back out of the local
3307 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
3308 stage, more precisely to ...
3309 * resolve.c (resolve_fl_derived): ... this place.
3311 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3314 * resolve.c (ensure_not_abstract): Allow abstract types with
3315 non-abstract ancestors.
3317 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3319 * trans-const.c: Include realmpfr.h.
3320 * Make-lang.in: Update dependencies.
3322 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3324 * trans-const.c, trans-types.c, trans-intrinsic.c:
3325 Clean up redundant includes.
3327 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
3330 * lang.opt (Wunused-dummy-argument): New option.
3331 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
3332 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
3333 (set_Wall): Enable warn_unused_dummy_argument.
3334 (gfc_handle_option): Set warn_unused_dummy_argument according to
3336 * trans-decl.c (generate_local_decl): Separate warnings about
3337 unused variables and unused dummy arguments.
3338 * invoke.texi: Documented new option.
3340 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
3342 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
3343 (gfc_conv_string_tmp): Do not assert type comparibilty.
3344 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
3345 (gfc_conv_expr_descriptor): Remove assert.
3346 * trans-common.c: Clarify why rtl.h and tm.h are included.
3347 * trans-openmp.c: Do not include ggc.h and real.h.
3348 Explain why gimple.h is included.
3349 * trans-const.c: Do not include ggc.h.
3350 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
3351 * trans.c: Do not include ggc.h and real.h.
3352 Explain why gimple.h is included.
3353 * trans-types.c: Do not include tm.h. Explain why langhooks.h
3354 and dwarf2out.h are included.
3355 * trans-io.c: Do not include gimple.h and real.h.
3356 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
3357 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
3360 2010-05-20 Tobias Burnus <burnus@net-b.de>
3362 * options.c (gfc_init_options,gfc_post_options): Enable
3363 flag_associative_math by default.
3365 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3368 * trans-stmt.c (gfc_trans_stop): Add generation of call to
3369 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
3370 blank STOP, handling a null expression. (gfc_trans_pause): Use
3371 pause_string for blank PAUSE.
3372 * trans.h: Add external function declaration for error_stop_numeric.
3373 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
3374 the declaration for the library call. Adjust whitespaces.
3375 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
3376 signal no stop code. Match the expression following the stop and pass
3377 that to the translators. Remove the old use of digit matching. Add
3378 checks that the stop_code expression is INTEGER or CHARACTER, constant,
3379 and if CHARACTER, default character KIND.
3381 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3384 * lang.opt (Wconversion-extra): New option.
3385 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
3386 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
3387 (set_Wall): Enable -Wconversion.
3388 (gfc_handle_option): Set warn_conversion_extra.
3389 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
3390 introduced for -Wconversion if -Wconversion-extra is present.
3391 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
3392 -Wconversion; document -Wconversion-extra.
3394 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3397 * gfortran.h (gfc_has_default_initializer): New.
3398 * expr.c (gfc_has_default_initializer): New.
3399 * resolve.c (has_default_initializer): Removed, use
3400 gfc_has_default_initializer() instead. Updated all callers.
3401 * trans-array.c (has_default_initializer): Removed, use
3402 gfc_has_default_initializer() instead. Updated all callers.
3403 * trans-decl.c (generate_local_decl): Do not check the
3404 first component only to check for initializers, but use
3405 gfc_has_default_initializer() instead.
3407 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3410 * primary.c (match_string_constant): Move start_locus just inside
3412 * data.c (create_character_intializer): Clarified truncation warning.
3414 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3417 * intrinsic.h (gfc_check_float): New prototype.
3418 (gfc_check_sngl): New prototype.
3419 * check.c (gfc_check_float): New.
3420 (gfc_check_sngl): New.
3421 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
3422 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
3424 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
3425 added them to the list of specifics of REAL instead.
3427 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3430 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
3431 This is now handled via 'gfc_class_null_initializer'.
3433 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3435 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
3436 gfc_build_class_symbol,add_proc_component,add_proc_comps,
3437 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3438 add_procs_to_declared_vtab,add_generic_specifics,
3439 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3440 find_typebound_proc_uop,gfc_find_typebound_proc,
3441 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3442 gfc_get_tbp_symtree): Moved here from other places.
3443 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
3445 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
3446 gfc_find_typebound_proc,gfc_find_typebound_user_op,
3447 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
3448 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
3449 * Make-lang.in: Add class.o.
3450 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
3451 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3452 add_procs_to_declared_vtab,add_generic_specifics,
3453 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3454 find_typebound_proc_uop,gfc_find_typebound_proc,
3455 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3456 gfc_get_tbp_symtree): Move to class.c.
3458 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3460 * trans-types.c (gfc_init_types): Use build_function_type_list.
3461 (gfc_get_ppc_type): Likewise.
3462 * trans-decl.c (gfc_generate_constructors): Likewise.
3463 * f95-lang.c (build_builtin_fntypes): Likewise.
3464 (gfc_init_builtin_functions): Likewise.
3465 (DEF_FUNCTION_TYPE_0): Likewise.
3466 (DEF_FUNCTION_TYPE_1): Likewise.
3467 (DEF_FUNCTION_TYPE_2): Likewise.
3468 (DEF_FUNCTION_TYPE_3): Likewise.
3469 (DEF_FUNCTION_TYPE_4): Likewise.
3470 (DEF_FUNCTION_TYPE_5): Likewise.
3471 (DEF_FUNCTION_TYPE_6): Likewise.
3472 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
3473 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
3475 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3477 * trans-array.c (gfc_trans_array_constructor_value): Use
3478 build_constructor instead of build_constructor_from_list.
3479 (gfc_build_constant_array_constructor): Likewise.
3480 * trans-decl.c (create_main_function): Likewise.
3481 * trans-stmt.c (gfc_trans_character_select): Likewise.
3483 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3486 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
3487 (resolve_fl_variable_derived): ... this place.
3488 (resolve_symbol): Make sure function symbols (and their result
3489 variables) are not resolved twice.
3491 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
3494 * array.c (match_array_list): Revert change from 2010-05-13.
3496 2010-05-16 Richard Guenther <rguenther@suse.de>
3498 * trans-decl.c (module_htab_decls_hash): Revert last change.
3500 2010-05-16 Richard Guenther <rguenther@suse.de>
3502 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
3504 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3506 * options.c (set_Wall): Remove special logic for Wuninitialized
3509 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3513 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
3516 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3520 * gfortran.h (gfc_class_null_initializer): New prototype.
3521 * expr.c (gfc_class_null_initializer): New function to build a NULL
3522 initializer for CLASS pointers.
3523 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
3524 containers. Remove default NULL initialization of $data component.
3525 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
3527 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
3528 Use new function 'gfc_class_null_initializer'.
3529 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
3532 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
3535 * fortran/interface.c (get_sym_storage_size): Use signed instead of
3536 unsigned mpz_get_?i routines.
3538 2010-05-14 Jakub Jelinek <jakub@redhat.com>
3540 * trans.c (trans_code): Set backend locus early.
3541 * trans-decl.c (gfc_get_fake_result_decl): Use source location
3542 of the function instead of current input_location.
3544 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
3547 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
3549 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
3550 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
3553 2010-05-13 Jakub Jelinek <jakub@redhat.com>
3556 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
3558 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
3559 by reference dummy procedures or non-dummy procedure pointers.
3560 (gfc_omp_predetermined_sharing): Return
3561 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
3563 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3566 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
3567 after OMP statement.
3568 (gfc_match_omp_critical): Likewise.
3569 (gfc_match_omp_flush): Likewise.
3570 (gfc_match_omp_workshare): Likewise.
3571 (gfc_match_omp_master): Likewise.
3572 (gfc_match_omp_ordered): Likewise.
3573 (gfc_match_omp_atomic): Likewise.
3574 (gfc_match_omp_barrier): Likewise.
3575 (gfc_match_omp_end_nowait): Likewise.
3577 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3580 * resolve.c (validate_case_label_expr): Removed FIXME.
3581 (resolve_select): Raise default warning on case labels out of range
3582 of the case expression.
3584 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
3589 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
3590 about conversion warnings.
3592 2010-05-10 Janus Weil <janus@gcc.gnu.org>
3595 * match.c (gfc_match_select_type): Move error message to
3596 resolve_select_type.
3597 * resolve.c (resolve_select_type): Error message moved here from
3598 gfc_match_select_type. Correctly set type of temporary.
3600 2010-05-10 Richard Guenther <rguenther@suse.de>
3602 * trans-decl.c (gfc_build_library_function_decl): Split out
3604 (build_library_function_decl_1): ... this new function.
3605 Set a fnspec attribute if a specification was provided.
3606 (gfc_build_library_function_decl_with_spec): New function.
3607 (gfc_build_intrinsic_function_decls): Annotate internal_pack
3608 and internal_unpack.
3610 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
3613 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
3616 2010-05-07 Jason Merrill <jason@redhat.com>
3618 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3619 to avoid -Wc++-compat warning.
3621 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
3624 * options.c (gfc_handle_option): Add argument kind.
3625 * gfortran.h (gfc_handle_option): Update declaration.
3627 2010-05-06 Tobias Burnus <burnus@net-b.de>
3630 * trans-types.c (gfc_sym_type): Mark Cray pointees as
3633 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3636 * resolve.c (traverse_data_list): Rephrase error message for
3637 non-constant bounds in data-implied-do.
3639 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3642 * gfortran.h: Removed repeat count from constructor, removed
3644 * data.h (gfc_assign_data_value_range): Changed return value from
3646 * data.c (gfc_assign_data_value): Add location to constructor element.
3647 (gfc_assign_data_value_range): Call gfc_assign_data_value()
3648 for each element in range. Return early if an error was generated.
3649 * resolve.c (check_data_variable): Stop early if range assignment
3652 2010-05-05 Janus Weil <janus@gcc.gnu.org>
3655 * resolve.c (resolve_fl_derived): Some fixes for class variables.
3656 * symbol.c (gfc_build_class_symbol): Add separate class container for
3659 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
3662 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3664 2010-05-02 Tobias Burnus <burnus@net-b.de>
3667 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3668 for lcobound, ucobound, image_index and this_image.
3669 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3670 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3671 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3672 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3674 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3676 2010-04-30 Tobias Burnus <burnus@net-b.de>
3680 * trans-types.c (gfc_get_array_descriptor_base): Fix index
3681 calculation for array descriptor types.
3683 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3686 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3687 initializers for PPC members of the vtabs.
3689 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3692 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3693 attribute for all PPC members of the vtypes.
3694 (copy_vtab_proc_comps): Copy the correct interface.
3695 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3696 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3697 a dummy argument and make sure all PPC members of the vtab are
3698 initialized correctly.
3699 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3700 in call to gfc_trans_assign_vtab_procs.
3701 * trans-stmt.c (gfc_trans_allocate): Ditto.
3703 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3706 * resolve.c (resolve_typebound_function): Renamed
3707 resolve_class_compcall.Do all the detection of class references
3709 (resolve_typebound_subroutine): resolve_class_typebound_call
3710 renamed. Otherwise same as resolve_typebound_function.
3711 (gfc_resolve_expr): Call resolve_typebound_function.
3712 (resolve_code): Call resolve_typebound_subroutine.
3714 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3717 * resolve.c (resolve_typebound_generic_call): For CLASS methods
3718 pass back the specific symtree name, rather than the target
3721 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3724 * resolve.c (resolve_structure_cons): Make the initializer of
3725 the vtab component 'extends' the same type as the component.
3727 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3730 * interface.c (check_interface1): Pass symbol name rather than NULL to
3731 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3732 trap MULL. (gfc_compare_derived_types): Revert previous change
3733 incorporated incorrectly during merge from trunk, r155778.
3734 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3735 than NULL to gfc_compare_interfaces.
3736 * symbol.c (add_generic_specifics): Likewise.
3738 2010-02-29 Janus Weil <janus@gcc.gnu.org>
3741 * interface.c (gfc_compare_derived_types): Add condition for vtype.
3742 * symbol.c (gfc_find_derived_vtab): Sey access to private.
3743 (gfc_find_derived_vtab): Likewise.
3744 * module.c (ab_attribute): Add enumerator AB_VTAB.
3745 (mio_symbol_attribute): Use new attribute, AB_VTAB.
3746 (check_for_ambiguous): Likewise.
3748 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3749 Janus Weil <janus@gcc.gnu.org>
3752 * trans-expr.c (select_class_proc): Remove function.
3753 (conv_function_val): Delete reference to previous.
3754 (gfc_conv_derived_to_class): Add second argument to the call to
3755 gfc_find_derived_vtab.
3756 (gfc_conv_structure): Exclude proc_pointer components when
3757 accessing $data field of class objects.
3758 (gfc_trans_assign_vtab_procs): New function.
3759 (gfc_trans_class_assign): Add second argument to the call to
3760 gfc_find_derived_vtab.
3761 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3762 implement holding off searching for the vptr derived type.
3763 (add_proc_component): New function.
3764 (add_proc_comps): New function.
3765 (add_procs_to_declared_vtab1): New function.
3766 (copy_vtab_proc_comps): New function.
3767 (add_procs_to_declared_vtab): New function.
3768 (void add_generic_specifics): New function.
3769 (add_generics_to_declared_vtab): New function.
3770 (gfc_find_derived_vtab): Add second argument to the call to
3771 gfc_find_derived_vtab. Add the calls to
3772 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3773 * decl.c (build_sym, build_struct): Use new arg in calls to
3774 gfc_build_class_symbol.
3775 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3776 definition of struct gfc_class_esym_list. Modify prototypes
3777 of gfc_build_class_symbol and gfc_find_derived_vtab.
3778 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3779 call to gfc_find_derived_vtab.
3780 * module.c : Add the vtype attribute.
3781 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3782 * resolve.c (resolve_typebound_generic_call): Add second arg
3783 to pass along the generic name for class methods.
3784 (resolve_typebound_call): The same.
3785 (resolve_compcall): Use the second arg to carry the generic
3786 name from the above. Remove the reference to class_esym.
3787 (check_members, check_class_members, resolve_class_esym,
3788 hash_value_expr): Remove functions.
3789 (resolve_class_compcall, resolve_class_typebound_call): Modify
3790 to use vtable rather than member by member calls.
3791 (gfc_resolve_expr): Modify second arg in call to
3793 (resolve_select_type): Add second arg in call to
3794 gfc_find_derived_vtab.
3795 (resolve_code): Add second arg in call resolve_typebound_call.
3796 (resolve_fl_derived): Exclude vtypes from check for late
3797 procedure definitions. Likewise for checking of explicit
3798 interface and checking of pass arg.
3799 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3800 calls to gfc_find_derived_vtab.
3801 * match.c (select_type_set_tmp): Use new arg in call to
3802 gfc_build_class_symbol.
3803 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3805 * parse.c (endType): Finish incomplete classes.
3807 2010-04-28 Tobias Burnus <burnus@net-b.de>
3811 * simplify.c (simplify_cobound): Handle scalar coarrays.
3813 2010-04-27 Tobias Burnus <burnus@net-b.de>
3815 * gfc-internals.texi: Update copyright year.
3816 * gfortran.texi: Ditto.
3817 * invoke.texi: Ditto.
3819 2010-04-27 Tobias Burnus <burnus@net-b.de>
3822 * resolve.c (resolve_allocate_expr): Allow array coarrays.
3823 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3824 * trans-types.c (gfc_get_array_type_bounds,
3825 gfc_get_array_descriptor_base): Add corank argument.
3826 * trans-array.c (gfc_array_init_size): Handle corank.
3827 (gfc_trans_create_temp_array, gfc_array_allocate,
3828 gfc_conv_expr_descriptor): Add corank argument to call.
3829 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3831 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
3835 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3836 of mucking with a tree directly.
3838 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3841 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3842 gfc_error with new error message.
3844 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
3848 * trans-expr.c (gfc_conv_expr): Supply an address expression for
3850 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3852 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3853 than the address of a GFC_SS_REFERENCE.
3854 * trans.h : Change comment on GFC_SS_REFERENCE.
3856 2010-04-22 Richard Guenther <rguenther@suse.de>
3859 * resolve.c (gfc_resolve_index): Wrap around ...
3860 (gfc_resolve_index_1): ... this. Add parameter to allow
3861 any integer kind index type.
3862 (resolve_array_ref): Allow any integer kind for the start
3863 index of an array ref.
3865 2010-04-21 Jakub Jelinek <jakub@redhat.com>
3868 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3871 2010-04-20 Harald Anlauf <anlauf@gmx.de>
3873 * intrinsic.c (sort_actual): Remove 'is' in error message.
3875 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
3878 * resolve.c (resolve_fl_derived): If a component character
3879 length has not been resolved, do so now.
3880 (resolve_symbol): The same as above for a symbol character
3882 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3883 not needed for a character valued, procedure pointer.
3886 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3887 not found, return FAILURE rather than ICEing.
3889 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3892 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3893 sequential loops private in the innermost containing task region.
3895 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3897 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3898 to build_common_tree_nodes.
3900 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
3903 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
3904 gfc_msg_bounds by using 'Array bound mismatch' directly.
3905 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
3906 error message to include the mismatch in the extent of array bound.
3907 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
3908 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
3910 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3912 * gfortran.texi: Update information on temporary file locations.
3914 2010-04-16 Jakub Jelinek <jakub@redhat.com>
3916 * trans-decl.c (gfc_build_qualified_array): Ensure
3917 ubound.N and lbound.N artificial variable names don't appear
3920 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
3923 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
3924 block of code. Set name to the variable associated with the descriptor.
3926 2010-04-15 Jakub Jelinek <jakub@redhat.com>
3928 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
3929 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
3931 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
3933 * intrinsic.texi: Add the missing specific name of intrinsic
3934 procedure where the specific name is identical to the generic name.
3935 Fix inconsistent or mismatch in the argument names in intrinsic
3936 procedure descriptions. Add the SCALAR allocatable description to
3939 2010-04-14 Tobias Burnus <burnus@net-b.de>
3942 * array.c (gfc_find_array_ref): Handle codimensions.
3943 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
3944 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
3945 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
3947 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
3948 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
3950 * intrinsic.h (add_functions): Add this_image, image_index,
3951 lcobound and ucobound intrinsics.
3952 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
3953 gfc_check_image_index, gfc_check_this_image,
3954 gfc_simplify_image_index, gfc_simplify_lcobound,
3955 gfc_simplify_this_image, gfc_simplify_ucobound):
3956 New function prototypes.
3957 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
3958 IMAGE_INDEX): Document new intrinsic functions.
3959 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
3961 * simplify.c (simplify_bound_dim): Handle coarrays.
3962 (simplify_bound): Update simplify_bound_dim call.
3963 (gfc_simplify_num_images): Add -fcoarray=none check.
3964 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
3965 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
3967 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3970 * constructor.c: Fix typo in comment.
3971 * expr.c (find_array_section): Add check for max array limit.
3973 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
3976 * gfortranspec.c (lookup_option): Check for -static and return
3978 (lang_specific_driver): Break when OPTION_static is discovered.
3980 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3982 * array.c (extract_element): Restore function from trunk.
3983 (gfc_get_array_element): Restore function from trunk.
3984 (gfc_expand_constructor): Restore check against
3985 flag_max_array_constructor.
3986 * constructor.c (node_copy_and_append): Delete unused.
3987 * gfortran.h: Delete comment and extra include.
3988 * constructor.h: Bump copyright and clean up TODO comments.
3989 * resolve.c: Whitespace.
3991 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3993 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
3994 with direct access access to elements. Adjusted prototype, fixed all
3996 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
3998 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
3999 (gfc_simplify_spread): Removed workaround, directly insert elements
4000 at a given array position.
4001 (gfc_simplify_transpose): Likewise.
4002 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
4004 (gfc_simplify_unpack): Likewise.
4006 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4008 * simplify.c (only_convert_cmplx_boz): Renamed to ...
4009 (convert_boz): ... this and moved to start of file.
4010 (gfc_simplify_abs): Whitespace fix.
4011 (gfc_simplify_acos): Whitespace fix.
4012 (gfc_simplify_acosh): Whitespace fix.
4013 (gfc_simplify_aint): Whitespace fix.
4014 (gfc_simplify_dint): Whitespace fix.
4015 (gfc_simplify_anint): Whitespace fix.
4016 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
4017 (gfc_simplify_dnint): Whitespace fix.
4018 (gfc_simplify_asin): Whitespace fix.
4019 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
4020 (gfc_simplify_atan): Likewise.
4021 (gfc_simplify_atanh): Whitespace fix.
4022 (gfc_simplify_atan2): Whitespace fix.
4023 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
4024 (gfc_simplify_bessel_j1): Likewise.
4025 (gfc_simplify_bessel_jn): Likewise.
4026 (gfc_simplify_bessel_y0): Likewise.
4027 (gfc_simplify_bessel_y1): Likewise.
4028 (gfc_simplify_bessel_yn): Likewise.
4029 (gfc_simplify_ceiling): Reorderd statements.
4030 (simplify_cmplx): Use convert_boz(), check for constant arguments.
4032 (gfc_simplify_cmplx): Use correct default kind. Removed check for
4034 (gfc_simplify_complex): Replaced if-gate. Removed check for
4036 (gfc_simplify_conjg): Whitespace fix.
4037 (gfc_simplify_cos): Whitespace fix.
4038 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
4039 (gfc_simplify_dcmplx): Removed check for constant arguments.
4040 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
4041 (gfc_simplify_digits): Whitespace fix.
4042 (gfc_simplify_dim): Whitespace fix.
4043 (gfc_simplify_dprod): Reordered statements.
4044 (gfc_simplify_erf): Whitespace fix.
4045 (gfc_simplify_erfc): Whitespace fix.
4046 (gfc_simplify_epsilon): Whitespace fix.
4047 (gfc_simplify_exp): Whitespace fix.
4048 (gfc_simplify_exponent): Use convert_boz().
4049 (gfc_simplify_floor): Reorderd statements.
4050 (gfc_simplify_gamma): Whitespace fix.
4051 (gfc_simplify_huge): Whitespace fix.
4052 (gfc_simplify_iand): Whitespace fix.
4053 (gfc_simplify_ieor): Whitespace fix.
4054 (simplify_intconv): Use gfc_convert_constant().
4055 (gfc_simplify_int): Use simplify_intconv().
4056 (gfc_simplify_int2): Reorderd statements.
4057 (gfc_simplify_idint): Reorderd statements.
4058 (gfc_simplify_ior): Whitespace fix.
4059 (gfc_simplify_ishftc): Removed duplicate type check.
4060 (gfc_simplify_len): Use range_check() instead of manual range check.
4061 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
4062 (gfc_simplify_log): Whitespace fix.
4063 (gfc_simplify_log10): Whitespace fix.
4064 (gfc_simplify_minval): Whitespace fix.
4065 (gfc_simplify_maxval): Whitespace fix.
4066 (gfc_simplify_mod): Whitespace fix.
4067 (gfc_simplify_modulo): Whitespace fix.
4068 (simplify_nint): Reorderd statements.
4069 (gfc_simplify_not): Whitespace fix.
4070 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
4071 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
4072 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
4073 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
4074 (gfc_simplify_realpart): Whitespace fix.
4075 (gfc_simplify_selected_char_kind): Removed unused result-variable.
4076 (gfc_simplify_selected_int_kind): Removed unused result-variable.
4077 (gfc_simplify_selected_real_kind): Removed unused result-variable.
4078 (gfc_simplify_sign): Whitespace fix.
4079 (gfc_simplify_sin): Whitespace fix.
4080 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
4081 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
4082 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
4083 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
4084 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
4086 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4088 * gfortran.h (gfc_start_constructor): Removed.
4089 (gfc_get_array_element): Removed.
4090 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
4091 instead. Fixed all callers.
4092 (extract_element): Removed.
4093 (gfc_expand_constructor): Temporarily removed check for
4094 max-array-constructor. Will be re-introduced later if still required.
4095 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
4096 instead. Fixed all callers.
4097 * expr.c (find_array_section): Replaced manual lookup of elements
4098 by gfc_constructor_lookup.
4100 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4102 * gfortran.h (gfc_get_null_expr): New prototype.
4103 (gfc_get_operator_expr): New prototype.
4104 (gfc_get_character_expr): New prototype.
4105 (gfc_get_iokind_expr): New prototype.
4106 * expr.c (gfc_get_null_expr): New.
4107 (gfc_get_character_expr): New.
4108 (gfc_get_iokind_expr): New.
4109 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
4110 * matchexp.c (build_node): Renamed and moved to
4111 expr.c (gfc_get_operator_expr). Reordered arguments to match
4112 other functions. Fixed all callers.
4113 (gfc_get_parentheses): Use specific function to build expr.
4114 * array.c (gfc_match_array_constructor): Likewise.
4115 * arith.c (eval_intrinsic): Likewise.
4116 (gfc_hollerith2int): Likewise.
4117 (gfc_hollerith2real): Likewise.
4118 (gfc_hollerith2complex): Likewise.
4119 (gfc_hollerith2logical): Likewise.
4120 * data.c (create_character_intializer): Likewise.
4121 * decl.c (gfc_match_null): Likewise.
4122 (enum_initializer): Likewise.
4123 * io.c (gfc_match_format): Likewise.
4124 (match_io): Likewise.
4125 * match.c (gfc_match_nullify): Likewise.
4126 * primary.c (match_string_constant): Likewise.
4127 (match_logical_constant): Likewise.
4128 (build_actual_constructor): Likewise.
4129 * resolve.c (build_default_init_expr): Likewise.
4130 * symbol.c (generate_isocbinding_symbol): Likewise.
4131 (gfc_build_class_symbol): Likewise.
4132 (gfc_find_derived_vtab): Likewise.
4133 * simplify.c (simplify_achar_char): Likewise.
4134 (gfc_simplify_adjustl): Likewise.
4135 (gfc_simplify_adjustr): Likewise.
4136 (gfc_simplify_and): Likewise.
4137 (gfc_simplify_bit_size): Likewise.
4138 (gfc_simplify_is_iostat_end): Likewise.
4139 (gfc_simplify_is_iostat_eor): Likewise.
4140 (gfc_simplify_isnan): Likewise.
4141 (simplify_bound): Likewise.
4142 (gfc_simplify_leadz): Likewise.
4143 (gfc_simplify_len_trim): Likewise.
4144 (gfc_simplify_logical): Likewise.
4145 (gfc_simplify_maxexponent): Likewise.
4146 (gfc_simplify_minexponent): Likewise.
4147 (gfc_simplify_new_line): Likewise.
4148 (gfc_simplify_null): Likewise.
4149 (gfc_simplify_or): Likewise.
4150 (gfc_simplify_precision): Likewise.
4151 (gfc_simplify_repeat): Likewise.
4152 (gfc_simplify_scan): Likewise.
4153 (gfc_simplify_size): Likewise.
4154 (gfc_simplify_trailz): Likewise.
4155 (gfc_simplify_trim): Likewise.
4156 (gfc_simplify_verify): Likewise.
4157 (gfc_simplify_xor): Likewise.
4158 * trans-io.c (build_dt): Likewise.
4159 (gfc_new_nml_name_expr): Removed.
4161 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4163 * arith.h (gfc_constant_result): Removed prototype.
4164 * constructor.h (gfc_build_array_expr): Removed prototype.
4165 (gfc_build_structure_constructor_expr): Removed prototype.
4166 * gfortran.h (gfc_int_expr): Removed prototype.
4167 (gfc_logical_expr): Removed prototype.
4168 (gfc_get_array_expr): New prototype.
4169 (gfc_get_structure_constructor_expr): New prototype.
4170 (gfc_get_constant_expr): New prototype.
4171 (gfc_get_int_expr): New prototype.
4172 (gfc_get_logical_expr): New prototype.
4173 * arith.c (gfc_constant_result): Moved and renamed to
4174 expr.c (gfc_get_constant_expr). Fixed all callers.
4175 * constructor.c (gfc_build_array_expr): Moved and renamed to
4176 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
4177 and kind. Fixed all callers.
4178 (gfc_build_structure_constructor_expr): Moved and renamed to
4179 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
4180 to type and kind. Fixed all callers.
4181 * expr.c (gfc_logical_expr): Renamed to ...
4182 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
4183 (gfc_int_expr): Renamed to ...
4184 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
4186 (gfc_get_constant_expr): New.
4187 (gfc_get_array_expr): New.
4188 (gfc_get_structure_constructor_expr): New.
4189 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
4192 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
4194 * constructor.h: New.
4195 * constructor.c: New.
4196 * Make-lang.in: Add new files to F95_PARSER_OBJS.
4197 * arith.c (reducy_unary): Use constructor API.
4198 (reduce_binary_ac): Likewise.
4199 (reduce_binary_ca): Likewise.
4200 (reduce_binary_aa): Likewise.
4201 * check.c (gfc_check_pack): Likewise.
4202 (gfc_check_reshape): Likewise.
4203 (gfc_check_unpack): Likewise.
4204 * decl.c (add_init_expr_to_sym): Likewise.
4205 (build_struct): Likewise.
4206 * dependency.c (gfc_check_dependency): Likewise.
4207 (contains_forall_index_p): Likewise.
4208 * dump-parse-tree.c (show_constructor): Likewise.
4209 * expr.c (free_expr0): Likewise.
4210 (gfc_copy_expr): Likewise.
4211 (gfc_is_constant_expr): Likewise.
4212 (simplify_constructor): Likewise.
4213 (find_array_element): Likewise.
4214 (find_component_ref): Likewise.
4215 (find_array_section): Likewise.
4216 (find_substring_ref): Likewise.
4217 (simplify_const_ref): Likewise.
4218 (scalarize_intrinsic_call): Likewise.
4219 (check_alloc_comp_init): Likewise.
4220 (gfc_default_initializer): Likewise.
4221 (gfc_traverse_expr): Likewise.
4222 * iresolve.c (check_charlen_present): Likewise.
4223 (gfc_resolve_reshape): Likewise.
4224 (gfc_resolve_transfer): Likewise.
4225 * module.c (mio_constructor): Likewise.
4226 * primary.c (build_actual_constructor): Likewise.
4227 (gfc_match_structure_constructor): Likewise.
4228 * resolve.c (resolve_structure_cons): Likewise.
4229 * simplify.c (is_constant_array_expr): Likewise.
4230 (init_result_expr): Likewise.
4231 (transformational_result): Likewise.
4232 (simplify_transformation_to_scalar): Likewise.
4233 (simplify_transformation_to_array): Likewise.
4234 (gfc_simplify_dot_product): Likewise.
4235 (simplify_bound): Likewise.
4236 (simplify_matmul): Likewise.
4237 (simplify_minval_maxval): Likewise.
4238 (gfc_simplify_pack): Likewise.
4239 (gfc_simplify_reshape): Likewise.
4240 (gfc_simplify_shape): Likewise.
4241 (gfc_simplify_spread): Likewise.
4242 (gfc_simplify_transpose): Likewise.
4243 (gfc_simplify_unpack): Likewise.q
4244 (gfc_convert_constant): Likewise.
4245 (gfc_convert_char_constant): Likewise.
4246 * target-memory.c (size_array): Likewise.
4247 (encode_array): Likewise.
4248 (encode_derived): Likewise.
4249 (interpret_array): Likewise.
4250 (gfc_interpret_derived): Likewise.
4251 (expr_to_char): Likewise.
4252 (gfc_merge_initializers): Likewise.
4253 * trans-array.c (gfc_get_array_constructor_size): Likewise.
4254 (gfc_trans_array_constructor_value): Likewise.
4255 (get_array_ctor_strlen): Likewise.
4256 (gfc_constant_array_constructor_p): Likewise.
4257 (gfc_build_constant_array_constructor): Likewise.
4258 (gfc_trans_array_constructor): Likewise.
4259 (gfc_conv_array_initializer): Likewise.
4260 * trans-decl.c (check_constant_initializer): Likewise.
4261 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
4262 (gfc_apply_interface_mapping_to_cons): Likewise.
4263 (gfc_trans_structure_assign): Likewise.
4264 (gfc_conv_structure): Likewise.
4265 * array.c (check_duplicate_iterator): Likewise.
4266 (match_array_list): Likewise.
4267 (match_array_cons_element): Likewise.
4268 (gfc_match_array_constructor): Likewise.
4269 (check_constructor_type): Likewise.
4270 (check_constructor): Likewise.
4272 (expand_constructor): Likewise.
4273 (extract_element): Likewise.
4274 (gfc_expanded_ac): Likewise.
4275 (resolve_array_list): Likewise.
4276 (gfc_resolve_character_array_constructor): Likewise.
4277 (copy_iterator): Renamed to ...
4278 (gfc_copy_iterator): ... this.
4279 (gfc_append_constructor): Removed.
4280 (gfc_insert_constructor): Removed unused function.
4281 (gfc_get_constructor): Removed.
4282 (gfc_free_constructor): Removed.
4283 (qgfc_copy_constructor): Removed.
4284 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
4285 Removed all references. Replaced constructor list by splay-tree.
4286 (struct gfc_constructor): Removed member 'next', moved 'offset' from
4287 the inner struct, added member 'base'.
4288 (gfc_append_constructor): Removed prototype.
4289 (gfc_insert_constructor): Removed prototype.
4290 (gfc_get_constructor): Removed prototype.
4291 (gfc_free_constructor): Removed prototype.
4292 (qgfc_copy_constructor): Removed prototype.
4293 (gfc_copy_iterator): New prototype.
4294 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
4296 2010-04-10 Tobias Burnus <burnus@net-b.de>
4299 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
4300 proc-pointers and type-bound procedures.
4301 (gfc_specification_expr): Check proc-pointers for pureness.
4303 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
4306 * gfortranspec.c (lang_specific_driver): Do not expose vars
4307 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
4310 2010-04-09 Tobias Burnus <burnus@net-b.de>
4313 * decl.c (variable_decl, match_attr_spec): Fix setting the array
4315 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
4316 * data.c (gfc_assign_data_value): Ditto.
4317 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
4318 (gfc_traverse_expr): Traverse also through codimension expressions.
4319 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4320 gfc_has_ultimate_pointer): New functions.
4321 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
4322 (gfc_array_ref): Add codimen.
4323 (gfc_array_ref): Add in_allocate.
4324 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4325 gfc_has_ultimate_pointer): Add prototypes.
4326 * interface.c (compare_parameter, compare_actual_formal,
4327 check_intents): Add coarray constraints.
4328 * match.c (gfc_match_iterator): Add coarray constraint.
4329 * match.h (gfc_match_array_ref): Update interface.
4330 * primary.c (gfc_match_varspec): Handle codimensions.
4331 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
4332 (check_class_members): Return gfc_try instead for error recovery.
4333 (resolve_typebound_function,resolve_typebound_subroutine,
4334 check_members): Handle return value of check_class_members.
4335 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
4336 check_dimension, compare_spec_to_ref, resolve_array_ref,
4337 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
4338 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
4340 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
4341 Skip over coarray refs.
4342 (gfc_array_allocate) Add support for references containing coindexes.
4343 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
4344 (gfc_map_intrinsic_function): Ignore codimensions.
4346 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
4349 * io.c (check_format_string): Added check for additional non
4350 blank characters after the format string was successfully
4352 * io.c (check_format): Changed the error messages for positive
4353 int required and period required to drop through the error logic
4354 and report with gfc_error instead of gfc_error_now. Corrected
4355 format postion for hollerith strings.
4357 2010-04-08 Tobias Burnus <burnus@net-b.de>
4359 * module.c (use_iso_fortran_env_module): Fix standard check.
4361 2010-04-07 Jakub Jelinek <jakub@redhat.com>
4363 * parse.c (parse_derived, parse_enum): Avoid set but not used
4366 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
4369 * gfortran.texi: Add section about representation of
4372 2010-04-07 Simon Baldwin <simonb@google.com>
4374 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
4375 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
4377 2010-04-07 Richard Guenther <rguenther@suse.de>
4379 * options.c (gfc_init_options): Do not set.
4381 2010-04-06 Tobias Burnus <burnus@net-b.de>
4384 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
4385 * match.c (gfc_match_critical, sync_statement): Ditto.
4386 * gfortran.h (gfc_fcoarray): New enum.
4387 (gfc_option_t): Use it.
4388 * lang.opt (fcoarray): Add new flag.
4389 * invoke.texi (fcoarray): Document it.
4390 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
4391 (gfc_handle_coarray_option): New function.
4393 2010-04-06 Tobias Burnus <burnus@net-b.de>
4396 * gfortran.h (gfc_array_spec): Add cotype.
4397 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
4398 and defer error diagnostic.
4399 * resolve.c (resolve_fl_derived): Add missing check.
4400 (resolve_symbol): Add cotype/type check.
4401 * parse.c (parse_derived): Fix setting of coarray_comp.
4403 2010-04-06 Tobias Burnus <burnus@net-b.de>
4406 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
4407 match_array_element_spec,gfc_copy_array_spec,
4408 gfc_compare_array_spec): Include corank.
4409 (match_array_element_spec,gfc_set_array_spec): Support codimension.
4410 * decl.c (build_sym,build_struct,variable_decl,
4411 match_attr_spec,attr_decl1,cray_pointer_decl,
4412 gfc_match_volatile): Add codimension.
4413 (gfc_match_codimension): New function.
4414 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
4415 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
4416 (gfc_add_codimension): New function prototype.
4417 * match.h (gfc_match_codimension): New function prototype.
4418 (gfc_match_array_spec): Update prototype
4419 * match.c (gfc_match_common): Update gfc_match_array_spec call.
4420 * module.c (MOD_VERSION): Bump.
4421 (mio_symbol_attribute): Support coarray attributes.
4422 (mio_array_spec): Add corank support.
4423 * parse.c (decode_specification_statement,decode_statement,
4424 parse_derived): Add coarray support.
4425 * resolve.c (resolve_formal_arglist, was_declared,
4426 is_non_constant_shape_array, resolve_fl_variable,
4427 resolve_fl_derived, resolve_symbol): Add coarray support.
4428 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
4429 gfc_build_class_symbol): Add coarray support.
4430 (gfc_add_codimension): New function.
4432 2010-04-06 Tobias Burnus <burnus@net-b.de>
4435 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
4436 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
4437 stat_locked_other_image, stat_stopped_image and stat_unlocked of
4439 * intrinsic.texi (iso_fortran_env): Ditto.
4440 * libgfortran.h (libgfortran_stat_codes): New enum.
4441 * module.c (use_iso_fortran_env_module): Honour -std= when loading
4442 constants from the intrinsic module.
4444 2010-04-06 Tobias Burnus <burnus@net-b.de>
4447 * intrinsic.c (add_functions): Add num_images.
4448 * decl.c (gfc_match_end): Handle END CRITICAL.
4449 * intrinsic.h (gfc_simplify_num_images): Add prototype.
4450 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
4452 * gfortran.h (gfc_statement): Add enum items for those.
4453 (gfc_exec_op) Ditto.
4454 (gfc_isym_id): Add num_images.
4455 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
4456 (gfc_trans_sync,gfc_trans_critical): New functions.
4457 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
4458 gfc_trans_critical): Add/update prototypes.
4459 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
4460 and SYNC statements.
4461 * trans.h (gfor_fndecl_error_stop_string) Add variable.
4462 * resolve.c (resolve_sync): Add function.
4463 (gfc_resolve_blocks): Handle CRITICAL.
4464 (resolve_code): Handle CRITICAL, ERROR STOP,
4465 (resolve_branch): Add CRITICAL constraint check.
4466 and SYNC statements.
4467 * st.c (gfc_free_statement): Add new statements.
4468 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
4469 (gfc_build_builtin_function_decls): Initialize it.
4470 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
4471 (gfc_match_critical, gfc_match_error_stop, sync_statement,
4472 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
4474 (match_exit_cycle): Handle CRITICAL constraint.
4475 (gfc_match_stopcode): Handle ERROR STOP.
4476 * match.h (gfc_match_critical, gfc_match_error_stop,
4477 gfc_match_sync_all, gfc_match_sync_images,
4478 gfc_match_sync_memory): Add prototype.
4479 * parse.c (decode_statement, gfc_ascii_statement,
4480 parse_executable): Handle new statements.
4481 (parse_critical_block): New function.
4482 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
4483 * intrinsic.texi (num_images): Document new function.
4484 * simplify.c (gfc_simplify_num_images): Add function.
4486 2010-04-06 Tobias Burnus <burnus@net-b.de>
4489 * trans-array.c (gfc_conv_expr_descriptor): Update
4490 gfc_trans_scalar_assign call.
4491 (has_default_initializer): New function.
4492 (gfc_trans_deferred_array): Nullify less often.
4493 * trans-expr.c (gfc_conv_subref_array_arg,
4494 gfc_trans_subcomponent_assign): Update call to
4495 gfc_trans_scalar_assign.
4496 (gfc_trans_scalar_assign): Add parameter and pass it on.
4497 (gfc_trans_assignment_1): Optionally, do not dealloc before
4499 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
4500 call to gfc_trans_scalar_assign.
4501 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
4502 initializer to static variables.
4503 (gfc_init_default_dt): Add dealloc parameter and pass it on.
4504 * trans-stmt.c (forall_make_variable_temp,
4505 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4506 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
4507 gfc_trans_allocate): Update gfc_trans_assignment call.
4508 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
4509 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
4510 parameter to prototype.
4512 2010-03-31 Paul Thomas <pault@gcc.gnu.org>
4514 * ioparm.def : Update copyright.
4516 * trans-array.c : ditto
4517 * trans-array.h : ditto
4519 * trans-types.c: ditto
4520 * dependency.c : ditto
4521 * gfortran.h : ditto
4523 * trans-io.c : ditto
4524 * trans-intrinsic.c : ditto
4525 * libgfortran.h : ditto
4526 * invoke.texi : ditto
4527 * intrinsic.texi : ditto
4530 * intrinsic.c : ditto
4531 * interface.c : ditto
4532 * iresolve.c : ditto
4533 * trans-stmt.c : ditto
4534 * trans-stmt.h : ditto
4539 2010-03-20 Paul Thomas <pault@gcc.gnu.org>
4542 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
4543 do not assert the context of derived types.
4545 2010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4548 * ioparm.def: Change inquire size variable to type pointer to
4551 2010-03-18 Paul Thomas <pault@gcc.gnu.org>
4554 * trans-expr.c (conv_parent_component_references): Ensure that
4555 'dt' has a backend_decl.
4558 * trans-expr.c (gfc_conv_structure): Ensure that the derived
4559 type has a backend_decl.
4562 * resolve.c (resolve_global_procedure): Check that the 'cl'
4563 structure is not NULL.
4565 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
4567 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
4570 2010-03-17 Tobias Burnus <burnus@net-b.de>
4573 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
4574 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
4576 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
4577 pointees as having explizit size.
4578 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
4580 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
4581 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
4582 * resolve.c (resolve_symbol): Handle cp_was_assumed.
4583 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
4584 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
4587 2010-03-14 Tobias Burnus <burnus@net-b.de>
4590 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
4591 (resolve_ordinary_assign): Add check to avoid segfault.
4593 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
4597 * resolve.c (resolve_compcall): Add new boolean dummy argument
4598 'class_members'. Only resolve expression at end if false.
4599 Remove redundant, static variable 'class_object'.
4600 (check_class_members): Add extra argument to call of
4602 (resolve_typebound_function): Renamed resolve_class_compcall.
4603 Do all the detection of class references here. Correct calls to
4604 resolve_compcall for extra argument.
4605 (resolve_typebound_subroutine): resolve_class_typebound_call
4606 renamed. Otherwise same as resolve_typebound_function.
4607 (gfc_resolve_expr): Call resolve_typebound_function.
4608 (resolve_code): Call resolve_typebound_subroutine.
4610 2010-03-10 Tobias Burnus <burnus@net-b.de
4613 * symbol.c (get_iso_c_sym): Set sym->result.
4615 2010-03-08 Janus Weil <janus@gcc.gnu.org>
4618 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
4619 for TBPs, otherwise they will not be resolved properly.
4620 (resolve_function): Use 'value.function.esym' instead of
4621 'value.function.name' to check if we're dealing with a TBP.
4622 (check_class_members): Set correct type of passed object for all TBPs,
4623 not only generic ones, except if the type is abstract.
4625 2010-03-04 Janus Weil <janus@gcc.gnu.org>
4628 * decl.c (gfc_match_final_decl): Make sure variable names starting with
4629 'final...' are not misinterpreted as FINAL statements.
4631 2010-03-03 Paul Thomas <pault@gcc.gnu.org>
4634 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4635 allocatable ultimate components do not need temporaries, whilst
4636 ultimate pointer components do.
4638 2010-03-03 Janus Weil <janus@gcc.gnu.org>
4641 * resolve.c (resolve_code): Correctly set gfc_current_ns for
4643 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
4646 2010-03-02 Paul Thomas <pault@gcc.gnu.org>
4649 * trans-array.c (gfc_conv_array_parameter): A full array of
4650 derived type need not be restricted to a symbol without an
4651 array spec to use the call to gfc_conv_expr_descriptor.
4654 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4655 allocatable arrays do not need temporaries.
4657 2010-03-01 Tobias Burnus <burnus@net-b.de>
4660 * resolve.c (find_array_spec): Handle REF_COMPONENT with
4663 2010-02-28 Tobias Burnus <burnus@net-b.de>
4666 * trans-expr.c (is_zero_initializer_p): Move up in the file.
4667 (gfc_conv_initializer): Handle zero initializer as special case.
4669 2010-02-27 Tobias Burnus <burnus@net-b.de>
4672 * resolve.c (resolve_fl_variable_derived): Imply SAVE
4673 for module variables for Fortran 2008.
4675 2010-02-25 Jakub Jelinek <jakub@redhat.com>
4678 * trans-common.c (build_common_decl): Also update DECL_MODE,
4679 and DECL_SIZE when encountering a larger common block and call
4682 2010-02-24 Tobias Burnus <burnus@net-b.de>
4685 * trans-expr.c (gfc_conv_initializer): Call directly
4686 gfc_conv_constant for C_NULL_(FUN)PTR.
4688 2010-02-22 Paul Thomas <pault@gcc.gnu.org>
4691 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
4692 checking the rest of the dimensions for elements.
4694 2010-02-21 Tobias Burnus <burnus@net-b.de>
4697 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
4699 * option.c (gfc_init_options,gfc_handle_option): Ditto.
4700 * trans-expr.c (gfc_conv_expr_op): Use the flag.
4701 * invoke.texi: Document new -fno-protect-parens flag.
4703 2010-02-20 Paul Thomas <pault@gcc.gnu.org>
4709 * dependency.c (gfc_check_argument_var_dependency): Use enum
4710 value instead of arithmetic vaue for 'elemental'.
4711 (check_data_pointer_types): New function.
4712 (gfc_check_dependency): Call check_data_pointer_types.
4713 * trans-array.h : Change fourth argument of
4714 gfc_conv_array_parameter to boolean.
4715 * trans-array.c (gfc_conv_array_parameter): A contiguous array
4716 can be a dummy but it must not be assumed shape or deferred.
4717 Change fourth argument to boolean. Array constructor exprs will
4718 always be contiguous and do not need packing and unpacking.
4719 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
4720 space and change fourth argument of gfc_conv_array_parameter
4722 (gfc_trans_arrayfunc_assign): Change fourth argument of
4723 gfc_conv_array_parameter to boolean.
4724 * trans-io.c (gfc_convert_array_to_string): The same.
4725 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
4727 2010-02-20 Tobias Burnus <burnus@net-b.de>
4730 * libgfortran.h: Add GFC_RTCHECK_MEM.
4731 * invoke.texi (-fcheck=): Document -fcheck=mem.
4732 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
4733 and enable malloc-success check only with -fcheck=mem.
4734 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
4736 2010-02-16 Tobias Burnus <burnus@net-b.de>
4739 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
4740 * intrinsic.c (add_functions): Ditto.
4741 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
4742 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
4744 2010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4747 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
4748 gfc_trans_do prototype.
4749 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
4750 a loop exit condition. If exit condition is given, build the loop exit
4751 code, checking IO results of implied do loops in READ and WRITE.
4752 (gfc_trans_do): Likewise.
4753 * trans.c (trans_code): New static work function, previously
4754 gfc_trans_code. Passes exit condition to gfc_trans_do.
4755 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
4756 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
4757 * trans-io.c (build_dt): Build an exit condition to allow checking IO
4758 result status bits in the dtparm structure. Use this condition in call
4759 to gfc_trans_code_cond.
4761 2010-02-13 Paul Thomas <pault@gcc.gnu.org>
4765 * trans-array.c (gfc_conv_array_parameter): Use
4766 gfc_full_array_ref_p to detect full and contiguous variable
4767 arrays. Full array components and contiguous arrays do not need
4768 internal_pack and internal_unpack.
4770 2010-02-11 Jakub Jelinek <jakub@redhat.com>
4773 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
4776 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
4778 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
4781 2010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
4782 Tobias Burnus <burnus@net-b.de>
4785 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
4787 2010-02-10 Tobias Burnus <burnus@net-b.de>
4790 * trans-decl.c (gfc_generate_function_code): Only check
4791 actual-vs.-dummy character bounds if not bind(C).
4793 2010-02-10 Jakub Jelinek <jakub@redhat.com>
4796 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
4797 info->dimen after info has been freed.
4799 2010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4802 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
4805 2010-02-09 Jakub Jelinek <jakub@redhat.com>
4807 * module.c (fix_mio_expr): Declare sym.
4809 2010-02-09 Paul Thomas <pault@gcc.gnu.org>
4812 * module.c (fix_mio_expr): Fix for private generic procedures.
4814 2010-02-09 Daniel Kraft <d@domob.eu>
4817 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
4818 length to be correct and issue only with -Wsurprising.
4819 * invoke.texi (Wsurprising): Mention this new warning that is
4820 turned on by -Wsurprising.
4822 2010-02-09 Daniel Kraft <d@domob.eu>
4825 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
4826 can be CHARACTER type.
4827 (MINVAL), (MAXLOC), (MINLOC): Ditto.
4829 2010-02-05 Paul Thomas <pault@gcc.gnu.org>
4832 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
4833 'formal_ptr'. If this is true, give returned descriptor unity
4834 lbounds, in all dimensions, and the appropriate offset.
4835 (gfc_conv_procedure_call); If formal is a pointer, set the last
4836 argument of gfc_conv_subref_array_arg to true.
4837 * trans.h : Add last argument for gfc_conv_subref_array_arg.
4838 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
4839 new arg of gfc_conv_subref_array_arg to false.
4840 * trans-stmt.c (forall_make_variable_temp): The same.
4842 2010-02-03 Tobias Burnus <burnus@net-b.de>
4845 * interface.c (compare_parameter): Disable rank-checking
4848 2010-02-02 Tobias Burnus <burnus@net-b.de>
4851 * parse.c (decode_specification_statement): Use sym->result not sym.
4853 2010-02-01 Tobias Burnus <burnus@net-b.de>
4856 * decl.c (variable_decl): Allow default initializer in
4857 TYPE declarations in PURE functions.
4859 2010-01-31 Janus Weil <janus@gcc.gnu.org>
4862 * resolve.c (resolve_allocate_expr): Move default initialization code
4863 here from gfc_trans_allocate.
4864 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
4866 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
4867 of CLASS variables via memcpy.
4868 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
4869 to resolve_allocate_expr.
4871 2010-01-31 Paul Thomas <pault@gcc.gnu.org>
4874 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
4875 * gfortran.h : Add prototype for above.
4876 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
4877 (gfc_trans_subcomponent_assign): Call new function to replace
4878 the code to deal with allocatable components.
4879 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
4880 gfc_get_full_arrayspec_from_expr to replace existing code.
4882 2010-01-25 Tobias Burnus <burnus@net-b.de>
4885 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
4888 2010-01-24 Paul Thomas <pault@gcc.gnu.org>
4892 * expr.c (remove_subobject_ref): If the constructor is NULL use
4893 the expression as the source.
4894 (simplify_const_ref): Change the type of expression if
4895 there are component references. Allow for substring to be at
4896 the end of an arbitrarily long chain of references. If an
4897 element is found that is not in an EXPR_ARRAY, assume that this
4898 is scalar initialization of array. Call remove_subobject_ref in
4899 this case with NULL second argument.
4901 2010-01-24 Tobias Burnus <burnus@net-b.de>
4904 * array.c (gfc_array_dimen_size): Use correct specific
4905 function in the check.
4907 2010-01-21 Paul Thomas <pault@gcc.gnu.org>
4910 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
4911 is required, turn any trailing array elements after a range
4912 into ranges so that offsets can be calculated.
4914 2010-01-20 Joern Rennecke <amylaar@spamcop.net>
4916 * module.c (mio_f2k_derived): Use enumerator as initializer of
4920 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
4921 bitfield of width 2.
4923 2010-01-19 Janus Weil <janus@gcc.gnu.org>
4926 * resolve.c (extract_compcall_passed_object): Set locus for
4927 passed-object argument.
4928 (extract_ppc_passed_object): Set locus and correctly remove PPC
4931 2010-01-19 Paul Thomas <pault@gcc.gnu.org>
4934 * trans-decl.c (add_argument_checking): Do not use the backend
4935 decl directly to test for the presence of an optional dummy
4936 argument. Use gfc_conv_expr_present, remembering to set the
4940 * trans-decl.c (gfc_generate_function_code): Small white space
4941 changes. If 'recurcheckvar' is NULL do not try to reset it.
4943 2010-01-19 Janus Weil <janus@gcc.gnu.org>
4946 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
4947 component for extended types.
4948 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
4949 and take care of parent component accessibility.
4951 2010-01-17 Janus Weil <janus@gcc.gnu.org>
4954 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
4955 * interface.c (check_interface1): Move a warning message here from
4956 resolve_fl_procedure.
4957 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
4958 * module.c (read_module): Remove call to gfc_check_interfaces, since
4959 this comes too early here.
4960 * resolve.c (resolve_fl_procedure): Move warning message to
4963 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4966 * interface.c (check_interface1): Pass symbol name rather than NULL to
4967 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
4969 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
4970 than NULL to gfc_compare_interfaces.
4972 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
4975 * trans-array.c (duplicate_allocatable): Static version of
4976 gfc_duplicate_allocatable with provision to handle scalar
4977 components. New boolean argument to switch off call to malloc
4979 (gfc_duplicate_allocatable): New function to call above with
4981 (gfc_copy_allocatable_data): New function to call above with
4983 (structure_alloc_comps): Do not apply indirect reference to
4984 scalar pointers. Add new section to copy allocatable components
4985 of arrays. Extend copying of allocatable components to include
4987 (gfc_copy_only_alloc_comp): New function to copy allocatable
4988 component derived types, without allocating the base structure.
4989 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
4990 Add primitive for gfc_copy_only_alloc_comp.
4991 * trans-expr.c (gfc_conv_procedure_call): After calls to
4992 transformational functions with results that are derived types
4993 with allocatable components, copy the components in the result.
4994 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
4995 of lhs derived types before allocation.
4997 2010-01-14 Paul Thomas <pault@gcc.gnu.org>
5000 * module.c (load_generic_interfaces): If a procedure that is
5001 use associated but not generic is given an interface that
5002 includes itself, then make it generic.
5004 2010-01-11 Joseph Myers <joseph@codesourcery.com>
5005 Shujing Zhao <pearly.zhao@oracle.com>
5007 PR translation/42469
5008 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
5009 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
5010 character between option name and help text.
5012 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5016 * trans-array.c (gfc_conv_array_initializer): Change call to
5017 gfc_error_now to call to gfc_fatal_error.
5018 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
5019 (is_constant_element): Changed name from constant_element.
5020 (gfc_constant_ac): Only use expand_construuctor for expression
5021 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
5022 call gfc_is_constant_expr.
5023 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
5025 * resolve.c (gfc_is_expandable_expr): New function that determiners if
5026 array expressions should have their constructors expanded.
5027 (gfc_resolve_expr): Use new function to determine whether or not to call
5028 gfc_expand_constructor.
5030 2010-01-09 Tobias Burnus <burnus@net-b.de>
5033 * trans-expr.c (gfc_trans_structure_assign): Handle
5035 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
5036 to the constructor for c_null_(fun)ptr.
5037 * resolve.c (resolve_structure_cons): Add special case
5038 for c_null_(fun)ptr.
5040 2010-01-09 Jakub Jelinek <jakub@redhat.com>
5042 * gfortranspec.c (lang_specific_driver): Update copyright notice
5045 2010-01-08 Tobias Burnus <burnus@net-b.de>
5048 * symbol.c (check_conflict, gfc_copy_attr): Add
5049 ASYNCHRONOUS support.
5050 (gfc_add_asynchronous): New function.
5051 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
5052 (gfc_match_asynchronous): New function.
5053 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
5054 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
5055 (gfc_add_asynchronous): New Prototype.
5056 * module.c (ab_attribute, mio_symbol_attribute): Add
5057 ASYNCHRONOUS support.
5058 * resolve.c (was_declared): Ditto.
5059 * match.h (gfc_match_asynchronous): New prototype.
5060 * parse.c (decode_specification_statement,decode_statement):
5061 Add ASYNCHRONOUS support.
5063 2010-01-07 Tobias Burnus <burnus@net-b.de>
5066 * trans-decl.c (get_proc_pointer_decl): Fix call to
5067 gfc_conv_initializer for array-valued proc-pointer funcs.
5069 2010-01-07 Tobias Burnus <burnus@net-b.de>
5072 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
5073 allocatable scalars with SAVE attribute.
5075 2010-01-05 Tobias Burnus <burnus@net-b.de>
5078 * options.c (gfc_post_options): Set -frecursion
5079 when -fopenmp is used.
5081 2010-01-05 Tobias Burnus <burnus@net-b.de>
5084 * trans-expr.c (gfc_conv_procedure_call): Nullify
5085 return value for allocatable-scalar character functions.
5087 2010-01-04 Tobias Burnus <burnus@net-b.de>
5090 * error.c (error_printf, gfc_warning, gfc_notify_std,
5091 gfc_warning_now, gfc_error, gfc_error_now,
5092 gfc_fatal_error): Change argument name from nocmsgid to
5093 gmsgid to enable (x)gettext's % checking.
5095 2010-01-04 Tobias Burnus <burnus@net-b.de>
5097 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
5099 2010-01-04 Tobias Burnus <burnus@net-b.de>
5102 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
5103 for functions returning allocatable scalars.
5104 * trans-stmt.c (gfc_trans_allocate): Emmit error when
5105 reallocating an allocatable scalar.
5106 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
5108 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
5109 allocatable scalars.
5110 (gfc_generate_function_code): Nullify result variable for
5111 allocatable scalars.
5114 * module.c (gfc_use_module): Fix warning string to allow
5118 * invoke.texi (-fcheck=recursion): Mention that the checking
5119 is also disabled for -frecursive.
5120 * trans-decl.c (gfc_generate_function_code): Disable
5121 -fcheck=recursion when -frecursive is used.
5123 * intrinsic.texi (iso_c_binding): Improve wording.
5126 Copyright (C) 2010 Free Software Foundation, Inc.
5128 Copying and distribution of this file, with or without modification,
5129 are permitted in any medium without royalty provided the copyright
5130 notice and this notice are preserved.