diff mbox series

[v2] testsuite: Add testcase for sparc ICE [PR105573]

Message ID 20230424223055.3450183-1-sam@gentoo.org
State New
Headers show
Series [v2] testsuite: Add testcase for sparc ICE [PR105573] | expand

Commit Message

Sam James April 24, 2023, 10:30 p.m. UTC
r11-10018-g33914983cf3734c2f8079963ba49fcc117499ef3 fixed PR105312 and added
a test case for target/arm but the duplicate PR105573 has a test case for
target/sparc that was uncommitted until now.

2023-04-21  Sam James   <sam@gentoo.org>
        PR tree-optimization/105312
	PR target/105573
	* gcc/testsuite/gcc.target/sparc/pr105573.c: New test.

Signed-off-by: Sam James <sam@gentoo.org>
---
 gcc/testsuite/gcc.target/sparc/pr105573.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/sparc/pr105573.c

Comments

Richard Biener April 25, 2023, 6:21 a.m. UTC | #1
On Mon, 24 Apr 2023, Sam James wrote:

> r11-10018-g33914983cf3734c2f8079963ba49fcc117499ef3 fixed PR105312 and added
> a test case for target/arm but the duplicate PR105573 has a test case for
> target/sparc that was uncommitted until now.

Pushed.

> 2023-04-21  Sam James   <sam@gentoo.org>
>         PR tree-optimization/105312
> 	PR target/105573
> 	* gcc/testsuite/gcc.target/sparc/pr105573.c: New test.
> 
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
>  gcc/testsuite/gcc.target/sparc/pr105573.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>  create mode 100644 gcc/testsuite/gcc.target/sparc/pr105573.c
> 
> diff --git a/gcc/testsuite/gcc.target/sparc/pr105573.c b/gcc/testsuite/gcc.target/sparc/pr105573.c
> new file mode 100644
> index 00000000000..14043a5fdad
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/sparc/pr105573.c
> @@ -0,0 +1,15 @@
> +/* { dg-do compile } */
> +/* { dg-options "-O3 -mvis3" } */
> +
> +int *UINT_sign_args, UINT_sign_steps;
> +int *UINT_sign_ip1;
> +
> +void UINT_sign() {
> +  char *op1 = (char*) UINT_sign_args;
> +  int os1 = UINT_sign_steps, i;
> +  for (; i; i++, op1 += os1) {
> +    unsigned in = *(unsigned *)UINT_sign_ip1;
> +    int *out = (int*) op1;
> +    *out = in > 0;
> +  }
> +}
>
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/sparc/pr105573.c b/gcc/testsuite/gcc.target/sparc/pr105573.c
new file mode 100644
index 00000000000..14043a5fdad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/pr105573.c
@@ -0,0 +1,15 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O3 -mvis3" } */
+
+int *UINT_sign_args, UINT_sign_steps;
+int *UINT_sign_ip1;
+
+void UINT_sign() {
+  char *op1 = (char*) UINT_sign_args;
+  int os1 = UINT_sign_steps, i;
+  for (; i; i++, op1 += os1) {
+    unsigned in = *(unsigned *)UINT_sign_ip1;
+    int *out = (int*) op1;
+    *out = in > 0;
+  }
+}