NAKAMURA Takumi d912f1f0cb
[Coverage] Let Decision take account of expansions (#78969)
The current implementation (D138849) assumes `Branch`(es) would follow
after the corresponding `Decision`. It is not true if `Branch`(es) are
forwarded to expanded file ID. As a result, consecutive `Decision`(s)
would be confused with insufficient number of `Branch`(es).

`Expansion` will point `Branch`(es) in other file IDs if `Expansion` is
included in the range of `Decision`.

Fixes #77871

---------

Co-authored-by: Alan Phipps <a-phipps@ti.com>
2024-02-02 20:34:12 +09:00

21 lines
339 B
C

#define C c
#define D 1
#define E (C != a) && (C > a)
#define F E
void __attribute__((noinline)) func1(void) { return; }
void __attribute__((noinline)) func(int a, int b, int c) {
if (a && D && E || b)
func1();
if (b && D)
func1();
if (a && (b && C) || (D && F))
func1();
}
int main() {
func(2, 3, 3);
return 0;
}