]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix input operands of gcc.dg/guality/pr43077-1.c
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 11 May 2021 17:33:37 +0000 (19:33 +0200)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Tue, 11 May 2021 17:33:37 +0000 (19:33 +0200)
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.

gcc/testsuite/gcc.dg/guality/pr43077-1.c

index 39bd26aae0175f7e35a963fdf5237e979ed4aad4..2d9376298d46f17ab49cbfae29c894319f78e358 100644 (file)
@@ -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;
 }