Skip to content
Snippets Groups Projects
Commit 3178786c authored by Pan Li's avatar Pan Li
Browse files

Test: Move pr116278 run test to dg/torture [NFC]


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: default avatarPan Li <pan2.li@intel.com>
parent 6dccd571
No related branches found
No related tags found
No related merge requests found
/* { 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 ();
}
/* { 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment