On Fri, Dec 01, 2023 at 03:53:14PM -0500, Marek Polacek wrote: > On Fri, Dec 01, 2023 at 11:44:28AM -0800, Andrew Pinski wrote: > > On Fri, Dec 1, 2023, 11:36 Marek Polacek <pola...@redhat.com> wrote: > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > -- >8 -- > > > It came up that a good hardening strategy is to disable trampolines > > > which may require executable stack. Therefore the following patch > > > adds -Werror=trampolines to -fhardened. > > > > > > > It might make sense to add a fortran testcase too. Especially when that and > > Ada are 2 biggest users of trampolines. > > I don't know either of these languages to write a test, and I don't see > anything that mentions the word trampoline in gfortran.dg/. Ada has
program nesting integer :: i procedure(), pointer :: p p => foo i = 5 call p if (i.ne.6) stop 1 contains subroutine foo i = i + 1 end subroutine end program (obviously at -O0 only)? Jakub