The example program is:

program test
implicit none

type c_struct
  type (g_struct), pointer :: g
end type

type g_struct
  type (p_struct), pointer :: p
end type

type p_struct
  type (region_struct), pointer :: r
end type

type region_struct
  type (p_struct) plot
end type

type (c_struct) curve(10)
namelist / params / curve
end program


compiling with "gfortran test2.f90" hangs the compiler. I don't have a simple
example but with other test programs I get the message:


[gfortran] Compiling:  test.f90 --> test_DBL.o
gfortran: Internal error: Segmentation fault (program f951)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


In any case, commenting out the namelist statement fixes the problem. Notice
that this code is non-conforming since the "curve" variable has a pointer
component but is also used in the namelist

-- David

PS: I am working on linux:
lnx4103:~/bmad/bmad_dist/test> uname -a
Linux lnx4103.lns.cornell.edu 2.6.18-194.11.1.el5 #1 SMP Tue Aug 10 16:39:28
EDT  2010 x86_64 x86_64 x86_64 GNU/Linux


-- 
           Summary: gfortran internal compiler error
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot sagan at gmail dot com


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

Reply via email to