/* Check load on condition for bool. */
/* { dg-do compile { target { s390*-*-* } } } */
-/* { dg-options "-O2 -march=z13" } */
+/* { dg-options "-O2 -march=z13 -mzarch" } */
/* { dg-final { scan-assembler "lochinh\t%r.?,1" } } */
#include <stdbool.h>
/* Check load on condition for global char. */
/* { dg-do compile { target { s390*-*-* } } } */
-/* { dg-options "-O2 -march=z13" } */
+/* { dg-options "-O2 -march=z13 -mzarch" } */
/* { dg-final { scan-assembler "locrnh\t%r.?,%r.?" } } */
#include <stdbool.h>
/* Check if conversion for two instructions. */
/* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
/* { dg-final { scan-assembler "lochih\t%r.?,1" } } */
/* { dg-final { scan-assembler "locrh\t.*" } } */
/* Check if conversion for two instructions. */
/* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
/* { dg-final { scan-assembler "lochih\t%r.?,1" } } */
/* { dg-final { scan-assembler "locrh\t.*" } } */
/* Check if conversion for two instructions. */
/* { dg-do run } */
-/* { dg-options "-O2 -march=z13 --save-temps" } */
+/* { dg-options "-O2 -march=z13 -mzarch --save-temps" } */
/* { dg-final { scan-assembler "locghih\t%r.?,1" } } */
/* { dg-final { scan-assembler "locgrh\t.*" } } */
+
#include <limits.h>
#include <stdio.h>
#include <assert.h>
__attribute__ ((noinline))
-long foo (long *a, unsigned long n)
+long long foo (long long *a, unsigned long long n)
{
- long min = 999999;
- long bla = 0;
+ long long min = 999999;
+ long long bla = 0;
for (int i = 0; i < n; i++)
{
if (a[i] < min)
int main()
{
- long a[] = {2, 1, -13, LONG_MAX, LONG_MIN, 0};
+ long long a[] = {2, 1, -13, LONG_MAX, LONG_MIN, 0};
- long res = foo (a, sizeof (a) / sizeof (a[0]));
+ long long res = foo (a, sizeof (a) / sizeof (a[0]));
assert (res == (LONG_MIN + 1));
}