struct kwset {
struct trie *trie;
- unsigned char delta[10];
+ unsigned char y[10];
struct trie* next[10];
int d;
};
register char const *end = p;
register char const *lim = q;
register int d = 1;
- register unsigned char const *delta = kws->delta;
+ register unsigned char const *y = kws->y;
- d = delta[c = (end+=d)[-1]]; // no-warning
+ d = y[c = (end+=d)[-1]]; // no-warning
trie = next[c];
}
}
+// PR 8646 - crash in the analyzer when handling unions.
+union pr8648_union {
+ signed long long pr8648_union_field;
+};
+void pr8648() {
+ long long y;
+ union pr8648_union x = { .pr8648_union_field = 0LL };
+ y = x.pr8648_union_field;
+
+ union pr8648_union z;
+ z = (union pr8648_union) { .pr8648_union_field = 0LL };
+
+ union pr8648_union w;
+ w = ({ (union pr8648_union) { .pr8648_union_field = 0LL }; });
+
+ // crash, no assignment
+ (void) ({ (union pr8648_union) { .pr8648_union_field = 0LL }; }).pr8648_union_field;
+
+ // crash with assignment
+ y = ({ (union pr8648_union) { .pr8648_union_field = 0LL }; }).pr8648_union_field;
+}