1 /* { dg-options "-fcompare-debug" } */
3 enum signop { SIGNED, UNSIGNED };
4 enum tree_code { FOO, BAR };
5 enum tree_code_class { tcc_type, tcc_other };
6 extern enum tree_code_class tree_code_type[];
9 enum tree_code code : 16;
10 unsigned unsigned_flag : 1;
20 typedef tree_def *tree;
24 storage_ref (const long *, unsigned int, unsigned int);
28 unsigned int precision;
31 inline storage_ref::storage_ref (const long *val_in,
33 unsigned int precision_in)
34 : val (val_in), len (len_in), precision (precision_in)
41 unsigned int precision;
46 decompose (long *scratch, unsigned int precision,
47 const hwi_with_prec &x)
50 if (x.sgn == SIGNED || x.val >= 0 || precision <= sizeof (long) * 8)
51 return storage_ref (scratch, 1, precision);
53 return storage_ref (scratch, 2, precision);
56 extern void tree_class_check_failed (int) __attribute__ ((__noreturn__));
59 tree_class_check (tree t, const enum tree_code_class cls, int x)
61 if (tree_code_type[t->base.code] != cls)
62 tree_class_check_failed (x);
66 tree wide_int_to_tree (tree, const storage_ref &);
69 build_int_cstu (tree type, unsigned long val)
73 x.precision = tree_class_check (type, tcc_type, 1)->type_common.precision;
74 x.sgn = (signop) tree_class_check (type, tcc_type, 2)->base.unsigned_flag;
76 return wide_int_to_tree (type, decompose (scratch, x.precision, x));