Commit c422cec5 by David Malcolm

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.
parent 1dae549d
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> 2020-02-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/93538 PR tree-optimization/93538
......
...@@ -171,8 +171,8 @@ int test_12c (void) ...@@ -171,8 +171,8 @@ int test_12c (void)
struct coord struct coord
{ {
int x; long x;
int y; long y;
}; };
int test_12d (struct coord c) int test_12d (struct coord c)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment