Debian Codegraph @

gcc/testsuite/gcc.target/i386/cet-label-3.c

raw
1 /* PR target/89355 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fcf-protection" } */
4 /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */
5 /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */
6 int
7 test (int* val)
8 {
9 int status = 99;
10
11 if (!val)
12 {
13 status = 22;
14 goto end;
15 }
16
17 extern int x;
18 *val = x;
19
20 status = 0;
21 end:
22 return status;
23 }