diff options
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r-- | gcc/testsuite/gcc.target/s390/jump-label.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/jump-label.c b/gcc/testsuite/gcc.target/s390/jump-label.c new file mode 100644 index 0000000..3de73f6 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/jump-label.c @@ -0,0 +1,19 @@ +/* Test jdd constraint, which is used for linux kernel jump labels. */ + +/* { dg-do link } */ +/* { dg-options "-O2 -fPIC -shared" } */ + +__attribute__ ((visibility ("default"))) extern int i; + +void f (void) +{ + asm goto (".pushsection foo\n" +#if defined(__s390x__) + ".quad %0-.\n" +#else + ".long %0-.\n" +#endif + ".popsection\n" + : : "jdd" (&i) : : l); +l:; +} |