program ifb_p

  implicit none

  interface
    subroutine ifb_echo_aux(this) bind(c, name="ifb_echo")
      implicit none
      type(*), dimension(..), & ! removing assumed rank solves segmentation fault
        optional, intent(in) :: this
    end subroutine ifb_echo_aux
  end interface

  call ifb_echo_aux() ! works
  call ifb_echo()     ! segmentation fault
  stop

contains
  
  subroutine ifb_echo(this)
    type(*), dimension(..), &
      optional, intent(in) :: this

    call ifb_echo_aux(this)
    return
  end subroutine ifb_echo

end program ifb_p

  
