https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67757

            Bug ID: 67757
           Summary: ICE after "ambiguous reference"
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arjen.markus895 at gmail dot com
  Target Milestone: ---

The following code causes the compiler to produce a message about an ambiguous
reference and then to crash with a segmentation fault (this is on Windows 7,
both MinGW and Cygwin)":

module quaternion_def_basic
    implicit none

    type quaternion
        !type(complex) :: c(2)
        complex :: c(2)
    end type quaternion
end module quaternion_def_basic

module quaternion_def
    use quaternion_def_basic, only: T => quaternion
end module quaternion_def

module octonion_def
    use quaternion_def, T2 => T

    implicit none

    !private :: T2

    type T
        type(T2) :: c(2)
    end type T
end module octonion_def

module sedenion_def
    use octonion_def, T2 => T

    implicit none

    !private :: T2

    type T
        type(T2) :: c(2)
    end type T
end module sedenion_def

When I bring the "private" statements back, all is well.

Reply via email to