Debian Codegraph @

gcc/testsuite/g++.dg/debug/dwarf2/block.C

raw
1 // Compiler should not generate too many lexical blocks for this function.
2 // { dg-do compile { target { i?86-*-* x86_64-*-* } } }
3 // { dg-options "-O0 -fno-exceptions -gdwarf-2 -dA" }
4
5 union UElement {
6 void* pointer;
7 int integer;
8 };
9 struct UColToken {
10 unsigned source;
11 unsigned char **rulesToParseHdl;
12 };
13
14 int uhash_hashTokens(const union UElement k)
15 {
16 int hash = 0;
17 struct UColToken *key = (struct UColToken *)k.pointer;
18 if (key != 0) {
19 int len = (key->source & 0xFF000000)>>24;
20 int inc = ((len - 32) / 32) + 1;
21 const unsigned char *p = (key->source & 0x00FFFFFF)
22 + *(key->rulesToParseHdl);
23 const unsigned char *limit = p + len;
24 hash = *p + *limit;
25 }
26 return hash;
27 }
28
29 // { dg-final { scan-assembler-not "LBB10" } }