linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Randy Dunlap <rdunlap@xenotime.net>, linux-sparse@vger.kernel.org
Subject: Re: more "unreplaced symbol" warnings
Date: Wed, 1 Jun 2011 00:41:02 -0700	[thread overview]
Message-ID: <BANLkTingWZfcrf3iKZw8_vMwECm4jYnNgQ@mail.gmail.com> (raw)
In-Reply-To: <20110531185831.GN11521@ZenIV.linux.org.uk>

On Tue, May 31, 2011 at 11:58 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> Here's what is actually triggering that crap.  Have fun...

Here is a slightly simpler version. However I haven't figure out how this happen
yet. Here is what I know so far:

1) It happens with two nested inline within one function.
    Inline bar() once the bug does not trigger.
2) It seems have some thing to do with dead statement call to inline functions.

I am still scratching my head on that inline/uninline business. My guess is that
there is some where we short circuit the inline copy due to dead
statement but some
other part of the code does not agree.

Chris

#define __u16 unsigned short
int foo(__u16 n);
static inline __u16 f(__u16 val)
{
        return val;
}

static inline unsigned int bar(__u16 n)
{
       switch (n) {
       case (1 ? 1 : f(1)):
               return 4;
       }
}

int foo(__u16 n)
{
	bar(n);
	bar(n);
	return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-06-01  7:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-29 21:54 more "unreplaced symbol" warnings Randy Dunlap
2011-05-31 17:39 ` Christopher Li
2011-05-31 18:30   ` Al Viro
2011-05-31 18:58   ` Al Viro
2011-05-31 19:05     ` Christopher Li
2011-06-01  7:41     ` Christopher Li [this message]
2011-08-15 19:34       ` Christopher Li

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=BANLkTingWZfcrf3iKZw8_vMwECm4jYnNgQ@mail.gmail.com \
    --to=sparse@chrisli.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=viro@zeniv.linux.org.uk \
    /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 NNTP newsgroup(s).