Debian Codegraph @

gcc/testsuite/g++.target/aarch64/sve/catch_7.C

raw
1 /* { dg-do run { target aarch64_sve_hw } } */
2 /* { dg-options "-O" } */
3
4 #include <arm_sve.h>
5
6 void __attribute__ ((noipa))
7 f1 (void)
8 {
9 throw 1;
10 }
11
12 void __attribute__ ((noipa))
13 f2 (svbool_t)
14 {
15 register svint8_t z8 asm ("z8") = svindex_s8 (11, 1);
16 asm volatile ("" :: "w" (z8));
17 f1 ();
18 }
19
20 void __attribute__ ((noipa))
21 f3 (int n)
22 {
23 register double d8 asm ("v8") = 42.0;
24 for (int i = 0; i < n; ++i)
25 {
26 asm volatile ("" : "=w" (d8) : "w" (d8));
27 try { f2 (svptrue_b8 ()); } catch (int) { break; }
28 }
29 if (d8 != 42.0)
30 __builtin_abort ();
31 }
32
33 int
34 main (void)
35 {
36 f3 (100);
37 return 0;
38 }