From: Richard Biener <richard.guenther@gmail.com>
To: paulkoning@comcast.net
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: not computable at load time
Date: Mon, 28 May 2018 09:03:00 -0000 [thread overview]
Message-ID: <CAFiYyc13yZQzJK6+K29Uxn8f8g7_Zk6V7HgVt9mkMRo4Cqy-RA@mail.gmail.com> (raw)
In-Reply-To: <1A72BAC7-9DFB-4F98-9191-DDE896021A41@comcast.net>
On Fri, May 25, 2018 at 8:05 PM Paul Koning <paulkoning@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
next prev parent reply other threads:[~2018-05-28 9:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 18:05 Paul Koning
2018-05-28 9:03 ` Richard Biener [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFiYyc13yZQzJK6+K29Uxn8f8g7_Zk6V7HgVt9mkMRo4Cqy-RA@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=paulkoning@comcast.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).