diff options
author | Tom Tromey <tromey@redhat.com> | 2010-07-27 18:08:48 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-07-27 18:08:48 +0000 |
commit | 5283e9e1e3ce1862befdd428729c2382fa4c2d91 (patch) | |
tree | e28247d85c8f1a459d96fd9d347581df38924531 /gdb/testsuite/gdb.opt/inline-bt.c | |
parent | e992ef7345b6ff291c424cac2a056ba09102e64a (diff) | |
download | gdb-5283e9e1e3ce1862befdd428729c2382fa4c2d91.zip gdb-5283e9e1e3ce1862befdd428729c2382fa4c2d91.tar.gz gdb-5283e9e1e3ce1862befdd428729c2382fa4c2d91.tar.bz2 |
* gdb.opt/inline-cmds.c (ATTR): New define.
(func1): Use it.
(func2): Likewise.
(func3): Likewise.
(outer_inline1): Likewise.
(outer_inline2): Likewise.
* gdb.opt/inline-bt.c (ATTR): New define.
(func1): Use it.
(func2): Likewise.
* gdb.opt/inline-locals.c (ATTR): New define.
(func1): Use it.
(func2): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.opt/inline-bt.c')
-rw-r--r-- | gdb/testsuite/gdb.opt/inline-bt.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.opt/inline-bt.c b/gdb/testsuite/gdb.opt/inline-bt.c index 476421d..45933d6 100644 --- a/gdb/testsuite/gdb.opt/inline-bt.c +++ b/gdb/testsuite/gdb.opt/inline-bt.c @@ -13,18 +13,27 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/* This is only ever run if it is compiled with a new-enough GCC, but + we don't want the compilation to fail if compiled by some other + compiler. */ +#ifdef __GNUC__ +#define ATTR __attribute__((always_inline)) +#else +#define ATTR +#endif + int x, y; volatile int result; void bar(void); -inline int func1(void) +inline ATTR int func1(void) { bar (); return x * y; } -inline int func2(void) +inline ATTR int func2(void) { return x * func1 (); } |