PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / ftrapv-1.c
blob86bd802cf13eb30477b32e16eb06b52a08766ed2
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" } */
10 /* { dg-require-effective-target trapping } */
12 __attribute__((noinline)) int
13 mulv(int a, int b)
15 return a * b;
18 int
19 main()
21 mulv( 0, 0);
22 mulv( 0, -1);
23 mulv(-1, 0);
24 mulv(-1, -1);
25 return 0;