https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78522
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |INVALID --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Samuel T C Huang from comment #0) > helper.run(reinterpret_cast<uint32_t*>(&value_type)); The problem is here. This cast leads to an aliasing violation when you assign through the pointer, so the program has undefined behaviour. Don't do that.