This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
not computable at load time
- From: Paul Koning <paulkoning at comcast dot net>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 25 May 2018 14:05:40 -0400
- Subject: not computable at load time
One of my testsuite failures for the pdp11 back end is gcc.c-torture/compile/930326-1.c which is:
struct
{
char a, b, f[3];
} s;
long i = s.f-&s.b;
It fails with "error: initializer element is not computable at load time".
I don't understand why because it seems to be a perfectly reasonable
compile time constant; "load time" doesn't enter into the picture that
I can see.
If I replace "long" by "short" it works correctly. So presumably it has
something to do with the fact that Pmode == HImode. But how that translates
into this failure I don't know.
paul