9 create_code (gcc_jit_context
*ctxt
, void *user_data
)
11 gcc_jit_type
*int_type
=
12 gcc_jit_context_get_type (ctxt
, GCC_JIT_TYPE_INT
);
14 /* Trigger an API error by passing a bad alignment. */
15 (void)gcc_jit_type_get_aligned (int_type
, 7);
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_aligned:"
28 " alignment not a power of two: 7"));