From patchwork Fri Nov 12 13:32:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 47524 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B8CC3857C44 for ; Fri, 12 Nov 2021 13:33:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B8CC3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636723992; bh=bzLHTqRGBHmGNqmidoiv3hZ5q5+P14OzxJhjY9mFj+s=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=M6NC90I3qHUhoe3XOsBknxiPOpaZ0cCQiG/Nf9J8CCmTfuHlMy+xqIA0QjkUyJqqO 0/tNA6EjgjOotIbIOQbUa3W5jLmWHDdkJR7DL4+o+TDkS8ybpONTns0Zcc5B3Io8wJ lLCZTIiuZkE7vdozq2XWo990fD/6y7nKGYccV2mQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 089F1385840F for ; Fri, 12 Nov 2021 13:32:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 089F1385840F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-318-S6x0y0CTPai7SoL2feeEpQ-1; Fri, 12 Nov 2021 08:32:42 -0500 X-MC-Unique: S6x0y0CTPai7SoL2feeEpQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F04B18125C9 for ; Fri, 12 Nov 2021 13:32:41 +0000 (UTC) Received: from t14s.localdomain.com (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 450E560C4A; Fri, 12 Nov 2021 13:32:35 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [committed] jit: fix -Werror=format-overflow= in testsuite [PR103199] Date: Fri, 12 Nov 2021 08:32:33 -0500 Message-Id: <20211112133233.1969299-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Successfully regression-tested on x86_64-pc-linux-gnu, improves jit.sum: FAIL: 2->0 (-2) PASS: 12043->12073 (+30) Pushed to trunk as r12-5196-gaa1fd30df56d752e3d5a81af409875a1f1e3e327. gcc/jit/ChangeLog: PR jit/103199 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Increase size of buffer. * docs/examples/tut04-toyvm/toyvm.cc (compilation_state::create_function): Likewise. Signed-off-by: David Malcolm --- gcc/jit/docs/examples/tut04-toyvm/toyvm.c | 2 +- gcc/jit/docs/examples/tut04-toyvm/toyvm.cc | 2 +- 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 8ea716e2d0a..63418f92d14 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 7e9550159ad..81c8045af2c 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); }