solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Segfault with --asm when accessing calldata array of internal function types

Open alex2449 opened this issue 2 months ago • 1 comments

Description

The following code causes the compiler to segfault when compiling with --asm. The issue appears to have started with version 0.8.0. I could not reduce this program any further.

I am not sure if this is related to #16223 but I thought to open a new issue in any case.

Steps to Reproduce

testcase.sol

// SPDX-License-Identifier: GPL-3.0

pragma solidity =0.8.30;

contract C {
    function f1(function () internal pure[] calldata p) internal {
        p[0];
    }

    function f2() external {
        f1;
    }
}

solc --asm testcase.sol

Environment

  • Compiler version: 0.8.30

alex2449 avatar Oct 03 '25 23:10 alex2449