diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.target/vax/push.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/vax/push.c b/gcc/testsuite/gcc.target/vax/push.c new file mode 100644 index 0000000..647ea60 --- /dev/null +++ b/gcc/testsuite/gcc.target/vax/push.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +void bar (void (*) (void), int, int); + +void +foo (void) +{ + bar (foo, 1, 0); +} + +/* Expect assembly like: + + pushl $0 + pushl $1 + pushab foo + calls $3,bar + +rather than: + + clrl -(%sp) + movl $1,-(%sp) + movab foo,-(%sp) + calls $3,bar + + */ + +/* { dg-final { scan-assembler "\[ \t\]+pushl\[ \t\]+\\\$0\n\[ \t\]+pushl\[ \t\]+\\\$1\n\[ \t\]+pushab\[ \t\]+foo\n" } } */ |