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

📄 4386991.c

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 C
字号:
/* APPLE LOCAL file 4386991 *//* { dg-do run } */#include <stdlib.h>#include <string.h>#include <stdio.h>/* "BarAnimationData" and these fieldnames are historical, from   HIToolbox where this originally broke.  */struct BarAnimationData{  int cid;  int window;  int startTime;  int totalTime;  float percentDone;  int *startBounds;  int *endBounds;  int *screenBounds;  int done;};void spook_optimizer (void *p) __attribute__ ((__noinline__));voidspook_optimizer (void *p){  printf ("", p);	/* Try to fool the optimizer escape analysis.  */}int GetCGSConnectionID(void) __attribute__ ((__noinline__));intGetCGSConnectionID(void){  return 42;}/* Test for complete initialization.  "AnimateBar" is historical;   it's from HIToolbox, where this originally broke.  */void AnimateBar (int) __attribute__ ((__noinline__));void AnimateBar (int window){  /* Initialize only the first two fields.  */  BarAnimationData data = { GetCGSConnectionID(), window };  /* Frighten the optimizer away.  */  spook_optimizer ((void *)&data);  if (data.startTime) abort ();  if (data.totalTime) abort ();  if (data.percentDone) abort ();  if (data.startBounds) abort ();  if (data.endBounds) abort ();  if (data.screenBounds) abort ();  if (data.done) abort ();}/* Clobber the local stack area with 0xffs.  */void smear_stack () __attribute__ ((__noinline__));voidsmear_stack (void){  char ary[400];  memset (&ary, 0xff, sizeof (ary));  spook_optimizer ((void *)&ary);}intmain (){  smear_stack ();  AnimateBar (42);  return 0;}

⌨️ 快捷键说明

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