Change to readonly conflict handling
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Sun Sep 17 15:52:00 GMT 2000
How is the Ada frontend creating a non-unchanging write to a readonly
field?
With a constructor, as an initializing expression.
Here's something similar in C, though it generates a warning:
struct foo {const int a; int b;};
void
sub1 (struct foo *p, struct foo *q)
{
*p = (struct foo) {1, 2};
*q = *p;
}
If you look at the RTL, you'll see that one word of *p is being stored with /u
and loaded without it. (They also have different alias sets, but that's
probably something I did in my last change and will fix momentarily.)
More information about the Gcc-patches
mailing list