gpu: properly handle dereferencing of pointers to struct
commita5c8ebf3997b0b0453899184c1ecfeec89ef1d4c
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Nov 2014 11:25:09 +0000 (6 12:25 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Nov 2014 11:25:09 +0000 (6 12:25 +0100)
tree73d07c690604c554e500f576860b00eb2f6c32ba
parent5af4964443458dc46f6a8141fce29782dd880c46
gpu: properly handle dereferencing of pointers to struct

Code for handling this case was added in 89cf296 (add support for arrays
of structs, Mon Aug 12 23:14:50 2013 +0200), but it was incomplete,
causing it to fail to properly detect member accesses.
Adjust dereference to use the same detection mechanism that
is used in gpu_local_array_info_linearize_index.

Reported-by: Michael Kruse <reply@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
gpu.c
tests/struct2.c [new file with mode: 0644]