PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / pr45865.c
blob6edea31471cdcd6e68fc6812614da7f4c4ff6d49
1 /* PR rtl-optimization/45865 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fcompare-debug" } */
5 typedef union tree_node *tree;
6 enum ix86_builtin_type {
7 IX86_BT_LAST_VECT,
8 IX86_BT_LAST_PTR
9 };
10 extern const enum ix86_builtin_type ix86_builtin_type_ptr_base[];
11 extern tree build_qualified_type (tree, int);
12 extern tree build_pointer_type (tree);
13 tree
14 ix86_get_builtin_type (enum ix86_builtin_type tcode, unsigned int index)
16 tree type, itype;
17 int quals;
18 if (tcode <= IX86_BT_LAST_PTR)
19 quals = 0x0;
20 else
21 quals = 0x1;
22 itype = ix86_get_builtin_type (ix86_builtin_type_ptr_base[index],
23 index);
24 if (quals != 0x0)
25 itype = build_qualified_type (itype, quals);
26 type = build_pointer_type (itype);
27 return type;