/* PR middle-end/29695 */
|
/* PR middle-end/29695 */
|
|
|
extern void abort (void);
|
extern void abort (void);
|
|
|
int a = 128;
|
int a = 128;
|
unsigned char b = 128;
|
unsigned char b = 128;
|
long long c = 0x80000000LL;
|
long long c = 0x80000000LL;
|
unsigned int d = 0x80000000;
|
unsigned int d = 0x80000000;
|
|
|
int
|
int
|
f1 (void)
|
f1 (void)
|
{
|
{
|
return (a & 0x80) ? 0x80 : 0;
|
return (a & 0x80) ? 0x80 : 0;
|
}
|
}
|
|
|
int
|
int
|
f2 (void)
|
f2 (void)
|
{
|
{
|
return (b & 0x80) ? 0x80 : 0;
|
return (b & 0x80) ? 0x80 : 0;
|
}
|
}
|
|
|
int
|
int
|
f3 (void)
|
f3 (void)
|
{
|
{
|
return (b & 0x80) ? 0x380 : 0;
|
return (b & 0x80) ? 0x380 : 0;
|
}
|
}
|
|
|
int
|
int
|
f4 (void)
|
f4 (void)
|
{
|
{
|
return (b & 0x80) ? -128 : 0;
|
return (b & 0x80) ? -128 : 0;
|
}
|
}
|
|
|
long long
|
long long
|
f5 (void)
|
f5 (void)
|
{
|
{
|
return (c & 0x80000000) ? 0x80000000LL : 0LL;
|
return (c & 0x80000000) ? 0x80000000LL : 0LL;
|
}
|
}
|
|
|
long long
|
long long
|
f6 (void)
|
f6 (void)
|
{
|
{
|
return (d & 0x80000000) ? 0x80000000LL : 0LL;
|
return (d & 0x80000000) ? 0x80000000LL : 0LL;
|
}
|
}
|
|
|
long long
|
long long
|
f7 (void)
|
f7 (void)
|
{
|
{
|
return (d & 0x80000000) ? 0x380000000LL : 0LL;
|
return (d & 0x80000000) ? 0x380000000LL : 0LL;
|
}
|
}
|
|
|
long long
|
long long
|
f8 (void)
|
f8 (void)
|
{
|
{
|
return (d & 0x80000000) ? -2147483648LL : 0LL;
|
return (d & 0x80000000) ? -2147483648LL : 0LL;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
if ((char) 128 != -128 || (int) 0x80000000 != -2147483648)
|
if ((char) 128 != -128 || (int) 0x80000000 != -2147483648)
|
return 0;
|
return 0;
|
if (f1 () != 128)
|
if (f1 () != 128)
|
abort ();
|
abort ();
|
if (f2 () != 128)
|
if (f2 () != 128)
|
abort ();
|
abort ();
|
if (f3 () != 896)
|
if (f3 () != 896)
|
abort ();
|
abort ();
|
if (f4 () != -128)
|
if (f4 () != -128)
|
abort ();
|
abort ();
|
if (f5 () != 0x80000000LL)
|
if (f5 () != 0x80000000LL)
|
abort ();
|
abort ();
|
if (f6 () != 0x80000000LL)
|
if (f6 () != 0x80000000LL)
|
abort ();
|
abort ();
|
if (f7 () != 0x380000000LL)
|
if (f7 () != 0x380000000LL)
|
abort ();
|
abort ();
|
if (f8 () != -2147483648LL)
|
if (f8 () != -2147483648LL)
|
abort ();
|
abort ();
|
return 0;
|
return 0;
|
}
|
}
|
|
|