1 // { dg-do compile { target int128 } }
2 // { dg-options "" }
3 
4 struct S {
SS5   S(void) { m_i128 = 0; m_u128 = 0; }
~SS6   ~S(void) { }
get1S7   __int128 get1 (void) { return m_i128; }
get2S8   unsigned __int128 get2 (void) { return m_u128; }
set1S9   void set1 (__int128 i) { m_i128 = i; }
set2S10   void set2 (unsigned int i) { m_u128 = 1; }
11   __int128 m_i128;
12   unsigned __int128 m_u128;
13 };
14 
15 struct S glb;
16 
fo1(void)17 __int128 fo1 (void) { return glb.get1 (); }
fo2(void)18 unsigned __int128 fo2 (void) { return glb.get2 (); }
fo3(__int128 i)19 __int128 fo3 (__int128 i) { __int128 v = fo1 (); glb.set1 (i); return v; }
fo4(unsigned __int128 i)20 unsigned __int128 fo4 (unsigned __int128 i)
21 {
22   unsigned __int128 v = fo2 (); glb.set2 (i);
23   return v;
24 }
25 
fo5(__int128 i)26 __int128 fo5 (__int128 i)
27 {
28   return fo3 (i);
29 }
30 
fo5(unsigned __int128 i)31 __int128 fo5 (unsigned __int128 i)
32 {
33   return (__int128) fo4 (i);
34 }
35 
36 
37 // { dg-final { scan-assembler "\n_?_Z3fo1v\[: \t\n\]" } }
38 // { dg-final { scan-assembler "\n_?_Z3fo2v\[: \t\n\]" } }
39 // { dg-final { scan-assembler "\n_?_Z3fo3n\[: \t\n\]" } }
40 // { dg-final { scan-assembler "\n_?_Z3fo4o\[: \t\n\]" } }
41 // { dg-final { scan-assembler "\n_?_Z3fo5n\[: \t\n\]" } }
42 // { dg-final { scan-assembler "\n_?_Z3fo5o\[: \t\n\]" } }
43 
44