From f745fe9b30ea4cff23fb12dee4695d23637fdb54 Mon Sep 17 00:00:00 2001 From: fjahanian Date: Mon, 26 Jan 2004 17:48:49 +0000 Subject: [PATCH] Test case for PR middle-end/13779. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76652 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/darwin-longlong.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/darwin-longlong.c diff --git a/gcc/testsuite/gcc.dg/darwin-longlong.c b/gcc/testsuite/gcc.dg/darwin-longlong.c new file mode 100644 index 00000000000..ef925d69dd8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/darwin-longlong.c @@ -0,0 +1,34 @@ +/* { dg-do run { target powerpc*-*-* } } */ +/* { dg-options "-mcpu=G5" } */ + +#include + +void +sig_ill_handler (int sig) +{ + exit(0); +} + + +int msw(long long in) +{ + union { + long long ll; + int i[2]; + } ud; + ud.ll = in; + return ud.i[0]; +} + +int main() +{ + + /* Exit on systems without 64bit instructions. */ + signal (SIGILL, sig_ill_handler); + asm volatile ("extsw r0,r0"); + signal (SIGILL, SIG_DFL); + + if (msw(1) != 0) + abort(); + exit(0); +} -- 2.11.4.GIT