Debian Codegraph @

gcc/testsuite/gcc.target/riscv/attribute-5.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-mriscv-attribute -mno-strict-align" } */
3 int foo()
4 {
5
6 /* Default mcpu is rocket which has slow_misaligned_access=true. */
7 #if !defined(__riscv_misaligned_slow)
8 #error "__riscv_misaligned_slow is not set"
9 #endif
10
11 #if defined(__riscv_misaligned_avoid) || defined(__riscv_misaligned_fast)
12 #error "__riscv_misaligned_avoid or __riscv_misaligned_fast is unexpectedly set"
13 #endif
14
15 return 0;
16 }
17 /* { dg-final { scan-assembler ".attribute unaligned_access, 1" } } */