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

The access type does not have a range attribute. #103

Closed
ikwzm opened this issue Feb 14, 2015 · 3 comments
Closed

The access type does not have a range attribute. #103

ikwzm opened this issue Feb 14, 2015 · 3 comments

Comments

@ikwzm
Copy link

ikwzm commented Feb 14, 2015

-- file: a.vhd
use std.textio.all;
entity access_attribute_range is
end entity;
architecture test of access_attribute_range is
    procedure puts(TAG:inout LINE; MSG:in STRING) is
        variable text_line   : LINE;
    begin
        write(text_line, TAG(TAG'range), RIGHT,  10);
        write(text_line, string'(" "));
        write(text_line, MSG(MSG'range));
        writeline(OUTPUT, text_line);
    end procedure;
begin
    main: process
        variable tag  : line;
    begin
        write(tag , string'(">>"));
        puts(tag, "test");
        report "done." severity FAILURE;
        wait;
    end process;
end test;
ikwzm@vm-ubuntu:~/work/nvc_test$ nvc -a a.vhd
** Error: object RANGE does not have a range
    File a.vhd, Line 8
            write(text_line, TAG(TAG'range), RIGHT,  10);
                                 ^^^^^^^^^
@nickg
Copy link
Owner

nickg commented Mar 1, 2015

This error is fixed in the master branch however your example causes a crash at runtime. This is fixed in the new-codegen branch so I'll close this when I merge that branch back in.

@ikwzm
Copy link
Author

ikwzm commented Mar 2, 2015

Thank you.

@nickg
Copy link
Owner

nickg commented Apr 25, 2015

This is fixed now and produces the expected output.

@nickg nickg closed this as completed Apr 25, 2015
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