public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15302] New: gcc not consistent for passing structures with complex in them
@ 2004-05-05 19:43 hjl at lucon dot org
2004-05-13 12:03 ` [Bug target/15302] " hjl at lucon dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: hjl at lucon dot org @ 2004-05-05 19:43 UTC (permalink / raw)
To: gcc-bugs
According to ABI structures are classified based on 8bytes recrsively to
determine if they are passed in register or memory. The 2 examples below pass
similiar structures (according to ABI complex should be treated as struct with
2 floats) but gcc uses memory in one case (call to bar1) and registers in the
other case (call to foo1)
#include "complex.h"
struct st{
int s1;
float complex x;
int s2;
} st1;
bar()
{
bar1(st1);
}
/**********************
LCFI2:
movq st1(%rip), %rax
movq %rax, (%rsp)
movq st1+8(%rip), %rax
movq %rax, 8(%rsp)
movl $0, %eax
call bar1
**********************/
typedef struct { float r, i; } _complex;
struct stc{
int s1;
_complex x;
int s2;
}st2;
foo()
{
foo1(st2);
}
/**********************
.LCFI4:
movq st2(%rip), %rdi
movq st2+8(%rip), %rsi
movl $0, %eax
call foo1
**********************/
--
Summary: gcc not consistent for passing structures with complex
in them
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Keywords: ABI
Severity: critical
Priority: P2
Component: target
AssignedTo: jh at suse dot cz
ReportedBy: hjl at lucon dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-pc-linux-gnu
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15302] gcc not consistent for passing structures with complex in them
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
@ 2004-05-13 12:03 ` hjl at lucon dot org
2004-05-18 17:11 ` hjl at lucon dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl at lucon dot org @ 2004-05-13 12:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2004-05-13 00:51 -------
A testcase is posted at
http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00486.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15302] gcc not consistent for passing structures with complex in them
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
2004-05-13 12:03 ` [Bug target/15302] " hjl at lucon dot org
@ 2004-05-18 17:11 ` hjl at lucon dot org
2004-05-18 18:42 ` [Bug target/15302] [3.3/3.4 only] " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: hjl at lucon dot org @ 2004-05-18 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2004-05-18 03:53 -------
Since the same checkin on mainline fixed the bug and bug 15301, I mark this
bug as the duplicate of bug 15301.
*** This bug has been marked as a duplicate of 15301 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15302] [3.3/3.4 only] gcc not consistent for passing structures with complex in them
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
2004-05-13 12:03 ` [Bug target/15302] " hjl at lucon dot org
2004-05-18 17:11 ` hjl at lucon dot org
@ 2004-05-18 18:42 ` cvs-commit at gcc dot gnu dot org
2004-05-18 19:01 ` cvs-commit at gcc dot gnu dot org
2004-05-22 1:42 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-18 18:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-18 05:08 -------
Subject: Bug 15302
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: hjl@gcc.gnu.org 2004-05-18 05:07:58
Modified files:
gcc : ChangeLog
gcc/config/i386: i386.c
Log message:
2004-05-17 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
PR debug/15301
PR debug/15302
2004-05-17 Jan Hubicka <jh@suse.cz>
* i386.c (construct_container): Do not produce BLKmode registers.
(classify_argument): Properly compute alignment of complex types.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.981&r2=1.16114.2.982
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.495.2.35&r2=1.495.2.36
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15302] [3.3/3.4 only] gcc not consistent for passing structures with complex in them
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
` (2 preceding siblings ...)
2004-05-18 18:42 ` [Bug target/15302] [3.3/3.4 only] " cvs-commit at gcc dot gnu dot org
@ 2004-05-18 19:01 ` cvs-commit at gcc dot gnu dot org
2004-05-22 1:42 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-18 19:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-18 06:14 -------
Subject: Bug 15302
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: hjl@gcc.gnu.org 2004-05-18 06:14:23
Modified files:
gcc : ChangeLog
gcc/config/i386: i386.c
Log message:
2004-05-17 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
PR target/15301
PR target/15302
2004-05-17 Jan Hubicka <jh@suse.cz>
* i386.c (construct_container): Do not produce BLKmode registers.
(classify_argument): Properly compute alignment of complex types.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.442&r2=2.2326.2.443
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.635.2.10&r2=1.635.2.11
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15302] [3.3/3.4 only] gcc not consistent for passing structures with complex in them
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
` (3 preceding siblings ...)
2004-05-18 19:01 ` cvs-commit at gcc dot gnu dot org
@ 2004-05-22 1:42 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-05-22 1:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-05-21 00:11 -------
Subject: Bug 15302
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: hjl@gcc.gnu.org 2004-05-21 00:11:07
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg/compat: struct-complex-1.h
struct-complex-1_main.c
struct-complex-1_x.c
struct-complex-1_y.c
Log message:
2004-05-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/15302
* gcc.dg/compat/struct-complex-1.h: New file.
* gcc.dg/compat/struct-complex-1_main.c: Likewise.
* gcc.dg/compat/struct-complex-1_x.c: Likewise.
* gcc.dg/compat/struct-complex-1_y.c: Likewise.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3765&r2=1.3766
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/struct-complex-1.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/struct-complex-1_main.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/struct-complex-1_x.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/compat/struct-complex-1_y.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15302
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-05-21 0:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-05 19:43 [Bug target/15302] New: gcc not consistent for passing structures with complex in them hjl at lucon dot org
2004-05-13 12:03 ` [Bug target/15302] " hjl at lucon dot org
2004-05-18 17:11 ` hjl at lucon dot org
2004-05-18 18:42 ` [Bug target/15302] [3.3/3.4 only] " cvs-commit at gcc dot gnu dot org
2004-05-18 19:01 ` cvs-commit at gcc dot gnu dot org
2004-05-22 1:42 ` cvs-commit 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).