Fortran: fix dependency checks for inquiry refs [PR115039]
[official-gcc.git] / gcc / testsuite / gcc.target / nios2 / pr87079-2.c
blobdb2100ad33d417bce50dec449f577994418f7484
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mhw-div -mhw-mul -mhw-mulx" } */
4 #include <stdint.h>
5 #include <stddef.h>
7 void foo(const uint8_t* str, uint32_t* res)
9 uint32_t rdVal0, rdVal1, rdVal2;
10 rdVal0 = rdVal1 = rdVal2 = 0;
11 unsigned c;
12 for (;;) {
13 c = *str++;
14 unsigned dig = c - '0';
15 if (dig > 9)
16 break; // non-digit
17 uint64_t x10;
19 x10 = (uint64_t)rdVal0*10 + dig;
20 rdVal0 = (uint32_t)x10;
21 dig = (uint32_t)(x10 >> 32);
23 x10 = (uint64_t)rdVal1*10 + dig;
24 rdVal1 = (uint32_t)x10;
25 dig = (uint32_t)(x10 >> 32);
27 rdVal2 = rdVal2*10 + dig;
29 res[0] = rdVal0;
30 res[1] = rdVal1;
31 res[2] = rdVal2;
34 /* { dg-final { scan-assembler-times "mulxuu\t" 2 } } */