diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-11-15 07:55:34 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-11-15 18:23:39 +0100 |
commit | 5b688c3a7fc164800c95a2133c1aaa5cf80c84c0 (patch) | |
tree | 61d8797ae07025df83de8f01d4db6bc441e0f431 /testsuite/gna/bug0125/gen.py | |
parent | 1a9e48e9d72bfd4c027ab2fb852f83c67ae9ce6c (diff) | |
download | ghdl-5b688c3a7fc164800c95a2133c1aaa5cf80c84c0.tar.gz ghdl-5b688c3a7fc164800c95a2133c1aaa5cf80c84c0.tar.bz2 ghdl-5b688c3a7fc164800c95a2133c1aaa5cf80c84c0.zip |
testsuite/gna: add a test for previous commit
Diffstat (limited to 'testsuite/gna/bug0125/gen.py')
-rwxr-xr-x | testsuite/gna/bug0125/gen.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/gna/bug0125/gen.py b/testsuite/gna/bug0125/gen.py new file mode 100755 index 000000000..c058f748b --- /dev/null +++ b/testsuite/gna/bug0125/gen.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 +# Generate a big aggregate + +import sys +import random + +out = sys.stdout + + +depth = 1024 +width = 6 + +out.write(""" +package repro is + type array2d is array(0 to {}, 0 to {}) of integer; + + constant cst : array2d := + ( +""".format(depth - 1, width - 1)) + +for i in range(depth): + if i != 0: + out.write(',\n') + out.write (' (') + for j in range(width): + if j != 0: + out.write(', ') + out.write('{}'.format(random.randint(0, 1<<31))) + out.write(')') +out.write(""" + ); +end repro; +""") |