Commit abf4d60b by Tobias Burnus Committed by Tobias Burnus

2010-03-10 Tobias Burnus <burnus@net-b.de

        PR fortran/43303
        * symbol.c (get_iso_c_sym): Set sym->result.

2010-03-10  Tobias Burnus  <burnus@net-b.de

        PR fortran/43303
        * gfortran.dg/c_assoc_3.f90: New test.

From-SVN: r157364
parent 23f39b37
2010-03-10 Tobias Burnus <burnus@net-b.de
PR fortran/43303
* symbol.c (get_iso_c_sym): Set sym->result.
2010-03-08 Janus Weil <janus@gcc.gnu.org> 2010-03-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/43256 PR fortran/43256
* resolve.c (resolve_compcall): Don't set 'value.function.name' here * resolve.c (resolve_compcall): Don't set 'value.function.name' here
for TBPs, otherwise they will not be resolved properly. for TBPs, otherwise they will not be resolved properly.
(resolve_function): Use 'value.function.esym' instead of (resolve_function): Use 'value.function.esym' instead of
'value.function.name' to check if we're dealing with a TBP. 'value.function.name' to check if we're dealing with a TBP.
(check_class_members): Set correct type of passed object for all TBPs, (check_class_members): Set correct type of passed object for all TBPs,
not only generic ones, except if the type is abstract. not only generic ones, except if the type is abstract.
......
...@@ -4502,6 +4502,8 @@ get_iso_c_sym (gfc_symbol *old_sym, char *new_name, ...@@ -4502,6 +4502,8 @@ get_iso_c_sym (gfc_symbol *old_sym, char *new_name,
new_symtree->n.sym->module = gfc_get_string (old_sym->module); new_symtree->n.sym->module = gfc_get_string (old_sym->module);
new_symtree->n.sym->from_intmod = old_sym->from_intmod; new_symtree->n.sym->from_intmod = old_sym->from_intmod;
new_symtree->n.sym->intmod_sym_id = old_sym->intmod_sym_id; new_symtree->n.sym->intmod_sym_id = old_sym->intmod_sym_id;
if (old_sym->attr.function)
new_symtree->n.sym->result = new_symtree->n.sym;
/* Build the formal arg list. */ /* Build the formal arg list. */
build_formal_args (new_symtree->n.sym, old_sym, add_optional_arg); build_formal_args (new_symtree->n.sym, old_sym, add_optional_arg);
......
2010-03-10 Tobias Burnus <burnus@net-b.de
PR fortran/43303
* gfortran.dg/c_assoc_3.f90: New test.
2010-03-10 Jakub Jelinek <jakub@redhat.com> 2010-03-10 Jakub Jelinek <jakub@redhat.com>
PR debug/36728 PR debug/36728
......
! { dg-do compile }
!
! PR fortran/43303
!
! Contributed by Dennis Wassel
!
PROGRAM c_assoc
use iso_c_binding
type(c_ptr) :: x
x = c_null_ptr
print *, C_ASSOCIATED(x) ! <<< was ICEing here
if (C_ASSOCIATED(x)) call abort ()
END PROGRAM c_assoc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment