Skip to content

prefix of array attribute must be an object name #1152

@eine

Description

@eine

The MWE below is extracted from VUnit/vunit#631. Since a few days ago, the MWE fails during analysis:

test.vhd:14:54:error: prefix of array attribute must be an object name
ghdl:error: compilation error

I think it might be a regression, since the same code has worked for many months. Moreover, if the commented ret_range and ret_val are used instead, the MWE works as expected.

How to reproduce?

entity ent is
end;

architecture arch of ent is

  type range_t is array (integer range <>) of bit;

  function get_range (constant code : string) return range_t is
    constant ret_val : range_t(1 to 10) := (others => '0');
  begin
    return ret_val;
  end function get_range;

  signal ret_val : boolean_vector(get_range("HELLO")'range) := (others => false);

  --constant ret_range : range_t := get_range("HELLO");
  --signal ret_val : boolean_vector(ret_range) := (others => false);
begin
end;
ghdl -a --std=08 ent.vhd

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions