Skip to content

Defuse analysis fails with "Overwriting definitions" #3650

Closed
@vhavel

Description

The attached file: defuse_fail.p4.txt triggers a failed BUG_CHECK during def-use analysis:

Compiler Bug: Overwriting definitions at <BlockStatement>(1396)

I checked the IR before def-use is invoked - the problematic BlockStatement is reachable on two control-flow program paths, but def-use seems to assume the IR doesn't share nodes. The node sharing is created by the inlining pass (running before defuse since #3591). Inlining substitutes both C1.apply method calls with C1 body, but the body isn't deep-copied, hence the two places where C1 is inlined share part of the IR subtree.

Metadata

Assignees

Labels

bugThis behavior is unintended and should be fixed.fixedThis topic is considered to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions