All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: linux-sparse@vger.kernel.org
Subject: Re: Output from linearize and LLVM error
Date: Fri, 27 Jan 2017 21:51:30 +0100	[thread overview]
Message-ID: <20170127205130.c4nbpfyoukudygjo@macpro.local> (raw)
In-Reply-To: <20170127190716.e7ux5guhg7sbomar@macpro.local>

On Fri, Jan 27, 2017 at 08:07:17PM +0100, Luc Van Oostenryck wrote:
> I've quickly looked at your test case;
> It seems to be related to a type problem, probably related to
> size_t.(I see:
> 	... call i8* @alloc(i0 4)
> and this 'i0' is very suspect.
> The following also fail because of a type problem but with the pointer.
> Even with replacing the pointers by void pointers it gives:
> 	i64  %0 = call i8* @malloc(i0 4)
> where the i64 is clearly wrong.
> It's possible that this late problem is a side effect of my second
> patch, I'll  investigate this tommorow.

Another problem you will have is with cast related void pointers.
For casts, sparse consider void pointers like an integer type
(because void pointers can't be used as such, they need to be casted
to a real pointer type to do something useful with them).
This means that a cast to a void pointer will produce an OP_CAST and
not an OP_PTRCAST.
And I guess this will be a problem for sparse-llvm.

Luc

      parent reply	other threads:[~2017-01-27 21:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 14:00 Output from linearize and LLVM error Dibyendu Majumdar
2017-01-27 14:29 ` Dibyendu Majumdar
2017-01-27 15:09 ` Dibyendu Majumdar
2017-01-27 15:59 ` Van Oostenryck Luc
2017-01-27 17:11   ` Dibyendu Majumdar
2017-01-27 18:18     ` Dibyendu Majumdar
2017-01-27 19:07       ` Luc Van Oostenryck
2017-01-27 19:22         ` Dibyendu Majumdar
2017-01-27 20:43         ` Luc Van Oostenryck
2017-01-29  0:26           ` Dibyendu Majumdar
2017-01-29  9:15             ` Luc Van Oostenryck
2017-01-27 20:51         ` Luc Van Oostenryck [this message]

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=20170127205130.c4nbpfyoukudygjo@macpro.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mobile@majumdar.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.