Skip to content

Commit 0081ca6

Browse files
committed
libgccjit: Fix UB in gcc_jit_context_new_array_constructor
1 parent 8cdf7b8 commit 0081ca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/jit/libgccjit.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,7 @@ gcc_jit_context_new_array_constructor (gcc_jit_context *ctxt,
17321732
"'values' NULL with non-zero 'num_values'");
17331733

17341734
gcc::jit::recording::array_type *arr_type =
1735-
reinterpret_cast<gcc::jit::recording::array_type*>(type);
1735+
type->dyn_cast_array_type ();
17361736
size_t n_el = arr_type->num_elements ();
17371737

17381738
RETURN_NULL_IF_FAIL_PRINTF2 (

0 commit comments

Comments
 (0)