public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24092] New: ICE in trans-types.c for nested derived types
@ 2005-09-27 21:30 pault at gcc dot gnu dot org
  2005-09-28  9:22 ` [Bug fortran/24092] " tobi at gcc dot gnu dot org
  0 siblings, 1 reply; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2005-09-27 21:30 UTC (permalink / raw)
  To: gcc-bugs

This module is taken from one of the Meissner tests and is the last to crash
with gfortran:

!  copyright 1996 Loren P. Meissner -- May be distributed if this line is included.
!  Linked List operations with Pointer to Pointer
   module llo
      type :: it
         character*10  :: k
         integer :: c(2)
      end type it
      type :: bt
         type (nt), pointer :: p
      end type bt
      type :: nt
         type (it) :: i
         type (bt) :: b
      end type nt
      type (bt), pointer :: ptr
   end module llo

produces

[prt@localhost meissner]# /gcc-4.1/bin/gfortran -c meissner21_mod.f90
meissner21_mod.f90:0: internal compiler error: in gfc_get_derived_type, at
fortran/trans-types.c:1459
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

A tentative fix is:

Index: gcc/gcc/fortran/trans-types.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/trans-types.c,v
retrieving revision 1.50
diff -c -p -r1.50 trans-types.c
*** gcc/gcc/fortran/trans-types.c	29 Jul 2005 00:02:37 -0000	1.50
--- gcc/gcc/fortran/trans-types.c	27 Sep 2005 21:11:53 -0000
*************** gfc_get_derived_type (gfc_symbol * deriv
*** 1456,1463 ****
  
        DECL_PACKED (field) |= TYPE_PACKED (typenode);
  
!       gcc_assert (!c->backend_decl);
!       c->backend_decl = field;
      }
  
    /* Now we have the final fieldlist.  Record it, then lay out the
--- 1456,1465 ----
  
        DECL_PACKED (field) |= TYPE_PACKED (typenode);
  
!       /* It can happen that in partially built, nested derived
! 	 types that the component backend_decl already exists.  */
!       if (!c->backend_decl)
! 	c->backend_decl = field;
      }
  
    /* Now we have the final fieldlist.  Record it, then lay out the

-- 
           Summary: ICE in trans-types.c for nested derived types
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pault at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24092


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-10-14 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24092-10374@http.gcc.gnu.org/bugzilla/>
2005-10-12 20:41 ` [Bug fortran/24092] ICE in trans-types.c for nested derived types cvs-commit at gcc dot gnu dot org
2005-10-14  4:53 ` cvs-commit at gcc dot gnu dot org
2005-10-14 13:09 ` pinskia at gcc dot gnu dot org
2005-10-14 16:38 ` paulthomas2 at wanadoo dot fr
2005-09-27 21:30 [Bug fortran/24092] New: " pault at gcc dot gnu dot org
2005-09-28  9:22 ` [Bug fortran/24092] " tobi at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).