Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr119131-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target dfp } */
3 /* { dg-additional-options "-Wno-psabi" } */
4 /* PR target/119131 */
5
6 typedef __attribute__((__vector_size__ (64))) char C;
7 typedef __attribute__((__vector_size__ (64))) _Decimal32 D;
8 int a, b;
9 _Decimal32 f;
10 C e;
11 C c;
12
13 void
14 foo (D d)
15 {
16 d -= *(_Decimal32 *) __builtin_memset (&f, 0, 4);
17 b += a;
18 if (a)
19 b /= 0; /* { dg-warning "division by zero" } */
20 c = (C) d + e;
21 }
22
23 void
24 foo1 (D d)
25 {
26 __builtin_memset (&f, 0, 4);
27 d -= *(_Decimal32 *)&f;
28 b += a;
29 if (a)
30 b /= 0;/* { dg-warning "division by zero" } */
31 c = (C) d + e;
32 }