public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* not computable at load time
@ 2018-05-25 18:05 Paul Koning
  2018-05-28  9:03 ` Richard Biener
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Koning @ 2018-05-25 18:05 UTC (permalink / raw)
  To: GCC Development

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-05-31 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 18:05 not computable at load time Paul Koning
2018-05-28  9:03 ` Richard Biener
2018-05-28 15:53   ` Andreas Schwab
2018-05-28 16:03     ` Richard Biener
2018-05-28 18:34       ` Paul Koning
2018-05-29  9:49         ` Richard Biener
2018-05-29 13:35           ` Paul Koning
2018-05-29 13:53           ` Jeff Law
2018-05-31 16:26           ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).