summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/BitsInitOverflow.td
blob: cf5d1ca85bc28800285c1a901fee713cf5cf5433 (plain)
1
2
3
4
5
6
7
8
9
// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s

// Check that a large integer is not truncated to a small bit sequence.
//
// CHECK: error: Initializer of 'X' in 'anonymous_0' could not be fully resolved:

def {
  bits<2> X = 5;  // bitfield is too small, reject
}
OpenPOWER on IntegriCloud