From: Dimitar Dimitrov Date: Sat, 18 Jan 2025 18:19:43 +0000 (+0200) Subject: testsuite: Fixes for test case pr117546.c X-Git-Tag: basepoints/gcc-16~2522 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34c51485808188eec3ebdacf969dd335e908aab3;p=thirdparty%2Fgcc.git testsuite: Fixes for test case pr117546.c This test fails on AVR. Debugging the test on x86 host, I noticed that u in function s sometimes has value 16128. The "t <= 3 * u" expression in the same function results in signed integer overflow for targets with sizeof(int)=2. Fix by requiring int32 effective target. Also add return statement for the main function. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr117546.c: Require effective target int32. (main): Add return statement. Signed-off-by: Dimitar Dimitrov --- diff --git a/gcc/testsuite/gcc.dg/torture/pr117546.c b/gcc/testsuite/gcc.dg/torture/pr117546.c index 21e2aef18b9..b60f877a906 100644 --- a/gcc/testsuite/gcc.dg/torture/pr117546.c +++ b/gcc/testsuite/gcc.dg/torture/pr117546.c @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target int32 } } */ typedef struct { int a; @@ -81,4 +81,6 @@ int main() { l.glyf.coords[4] = (e){2, 206}; l.glyf.coords[6] = (e){0, 308, 5}; w(&l); + + return 0; }