public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-coroutines] analyzer: fix testsuite assumption that sizeof(int) > 2
@ 2020-02-04 20:57 Iain D Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2020-02-04 20:57 UTC (permalink / raw)
  To: gcc-cvs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1881 bytes --]

https://gcc.gnu.org/g:c422cec54a5495f6f42b80f35a11c5508fe8eec3

commit c422cec54a5495f6f42b80f35a11c5508fe8eec3
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Mon Feb 3 15:39:50 2020 -0500

    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:
---
 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 7ce58af..d2dc664 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-02-04  David Malcolm  <dmalcolm@redhat.com>
+
+	* gcc.dg/analyzer/data-model-1.c (struct coord): Convert fields
+	from int to long.
+
 2020-02-04  Richard Biener  <rguenther@suse.de>
 
 	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 3f92594..d75b9fa 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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-04 20:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 20:57 [gcc/devel/c++-coroutines] analyzer: fix testsuite assumption that sizeof(int) > 2 Iain D Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).