mirror of
https://github.com/nArnoSNES/tcc-65816.git
synced 2024-06-12 13:29:29 +00:00
25 lines
372 B
C
25 lines
372 B
C
/* Signed left-shift is implementation-defined in C89 (and see
|
|
DR#081), not undefined. Bug 7284 from Al Grant (AlGrant at
|
|
myrealbox.com). */
|
|
|
|
/* { dg-options "-std=c89" } */
|
|
|
|
extern void abort (void);
|
|
extern void exit (int);
|
|
|
|
int
|
|
f (int n)
|
|
{
|
|
return (n << 8) / (1 << 7);
|
|
}
|
|
|
|
volatile int x = 128;
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
if (f(x) != -256)
|
|
abort ();
|
|
exit (0);
|
|
}
|