Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / unsigned-long-compare.c
blob74e7638f1ce9859d117e90d23e44e8af1cc2df53
1 /* Copyright (C) 2006 Free Software Foundation, Inc. */
2 /* Contributed by Carlos O'Donell on 2006-01-30 */
4 /* Test a division corner case where the expression simplifies
5 to a comparison, and the optab expansion is wrong. The optab
6 expansion emits a function whose return is unbiased and needs
7 adjustment. */
8 /* Origin: Carlos O'Donell <carlos@codesourcery.com> */
9 /* { dg-do run } */
10 /* { dg-options "" } */
11 #include <stdlib.h>
13 #define BIG_CONSTANT 0xFFFFFFFF80000000ULL
15 int main (void)
17 unsigned long long OneULL = 1ULL;
18 unsigned long long result;
20 result = OneULL / BIG_CONSTANT;
21 if (result)
22 abort ();
23 exit (0);