diff mbox series

testsuite: Fix up pr116488.c and pr117226.c tests [PR116488]

Message ID Zxej/m9uLQqqKq9C@tucnak
State New
Headers show
Series testsuite: Fix up pr116488.c and pr117226.c tests [PR116488] | expand

Commit Message

Jakub Jelinek Oct. 22, 2024, 1:09 p.m. UTC
Hi!

On Mon, Oct 21, 2024 at 01:39:52PM -0600, Jeff Law wrote:
> 	* gcc.dg/torture/pr116488.c: New test.
> 	* gcc.dg/torture/pr117226.c: New test.

These two tests FAIL on powerpc64le-linux (and I assume on all other
-funsigned-char defaulting targets).

The following patch fixes that, tested on powerpc64le-linux and
x86_64-linux (-m32/-m64); on x86_64 also tested before/after with
-funsigned-char.

Ok for trunk?

2024-10-22  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/116488
	PR rtl-optimization/117226
	* gcc.dg/torture/pr116488.c (c, e): Change type from char to
	signed char.
	* gcc.dg/torture/pr117226.c (main): Change f type from char to
	signed char.



	Jakub

Comments

Jeff Law Oct. 24, 2024, 3:22 a.m. UTC | #1
On 10/22/24 7:09 AM, Jakub Jelinek wrote:
> Hi!
> 
> On Mon, Oct 21, 2024 at 01:39:52PM -0600, Jeff Law wrote:
>> 	* gcc.dg/torture/pr116488.c: New test.
>> 	* gcc.dg/torture/pr117226.c: New test.
> 
> These two tests FAIL on powerpc64le-linux (and I assume on all other
> -funsigned-char defaulting targets).
> 
> The following patch fixes that, tested on powerpc64le-linux and
> x86_64-linux (-m32/-m64); on x86_64 also tested before/after with
> -funsigned-char.
> 
> Ok for trunk?
> 
> 2024-10-22  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/116488
> 	PR rtl-optimization/117226
> 	* gcc.dg/torture/pr116488.c (c, e): Change type from char to
> 	signed char.
> 	* gcc.dg/torture/pr117226.c (main): Change f type from char to
> 	signed char.
Ugh.  Sorry about that.  I went ahead and pushed this for you since I've 
got multiple test systems complaining to me about the new tests ;-)

Jeff
diff mbox series

Patch

--- gcc/testsuite/gcc.dg/torture/pr116488.c.jj	2024-10-22 09:21:05.503216018 +0000
+++ gcc/testsuite/gcc.dg/torture/pr116488.c	2024-10-22 12:57:45.030936225 +0000
@@ -1,7 +1,7 @@ 
 /* { dg-do run } */
 /* { dg-additional-options "-fno-forward-propagate" } */
 int a, b;
-char c, e;
+signed char c, e;
 unsigned char d;
 __attribute__ ((noinline,noclone,noipa))
 void f(int g, short h) {
--- gcc/testsuite/gcc.dg/torture/pr117226.c.jj	2024-10-22 09:21:05.683220698 +0000
+++ gcc/testsuite/gcc.dg/torture/pr117226.c	2024-10-22 12:58:08.071530058 +0000
@@ -5,7 +5,7 @@ 
 int a = 128, b, d;
 long e = -2, c;
 int main() {
-  char f = a;
+  signed char f = a;
   int g = f;
   c = (g < 0) - e;
   unsigned char h = g;