jit: Add checking for dereference of void *
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 8 Jan 2015 01:08:19 +0000 (01:08 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Thu, 8 Jan 2015 01:08:19 +0000 (01:08 +0000)
commitc211cd236cb0b4cda31657cd96668aace2e8e4ac
tree025103f7b525c54f3336316a1945f7c1106cf5c0
parent5efe46fdc75546d4279d355b5e79280901238b09
jit: Add checking for dereference of void *

gcc/jit/ChangeLog:
* jit-recording.h (gcc::jit::recording::type::is_void): New
virtual function.
(gcc::jit::recording::memento_of_get_type::is_void): New
function, overriding default implementation.
* libgccjit.c (gcc_jit_rvalue_dereference): Verify that
the underlying type is not "void".

gcc/testsuite/ChangeLog:
* jit.dg/test-error-dereferencing-void-ptr.c: New test case.

From-SVN: r219333
gcc/jit/ChangeLog
gcc/jit/jit-recording.h
gcc/jit/libgccjit.c
gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/test-error-dereferencing-void-ptr.c [new file with mode: 0644]