20050713-1.c

来自「用于进行gcc测试」· C语言 代码 · 共 57 行

C
57
字号
/* Test that sibling call is not used if there is an argument overlap.  */extern void abort (void);struct S{  int a, b, c;};intfoo2 (struct S x, struct S y){  if (x.a != 3 || x.b != 4 || x.c != 5)    abort ();  if (y.a != 6 || y.b != 7 || y.c != 8)    abort ();  return 0;}intfoo3 (struct S x, struct S y, struct S z){  foo2 (x, y);  if (z.a != 9 || z.b != 10 || z.c != 11)    abort ();  return 0;}intbar2 (struct S x, struct S y){  return foo2 (y, x);}intbar3 (struct S x, struct S y, struct S z){  return foo3 (y, x, z);}intbaz3 (struct S x, struct S y, struct S z){  return foo3 (y, z, x);}intmain (void){  struct S a = { 3, 4, 5 }, b = { 6, 7, 8 }, c = { 9, 10, 11 };  bar2 (b, a);  bar3 (b, a, c);  baz3 (c, a, b);  return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?