1! { dg-do run } 2! { dg-options "-fcheck=all -std=f2003 " } 3! { dg-shouldfail "Pointer actual argument 'ptr' is not associated" } 4! 5! PR fortran/49255 6! 7! Valid F2008, invalid F95/F2003. 8! 9integer,pointer :: ptr => null() 10call foo (ptr) 11contains 12 subroutine foo (x) 13 integer, optional :: x 14 if (present (x)) STOP 1 15 end subroutine foo 16end 17