public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3
@ 2003-08-27 18:28 mikulas at artax dot karlin dot mff dot cuni dot cz
2003-08-27 19:55 ` [Bug other/12081] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: mikulas at artax dot karlin dot mff dot cuni dot cz @ 2003-08-27 18:28 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
Summary: Gcc can't be compiled with -mregparm=3
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikulas at artax dot karlin dot mff dot cuni dot cz
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-pc-linux-gnu
GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu
When GCC is compiled with -mregparm=3 (system libraries are compiled with that flag too), it doesn't work. The problem is this line (maybe there are more buggy declarations, but this is the first one I hit):
typedef rtx (*insn_gen_fn) PARAMS ((rtx, ...));
Later, two-parameter functions are retyped to insn_gen_fn and called. The caller pushes arguments to stack, the calee expects them in registers.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug other/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
@ 2003-08-27 19:55 ` pinskia at gcc dot gnu dot org
2003-12-26 22:55 ` [Bug target/12081] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-27 19:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |other
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
2003-08-27 19:55 ` [Bug other/12081] " pinskia at gcc dot gnu dot org
@ 2003-12-26 22:55 ` pinskia at gcc dot gnu dot org
2004-01-17 23:53 ` dhazeghi at yahoo dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-26 22:55 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|other |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
2003-08-27 19:55 ` [Bug other/12081] " pinskia at gcc dot gnu dot org
2003-12-26 22:55 ` [Bug target/12081] " pinskia at gcc dot gnu dot org
@ 2004-01-17 23:53 ` dhazeghi at yahoo dot com
2004-01-18 1:39 ` mikulas at artax dot karlin dot mff dot cuni dot cz
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-17 23:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2004-01-17 23:53 -------
Sorry that this report seems to have slipped through the cracks. What exactly do you mean by
"doesn't work"? Does it produce buggy code, or just crash, or what? Also, I don't suppose you
could come up with a small, self-contained testcase? Thanks.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
` (2 preceding siblings ...)
2004-01-17 23:53 ` dhazeghi at yahoo dot com
@ 2004-01-18 1:39 ` mikulas at artax dot karlin dot mff dot cuni dot cz
2004-01-18 1:42 ` mikulas at artax dot karlin dot mff dot cuni dot cz
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mikulas at artax dot karlin dot mff dot cuni dot cz @ 2004-01-18 1:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mikulas at artax dot karlin dot mff dot cuni dot cz 2004-01-18 01:39 -------
Gcc is code written the wrong way
Let's have these declarations:
void f(int a, int b);
void (*g)(int a, ...);
and this code:
g = (void (*)(int, ...))f;
f(1,2);
--- the code is obviously wrong in C and might not work. It works on most
architectures, but it doesn't on x86 with regparm 3 or -mrtd.
Similar code exists in gcc in insn-output.c (there is:
"(insn_gen_fn)gen_cmpqi_ext_3_insn" and many more like this).
I "fixed" it for myself by adding attribute regparm(0),cdecl to these
functions, but it is not correct fix. Correct fix would be to not use these
kind of casts.
I can't show you how to reproduce the bug, because you don't have environment
where regparm(3) is default calling convention. I do have.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
` (3 preceding siblings ...)
2004-01-18 1:39 ` mikulas at artax dot karlin dot mff dot cuni dot cz
@ 2004-01-18 1:42 ` mikulas at artax dot karlin dot mff dot cuni dot cz
2004-01-18 1:54 ` dhazeghi at yahoo dot com
2004-10-28 12:09 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mikulas at artax dot karlin dot mff dot cuni dot cz @ 2004-01-18 1:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mikulas at artax dot karlin dot mff dot cuni dot cz 2004-01-18 01:42 -------
In example I wrote there should be
g(1,2)
instead of
f(1,2)
f(1,2) is correct, but g(1,2) will crash with -mrtd or pass invalid arguments
with -mregparm=3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
` (4 preceding siblings ...)
2004-01-18 1:42 ` mikulas at artax dot karlin dot mff dot cuni dot cz
@ 2004-01-18 1:54 ` dhazeghi at yahoo dot com
2004-10-28 12:09 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-18 1:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dhazeghi at yahoo dot com 2004-01-18 01:54 -------
I don't necessarily disagree. However without a testcase, the chances of somebody looking into/
fixing this aren't too good (I certainly don't have the expertise).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/12081] Gcc can't be compiled with -mregparm=3
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
` (5 preceding siblings ...)
2004-01-18 1:54 ` dhazeghi at yahoo dot com
@ 2004-10-28 12:09 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-28 12:09 -------
*** Bug 18193 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rpedersen at atmel dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12081
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-28 12:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27 18:28 [Bug middle-end/12081] New: Gcc can't be compiled with -mregparm=3 mikulas at artax dot karlin dot mff dot cuni dot cz
2003-08-27 19:55 ` [Bug other/12081] " pinskia at gcc dot gnu dot org
2003-12-26 22:55 ` [Bug target/12081] " pinskia at gcc dot gnu dot org
2004-01-17 23:53 ` dhazeghi at yahoo dot com
2004-01-18 1:39 ` mikulas at artax dot karlin dot mff dot cuni dot cz
2004-01-18 1:42 ` mikulas at artax dot karlin dot mff dot cuni dot cz
2004-01-18 1:54 ` dhazeghi at yahoo dot com
2004-10-28 12:09 ` pinskia 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).