linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-sparse@vger.kernel.org
Subject: sparse-llvm: pseudo_to_value: Assertion `sym->ident == ((void *)0)' failed
Date: Mon, 13 Feb 2012 18:17:39 +1100	[thread overview]
Message-ID: <1329117459.2534.11.camel@pasglop> (raw)

Hi folks !

Haven't had a chance to investigate further today (and probably won't)
so I'm shooting this here just in case ;-)

I was tracking down what looks like an LLVM bug with sign extension from
1-bit integers while playing with llvmpipe (gallium llvm backend) and
out of curiosity decided to look at what sparse generated when
sign-extending a bool :-)

So I added to my earlier hello.c some statements to that effect, and
trying to compile it results in:

sparse-llvm.c:311: pseudo_to_value: Assertion `sym->ident == ((void *)0)' failed.

The new hello.c is:

#include <stdio.h>
#include <stdbool.h>

int main(void)
{
        int i;
        double f1,f2;
        bool eq;

        printf("Hello World !\n");

        for (i = 0; i < 10; i ++)
                printf("I can count to %d\n", i);

        printf("f1=");
        scanf("%f",&f1);
        printf("f2=");
        scanf("%f",&f2);

        eq = f1 == f2;

        printf("f1==f2: %d\n", (int)eq);
        return 0;
}

Cheers,
Ben.



             reply	other threads:[~2012-02-13  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13  7:17 Benjamin Herrenschmidt [this message]
2012-02-13 13:34 ` sparse-llvm: pseudo_to_value: Assertion `sym->ident == ((void *)0)' failed Pekka Enberg

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=1329117459.2534.11.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-sparse@vger.kernel.org \
    /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).