re PR fortran/43303 (ICE with C_ASSOCIATED)

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

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

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

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

From-SVN: r157383
This commit is contained in:
Tobias Burnus 2010-03-11 12:10:37 +01:00 committed by Tobias Burnus
parent adf8aa2bf8
commit c5d8838685
4 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-03-11 Tobias Burnus <burnus@net-b.de
PR fortran/43303
* symbol.c (get_iso_c_sym): Set sym->result.
2010-02-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41869

View File

@ -4237,6 +4237,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->from_intmod = old_sym->from_intmod;
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_formal_args (new_symtree->n.sym, old_sym, add_optional_arg);

View File

@ -1,3 +1,8 @@
2010-03-11 Tobias Burnus <burnus@net-b.de
PR fortran/43303
* gfortran.dg/c_assoc_3.f90: New test.
2010-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the

View File

@ -0,0 +1,13 @@
! { 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