9 create_code (gcc_jit_context
*ctxt
, void *user_data
)
11 gcc_jit_type
*void_type
=
12 gcc_jit_context_get_type (ctxt
, GCC_JIT_TYPE_VOID
);
14 /* Trigger an API error by passing a bad type. */
15 (void)gcc_jit_type_get_vector (void_type
, 4);
19 verify_code (gcc_jit_context
*ctxt
, gcc_jit_result
*result
)
21 /* Ensure that the bad API usage prevents the API giving a bogus
23 CHECK_VALUE (result
, NULL
);
25 /* Verify that the correct error message was emitted. */
26 CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt
),
27 ("gcc_jit_type_get_vector:"
28 " type is not integral or floating point: void"));