solidity icon indicating copy to clipboard operation
solidity copied to clipboard

ICE for user-defined value type in external library function

Open alex2449 opened this issue 2 months ago • 0 comments

Description

The following code triggers the ICE shown below in the latest solc version 0.8.30. The issue appears to have started with version 0.8.8, which was when user-defined value types were introduced.

Steps to Reproduce

testcase.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity =0.8.30;

type T is bool;

library L {
    function f(T[] storage p) external {
    }
}

solc testcase.sol

Internal compiler error:
/solidity/libsolidity/ast/Types.h(1199): Throw in function virtual std::string solidity::frontend::UserDefinedValueType::signatureInExternalFunction(bool) const
Dynamic exception type: boost::wrapexcept<solidity::langutil::InternalCompilerError>
std::exception::what: Solidity assertion failed
[solidity::util::tag_comment*] = Solidity assertion failed

Environment

  • Compiler version: 0.8.30

alex2449 avatar Oct 03 '25 19:10 alex2449