1 /* Copyright (C) 2004 Free Software Foundation.
4 Verify that -ftrapv doesn't produce bogus results
7 Written by Eric Botcazou */
10 /* { dg-options "-ftrapv" } */
12 extern void abort(void);
13 extern long labs(long);
15 int __attribute__((noinline
))
21 int __attribute__((noinline
))
27 int __attribute__((noinline
))
33 int __attribute__((noinline
))
39 int __attribute__((noinline
))
45 long __attribute__((noinline
))
51 long __attribute__((noinline
))
57 long __attribute__((noinline
))
63 long __attribute__((noinline
))
69 long __attribute__((noinline
))
80 if (iaddv (2,-3) != -1)
83 if (isubv (2,3) != -1)
86 if (imulv (-2,3) != -6)
92 if (labsv (-1L) != 1L)
95 if (laddv (2L,-3L) != -1L)
98 if (lsubv (2L,3L) != -1L)
101 if (lmulv (-2L,3L) != -6L)
104 if (lnegv (-1L) != 1L)