From: Rich Felker <dalias@libc.org>
To: Alexander Monakov <amonakov@ispras.ru>
Cc: Jeff Law <law@redhat.com>,
Richard Biener <richard.guenther@gmail.com>,
Jan Hubicka <hubicka@ucw.cz>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] proposed fix for bug # 61144
Date: Sat, 14 Jun 2014 21:24:00 -0000 [thread overview]
Message-ID: <20140614212413.GN179@brightrain.aerifal.cx> (raw)
In-Reply-To: <alpine.LNX.2.00.1406091533270.2730@monopod.intra.ispras.ru>
Ping. Do you have any feedback on my tests? What is the next step?
Rich
On Mon, Jun 09, 2014 at 03:40:44PM +0400, Alexander Monakov wrote:
>
>
> On Fri, 6 Jun 2014, Rich Felker wrote:
>
> > On Fri, May 23, 2014 at 12:26:18PM -0600, Jeff Law wrote:
> > > On 05/21/14 21:59, Rich Felker wrote:
> > > >On Wed, May 21, 2014 at 11:17:53AM +0200, Richard Biener wrote:
> > > >>On Wed, May 21, 2014 at 3:59 AM, Rich Felker <dalias@libc.org> wrote:
> > > >>>Bug # 61144 is a regression in 4.9.0 that breaks building of musl libc
> > > >>>due to aggressive and semantically-incorrect constant folding of weak
> > > >>>aliases. The attached patch seems to fix the issue. A weak alias
> > > >>>should never be a candidate for constant folding because it may always
> > > >>>be replaced by a strong definition from another translation unit.
> > > >>>
> > > >>>For details see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61144
> > > >>>
> > > >>>I do not have a copyright assignment on file but this patch should be
> > > >>>sufficiently trivial not to require it.
> > > >>
> > > >>Please add a testcase. Also I wonder why it isn't better to generalize
> > > >
> > > >How should a testcase be done? On the PR there's a testcase that shows
> > > >the problem in the generated code, but no automated check for it.
> > > >Testing this is actually a bit of a pain unless you're allowed to run
> > > >the generated program.
> > > You can run the test program. Have it exit (0) on success, abort ()
> > > on failure if at all possible. Then drop the test source file into
> > > gcc/testsuite/gcc.c-torture/execute/pr61144.c
> >
> > The test needs to be two translation units linked together: one with
> > a weak definition of the object as 0, and the other with a strong
> > definition. The test should show the weak value being used rather than
> > the strong one. But I'm not sure how this should be integrated with
> > the build process.
>
> Please have a look at gcc/testsuite/gcc.dg/special/wkali-2{,a,b}.c. This is a
> three-TU test for weak aliases, so you should be able to very easily adjust it
> for this bug.
>
> Thanks.
> Alexander
next prev parent reply other threads:[~2014-06-14 21:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 1:59 Rich Felker
2014-05-21 9:17 ` Richard Biener
2014-05-22 3:59 ` Rich Felker
2014-05-23 18:26 ` Jeff Law
2014-06-06 17:14 ` Rich Felker
2014-06-09 11:41 ` Alexander Monakov
2014-06-09 18:46 ` Rich Felker
2014-06-16 9:06 ` Jan Hubicka
2014-06-16 13:38 ` Rich Felker
2014-06-16 16:05 ` Jan Hubicka
2014-06-16 16:35 ` Rich Felker
2014-06-14 21:24 ` Rich Felker [this message]
2014-06-16 8:56 ` Jan Hubicka
2014-07-22 17:18 ` Alexander Monakov
2014-07-22 17:23 ` Alexander Monakov
2014-07-22 17:30 ` Rich Felker
2014-07-23 9:06 ` Florian Weimer
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=20140614212413.GN179@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=amonakov@ispras.ru \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=law@redhat.com \
--cc=richard.guenther@gmail.com \
/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).