public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25262]  New:  compiler dies, explicit interface, array valued function
@ 2005-12-05 11:26 jpr at csc dot fi
  2005-12-05 11:31 ` [Bug fortran/25262] " pinskia at gcc dot gnu dot org
  2005-12-17 19:55 ` eedelman at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: jpr at csc dot fi @ 2005-12-05 11:26 UTC (permalink / raw)
  To: gcc-bugs

Hi!

The test program (below) kills latest gfortran:

[jpr@dhcp-38 fem]$ gfortran -v test.f90
Driving: gfortran -v test.f90 -lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: i386-linux
Configured with: ../gcc/configure --prefix=/tmp/gfortran-20051205/irun
--enable-languages=c,fortran --host=i386-linux
Thread model: posix
gcc version 4.2.0 20051205 (experimental)
 /home/wrk/jpr/irun/bin/../libexec/gcc/i386-linux/4.2.0/f951 test.f90 -quiet
-dumpbase test.f90 -auxbase test -version -o /tmp/ccZbxhvU.s
GNU F95 version 4.2.0 20051205 (experimental) (i386-linux)
        compiled by GNU C version 4.0.2 (Debian 4.0.2-2).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
test.f90: In function 'sub':
test.f90:14: internal compiler error: in gfc_trans_arrayfunc_assign, at
fortran/trans-expr.c:2637
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.



platform:
 uname --all
Linux dhcp-38.csc.fi 2.4.20-43.9.legacysmp #1 SMP Sat Apr 30 19:07:33 EDT 2005
i686 i686 i386 GNU/Linux

test program:

PROGRAM test
   REAL, POINTER :: Quant(:)
   REAL :: Ind(2)

   INTERFACE
     FUNCTION x_InsideResidual( Quant ) RESULT(Indicator)
        REAL :: Quant(:), Indicator(2)
      END FUNCTION x_InsideResidual
   END INTERFACE

    NULLIFY( Quant )
!   print*, x_InsideResidual( Quant )               ! works
!   ind = x_InsideResidual( Quant ); print*,ind     ! works
    CALL sub( Quant,x_InsideResidual )

CONTAINS

    SUBROUTINE sub( Quant, InsideResidual )
      REAL :: Quant(:)

      INTERFACE
        FUNCTION InsideResidual( Quant ) RESULT(Indicator)
           REAL :: Quant(:), Indicator(2)
         END FUNCTION InsideResidual
      END INTERFACE

      REAL :: Ind(2)

!     EXTERNAL InsideResidual  ! both cases below work, if you uncomment this.
                               ! Other compilers seem to agree that you can't
have it...

     ind = InsideResidual( Quant ); print*,Ind    ! compiler dies
!    print*,InsideResidual( Quant )               ! seg fault at runtime
    END SUBROUTINE sub

END PROGRAM Test

FUNCTION x_InsideResidual( quant ) RESULT( Indicator )
    REAL :: Quant(:), Indicator(2)

    Indicator = 1.0d0
END FUNCTION x_InsideResidual


BTW. Great progress with gfortran in recent months!

Regards, Juha


-- 
           Summary:  compiler dies, explicit interface, array valued
                    function
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jpr at csc dot fi


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


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

* [Bug fortran/25262] compiler dies, explicit interface, array valued function
  2005-12-05 11:26 [Bug fortran/25262] New: compiler dies, explicit interface, array valued function jpr at csc dot fi
@ 2005-12-05 11:31 ` pinskia at gcc dot gnu dot org
  2005-12-17 19:55 ` eedelman at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-05 11:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-12-05 11:31 -------
Confirmed, looks very much related to PR 18197.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |18197
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-05 11:31:21
               date|                            |
            Summary| compiler dies, explicit    |compiler dies, explicit
                   |interface, array valued     |interface, array valued
                   |function                    |function


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


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

* [Bug fortran/25262] compiler dies, explicit interface, array valued function
  2005-12-05 11:26 [Bug fortran/25262] New: compiler dies, explicit interface, array valued function jpr at csc dot fi
  2005-12-05 11:31 ` [Bug fortran/25262] " pinskia at gcc dot gnu dot org
@ 2005-12-17 19:55 ` eedelman at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2005-12-17 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from eedelman at gcc dot gnu dot org  2005-12-17 19:55 -------
(In reply to comment #1)
> looks very much related to PR 18197.

Indeed. Since patch for PR 18197 fixes this too I think we can call it a
duplicate.



*** This bug has been marked as a duplicate of 18197 ***


-- 

eedelman at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2005-12-17 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-05 11:26 [Bug fortran/25262] New: compiler dies, explicit interface, array valued function jpr at csc dot fi
2005-12-05 11:31 ` [Bug fortran/25262] " pinskia at gcc dot gnu dot org
2005-12-17 19:55 ` eedelman 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).