Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[isoltest] Bug in auto update for gas in constructor case #11600

Closed
hrkrshnn opened this issue Jun 30, 2021 · 2 comments · Fixed by #12282
Closed

[isoltest] Bug in auto update for gas in constructor case #11600

hrkrshnn opened this issue Jun 30, 2021 · 2 comments · Fixed by #12282

Comments

@hrkrshnn
Copy link
Member

hrkrshnn commented Jun 30, 2021

Take the following semantic test:

contract C {
    uint public x = 1;
}
// ====
// compileViaYul: also
// ----
// constructor()
// gas irOptimized: 1
// gas legacy: 1
// gas legacyOptimized: 1
// x() -> 1
// gas irOptimized: 1
// gas legacy: 1
// gas legacyOptimized: 1

Running isoltest will automatically update the gas costs for x(), however the constructor call doesn't seem to get updated.

(Or only updated for legacy, which was the case https://github.com/ethereum/solidity/pull/11598/files#r661433855)

@ekpyron
Copy link
Member

ekpyron commented Nov 3, 2021

For me this correctly updates legacy on an isoltest run and legacyOptimized on an isoltest --optimize run, as I would expect...

@ekpyron
Copy link
Member

ekpyron commented Nov 3, 2021

Or actually, something really weird is going on... if I start from the test case and run isoltest and then isoltest --optimize, then it updates everything correctly... if I then change legacyOptimized to 1 in the constructor, it ignores it... if I also change legacyOptimized to 1 for x() though, it updates again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants