I would not help because modern compiler treat UB as an optimization opportunity, including a license to do whatever they want (even elimination of code).