public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28630]  New: ICE due to a module function returning a derived type
@ 2006-08-07  9:47 paul dot richard dot thomas at cea dot fr
  2006-08-08 13:45 ` [Bug fortran/28630] " patchapp at dberlin dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2006-08-07  9:47 UTC (permalink / raw)
  To: gcc-bugs

This was reported by Mark Hesselink
http://gcc.gnu.org/ml/fortran/2006-08/msg00124.html

This:

MODULE types
   TYPE :: t
      INTEGER :: i
   END TYPE
END MODULE types

MODULE foo
   USE types
CONTAINS
   FUNCTION bar (x) RESULT(r)
      USE types
      REAL, INTENT(IN) :: x
      TYPE(t) :: r
      r = t(0)
   END FUNCTION bar
END MODULE

LOGICAL FUNCTION foobar (x)
   USE foo
   REAL :: x
   TYPE(t) :: c
   foobar = .FALSE.
   c = bar (x)
END FUNCTION foobar

produces:

$ /irun/bin/gfortran mark.f90
mark.f90: In function 'foobar':
mark.f90:22: internal compiler error: in fold_convert, at fold-const.c:2098
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This is essentially the same as PR25391 except that it is a function that is
picking up the wrong derived type definition (look at foo.mod).

I already have a very kludgy fix working.

Paul


-- 
           Summary: ICE due to a module function returning a derived type
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paul dot richard dot thomas at cea dot fr


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


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

end of thread, other threads:[~2006-08-20 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07  9:47 [Bug fortran/28630] New: ICE due to a module function returning a derived type paul dot richard dot thomas at cea dot fr
2006-08-08 13:45 ` [Bug fortran/28630] " patchapp at dberlin dot org
2006-08-08 19:46 ` pault at gcc dot gnu dot org
2006-08-09 14:20 ` patchapp at dberlin dot org
2006-08-20  5:46 ` pault at gcc dot gnu dot org
2006-08-20  8:21 ` pault at gcc dot gnu dot org
2006-08-20 17:30 ` pault 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).