From: David Malcolm Date: Mon, 3 Feb 2020 20:39:50 +0000 (-0500) Subject: analyzer: fix testsuite assumption that sizeof(int) > 2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c422cec54a5495f6f42b80f35a11c5508fe8eec3;p=gcc.git analyzer: fix testsuite assumption that sizeof(int) > 2 Fix some failures on xstormy16-elf: gcc.dg/analyzer/data-model-1.c (test for warnings, line 595) gcc.dg/analyzer/data-model-1.c (test for warnings, line 642) gcc.dg/analyzer/data-model-1.c (test for warnings, line 690) gcc.dg/analyzer/data-model-1.c (test for warnings, line 738) due to: warning: overflow in conversion from ‘long int’ to ‘int’ changes value from ‘100024’ to ‘-31048’ [-Woverflow] 20 | p[0].x = 100024; | ^~~~~~ gcc/testsuite/ChangeLog: * gcc.dg/analyzer/data-model-1.c (struct coord): Convert fields from int to long. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ce58af462b..d2dc6648bc4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-04 David Malcolm + + * gcc.dg/analyzer/data-model-1.c (struct coord): Convert fields + from int to long. + 2020-02-04 Richard Biener PR tree-optimization/93538 diff --git a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c index 3f925941f87..d75b9fa1db3 100644 --- a/gcc/testsuite/gcc.dg/analyzer/data-model-1.c +++ b/gcc/testsuite/gcc.dg/analyzer/data-model-1.c @@ -171,8 +171,8 @@ int test_12c (void) struct coord { - int x; - int y; + long x; + long y; }; int test_12d (struct coord c)