diff --git a/gdb/testsuite/gdb.opt/inline-small-func.h b/gdb/testsuite/gdb.opt/inline-small-func.h index 66323952cf4..44b6e86fc15 100644 --- a/gdb/testsuite/gdb.opt/inline-small-func.h +++ b/gdb/testsuite/gdb.opt/inline-small-func.h @@ -13,9 +13,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#ifdef __GNUC__ +#define ATTR __attribute__((always_inline)) +#else +#define ATTR +#endif + int counter = 42; -inline void +inline ATTR void callee () { counter = 0; /* callee: body. */ }