PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr68619-3.c
blob354872595fb0f1e16ab4038f8cb7c6f271d9d648
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -w" } */
3 typedef unsigned int hashval_t;
4 enum ETYPE
6 ETYPE_ARRAY, ETYPE_STRUCT, ETYPE_UNION,
7 };
8 struct entry
10 enum ETYPE etype:8;
11 unsigned short len;
12 const char *attrib;
14 e_hash (const void *a)
16 const struct entry *e = a;
17 hashval_t ret = 0;
18 int i;
19 if (e[0].etype != ETYPE_STRUCT && e[0].etype != ETYPE_UNION)
20 abort ();
21 for (i = 0; i <= e[0].len; ++i)
23 ret = iterative_hash (&e[i], __builtin_offsetof (struct entry, attrib), ret);
25 return ret;