FAIL: gcc.c-torture/execute/950628-1.c execution, -O1
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu Jan 25 10:18:00 GMT 2001
> > 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)
More information about the Gcc-bugs
mailing list