Debian Codegraph @

gcc/testsuite/gcc.target/loongarch/cmodel-func-attr-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mcmodel=normal -mexplicit-relocs=none" } */
3
4 extern char a[8];
5 extern char b[8];
6
7 #ifndef TEST_TARGET_PRAGMA
8 __attribute__ ((target ("cmodel=extreme")))
9 #else
10 #pragma GCC target ("cmodel=extreme")
11 #endif
12 void
13 test (void)
14 {
15 a[0] = b[1];
16 a[1] = b[2];
17 a[2] = b[3];
18 a[3] = b[4];
19 }
20
21 /* { dg-final { scan-assembler "la.global\t\\\$r\[0-9\]+,\\\$r\[0-9\]+,a" } } */