This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
- To: rth at redhat dot com (Richard Henderson)
- Subject: Re: FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 25 Jan 2001 13:17:50 -0500 (EST)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, kenner at vlsi1 dot ultra dot nyu dot edu
> > However, I still come back to the issue of whether it's worth imposing
> > the restriction of only one store.
>
> And I'll come back to the issue of changing "unchanging" memory.
>
> Oh, I certainly agree that it's a conceptually-confusing issue, but the
> cost is significant.
>
> If you have two constant variables that would normally be able to occupy the
> same stack slot, they won't be able to anymore. That probably doesn't matter
> at all in C, is likely more significant in C++ and even moreso in Ada.
I have to wonder if this debate is missing the mark with respect to the
/u flag. This is the function where the original problem was noted:
typedef struct
{
char hours, day, month;
short year;
} T;
T f (void)
{
T virk;
virk = g ();
return virk;
}
As ~r noted, there is no "const" anywhere and yet the stores to virk have
the /u bit set. I changed f to set `virk = g ()' twice and the /u bits
are there for both assignments.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)