Debian Codegraph @

gcc/testsuite/gcc.target/riscv/pr113095.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O2 -march=rv32gc -mabi=ilp32d -mtune=sifive-7-series" { target { rv32 } } } */
3 /* { dg-options "-O2 -march=rv64gc -mabi=lp64d -mtune=sifive-7-series" {target { rv64 } } } */
4
5 extern void abort (void);
6 extern void exit (int);
7
8 unsigned short __attribute__ ((noinline, noclone))
9 foo (unsigned short x) {
10 if (x == 1)
11 x ^= 0x4002;
12
13 return x;
14 }
15
16 int main () {
17 if (foo(1) != 0x4003)
18 abort ();
19
20 exit(0);
21 }