On 07/19/2016 12:35 PM, Richard Biener wrote:
I think that start/end_recording_case_labels also merged adjacent labels via group_case_labels_stmt. Not sure why you need to stop recording case labels during the transform. Is this because you are building a new switch stmt?
It's because the cached mapping gets invalidated. Look in tree-cfg, it has a edge_to_cases map which I think cannot be maintained if you modify the structure. I certainly got lots of internal errors until I added that pair of calls.
Bernd