[committed] testsuite: Fix up ipa/pr119530.c testcase [PR119318]

Message ID Z/1IZM6cBLGBEnT0@tucnak
State New
Headers
Series [committed] testsuite: Fix up ipa/pr119530.c testcase [PR119318] |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply

Commit Message

Jakub Jelinek April 14, 2025, 5:39 p.m. UTC
  Hi!

On Sat, Apr 12, 2025 at 12:19:28AM +0200, Martin Jambor wrote:
> 2025-04-11  Martin Jambor  <mjambor@suse.cz>
> 
> 	PR ipa/119318
> 	* gcc.dg/ipa/pr119318.c: New test.
> 	* gcc.dg/ipa/pr119530.c: Likwise.

I'm seeing
+FAIL: gcc.dg/ipa/pr119530.c execution test
on i686-linux.  The problem is that when long is just 32-bit and
so is unsigned, the testcase then behaves differently and should abort.
Fixed by making the argument long long instead.
While at it, just in case I've changed type of d variable to signed char
as well just in case there is -funsigned-char 8-bit int target or something
similar.

Fixed thusly, tested on x86_64-linux and i686-linux (also with reversion
of the PR119318 ipa-cp.cc change where it FAILs on both), committed to trunk
as obvious.

2025-04-14  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/119318
	* gcc.dg/ipa/pr119530.c (d): Change type from char to signed char.
	(e): Change argument type from long to long long.



	Jakub
  

Patch

--- gcc/testsuite/gcc.dg/ipa/pr119530.c.jj	2025-04-14 15:02:23.768540571 +0200
+++ gcc/testsuite/gcc.dg/ipa/pr119530.c	2025-04-14 18:47:15.610079496 +0200
@@ -5,8 +5,8 @@  struct a {
   int b;
 };
 int c;
-char d;
-static int e(long f) { return f < 0; }
+signed char d;
+static int e(long long f) { return f < 0; }
 static void g(unsigned f) { c = e(~f); }
 int main() {
   int h;