The assertion failure gets exposed when experimenting with traversal options
Details
Diff Detail
Event Timeline
This one is really weird. Any node can cache out, regardless of program point types.
However, it documents how the code works: if the number of predecessors is not equal to 1, the ascension through predecessors is not necessarily working correctly.
I think we should keep it until we are ready to provide an actual broken example, and then see how can this code be fixed. There must be something in the program state that should keep these branches apart (and these nodes from caching out). And since there is something in the program state, we should extend it to contain whatever we need here, so that we didn't need to ascend.
@NoQ a short reproducer is:
typedef struct { char a; } b; int c(b* input) { return (input->a ?: input) ? 1 : 0; }
Tracked in rdar://37540480
All right, so it sounds like it still needs to be investigated, but at least we've made one more step with a brand-new reproducer.