diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/crc-non-cst-poly-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/crc-non-cst-poly-1.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/crc-non-cst-poly-1.c b/gcc/testsuite/gcc.dg/crc-non-cst-poly-1.c new file mode 100644 index 0000000..0c3d905 --- /dev/null +++ b/gcc/testsuite/gcc.dg/crc-non-cst-poly-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "" } */ + +/* PR middle-end/120709 */ +/* Make sure we don't ICE on a non-constant poly argument. */ + + +typedef unsigned char uint8_t; +uint8_t crc8_data8(uint8_t crc, uint8_t data, uint8_t polynomial) { + return __builtin_rev_crc32_data8 (crc, data, polynomial); /* { dg-error "must be a constant" } */ +} |