public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38907]  New: ICE when contained function has same name as module function and used in expression
@ 2009-01-18 21:21 dick dot hendrickson at gmail dot com
  2009-01-18 21:44 ` [Bug fortran/38907] " kargl at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2009-01-18 21:21 UTC (permalink / raw)
  To: gcc-bugs

The following program gives an internal compiler error.  If the line
RDA = -1 is commented out, there is a different ICE.  If the unary +
before the function reference in the assignment to RDA(1,2) is removed
the ICE goes away.

Dick Hendrickson


      module sa0054_stuff

! fails on Windows XP
! gcc version 4.4.0 20081219 (experimental) [trunk revision 142842] (GCC)

      contains

      PURE FUNCTION S_REAL_SUM_I (A,B)
      REAL  ::  S_REAL_SUM_I
      REAL, INTENT(IN), OPTIONAL  ::  A,B
      X = 0
      S_REAL_SUM_I = X

      END FUNCTION S_REAL_SUM_I

      SUBROUTINE SA0054(RDA, NF10,nf1,nf2,nf3,nf4)
      REAL RDA(NF10,NF10)

      RDA    = -1                  !changes ICE if commented out

          RDA(1,2) = + S_REAL_SUM_I(1.0,2.0)

!         RDA(1,2) =   S_REAL_SUM_I(1.0,2.0)     !This one works

      CONTAINS

      PURE FUNCTION S_REAL_SUM_I (A,B)
      REAL  ::  S_REAL_SUM_I
      REAL, INTENT(IN), OPTIONAL  ::  A,B
      S_REAL_SUM_I = 0
      END FUNCTION S_REAL_SUM_I

      END SUBROUTINE

      end module sa0054_stuff


With RDA = -1
C:\gfortran>gfortran try_sa0054.f
f951.exe: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


With RDA = -1 commented out
C:\gfortran>gfortran try_sa0054.f
f951.exe: internal compiler error: in check_host_association, at
fortran/resolve
.c:4369
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: ICE when contained function has same name as module
                    function and used in expression
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick dot hendrickson at gmail dot com


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


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

end of thread, other threads:[~2009-01-26  6:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-18 21:21 [Bug fortran/38907] New: ICE when contained function has same name as module function and used in expression dick dot hendrickson at gmail dot com
2009-01-18 21:44 ` [Bug fortran/38907] " kargl at gcc dot gnu dot org
2009-01-18 21:47 ` [Bug fortran/38907] [regression 4.3/4.4] " kargl at gcc dot gnu dot org
2009-01-18 21:47 ` kargl at gcc dot gnu dot org
2009-01-18 22:28 ` [Bug fortran/38907] [4.3/4.4 Regression ] " burnus at gcc dot gnu dot org
2009-01-19 22:34 ` mikael at gcc dot gnu dot org
2009-01-19 22:40 ` dominiq at lps dot ens dot fr
2009-01-19 23:08 ` pault at gcc dot gnu dot org
2009-01-20 19:48 ` mikael at gcc dot gnu dot org
2009-01-20 21:57 ` pault at gcc dot gnu dot org
2009-01-20 21:59 ` [Bug fortran/38907] [4.3 " pault at gcc dot gnu dot org
2009-01-26  6:16 ` pault at gcc dot gnu dot org
2009-01-26  6:16 ` 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).