[llvm-bugs] [Bug 42896] New: Using variable defined from expression on the same line can fail
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 5 15:26:25 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42896
Bug ID: 42896
Summary: Using variable defined from expression on the same
line can fail
Product: Test Suite
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: lit
Assignee: unassignedbugs at nondot.org
Reporter: thomas.preudhomme at celest.fr
CC: daniel at zuster.org, llvm-bugs at lists.llvm.org
The following testcase fails:
RUN: FileCheck --input-file %s %s
FOO=67
BAR=68
BAR=69, BAZ:70
CHECK: FOO=[[#FOO:]]
CHECK: BAR=[[#BAR:FOO+1]]
CHECK: BAR=[[#BAR:FOO+2]], BAZ:[[#BAR+1]]
This is due to the commit r365220 which changes the use of
FileCheckNumericVariable to have only one instance per variable rather than one
instance per variable definition as previously. The two definitions of BAR
above thus share the same expression: FOO+1. Substitution works fine because it
does not get the expression from the variable. However setting the first value
of BAR will clear the expression, leading the evaluation of BAR+1 to consider
BAR as being undefined because its expression is null and thus it cannot
evaluate BAR.
I am working on a patch to solve this.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190805/755223fa/attachment.html>
More information about the llvm-bugs
mailing list