Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefix of array attribute must be an object name #1152

Closed
eine opened this issue Mar 6, 2020 · 1 comment
Closed

prefix of array attribute must be an object name #1152

eine opened this issue Mar 6, 2020 · 1 comment
Milestone

Comments

@eine
Copy link
Collaborator

eine commented Mar 6, 2020

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
@tgingold
Copy link
Member

tgingold commented Mar 6, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants