OSDN Git Service

2011-11-04 Tom de Vries <tom@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr45865.c
1 /* PR rtl-optimization/45865 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fcompare-debug" } */
4
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)
15 {
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;
28 }