Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr96779-disabled.c

raw
1 /* PR tree-optimization/96779 */
2 /* { dg-do run } */
3 /* { dg-options "-O -fdump-tree-optimized -fwrapv" } */
4 /* { dg-require-effective-target int32plus } */
5
6 #include <stdbool.h>
7
8 bool __attribute__ ((noipa)) f_func(int a)
9 {
10 return -a == a;
11 }
12
13 bool __attribute__ ((noipa)) g_func(unsigned int a)
14 {
15 return -a == a;
16 }
17
18 bool __attribute__ ((noipa)) h_func(short a)
19 {
20 return -a == a;
21 }
22
23 bool __attribute__ ((noipa)) k_func(long a)
24 {
25 return -a == a;
26 }
27
28 int
29 main (void)
30 {
31 // few randomly generated test cases
32 if (f_func (71856034))
33 {
34 __builtin_abort ();
35 }
36 if (g_func (71856034))
37 {
38 __builtin_abort ();
39 }
40 if (h_func (1744))
41 {
42 __builtin_abort ();
43 }
44 if (k_func (68268386))
45 {
46 __builtin_abort ();
47 }
48 if (f_func (-112237))
49 {
50 __builtin_abort ();
51 }
52 if (g_func (-787116))
53 {
54 __builtin_abort ();
55 }
56 if (h_func (-863))
57 {
58 __builtin_abort ();
59 }
60 if (k_func (-787116))
61 {
62 __builtin_abort ();
63 }
64 if (!f_func (0))
65 {
66 __builtin_abort ();
67 }
68 if (!g_func (0))
69 {
70 __builtin_abort ();
71 }
72 if (!h_func (0))
73 {
74 __builtin_abort ();
75 }
76 if (!k_func (0))
77 {
78 __builtin_abort ();
79 }
80
81 return 0;
82 }
83
84 /* Verify that we have *not* transfered "= -" pattern in any of those functions. */
85 /* { dg-final { scan-tree-dump-times "= -" 4 "optimized" } } */