Small constants can make C compiler assume signing #773
Comments
|
Original Redmine Comment Fixed in git towards 3.861. Interesting as this precise use of small constants caused the emitted code to be such that the C compiler saw a small constant on both sides of a comparison, so it used a signed compare instead of the intended unsigned compare. Now forcing unsigned. |
|
Original Redmine Comment In 3.862. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Author Name: Clifford Wolf (@cliffordwolf)
Original Redmine Issue: 773 from https://www.veripool.org
Original Date: 2014-05-23
Original Assignee: Wilson Snyder (@wsnyder)
This should return
y=0fora=31, but Verilator 06744b6 returnsy=31instead:Self-contained test case:
http://svn.clifford.at/handicraft/2014/verilatortest/test017.v
http://svn.clifford.at/handicraft/2014/verilatortest/test017.cc
http://svn.clifford.at/handicraft/2014/verilatortest/test017.sh
The text was updated successfully, but these errors were encountered: