Adjust 'libgomp.c/max_vf-*.c'
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr19606.c
blobb857ddeaa73ed21793046f8811671422928be658
1 /* PR c/19606
2 The C front end used to shorten the type of a division to a type
3 that does not preserve the semantics of the original computation.
4 Make sure that won't happen. */
6 void abort (void);
7 void exit (int);
9 signed char a = -4;
11 int
12 foo (void)
14 return ((unsigned int) (signed int) a) / 2LL;
17 int
18 bar (void)
20 return ((unsigned int) (signed int) a) % 5LL;
23 int
24 main (void)
26 int r;
28 r = foo ();
29 if (r != ((unsigned int) (signed int) (signed char) -4) / 2LL)
30 abort ();
32 r = bar ();
33 if (r != ((unsigned int) (signed int) (signed char) -4) % 5LL)
34 abort ();
36 exit (0);