https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87838
Bug ID: 87838 Summary: Segmentation fault with function pointer to contained function Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: menospaamthereaper at hotmail dot com Target Milestone: --- Created attachment 44938 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44938&action=edit Output from -save-temps Function pointer to a function contained within the same program gives a segmentation fault. Confirmed in both 7.3.0 and 8.2.0-1 (Ubuntu 18.04 installed from apt). Compiled with gfortran test.f03 and gfortran-8 test.f03. Minimal failing example: program test_func_ptrs implicit none abstract interface subroutine func() end subroutine end interface procedure (func), pointer :: f_ptr => null () f_ptr => f1 call f_ptr() contains subroutine f1() implicit none return end subroutine end program test_func_ptrs