decodetree: Diagnose empty pattern group
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 26 May 2023 01:50:58 +0000 (18:50 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 30 May 2023 17:55:39 +0000 (10:55 -0700)
commitf26044717679331ba31ba9bb911e059a13a49599
treeaee4744571b80e6fff4b856f6bee10fd9a7d9957
parent2fd2eb5a247e641adc36a67318a791b417afea46
decodetree: Diagnose empty pattern group

Test err_pattern_group_empty.decode failed with exception:

Traceback (most recent call last):
  File "./scripts/decodetree.py", line 1424, in <module> main()
  File "./scripts/decodetree.py", line 1342, in main toppat.build_tree()
  File "./scripts/decodetree.py", line 627, in build_tree
    self.tree = self.__build_tree(self.pats, self.fixedbits,
  File "./scripts/decodetree.py", line 607, in __build_tree
    fb = i.fixedbits & innermask
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
scripts/decodetree.py