From c422cec54a5495f6f42b80f35a11c5508fe8eec3 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 3 Feb 2020 15:39:50 -0500 Subject: [PATCH] analyzer: fix testsuite assumption that sizeof(int) > 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/analyzer/data-model-1.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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) -- 2.30.2