Move the run test of pr116278 to dg/torture and leave the risc-v the
asm check under risc-v part.
PR target/116278
gcc/testsuite/ChangeLog:
* gcc.target/riscv/pr116278-run-1.c: Take compile instead of run.
* gcc.target/riscv/pr116278-run-2.c: Ditto.
* gcc.dg/torture/pr116278-run-1.c: New test.
* gcc.dg/torture/pr116278-run-2.c: New test.
Signed-off-by: Pan Li <pan2.li@intel.com>
--- /dev/null
+/* { dg-do run } */
+/* { dg-require-effective-target int32 } */
+/* { dg-options "-O2" } */
+
+#include <stdint.h>
+
+int8_t b[1];
+int8_t *d = b;
+int32_t c;
+
+int main() {
+ b[0] = -40;
+ uint16_t t = (uint16_t)d[0];
+
+ c = (t < 0xFFF6 ? t : 0xFFF6) + 9;
+
+ if (c != 65505)
+ __builtin_abort ();
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-require-effective-target int32 } */
+/* { dg-options "-O2" } */
+
+#include <stdint.h>
+
+int16_t b[1];
+int16_t *d = b;
+int64_t c;
+
+int main() {
+ b[0] = -40;
+ uint32_t t = (uint32_t)d[0];
+
+ c = (t < 0xFFFFFFF6u ? t : 0xFFFFFFF6u) + 9;
+
+ if (c != 4294967265)
+ __builtin_abort ();
+}
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fdump-rtl-expand-details" } */
-#include <stdint-gcc.h>
+#include <stdint.h>
int8_t b[1];
int8_t *d = b;
-/* { dg-do run { target { riscv_v } } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fdump-rtl-expand-details" } */
-#include <stdint-gcc.h>
+#include <stdint.h>
int16_t b[1];
int16_t *d = b;