From f4a14e09eef775f7fd1ff4dc7027c9237d386afe Mon Sep 17 00:00:00 2001 From: Jozef Lawrynowicz Date: Mon, 26 Nov 2018 21:14:47 +0000 Subject: [PATCH] sourcebuild.texi: Document check_effective_target_size20plus. 2018-11-26 Jozef Lawrynowicz gcc/ChangeLog: * doc/sourcebuild.texi: Document check_effective_target_size20plus. Clarify documentation for check_effective_target_size32plus. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/20151204.c: Add dg-require-effective-target size20plus. * gcc.dg/pr34225.c: Likewise. * gcc.dg/pr40971.c: Likewise. * gcc.dg/pr69071.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-10.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-2.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-3.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-5.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-6.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-7.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-8.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-9.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-11.c: Add dg-require-effective-target size32plus. * gcc.dg/Walloc-size-larger-than-4.c: Likewise. * gcc.dg/Walloc-size-larger-than-5.c: Likewise. * gcc.dg/Walloc-size-larger-than-6.c: Likewise. * gcc.dg/Walloc-size-larger-than-7.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-1.c: Likewise. * gcc.dg/tree-ssa/loop-interchange-1b.c: Likewise. * lib/target-supports.exp (check_effective_target_size20plus): New. (check_effective_target_size32plus): Update comment. From-SVN: r266483 --- gcc/ChangeLog | 5 ++++ gcc/doc/sourcebuild.texi | 7 ++++- gcc/testsuite/ChangeLog | 26 +++++++++++++++++++ .../gcc.c-torture/compile/20151204.c | 2 +- .../gcc.dg/Walloc-size-larger-than-4.c | 2 +- .../gcc.dg/Walloc-size-larger-than-5.c | 2 +- .../gcc.dg/Walloc-size-larger-than-6.c | 2 +- .../gcc.dg/Walloc-size-larger-than-7.c | 2 +- gcc/testsuite/gcc.dg/pr34225.c | 1 + gcc/testsuite/gcc.dg/pr40971.c | 1 + gcc/testsuite/gcc.dg/pr69071.c | 2 +- .../gcc.dg/tree-ssa/loop-interchange-1.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-10.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-11.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-1b.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-2.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-3.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-5.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-6.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-7.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-8.c | 3 ++- .../gcc.dg/tree-ssa/loop-interchange-9.c | 3 ++- gcc/testsuite/lib/target-supports.exp | 18 ++++++++++--- 23 files changed, 82 insertions(+), 21 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6406ec3b84..c2f1c4e0dc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-11-26 Jozef Lawrynowicz + + * doc/sourcebuild.texi: Document check_effective_target_size20plus. + Clarify documentation for check_effective_target_size32plus. + 2018-11-26 Aaron Sawdey * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 7734941511a..b8ab0ee629f 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1369,8 +1369,13 @@ Target supports @code{long double} that is longer than @code{double}. @item ptr32plus Target has pointers that are 32 bits or longer. +@item size20plus +Target has a 20-bit or larger address space, so at least supports +16-bit array and structure sizes. + @item size32plus -Target supports array and structure sizes that are 32 bits or longer. +Target has a 32-bit or larger address space, so at least supports +24-bit array and structure sizes. @item 4byte_wchar_t Target has @code{wchar_t} that is at least 4 bytes. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 749c573f886..ef9ad1db551 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,29 @@ +2018-11-26 Jozef Lawrynowicz + + * gcc.c-torture/compile/20151204.c: Add dg-require-effective-target + size20plus. + * gcc.dg/pr34225.c: Likewise. + * gcc.dg/pr40971.c: Likewise. + * gcc.dg/pr69071.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-10.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-2.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-3.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-5.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-6.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-7.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-8.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-9.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-11.c: Add dg-require-effective-target + size32plus. + * gcc.dg/Walloc-size-larger-than-4.c: Likewise. + * gcc.dg/Walloc-size-larger-than-5.c: Likewise. + * gcc.dg/Walloc-size-larger-than-6.c: Likewise. + * gcc.dg/Walloc-size-larger-than-7.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-1.c: Likewise. + * gcc.dg/tree-ssa/loop-interchange-1b.c: Likewise. + * lib/target-supports.exp (check_effective_target_size20plus): New. + (check_effective_target_size32plus): Update comment. + 2018-11-26 Uros Bizjak PR target/88178 diff --git a/gcc/testsuite/gcc.c-torture/compile/20151204.c b/gcc/testsuite/gcc.c-torture/compile/20151204.c index 6a46abf7225..e41f6c1dca9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20151204.c +++ b/gcc/testsuite/gcc.c-torture/compile/20151204.c @@ -1,4 +1,4 @@ -/* { dg-skip-if "Array too big" { "avr-*-*" "pdp11-*-*" } } */ +/* { dg-require-effective-target size20plus } */ typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c index 4b3a64b56ab..54e43cd9e6d 100644 --- a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c +++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c @@ -1,6 +1,6 @@ /* PR middle-end/82063 - issues with arguments enabled by -Wall { dg-do compile } - { dg-skip-if "small address space" { "pdp11-*-*" } } + { dg-require-effective-target size32plus } { dg-options "-O -Walloc-size-larger-than=1MiB -ftrack-macro-expansion=0" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c index 4217ad65110..774c4cf271b 100644 --- a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c +++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c @@ -1,6 +1,6 @@ /* PR middle-end/82063 - issues with arguments enabled by -Wall { dg-do compile } - { dg-skip-if "small address space" { "pdp11-*-*" } } + { dg-require-effective-target size32plus } { dg-options "-O -Walloc-size-larger-than=1MB -ftrack-macro-expansion=0" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c index a46fce7d0ca..2dfc6632b9e 100644 --- a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c +++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c @@ -1,6 +1,6 @@ /* PR middle-end/82063 - issues with arguments enabled by -Wall { dg-do compile } - { dg-skip-if "small address space" { "pdp11-*-*" } } + { dg-require-effective-target size32plus } { dg-options "-O -Walloc-size-larger-than=1GiB -ftrack-macro-expansion=0" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c index 4d9aafd661e..2cc517fab59 100644 --- a/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c +++ b/gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c @@ -1,6 +1,6 @@ /* PR middle-end/82063 - issues with arguments enabled by -Wall { dg-do compile } - { dg-skip-if "small address space" { "pdp11-*-*" } } + { dg-require-effective-target size32plus } { dg-options "-O -Walloc-size-larger-than=1GB -ftrack-macro-expansion=0" } */ void sink (void*); diff --git a/gcc/testsuite/gcc.dg/pr34225.c b/gcc/testsuite/gcc.dg/pr34225.c index 659e176ad96..e3373403a9c 100644 --- a/gcc/testsuite/gcc.dg/pr34225.c +++ b/gcc/testsuite/gcc.dg/pr34225.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fno-strict-aliasing -fstack-protector" } */ /* { dg-require-effective-target fstack_protector } */ +/* { dg-require-effective-target size20plus } */ typedef __SIZE_TYPE__ size_t; extern int sscanf (const char *, const char *, ...); diff --git a/gcc/testsuite/gcc.dg/pr40971.c b/gcc/testsuite/gcc.dg/pr40971.c index 31dfd5e1398..4317638e7bd 100644 --- a/gcc/testsuite/gcc.dg/pr40971.c +++ b/gcc/testsuite/gcc.dg/pr40971.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O -fstack-protector -fno-strict-aliasing" } */ /* { dg-require-effective-target fstack_protector } */ +/* { dg-require-effective-target size20plus } */ extern void bar (char *); diff --git a/gcc/testsuite/gcc.dg/pr69071.c b/gcc/testsuite/gcc.dg/pr69071.c index 0396bbc70e2..3ae38112fa2 100644 --- a/gcc/testsuite/gcc.dg/pr69071.c +++ b/gcc/testsuite/gcc.dg/pr69071.c @@ -1,7 +1,7 @@ /* PR target/69071 */ /* { dg-do compile } */ /* { dg-options "-O2 -g" } */ -/* { dg-skip-if "Array too big" { "avr-*-*" } } */ +/* { dg-require-effective-target size20plus } */ void *bar (void *); diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c index 4a81e128e16..c7ebaefeab8 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fassociative-math -fno-signed-zeros -fno-trapping-math -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size32plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ /* Copied from graphite/interchange-4.c */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c index 57357569965..8f5a9a03970 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c index 2a1b340a07b..413b81e0f21 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c index 7de2b403005..a3063bbef45 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size32plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ /* Copied from graphite/interchange-4.c */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c index 247adc98c70..fbd46a2af8b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ /* Copied from graphite/interchange-5.c */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c index b239230157d..8028e36e2f1 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big stack" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big stack" { visium-*-* } } */ /* Copied from graphite/interchange-6.c */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c index 8f13cd4617b..81050a8de33 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M], c[M][M], d[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c index a38fd9d28d4..8a2692ecc04 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M], c[M][M], d[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c index e6ad26f2a4e..d55c1e2f41d 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M], c[M][M], d[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c index 5ed300aa165..391b8a437f8 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M], c[M][M], d[M][M]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c index a984e47d854..b5fda2d5097 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -floop-interchange -fdump-tree-linterchange-details" } */ -/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */ +/* { dg-require-effective-target size20plus } */ +/* { dg-skip-if "too big data segment" { visium-*-* } } */ #define M 256 int a[M][M], b[M][M], c[M], d[M]; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 37791cfcf9d..fe7169158e4 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2608,9 +2608,21 @@ proc check_effective_target_ptr32plus { } { }] } -# Return 1 if we support 32-bit or larger array and structure sizes -# using default options, 0 otherwise. Avoid false positive on -# targets with 20 or 24 bit address spaces. +# Return 1 if we support 16-bit or larger array and structure sizes +# using default options, 0 otherwise. +# This implies at least a 20-bit address space, as no targets have an address +# space between 16 and 20 bits. + +proc check_effective_target_size20plus { } { + return [check_no_compiler_messages size20plus object { + char dummy[65537L]; + }] +} + +# Return 1 if we support 24-bit or larger array and structure sizes +# using default options, 0 otherwise. +# This implies at least a 32-bit address space, as no targets have an address +# space between 24 and 32 bits. proc check_effective_target_size32plus { } { return [check_no_compiler_messages size32plus object { -- 2.30.2