On Fri, May 25, 2018 at 8:05 PM Paul Koning <paulkon...@comcast.net> wrote:
> 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. It means there's no relocation that can express the result of 's.f - &s.b' and the frontend doesn't consider this a constant expression (likely because of the conversion). > 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