public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
@ 2005-10-22 21:52 ` pinskia at gcc dot gnu dot org
2005-10-31 3:45 ` mmitchel at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-22 21:52 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:52 ` [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags pinskia at gcc dot gnu dot org
@ 2005-10-31 3:45 ` mmitchel at gcc dot gnu dot org
2005-10-31 4:30 ` dannysmith at users dot sourceforge dot net
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-10-31 3:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2005-10-31 03:45 -------
Leaving at P2, only because Cygwin is not a primary platform. (Otherwise, I'd
make this P1.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:52 ` [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags pinskia at gcc dot gnu dot org
2005-10-31 3:45 ` mmitchel at gcc dot gnu dot org
@ 2005-10-31 4:30 ` dannysmith at users dot sourceforge dot net
2006-02-16 11:31 ` [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2005-10-31 4:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dannysmith at users dot sourceforge dot net 2005-10-31 04:30 -------
This is an i386 bug, not specific to MS windows target. However, it is only a
problem with -mtune=i386 -mrtd.
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-31 4:30 ` dannysmith at users dot sourceforge dot net
@ 2006-02-16 11:31 ` rguenth at gcc dot gnu dot org
2006-02-16 12:29 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 11:31 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2006-02-16 11:31 ` [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd rguenth at gcc dot gnu dot org
@ 2006-02-16 12:29 ` pinskia at gcc dot gnu dot org
2006-02-16 13:22 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-16 12:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from pinskia at gcc dot gnu dot org 2006-02-16 12:29 -------
Milestone should be 4.0.3 pre agreement with GDR and Mark.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-06-12 15:08:24 |2006-02-16 12:29:22
date| |
Target Milestone|3.4.6 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2006-02-16 12:29 ` pinskia at gcc dot gnu dot org
@ 2006-02-16 13:22 ` rguenth at gcc dot gnu dot org
2006-02-16 13:25 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 13:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2006-02-16 13:22 -------
The problem is that we do not honour the override decl for memcpy simply
because
for expand_call ("foo(&i, st);") we end up in emit_block_move_via_libcall which
builds yet another "memcpy" decl via expr.c:init_block_move_fn(). Yay.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2006-02-16 13:22 ` rguenth at gcc dot gnu dot org
@ 2006-02-16 13:25 ` rguenth at gcc dot gnu dot org
2006-02-16 13:34 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 13:25 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
------- Comment #11 from rguenth at gcc dot gnu dot org 2006-02-16 13:25 -------
The problem is we cannot simply use (implicit_)built_in_decl[BUILT_IN_MEMCPY]
here
either because that one is still the internal one, and if annotating our memcpy
decl with __attribute__((__cdecl__)) we warn:
/tmp/t.c:2: warning: conflicting types for built-in function memcpy
and keep our one in (implicit_)built_in_decl[BUILT_IN_MEMCPY], still creating
the user overridden one. But I have no idea how to get our hands on it here.
Still it looks like init_block_move_fn is completely wonky.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2006-02-16 13:25 ` rguenth at gcc dot gnu dot org
@ 2006-02-16 13:34 ` rguenth at gcc dot gnu dot org
2006-02-16 13:36 ` rguenth at gcc dot gnu dot org
2006-02-16 15:50 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 13:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-02-16 13:34 -------
A similar issue is in PR11772 - we fail to account for -mrtd when expanding
calls to builtin functions or functions from libgcc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2006-02-16 13:34 ` rguenth at gcc dot gnu dot org
@ 2006-02-16 13:36 ` rguenth at gcc dot gnu dot org
2006-02-16 15:50 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2006-02-16 13:36 -------
It all looks like a mess wrt -mrtd, I'm not going to touch this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2006-02-16 13:36 ` rguenth at gcc dot gnu dot org
@ 2006-02-16 15:50 ` rguenth at gcc dot gnu dot org
9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-16 15:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2006-02-16 15:50 -------
Reading the documentation for '-mrtd' I'm tempted to close this as invalid.
The
user is changing the ABI while still linking to libraries with a different ABI.
The fact that overriding builtins is not possible is a separate issue, but
that is already covered by 11772 which deals with the case of having a complete
-mrtd toolchain but still builtins are emitted without honouring -mrtd.
At least it's a duplicate, if valid, or invalid.
*** This bug has been marked as a duplicate of 11772 ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22017
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-02-16 15:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-22017-10808@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:52 ` [Bug target/22017] [3.4/4.0/4.1 Regression] Error to pass struct parameter when compile with mingw's gcc.exe using "-march=i386 -mrtd" flags pinskia at gcc dot gnu dot org
2005-10-31 3:45 ` mmitchel at gcc dot gnu dot org
2005-10-31 4:30 ` dannysmith at users dot sourceforge dot net
2006-02-16 11:31 ` [Bug target/22017] [3.4/4.0/4.1/4.2 Regression] Error to pass struct parameter when compile with -mrtd rguenth at gcc dot gnu dot org
2006-02-16 12:29 ` pinskia at gcc dot gnu dot org
2006-02-16 13:22 ` rguenth at gcc dot gnu dot org
2006-02-16 13:25 ` rguenth at gcc dot gnu dot org
2006-02-16 13:34 ` rguenth at gcc dot gnu dot org
2006-02-16 13:36 ` rguenth at gcc dot gnu dot org
2006-02-16 15:50 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).