On 10/28/2015 06:51 PM, Alexander Monakov wrote:
On Wed, 28 Oct 2015, Bernd Schmidt wrote:
I didn't quite get why you felt a need to change this? Your previous mail
didn't seem to include a testcase, just that you get "the desired behaviour".

Hm?  I said,

   There's another issue with handling of types in init_output_initializer.
   Test libgomp.c++/examples-4/declare_target-2.C fails with "libgomp: Can't map
   target variables (size mismatch)".

   Variables varX and varY of struct/class type have size 4, but their 
definition
   in PTX code has size 8 because init_output_initializer changes 'type' to
   ptr_type_node and emits them in size-8 chunks.

Ooops, sorry, somehow that didn't show up. Mailer user interface trouble.

So I did mention the testcase, and the issue: structs with size 4 on host are
emitted with size 8 into PTX code.

Ok, so adjust the if condition for non-integral types - make it false if the size of the struct is smaller than the pointer type.


Bernd

Reply via email to