https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121814
--- Comment #8 from liwei <liweifriends at gmail dot com> --- Created attachment 62319 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62319&action=edit New version with some bug fixed, but exception still throw Thanks for the comments from @Jonathan Wakely. I have updated the code: 1. fix the issues in put function 2. change _UIntPtrType to UIntPtrType 3. change __s to i_s 4. use assign to set output in put function. For this one, the memory issue is solved, but when compiling with -O3, The system still throw exception.