1int i;
2double d;
3
4/* Make sure we return a constant.  */
5float rootbeer[__builtin_types_compatible_p (int, typeof(i))];
6
7typedef enum { hot, dog, poo, bear } dingos;
8typedef enum { janette, laura, amanda } cranberry;
9
10typedef float same1;
11typedef float same2;
12
13int main (void);
14
15int main (void)
16{
17  /* Compatible types.  */
18  if (!(__builtin_types_compatible_p (int, const int)
19	&& __builtin_types_compatible_p (typeof (hot), int)
20	&& __builtin_types_compatible_p (typeof (hot), typeof (laura))
21	&& __builtin_types_compatible_p (int[5], int[])
22	&& __builtin_types_compatible_p (same1, same2)))
23    abort ();
24
25  /* Incompatible types.  */
26  if (__builtin_types_compatible_p (char *, int)
27      || __builtin_types_compatible_p (char *, const char *)
28      || __builtin_types_compatible_p (long double, double)
29      || __builtin_types_compatible_p (typeof (i), typeof (d))
30      || __builtin_types_compatible_p (typeof (dingos), typeof (cranberry))
31      || __builtin_types_compatible_p (char, int)
32      || __builtin_types_compatible_p (char *, char **))
33    abort ();
34  exit (0);
35}
36