https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118401
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The -O1 issue might be a bug in the backend with respect to using __builtin_return_address . I suspect there might be a way to use -finstrument-functions-exclude-function-list= to get the functions excluded at offloading time.