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)=16.
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. Ok for trunk? Cc: Sam James <s...@gentoo.org> Signed-off-by: Dimitar Dimitrov <dimi...@dinux.eu> --- gcc/testsuite/gcc.dg/torture/pr117546.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.47.1