&& tree_int_cst_equal (m_upper, other.m_upper));
}
+static int
+cmp_types (const_tree type1, const_tree type2)
+{
+ int t1 = TYPE_UID (type1);
+ int t2 = TYPE_UID (type2);
+ return t1 - t2;
+}
+
int
bounded_range::cmp (const bounded_range &br1, const bounded_range &br2)
{
- if (int cmp_lower = tree_int_cst_compare (br1.m_lower,
- br2.m_lower))
+ if (int cmp_lower = tree_int_cst_compare (br1.m_lower, br2.m_lower))
return cmp_lower;
- return tree_int_cst_compare (br1.m_upper, br2.m_upper);
+ if (int cmp_upper = tree_int_cst_compare (br1.m_upper, br2.m_upper))
+ return cmp_upper;
+ if (int cmp_lower_type = cmp_types (TREE_TYPE (br1.m_lower),
+ TREE_TYPE (br2.m_lower)))
+ return cmp_lower_type;
+ if (int cmp_upper_type = cmp_types (TREE_TYPE (br1.m_upper),
+ TREE_TYPE (br2.m_upper)))
+ return cmp_upper_type;
+ return 0;
}
/* struct bounded_ranges. */
--- /dev/null
+/* { dg-additional-options "-fdump-analyzer" } */
+
+enum { PIPE_SWIZZLE_X, PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W };
+enum { UTIL_FORMAT_COLORSPACE_YUV, UTIL_FORMAT_COLORSPACE_ZS } colorspace;
+int util_format_colormask_descutil_format_colormask_colormask,
+ util_format_get_component_bits_component,
+ util_format_get_component_bits_desc_0_3_0;
+void util_format_colormask_descutil_format_colormask() {
+ switch (colorspace) {
+ case UTIL_FORMAT_COLORSPACE_YUV:
+ util_format_colormask_descutil_format_colormask_colormask = 0;
+ for (;;)
+ case UTIL_FORMAT_COLORSPACE_ZS:; /* { dg-warning "infinite loop" } */
+ }
+}
+unsigned util_format_get_component_bits() {
+ switch (util_format_get_component_bits_component)
+ case PIPE_SWIZZLE_X:
+ case PIPE_SWIZZLE_W:
+ return util_format_get_component_bits_desc_0_3_0;
+}