------- Comment #3 from fxcoudert at gcc dot gnu dot org  2006-11-02 09:47 
-------
(In reply to comment #1)
> I presented a patch for this problem and for detected unassigned r-values that
> was rejected.  I don't know what to say; I think that it's a bug, in 
> principle,
> but the standard does not require it.

Paul,

I looked at that bug again but couldn't find the patch you proposed. I think we
should issue a warning but not an error, because you can write code that is
still valid:

logical function foo(a, x)
  integer,intent(in) :: a
  integer,intent(out) :: x

  foo = .false.
  if (a > 0) then
    foo = .true.
    x = a
  end if
end function foo

program test
  integer :: a, x

  a = -1
  if (foo (a,x)) print *, x
end program test


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-02 09:47:07
               date|                            |


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

Reply via email to