From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7806) id F1376398B84E; Tue, 11 May 2021 17:34:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1376398B84E MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Stefan Schulze Frielinghaus To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-726] testsuite: Fix input operands of gcc.dg/guality/pr43077-1.c X-Act-Checkin: gcc X-Git-Author: Stefan Schulze Frielinghaus X-Git-Refname: refs/heads/master X-Git-Oldrev: 84b384a16f388c68166b0603e50d0b477d0830a7 X-Git-Newrev: 21dfb22920ce32fcf336eac4513fa44de28819e0 Message-Id: <20210511173427.F1376398B84E@sourceware.org> Date: Tue, 11 May 2021 17:34:27 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 17:34:28 -0000 https://gcc.gnu.org/g:21dfb22920ce32fcf336eac4513fa44de28819e0 commit r12-726-g21dfb22920ce32fcf336eac4513fa44de28819e0 Author: Stefan Schulze Frielinghaus Date: Tue May 11 19:33:37 2021 +0200 testsuite: Fix input operands of gcc.dg/guality/pr43077-1.c The type of the output operands *p and *q of the extended asm statement of function foo is unsigned long whereas the type of the corresponding input operands is int. This results, e.g. on IBM Z, in the case that the immediates 2 and 3 are written into registers in SI mode and read in DI mode resulting in wrong values. Fixed by lifting the input operands to type long. gcc/testsuite/ChangeLog: * gcc.dg/guality/pr43077-1.c: Align types of output and input operands by lifting immediates to type long. Diff: --- gcc/testsuite/gcc.dg/guality/pr43077-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/guality/pr43077-1.c b/gcc/testsuite/gcc.dg/guality/pr43077-1.c index 39bd26aae01..2d9376298d4 100644 --- a/gcc/testsuite/gcc.dg/guality/pr43077-1.c +++ b/gcc/testsuite/gcc.dg/guality/pr43077-1.c @@ -24,7 +24,7 @@ int __attribute__((noinline)) foo (unsigned long *p, unsigned long *q) { int ret; - asm volatile ("" : "=r" (ret), "=r" (*p), "=r" (*q) : "0" (1), "1" (2), "2" (3)); + asm volatile ("" : "=r" (ret), "=r" (*p), "=r" (*q) : "0" (1), "1" (2l), "2" (3l)); return ret; }