[Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 5 22:27:00 GMT 2013


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

--- Comment #13 from janus at gcc dot gnu.org 2013-02-05 22:26:55 UTC ---
(In reply to comment #12)
> program main
>   implicit none
> 
>   integer, pointer :: y(:)
> 
>   y => null()
>   call a4t2(y)
> 
> contains
> 
>  subroutine a4t2(x)
>    integer, intent(in) :: x(4)
>  end subroutine
> 
> end

Ok, sorry. This one is actually invalid, which is correctly caught by
-fcheck=all:

Fortran runtime error: Pointer actual argument 'y' is not associated

However, it becomes valid when making 'x' optional (but still gives the
valgrind error).



More information about the Gcc-bugs mailing list