diff options
author | Kai Tietz <ktietz@redhat.com> | 2014-06-23 23:50:48 +0200 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2014-06-23 23:50:48 +0200 |
commit | 9b7a5864abed3d317b8e4b0a37b3998848e7c81b (patch) | |
tree | 9e8a801d8d9dbdb34858199e2ab87cc46715a1fd /gcc | |
parent | 76da3a15ab5b03fbf44098422fe40e9db5b22fc3 (diff) | |
download | gcc-9b7a5864abed3d317b8e4b0a37b3998848e7c81b.zip gcc-9b7a5864abed3d317b8e4b0a37b3998848e7c81b.tar.gz gcc-9b7a5864abed3d317b8e4b0a37b3998848e7c81b.tar.bz2 |
* gcc.target/i386/indjmp-1.c: New test.
From-SVN: r211918
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/indjmp-1.c | 23 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b0f902a..fb9e00b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-06-23 Kai Tietz <ktietz@redhat.com> + + * gcc.target/i386/indjmp-1.c: New test. + 2014-06-23 Andrew Pinski <apinski@cavium.com> * gcc.c-torture/compile/20140723-1.c: New testcase. diff --git a/gcc/testsuite/gcc.target/i386/indjmp-1.c b/gcc/testsuite/gcc.target/i386/indjmp-1.c new file mode 100644 index 0000000..bbcb243 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/indjmp-1.c @@ -0,0 +1,23 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2" } */ + +#define ADVANCE_AND_DISPATCH() goto *addresses[*pc++] + +void +Interpret(const unsigned char *pc) +{ + static const void *const addresses[] = { + &&l0, &&l1, &&l2 + }; + +l0: + ADVANCE_AND_DISPATCH(); + +l1: + ADVANCE_AND_DISPATCH(); + +l2: + return; +} + +/* { dg-final { scan-assembler-not "jmp\[ \t\]*.%eax" } } */ |