------- Additional Comments From dannysmith at users dot sourceforge dot net
2005-06-12 05:18 -------
Hi,
I think the problem is that
st.m_i = 1;
st.m_ch[0] = 0;
causes gcc to generate a call to the library memcpy. Since the -mrtd switch is
in effect, the call is generated assuming that memcpy will pop the stack. It
doesn't, of course, so the stack is corrupted.
Adding a static extern "C" memcpy code to the testcase, so that the local
memcpy does indeed use rtd convention, make the assert succeed.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017