You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to fix the Solidity issues occurring with #1696, I came across this variation of regression/esbmc-solidity/constructor_4:
// SPDX-License-Identifier: GPL-3.0pragma solidity>=0.5.0;
contractBB {
uint8 data;
constructor(uint8x, uint8y) {
data = x + y;
}
function empty1() public {
assert(data ==2);
}
function empty(uint8x, uint256y) public {
data = data + x;
empty1();
}
}
contractDD {
BB x =newBB(2, 0);
BB y =newBB(3, 0); // this line is new, rest unchangedfunction empty2() public {}
function D() public {
x.empty(0, 2);
}
}
Current master says VERIFICATION FAILED with --function D. When removing the new line or moving it above BB x = new BB(2, 0);, it is successfully verified. The reason is that the data member of BB is interpreted as a static instead of instance variable.
As I don't know much about Solidity, could someone confirm whether this is a bug or whether this is indeed the indended behaviour?
This is the corresponding solast file generated with solc version 0.8.24+commit.e11b9ed9.Linux.g++: ctor4-2.solast.txt
The text was updated successfully, but these errors were encountered:
While trying to fix the Solidity issues occurring with #1696, I came across this variation of regression/esbmc-solidity/constructor_4:
Current master says VERIFICATION FAILED with
--function D
. When removing the new line or moving it aboveBB x = new BB(2, 0);
, it is successfully verified. The reason is that thedata
member ofBB
is interpreted as a static instead of instance variable.As I don't know much about Solidity, could someone confirm whether this is a bug or whether this is indeed the indended behaviour?
This is the corresponding solast file generated with solc version 0.8.24+commit.e11b9ed9.Linux.g++: ctor4-2.solast.txt
The text was updated successfully, but these errors were encountered: