gcc/testsuite/jit.dg/test-error-gcc_jit_context_get_builtin_function-unknown-builtin.c
raw| 1 | #include <stdlib.h> |
| 2 | #include <stdio.h> |
| 3 | |
| 4 | #include "libgccjit.h" |
| 5 | |
| 6 | #include "harness.h" |
| 7 | |
| 8 | void |
| 9 | create_code (gcc_jit_context *ctxt, void *user_data) |
| 10 | { |
| 11 | gcc_jit_context_get_builtin_function (ctxt, |
| 12 | "this_is_not_a_builtin"); |
| 13 | } |
| 14 | |
| 15 | void |
| 16 | verify_code (gcc_jit_context *ctxt, gcc_jit_result *result) |
| 17 | { |
| 18 | CHECK_VALUE (result, NULL); |
| 19 | |
| 20 | CHECK_STRING_VALUE (gcc_jit_context_get_first_error (ctxt), |
| 21 | "builtin \"this_is_not_a_builtin\" not found"); |
| 22 | } |