⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sibcall-4.c

📁 this is a gcc file, you can download it and learn its usetility, for further detail please look at t
💻 C
字号:
/* Simple check that sibling calls are performed from a   void non-leaf-function taking no arguments calling a function which   is about the same as itself.   Copyright (C) 2002 Free Software Foundation Inc.   Contributed by Hans-Peter Nilsson  <hp@bitrange.com>  *//* { dg-do run { xfail arc-*-* avr-*-* c4x-*-* cris-*-* h8300-*-* i370-*-* i960-*-* ip2k-*-* m32r-*-* m68hc1?-*-* m681?-*-* m680*-*-* m68k-*-* mcore-*-* mips*-*-* mn10?00-*-* ns32k-*-* s390*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa-*-* } } *//* { dg-options "-O2 -foptimize-sibling-calls" } *//* The option -foptimize-sibling-calls is the default, but serves as   marker.  This test is xfailed on targets without sibcall patterns   (except targets where the test does not work due to the return address   not saved on the regular stack).  */static void recurser_void1 (void);static void recurser_void2 (void);extern void track (void);int n = 0;int main (){  recurser_void1 ();  exit (0);}/* The functions should get the same stack-frame, and best way to make it   reasonably sure is to make them have the same contents (regarding the   n tests).  */static voidrecurser_void1 (void){  if (n == 0 || n == 7 || n == 8)    track ();  if (n == 10)    return;  n++;  recurser_void2 ();}static voidrecurser_void2 (void){  if (n == 0 || n == 7 || n == 8)    track ();  if (n == 10)    return;  n++;  recurser_void1 ();}void *trackpoint;voidtrack (){  char stackpos[1];  if (n == 0)    trackpoint = stackpos;  else if ((n != 7 && n != 8) || trackpoint != stackpos)    abort ();}

⌨️ 快捷键说明

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