Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr45865.c
blob9974896f60ccf1f151bcee6ff25a30ab64837b67
1 /* { dg-do compile } */
3 typedef struct rtx_def *rtx;
4 enum machine_mode {
5 VOIDmode,
6 CCFPmode,
7 CCFPUmode,
8 MAX_MACHINE_MODE
9 };
10 enum mode_class {
11 MODE_CC,
12 MODE_FLOAT,
13 MODE_COMPLEX_FLOAT,
14 MODE_VECTOR_FLOAT
16 extern const enum mode_class mode_class[(int) MAX_MACHINE_MODE];
17 enum rtx_code {
18 UNKNOWN,
19 GEU,
20 ORDERED,
21 CONST_INT
23 struct rtx_def {
24 unsigned int code: 16;
25 unsigned int mode : 8;
27 extern enum rtx_code reverse_condition (enum rtx_code);
28 extern enum rtx_code reverse_condition_maybe_unordered (enum rtx_code);
29 enum rtx_code
30 reversed_comparison_code_parts (enum rtx_code code, rtx insn, rtx arg0,
31 rtx arg1)
33 enum machine_mode mode;
34 mode = (enum machine_mode) (arg0)->mode;
35 if (mode == VOIDmode)
36 mode = (enum machine_mode) (arg1)->mode;
37 if ((mode_class[(int) (mode)]) == MODE_CC)
38 return (mode != CCFPmode && mode != CCFPUmode
39 ? reverse_condition (code)
40 : reverse_condition_maybe_unordered (code));
41 switch (code)
43 case GEU:
44 return reverse_condition (code);
45 case ORDERED:
46 return UNKNOWN;
48 if (((enum rtx_code) (arg0)->code) == CONST_INT
49 || (((enum machine_mode) (arg0)->mode) != VOIDmode
50 && ! ((mode_class[(int) (mode)]) == MODE_FLOAT
51 || (mode_class[(int) (mode)]) == MODE_COMPLEX_FLOAT
52 || (mode_class[(int) (mode)]) == MODE_VECTOR_FLOAT)))
53 return reverse_condition (code);
54 return UNKNOWN;