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

📄 bug-971834.c

📁 sdcc是为51等小型嵌入式cpu设计的c语言编译器支持数种不同类型的cpu
💻 C
字号:
/* bug-971834.c   Life Range problem with   - uninitialized variable   - loop   LR problem hits all ports, but this test is mcs51 specific */#include <testfwk.h>unsigned char ttt[] = {0xff, 1};unsigned char b;#if !defined(PORT_HOST)#  pragma disable_warning 84#endifunsigned char orsh (void){  unsigned char a, i;  for (i = 0; i < sizeof(ttt); i++)    a |= ttt[i];  return a;}unsigned char orsh1 (void){  unsigned char i, j;  unsigned char a;  for (j = 0; j < sizeof(ttt); j++)    {      for (i = 0; i < sizeof(ttt); i++)        {          a |= ttt[i];          b = a;        }    }  return b;}voidtestLR(void){  ASSERT(orsh()  == 0xff);  ASSERT(orsh1() == 0xff);}

⌨️ 快捷键说明

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