1 /* PR tree-optimization/92157 - incorrect strcmp() == 0 result for unknown
4 { dg-options "-O2 -Wall" } */
12 static inline __attribute__ ((always_inline
)) int
13 verify_not_equal (const char *s
, const char *t
, int x
)
15 int n
= x
< 0 ? strlen (s
) : 0 < x
? strlen (t
) : strlen (s
) + strlen (t
);
17 if (strcmp (t
, s
) == 0)
23 __attribute__ ((noipa
)) int test_a2_s (const char *s
)
25 return verify_not_equal (a2
, s
, 0);
28 __attribute__ ((noipa
)) int test_a2_a3 (void)
30 return verify_not_equal (a2
, a3
, 0);
33 __attribute__ ((noipa
)) int test_a3_a2 (void)
35 return verify_not_equal (a3
, a2
, 0);
38 __attribute__ ((noipa
)) int test_s_a2 (const char *s
)
40 return verify_not_equal (s
, a2
, 0);
44 __attribute__ ((noipa
)) int test_a2_s_1 (const char *s
)
46 return verify_not_equal (a2
, s
, -1);
49 __attribute__ ((noipa
)) int test_a2_a3_1 (void)
51 return verify_not_equal (a2
, a3
, -1);
54 __attribute__ ((noipa
)) int test_a3_a2_1 (void)
56 return verify_not_equal (a3
, a2
, -1);
59 __attribute__ ((noipa
)) int test_s_a2_1 (const char *s
)
61 return verify_not_equal (s
, a2
, -1);
65 __attribute__ ((noipa
)) int test_a2_s_2 (const char *s
)
67 return verify_not_equal (a2
, s
, +1);
70 __attribute__ ((noipa
)) int test_a2_a3_2 (void)
72 return verify_not_equal (a2
, a3
, +1);
75 __attribute__ ((noipa
)) int test_a3_a2_2 (void)
77 return verify_not_equal (a3
, a2
, +1);
80 __attribute__ ((noipa
)) int test_s_a2_2 (const char *s
)
82 return verify_not_equal (s
, a2
, +1);