Dear GHDL developers,

I’ve ran into a problem with an ENTITY whose name is an \extended identifier\. 
Needless to say, the issue surfaced in a file supplied by a major FPGA vendor, 
below is a minimalistic test case (attached, demo.vhd).

To reproduce the problem:

> $ ghdl -a demo.vhd
> demo.s:0:Unknown escape '\_' in string: Ignored
> demo.s:0:Unknown escape '\_' in string: Ignored
> demo.s:0:Unknown escape '\_' in string: Ignored

> $ ghdl -e bar structural
> Undefined symbols for architecture x86_64:
>   "_work__\foo\__LASTARCH__DEFAULT_CONFIG", referenced from:
>       _work__bar__ARCH__structural__foo_1__ELAB in demo.o
>   "_work__\foo\__LASTARCH__ELAB", referenced from:
>       _work__bar__ARCH__structural__foo_1__ELAB in demo.o
>   "_work__\foo\__LASTARCH__INSTSIZE", referenced from:
>       _work__bar__ARCH__structural__foo_1__ELAB in demo.o
> ld: symbol(s) not found for architecture x86_64

From the assembly output (attached, demo.s) it seems the translation \foo\ -> 
Xfoo__ happens everywhere except when instantiating the ENTITY at

> foo_1: entity work.\foo\

The underlying cause seems to be the procedure 
Trans.Chap9.Translate_Entity_Instantiation (trans-chap9.adb), which is not 
fully aware of \extended identifier\. A provisional patch is a attached 
(extended.diff).

Thank you for your consideration,
Ole


Attachment: demo.vhd
Description: Binary data

Attachment: demo.s
Description: Binary data

Attachment: extended.diff
Description: Binary data

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to