Skip to content

Commit

Permalink
[Fortran/gfortran] Skip test that requires -fcheck=pointer
Browse files Browse the repository at this point in the history
This test expects to fail with an error because you pass
an empty optional to a function where the argument is
not optional (and/or you're passing a pointer as an integer
I'm not sure which).

A reduced test case is:
```
program test
  call sub1c()
contains
  subroutine sub1c(a)
   integer, pointer,optional :: a
   call sub3(a) ! << INVALID
  end subroutine sub1c
  subroutine sub3(b)
    integer :: b
  end subroutine
end
```

gfortran compiles this and this happens when you run the binary:
Fortran runtime error: Pointer actual argument 'a' is not associated or not present

The test suite filters out `-f` options Flang doesn't support and until now,
Flang would produce code that somehow didn't crash at -O3. Since
https://lab.llvm.org/buildbot/#/builders/143/builds/3126 the code crashes.

llvm/llvm-project#113949 is the obvious suspect there
but the code crashes even when that is reverted. Perhaps there is some
non-determinism in play.

That said, the program is doing bad things so I think crashing is not
unexpected here. gofortran's code at -O0 also crashes.

There are other tests with -fcheck=pointer but I am just looking
to get the bots green so I've left the other ones alone.
  • Loading branch information
DavidSpickett committed Nov 1, 2024
1 parent c397861 commit 0b54d60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Fortran/gfortran/regression/DisabledFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1780,6 +1780,9 @@ file(GLOB FAILING_FILES CONFIGURE_DEPENDS
bounds_check_17.f90
pr48958.f90

# Require -fcheck=pointer.
pointer_check_6.f90

# These files require the __truncsfbf2 intrinsic that is not available
# before GCC 13. Alternatively, it requires compiler-rt to be built and a
# command line option provided to instruct the compiler to use it. Currently,
Expand Down

0 comments on commit 0b54d60

Please sign in to comment.