public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
@ 2004-06-12 22:58 danglin at gcc dot gnu dot org
2004-06-13 8:51 ` [Bug target/15968] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-06-12 22:58 UTC (permalink / raw)
To: gcc-bugs
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O0
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O1
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O2
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O3 -fomit-frame-pointer -
funroll-loops
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O3 -fomit-frame-pointer -
funroll-all-loops -finline-functions
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -O3 -g
FAIL: gcc.c-torture/execute/va-arg-22.c execution, -Os
See < http://gcc.gnu.org/ml/gcc-testresults/2004-06/msg00467.html>.
I'm not sure whether this was intentional or not but va-arg-22.c passes
an empty struct D(0). If I change this typedef from
#define D(N) typedef struct { char x[N]; } A##N;
to
#define D(N) typedef struct { char x[N+1]; } A##N;
the test passes.
We pass empty structs by reference. I think va_arg
#define D(N) \
a##N = va_arg (ap, typeof (a##N)); \
for (i = 0; i < N; i++) \
bar (N, a##N.x[i]);
D(0) D(1) D(2) D(3) D(4) D(5) D(6) D(7)
...
in foo is broken for a0, when a0 is an empty struct.
--
Summary: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails
on hppa64-hp-hpux11.11
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danglin at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,jakub at redhat dot
com,jason at redhat dot com
GCC build triplet: hppa64-hp-hpux11.11
GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15968] [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
@ 2004-06-13 8:51 ` pinskia at gcc dot gnu dot org
2004-06-14 16:00 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-13 8:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-13 08:51 -------
No this is testing if you can pass an empty stuct too so that is deliberate.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |target
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15968] [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
2004-06-13 8:51 ` [Bug target/15968] " pinskia at gcc dot gnu dot org
@ 2004-06-14 16:00 ` jason at gcc dot gnu dot org
2004-06-15 0:16 ` dave at hiauly1 dot hia dot nrc dot ca
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu dot org @ 2004-06-14 16:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jason at gcc dot gnu dot org 2004-06-14 16:00 -------
Want to take a crack at implementing TARGET_GIMPLIFY_VA_ARG_EXPR, to see if that
fixes it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15968] [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
2004-06-13 8:51 ` [Bug target/15968] " pinskia at gcc dot gnu dot org
2004-06-14 16:00 ` jason at gcc dot gnu dot org
@ 2004-06-15 0:16 ` dave at hiauly1 dot hia dot nrc dot ca
2004-06-15 0:33 ` pinskia at gcc dot gnu dot org
2004-08-03 22:17 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2004-06-15 0:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2004-06-15 00:16 -------
Subject: Re: [3.5 Regression] gcc.c-torture/execute/va-arg-
> Want to take a crack at implementing TARGET_GIMPLIFY_VA_ARG_EXPR, to see if
> that
> fixes it?
I'm working on a small contract at the moment but after it completes
this is definitely something that should be looked at, even if it's
only for the learning experience.
I think the current problem is with va_start. I see the following
error message with the testscase and a simplified version xxx.c:
# ../xgcc -B../ -O1 -s -o xyz.s xxx.c
xxx.c: In function `foo':
xxx.c:37: warning: second parameter of `va_start' not last named argument
xxx.c contains just D(0) and D(1) from the original test. Looking at
the assembler output, I see that we are loading the high order byte
from the argument passed for D(0) instead of that for D(1).
I still don't know why this is happening. The same code works in 3.3
and 3.4, and for some reason nearly identical code seems to work on the
32-bit port. In both cases, empty structs are passed by reference.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15968] [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-06-15 0:16 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2004-06-15 0:33 ` pinskia at gcc dot gnu dot org
2004-08-03 22:17 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-15 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-15 00:33 -------
Actually I know what is happeing here is that the variable is being marked as addressable so it is being
gimplified wrong for va_start, see PR 15885.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-15 00:33:01
date| |
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/15968] [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-06-15 0:33 ` pinskia at gcc dot gnu dot org
@ 2004-08-03 22:17 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-03 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-03 22:17 -------
I see that this passes now: <http://gcc.gnu.org/ml/gcc-testresults/2004-07/msg01349.html>.
Closing as fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15968
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-08-03 22:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-12 22:58 [Bug c/15968] New: [3.5 Regression] gcc.c-torture/execute/va-arg-22.c fails on hppa64-hp-hpux11.11 danglin at gcc dot gnu dot org
2004-06-13 8:51 ` [Bug target/15968] " pinskia at gcc dot gnu dot org
2004-06-14 16:00 ` jason at gcc dot gnu dot org
2004-06-15 0:16 ` dave at hiauly1 dot hia dot nrc dot ca
2004-06-15 0:33 ` pinskia at gcc dot gnu dot org
2004-08-03 22:17 ` 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).