qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Improve alias attribute check


From: Richard Henderson
Subject: Re: [PATCH] configure: Improve alias attribute check
Date: Sat, 20 Mar 2021 16:33:55 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/20/21 11:52 AM, Paolo Bonzini wrote:
+int main(void)
+{
+    return read_y();
+}

I think this should be "read_y() == 1 ? 0 : 1".

As a testcase returning 0 on success, yes.

I can reproduce it with -flto -O2 but not without -flto, do you agree?

Agreed.  Replicated with a random recent gcc 11 snapshot.
This is really annoying of lto.  It's clear something needs to change though.

Perhaps we can obtain the same optimization by wrapping reads of the page size in an inline __attribute__((const)) function.  Richard, what do you think?

I'll give it a shot and see what happens.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]