PR middle-end/27945
[official-gcc.git] / gcc / testsuite / gcc.dg / ftrapv-1.c
blob44eb176b50d39cecfa4c82f87f669bb7cdb6faf0
1 /* Copyright (C) 2004 Free Software Foundation.
3 PR other/15526
4 Verify correct overflow checking with -ftrapv.
6 Written by Falk Hueffner, 20th May 2004. */
8 /* { dg-do run } */
9 /* { dg-options "-ftrapv" } */
11 __attribute__((noinline)) int
12 mulv(int a, int b)
14 return a * b;
17 int
18 main()
20 mulv( 0, 0);
21 mulv( 0, -1);
22 mulv(-1, 0);
23 mulv(-1, -1);
24 return 0;