File: ifc-pr47271.c

package info (click to toggle)
gcc-arm-none-eabi 15%3A8-2019-q3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 571,828 kB
  • sloc: ansic: 2,937,651; cpp: 881,644; ada: 597,189; makefile: 65,528; asm: 56,499; xml: 46,621; exp: 24,747; sh: 19,684; python: 7,256; pascal: 4,370; awk: 3,497; perl: 2,695; yacc: 316; ml: 285; f90: 234; lex: 198; objc: 194; haskell: 119
file content (49 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* { dg-options "-O3" } */
/* { dg-do run } */

extern void abort (void);

void func (void)
{
  int i;
  int nops;
  char *codestr =
    "|\000\000Ee\000\000Z\001\000d\000\000Z\002\000d\025\000Z\003\000"
    "\t\t\t\t\t\t\t\t\t\t\t\td\026\000Z\004\000d\005\000\204\000\000Z"
    "\005\000e\006\000e\a\000j\005\000e\b\000d\006\000\204\002\000\203"
    "\001\000Z\t\000d\a\000\204\000\000Z\n\000d\b\000\204\000\000Z\v\000d"
    "\t\000\204\000\000Z\f\000d\n\000\204\000\000Z\r\000e\016\000e\017\000d"
    "\v\000\203\001\000d\f\000d\r\000\203\001\001Z\020\000e\016\000e\017"
    "\000d\016\000\203\001\000d\f\000d\017\000\203\001\001Z\021\000e\016"
    "\000e\017\000d\020\000\203\001\000d\f\000d\021\000\203\001\001Z\022"
    "\000e\016\000e\017\000d\022\000\203\001\000d\f\000d\023\000\203\001"
    "\001Z\023\000d\024\000S";
  int codelen = 209;
  int addrmap[500];

  for (i=0, nops=0 ; i<codelen ; i += ((codestr[i] >= 90) ? 3 : 1))
    {
      addrmap[i] = i - nops;
      if (codestr[i] == 9)
	nops++;
    }

  if (addrmap[0] != 0
      || addrmap[3] != 3
      || addrmap[4] != 4
      || addrmap[7] != 7
      || addrmap[10] != 10
      || addrmap[13] != 13
      || addrmap[16] != 16
      || addrmap[19] != 19
      || addrmap[22] != 22
      || addrmap[23] != 22
      || addrmap[24] != 22)
    abort ();
}

int main ()
{
  func ();
  return 0;
}