From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4417 invoked by alias); 16 Feb 2006 11:31:47 -0000 Received: (qmail 4407 invoked by uid 48); 16 Feb 2006 11:31:44 -0000 Date: Thu, 16 Feb 2006 11:31:00 -0000 Message-ID: <20060216113144.4406.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg01803.txt.bz2 List-Id: ------- Comment #8 from rguenth at gcc dot gnu dot org 2006-02-16 11:31 ------- I can reproduce this on i586-pc-linux-gnu with -Os -mrtd. As analyzed, the failure occours with -mrtd if a call to memcpy is generated. The following testcase fails for me with -mrtd and passes without it for 3.4.5, 4.0.2, 4.1.0 and mainline using the C frontend: extern void abort(void); struct st_t { int m_i; char m_ch[260]; }; void foo(int *pInt, struct st_t st) { if (*pInt != 123 || st.m_i != 1 || st.m_ch[0] != 2) abort(); } int main() { int i = 123; struct st_t st; st.m_i = 1; st.m_ch[0] = 2; foo(&i, st); return 0; } Still using -mrtd is not common at least for non-mingw targets. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- GCC target triplet|i386-*-mingw32 |i?86-*-* Known to fail|3.4.2 3.4.3 3.4.4 |3.4.2 3.4.3 3.4.4 3.4.5 | |4.0.2 4.1.0 4.2.0 Summary|[3.4/4.0/4.1/4.2 Regression]|[3.4/4.0/4.1/4.2 Regression] |Error to pass struct |Error to pass struct |parameter when compile with |parameter when compile with |mingw's gcc.exe using "- |-mrtd |march=i386 -mrtd" flags | Target Milestone|4.0.3 |3.4.6 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017