24 lines · c
1// RUN: not %clang_cc1 -triple loongarch32 -O2 -emit-llvm %s 2>&1 -o - | FileCheck %s2// RUN: not %clang_cc1 -triple loongarch64 -O2 -emit-llvm %s 2>&1 -o - | FileCheck %s3 4void test_l(void) {5// CHECK: :[[#@LINE+1]]:27: error: value '32768' out of range for constraint 'l'6 asm volatile ("" :: "l"(32768));7// CHECK: :[[#@LINE+1]]:27: error: value '-32769' out of range for constraint 'l'8 asm volatile ("" :: "l"(-32769));9}10 11void test_I(void) {12// CHECK: :[[#@LINE+1]]:27: error: value '2048' out of range for constraint 'I'13 asm volatile ("" :: "I"(2048));14// CHECK: :[[#@LINE+1]]:27: error: value '-2049' out of range for constraint 'I'15 asm volatile ("" :: "I"(-2049));16}17 18void test_K(void) {19// CHECK: :[[#@LINE+1]]:27: error: value '4096' out of range for constraint 'K'20 asm volatile ("" :: "K"(4096));21// CHECK: :[[#@LINE+1]]:27: error: value '-1' out of range for constraint 'K'22 asm volatile ("" :: "K"(-1));23}24