You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes generics will be wrapped into appropriated constants in their architecture.
w/ proposed regression issueA,
entity issueA is
generic (
L : integer range 0 to integer'high
);
begin
end entity issueA;
architecture a of issueA is
pure function fL (
iDUMMY : boolean
) return integer is
begin
if (L < 1) then
return 1;
else
return L;
end if;
end function fL;
constant cL : integer range 1 to integer'high := fL(true);
begin
end architecture a;
then i got,
$ NVC_LIBPATH=./lib/std:./lib/ieee:./lib/nvc NVC_CYG_LIB=./src ./src/nvc.exe -a test/regress/issueA.vhd
Segmentation fault (core dumped)
$ NVC_LIBPATH=./lib/std:./lib/ieee:./lib/nvc NVC_CYG_LIB=./src gdb ./src/nvc.exe
[SNIP]
(gdb) r -a test/regress/issueA.vhd
Starting program: /home/hiyuh/git-repos/nvc/src/nvc.exe -a test/regress/issueA.vhd
[New Thread 6996.0x1aac]
[New Thread 6996.0x1624]
Program received signal SIGSEGV, Segmentation fault.
0x00450b86 in folded_bool (t=t@entry=0x800c4dd8, b=b@entry=0x0) at common.c:206
206 *b = (tree_pos(decl) == 1);
(gdb) bt
#0 0x00450b86 in folded_bool (t=t@entry=0x800c4dd8, b=b@entry=0x0) at common.c:206
#1 0x0045ad5e in folded (t=0x800c4dd8) at eval.c:157
#2 0x0045b67a in eval_fcall (t=t@entry=0x800c4e78, v=v@entry=0x28a960) at eval.c:385
#3 0x0045cd76 in eval (fcall=0x800c4e78) at eval.c:670
#4 0x004314fc in simp_fcall (t=t@entry=0x800c4e78) at simp.c:94
#5 0x00433dad in simp_tree (t=0x800c4e78, context=0x0) at simp.c:748
#6 0x0043c091 in tree_rewrite_aux (t=0x800c4e78, ctx=ctx@entry=0x28aafc) at tree.c:1814
#7 0x0043c1f6 in tree_rewrite_aux (t=0x800c4ef0, ctx=ctx@entry=0x28aafc) at tree.c:1771
#8 0x0043bf55 in tree_rewrite_aux (t=t@entry=0x800c4f38, ctx=ctx@entry=0x28aafc) at tree.c:1776
#9 0x0043c31d in tree_rewrite (t=t@entry=0x800c4f38, fn=fn@entry=0x433bc0 <simp_tree>, context=context@entry=0x0)
at tree.c:1836
#10 0x00433f1d in simplify (top=0x800c4f38) at simp.c:786
#11 0x00401951 in analyse (argc=argc@entry=2, argv=0x28ac00) at nvc.c:120
#12 0x004ab40d in main (argc=2, argv=<optimized out>) at nvc.c:713
[SNIP]
The text was updated successfully, but these errors were encountered:
sometimes generics will be wrapped into appropriated constants in their architecture.
w/ proposed regression issueA,
then i got,
The text was updated successfully, but these errors were encountered: