aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2020-09-02 13:42:39 +0100
committerJozef Lawrynowicz <jozef.l@mittosystems.com>2020-09-02 14:18:09 +0100
commitd45a6c7099a346153e970476688be5bd6a016cef (patch)
tree051da6ad90e3959afaec0564cffe38a9c6a6e7cb
parent6bdbf0f37bda2587a4e82cbb956de7a159a397ae (diff)
downloadgcc-d45a6c7099a346153e970476688be5bd6a016cef.zip
gcc-d45a6c7099a346153e970476688be5bd6a016cef.tar.gz
gcc-d45a6c7099a346153e970476688be5bd6a016cef.tar.bz2
MSP430: Skip gcc.dg/pr55940.c in the small memory model
In the MSP430 small memory model, there is a 16-bit address space and pointer arithmetic wraps around the address space, so any calculated address is always within this range. In this test, pointer arithmetic wraps when 0x1000 is added to the address of a variable, causing the resulting address to be unexpectedly less than 0x2000, which breaks the test. gcc/testsuite/ChangeLog: * gcc.dg/pr55940.c: Skip for msp430 unless -mlarge is specified.
-rw-r--r--gcc/testsuite/gcc.dg/pr55940.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr55940.c b/gcc/testsuite/gcc.dg/pr55940.c
index d046d0b..85761f6 100644
--- a/gcc/testsuite/gcc.dg/pr55940.c
+++ b/gcc/testsuite/gcc.dg/pr55940.c
@@ -1,5 +1,6 @@
/* PR target/55940 */
/* { dg-do run } */
+/* { dg-skip-if "pointer arithmetic can wrap" { msp430-*-* } { "*" } { "-mlarge" } } */
/* { dg-options "-Os" } */
/* { dg-additional-options "-mpreferred-stack-boundary=2" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */