public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/37316] [4.4 Regression] Small structs are not passed correctly on hppa64-*-*
Date: Sat, 25 Oct 2008 01:13:00 -0000 [thread overview]
Message-ID: <20081025011150.939.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37316-276@http.gcc.gnu.org/bugzilla/>
------- Comment #16 from dave at hiauly1 dot hia dot nrc dot ca 2008-10-25 01:11 -------
Subject: Re: [4.4 Regression] Small structs are not passed correctly on
hppa64-*-*
> Can you please look at the testcases why they fail (what is passed differently)
> and try to minimize them as much as possible? Finding a bug in RTL or assembly
> without knowing what you are looking for is certainly harder than when you have
> a debugger and can see what is passed differently...
The following is a simplification of the first failure in
gcc.dg/compat/scalar-by-value-4.
_Complex char g01cc;
void
initcc (_Complex char *p, _Complex char v)
{
*p = v + (0 + 1 * __extension__ 1i);
}
void
checkcc (_Complex char x, _Complex char v)
{
if (x != v + (0 + 1 * __extension__ 1i)) abort ();
}
void
checkgcc (void)
{
checkcc (g01cc, 1);
}
int
main ()
{
initcc (&g01cc, 1);
checkgcc ();
return 0;
}
The first argument passed to checkcc is wrong. The value passed in
r26 (the first argument register) is 1. 4.3.2 passed 0x101. The value
passed for v is 0x100 in both versions.
Now, as I understand the 64-bit runtime specification for hppa64-hpux,
neither GCC version is correct. However, I don't believe HP cc or aCC
supports integer complex values, so I can't check for consistency.
My understanding is that small structs and aggregates should be left
justified. This unfortunately differs from the right justification
used on most big endian targets. I believe tha correct value for
x and v should be 0x0101000000000000 and 0x010000000000000, respectively.
I have checked that the struct { byte x; byte y } is correctly left
justified.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37316
next prev parent reply other threads:[~2008-10-25 1:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 18:23 [Bug middle-end/37316] New: " danglin at gcc dot gnu dot org
2008-09-01 18:29 ` [Bug middle-end/37316] " danglin at gcc dot gnu dot org
2008-09-01 20:20 ` danglin at gcc dot gnu dot org
2008-09-02 11:43 ` rguenth at gcc dot gnu dot org
2008-09-06 1:24 ` danglin at gcc dot gnu dot org
2008-09-06 1:45 ` dave at hiauly1 dot hia dot nrc dot ca
2008-09-09 3:17 ` drow at gcc dot gnu dot org
2008-10-22 3:04 ` mmitchel at gcc dot gnu dot org
2008-10-22 14:30 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-22 15:38 ` jakub at gcc dot gnu dot org
2008-10-22 15:50 ` drow at gcc dot gnu dot org
2008-10-22 19:02 ` jakub at gcc dot gnu dot org
2008-10-23 13:26 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-23 16:05 ` danglin at gcc dot gnu dot org
2008-10-23 16:06 ` danglin at gcc dot gnu dot org
2008-10-23 16:16 ` danglin at gcc dot gnu dot org
2008-10-23 20:26 ` jakub at gcc dot gnu dot org
2008-10-23 20:48 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-25 1:13 ` dave at hiauly1 dot hia dot nrc dot ca [this message]
2008-10-25 10:48 ` jakub at gcc dot gnu dot org
2008-10-25 16:55 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-25 17:50 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-27 1:18 ` danglin at gcc dot gnu dot org
2008-10-27 7:09 ` jakub at gcc dot gnu dot org
2008-10-27 9:54 ` ebotcazou at gcc dot gnu dot org
2008-10-27 13:51 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-27 14:20 ` jakub at gcc dot gnu dot org
2008-10-27 15:26 ` danglin at gcc dot gnu dot org
2008-11-22 8:29 ` jakub at gcc dot gnu dot org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081025011150.939.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).