This is what I ended up with for the test case. It was a bit tricky since it only works with msp430x (not msp430) and requires the gnu extensions. Is this OK? If so, is there anything else, or can I check the whole mess in yet?
// { dg-do compile { target msp430*-*-* } } // { dg-options "-std=gnu++11" } // { dg-skip-if "" { msp430*-*-* } { "-mcpu=msp430" } { "" } } __int20 x; __int20 foo (__int20 a, unsigned __int20 b) { return a + b; } // { dg-final { scan-assembler "\n_?_Z3foou5int20u6uint20\[: \t\n\]" } }