public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31921]  New: crash for FUNCTION with RESULT specifier
@ 2007-05-14 18:01 beliavsky at aol dot com
  2007-05-14 18:14 ` [Bug fortran/31921] " dominiq at lps dot ens dot fr
  2007-05-14 19:08 ` burnus at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: beliavsky at aol dot com @ 2007-05-14 18:01 UTC (permalink / raw)
  To: gcc-bugs

module mman 
implicit none
private 
public mskew,nskew
contains 
function nskew() result(y)
real :: y(1)
call skewm(y)
end function nskew
!
function mskew() 
real :: mskew(1) 
call skewm(mskew)
end function mskew
!
subroutine skewm(smat) 
real, intent(out) :: smat(1) 
smat = 0.0
end subroutine skewm
end module mman
!
program mtst 
use mman, only: mskew,nskew
implicit none 
print*,"(1) calling nskew"
print*,nskew()
print*,"(2) calling mskew"
print*,mskew()
print*,"(3) done"
end program mtst

Compiling with mingw gfortran 20070506 with the default options gives the
incorrect warning message

xfunc_bug.f90: In function 'mskew':
xfunc_bug.f90:13: warning: Function does not return a value

and at run time the output is

 (1) calling nskew
   0.000000    
 (2) calling mskew
<crash>


-- 
           Summary: crash for FUNCTION with RESULT specifier
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: beliavsky at aol dot com


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


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

* [Bug fortran/31921] crash for FUNCTION with RESULT specifier
  2007-05-14 18:01 [Bug fortran/31921] New: crash for FUNCTION with RESULT specifier beliavsky at aol dot com
@ 2007-05-14 18:14 ` dominiq at lps dot ens dot fr
  2007-05-14 19:08 ` burnus at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens dot fr @ 2007-05-14 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2007-05-14 19:14 -------
Works for me on powerpc-apple-darwin7 with gfortran 4.3.0 20070511


-- 


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


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

* [Bug fortran/31921] crash for FUNCTION with RESULT specifier
  2007-05-14 18:01 [Bug fortran/31921] New: crash for FUNCTION with RESULT specifier beliavsky at aol dot com
  2007-05-14 18:14 ` [Bug fortran/31921] " dominiq at lps dot ens dot fr
@ 2007-05-14 19:08 ` burnus at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-14 19:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2007-05-14 20:06 -------
I believe this is a duplicate of PR 31692 which was fixed Tue May 8, which
explains that it is failing in 20070506 but working in 20070511.

Please reopen if there are other issues.

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


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-05-14 19:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 18:01 [Bug fortran/31921] New: crash for FUNCTION with RESULT specifier beliavsky at aol dot com
2007-05-14 18:14 ` [Bug fortran/31921] " dominiq at lps dot ens dot fr
2007-05-14 19:08 ` burnus 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).