Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr86064.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-skip-if "split DWARF unsupported" { *-*-darwin* } } */ /* { dg-options "-g -O2 -fno-var-tracking-assignments -gsplit-dwarf" } */ /* This used to fail with location views (implicitly) enabled, because var-tracking (not at assignments) creates a range for d starting at the load after the first call, and we did not split the range, despite its crossing between hot and cold partitions, because it's a single range, that we normally extend to the entire function. However, because the range starts at a (presumed) nonzero view, we end up outputting a loclist instead of a single location entry. But then, -gsplit-dwarf selects (startx,length) loclist entries, and the length ends up computing the difference between symbols in different subsections. */ int a; __attribute__((__cold__)) void b(); void e(int *); int f(); void c() { int d; e(&d); a = d; if (f()) b(); }