aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/docs/examples/tut04-toyvm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/jit/docs/examples/tut04-toyvm')
-rw-r--r--gcc/jit/docs/examples/tut04-toyvm/toyvm.c2
-rw-r--r--gcc/jit/docs/examples/tut04-toyvm/toyvm.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/jit/docs/examples/tut04-toyvm/toyvm.c b/gcc/jit/docs/examples/tut04-toyvm/toyvm.c
index 8ea716e..63418f9 100644
--- a/gcc/jit/docs/examples/tut04-toyvm/toyvm.c
+++ b/gcc/jit/docs/examples/tut04-toyvm/toyvm.c
@@ -561,7 +561,7 @@ toyvm_function_compile (toyvm_function *fn)
/* Create a block per operation. */
for (pc = 0; pc < fn->fn_num_ops; pc++)
{
- char buf[16];
+ char buf[100];
sprintf (buf, "instr%i", pc);
state.op_blocks[pc] = gcc_jit_function_new_block (state.fn, buf);
}
diff --git a/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc b/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc
index 7e95501..81c8045 100644
--- a/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc
+++ b/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc
@@ -633,7 +633,7 @@ compilation_state::create_function (const char *funcname)
/* Create a block per operation. */
for (int pc = 0; pc < toyvmfn.fn_num_ops; pc++)
{
- char buf[16];
+ char buf[100];
sprintf (buf, "instr%i", pc);
op_blocks[pc] = fn.new_block (buf);
}