From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7659 invoked by alias); 25 Jan 2018 00:48:47 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 7639 invoked by uid 89); 25 Jan 2018 00:48:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HTo:U*jit, Hx-languages-length:1753 X-Spam-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Jan 2018 00:48:44 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FBC8780E7; Thu, 25 Jan 2018 00:48:43 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-31.phx2.redhat.com [10.3.112.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 28C186031B; Thu, 25 Jan 2018 00:48:41 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Cc: David Malcolm Subject: [committed] Fix jit.dg/test-alignment* (PR jit/82846) Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-Id: <1516841604-40283-1-git-send-email-dmalcolm@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 25 Jan 2018 00:48:43 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00000.txt.bz2 These testcases jit-compile functions that return char, but were erroneously calling them as if they returned int. This led to errors for certain target configurations (e.g. reading from %eax (32-bit) in the harness when only %al (8-bit) had been written to in the jit-compiled function). Regrtested on x86_64-pc-linux-gnu, and smoketested with "-with-arch=haswell--with-cpu=haswell". Committed to trunk as r257037. gcc/testsuite/ChangeLog: PR jit/82846 * jit.dg/test-alignment.c (create_aligned_code): Fix return type of "fn_type" typedef. * jit.dg/test-alignment.cc (verify_aligned_code): Likewise. --- gcc/testsuite/jit.dg/test-alignment.c | 2 +- gcc/testsuite/jit.dg/test-alignment.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/jit.dg/test-alignment.c b/gcc/testsuite/jit.dg/test-alignment.c index 686d981..82328d5 100644 --- a/gcc/testsuite/jit.dg/test-alignment.c +++ b/gcc/testsuite/jit.dg/test-alignment.c @@ -166,7 +166,7 @@ create_aligned_code (gcc_jit_context *ctxt, const char *struct_name, gcc_jit_result *result, \ const char *writer_fn_name) \ { \ - typedef int (*fn_type) (struct TYPENAME *); \ + typedef char (*fn_type) (struct TYPENAME *); \ CHECK_NON_NULL (result); \ \ struct TYPENAME tmp; \ diff --git a/gcc/testsuite/jit.dg/test-alignment.cc b/gcc/testsuite/jit.dg/test-alignment.cc index 3e99209..9a09a41 100644 --- a/gcc/testsuite/jit.dg/test-alignment.cc +++ b/gcc/testsuite/jit.dg/test-alignment.cc @@ -126,7 +126,7 @@ verify_aligned_code (gcc_jit_context *ctxt, gcc_jit_result *result, const char *writer_fn_name) { - typedef int (*fn_type) (T *); + typedef char (*fn_type) (T *); CHECK_NON_NULL (result); T tmp; -- 1.8.5.3