Skip to content

ICE for calldata parameter in an internal function #16223

@alex1448

Description

@alex1448

Description

The following code triggers the ICE shown bellow in the latest solc version 0.8.30. The problem seems to appear with version 0.6.9 (tested on remix), which is when calldata location was permitted for internal functions.

Steps to Reproduce

testcase.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity =0.8.30;

contract C {
    function f(S[10] calldata p) internal {
    }
}

struct S {
    function () internal pure m1;
}
solc testcase.sol
Internal compiler error:
/solidity/libsolidity/ast/Types.cpp(2295): Throw in function virtual bool solidity::frontend::StructType::isDynamicallyEncoded() 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions