Test case for PR middle-end/13779.

From-SVN: r76652
This commit is contained in:
Fariborz Jahanian 2004-01-26 17:48:49 +00:00
parent 6c8066b9ca
commit b2037eac29
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
/* { dg-do run { target powerpc*-*-* } } */
/* { dg-options "-mcpu=G5" } */
#include <signal.h>
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);
}