Debian Codegraph @

gcc/testsuite/gcc.target/nvptx/alias-1.c

raw
1 /* { dg-do link } */
2 /* { dg-do run { target nvptx_runtime_alias_ptx } } */
3 /* { dg-options "-save-temps" } */
4 /* { dg-add-options nvptx_alias_ptx } */
5
6 int v;
7
8 void __f ()
9 {
10 v = 1;
11 }
12
13 void f () __attribute__ ((alias ("__f")));
14
15 int
16 main (void)
17 {
18 if (v != 0)
19 __builtin_abort ();
20 f ();
21 if (v != 1)
22 __builtin_abort ();
23 return 0;
24 }
25
26 /* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: __f$} 1 } }
27 { dg-final { scan-assembler-times {(?n)^\.visible \.func __f;$} 1 } }
28 { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: __f$} 1 } }
29 { dg-final { scan-assembler-times {(?n)^\.visible \.func __f$} 1 } } */
30
31 /* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: f$} 1 } }
32 { dg-final { scan-assembler-times {(?n)^\.visible \.func f;$} 1 } }
33 { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: f$} 1 } }
34 { dg-final { scan-assembler-times {(?n)^\.alias f,__f;$} 1 } } */
35
36 /* { dg-final { scan-assembler-times {(?n)\tcall __f;$} 0 } }
37 { dg-final { scan-assembler-times {(?n)\tcall f;$} 1 } } */