Why is this an issue?

A constant function tried to access a nonexistent range of a dynamic array.

How to fix it

Code examples

Noncompliant code example

typedef int ret_type[2];
localparam ret_type foo = func();
function ret_type func;
  automatic int i[] = new [2];
  return i[6:7]; // Noncompliant
endfunction