http://llvm.org/bugs/show_bug.cgi?id=16450
Bug ID: 16450
Summary: Combining CHECK-DAG and CHECK-NOT sometimes causes an
incorrect error-less failure
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 10763
--> http://llvm.org/bugs/attachment.cgi?id=10763&action=edit
test.txt
Overview:
Using CHECK-NOT between two CHECK-DAG's may result in a failure with no
error emitted. There are two locations in the CHECK-DAG processing that
CHECK-NOT is processed and one of them is handled incorrectly.
The one that is incorrect is taking the bool returned by CheckNot(),
casting it to size_t, then comparing it to a large unsigned value. This
comparison is always false whether the pattern is matched or not.
It seems that the testsuite only checks that successful matches of the
CHECK-NOT pattern trigger failures. I didn't find any tests that check that
unsuccessful matches permits successes.
Steps to reproduce:
* Run 'FileCheck -input-file test.txt test.txt' using the attached file.
* echo $?
Expected behaviour:
* No output
* Exit with 0
Actual behaviour:
* No output
* Exit with 1
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs