sourcebuild.texi: Document check_effective_target_size20plus.
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Mon, 26 Nov 2018 21:14:47 +0000 (21:14 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Mon, 26 Nov 2018 21:14:47 +0000 (21:14 +0000)
2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

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

23 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20151204.c
gcc/testsuite/gcc.dg/Walloc-size-larger-than-4.c
gcc/testsuite/gcc.dg/Walloc-size-larger-than-5.c
gcc/testsuite/gcc.dg/Walloc-size-larger-than-6.c
gcc/testsuite/gcc.dg/Walloc-size-larger-than-7.c
gcc/testsuite/gcc.dg/pr34225.c
gcc/testsuite/gcc.dg/pr40971.c
gcc/testsuite/gcc.dg/pr69071.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-10.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-11.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-1b.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-2.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-3.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-5.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-6.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-7.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-8.c
gcc/testsuite/gcc.dg/tree-ssa/loop-interchange-9.c
gcc/testsuite/lib/target-supports.exp

index a6406ec3b84beeef6ea6e0200a77ebf6ff3b61b1..c2f1c4e0dc0a0d364fddf4432dfa99be0c6195fc 100644 (file)
@@ -1,3 +1,8 @@
+2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * doc/sourcebuild.texi: Document check_effective_target_size20plus.
+       Clarify documentation for check_effective_target_size32plus.
+
 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
 
        * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
index 7734941511ac77f0e9ca3f357d846243a1977b89..b8ab0ee629f6486852b0ffbe74f8b1bb8e837a39 100644 (file)
@@ -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.
index 749c573f886813c5a02e623613145e20c705db32..ef9ad1db55116c04c5542920e6326373f6ab0157 100644 (file)
@@ -1,3 +1,29 @@
+2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * 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  <ubizjak@gmail.com>
 
        PR target/88178
index 6a46abf722572d22316b3c952c99c99070adeebf..e41f6c1dca9eed59a13e8a50d0efc9a529254659 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-skip-if "Array too big" { "avr-*-*" "pdp11-*-*" } } */
+/* { dg-require-effective-target size20plus } */
 
 typedef __SIZE_TYPE__ size_t;
 
index 4b3a64b56abbeab66e6f1443c07a8961e5c6bbec..54e43cd9e6dc636f7567544586788f0f9d446ea7 100644 (file)
@@ -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*);
index 4217ad651102d8d56e5353c8c2e47d84bb2bb538..774c4cf271b90f600fa92a7543e48124c369eb43 100644 (file)
@@ -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*);
index a46fce7d0ca69046746ac5e9b348b9f4ccb53ec7..2dfc6632b9e4427abbf03784c57cf0070caa1c7b 100644 (file)
@@ -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*);
index 4d9aafd661e05e1a3e70288c90b04cd0428a837b..2cc517fab59c11aeb369df3c9a0382a069dfd2a7 100644 (file)
@@ -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*);
index 659e176ad96a64d64a5effe89cf480af6e228bfe..e3373403a9cd985ee7bc3bb2e5e9f5fbaa8a9f11 100644 (file)
@@ -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 *, ...);
index 31dfd5e13989812cb023b7dce6e3ae992ddee7c7..4317638e7bdd0fb321834cd61b762491a743bfa4 100644 (file)
@@ -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 *);
 
index 0396bbc70e209cd87827fee152e85066c4aca437..3ae38112fa2b86ea91b73ec30a815b992b8f9473 100644 (file)
@@ -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 *);
 
index 4a81e128e160a1a0bdac561ca2c6309ed574f6b6..c7ebaefeab8afe204c505fb06e6b6f44138ed6bf 100644 (file)
@@ -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 */
 
index 57357569965b35b024420edd7a96c610a193f5ea..8f5a9a03970e7bb3d4142c800cd729a8fe59efac 100644 (file)
@@ -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];
index 2a1b340a07b748485447b189093a7678d686eb35..413b81e0f21ef7b2051d044048a795e48a9f55c0 100644 (file)
@@ -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];
index 7de2b403005a4d70268b289dab1c6b6e5b41c7ca..a3063bbef45824bbfb95a5711cf6ed5bf8fc2d9e 100644 (file)
@@ -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 */
 
index 247adc98c700ebf29640029cb518222d00c9810c..fbd46a2af8b69631c2c9708a573e6249b8ceeea8 100644 (file)
@@ -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 */
 
index b239230157da725bd039734145790d9e8bf4320b..8028e36e2f17411f5130faf4f909e74dd223417c 100644 (file)
@@ -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 */
 
index 8f13cd4617b384ad3c893d3d710614917a5874d9..81050a8de3301b54b9a4d01099befa0a21aade3e 100644 (file)
@@ -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];
index a38fd9d28d4eb6f12762109ee79f54b1c2cd9173..8a2692ecc047f237d24e294e27f39c8a45dd8c73 100644 (file)
@@ -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];
index e6ad26f2a4e9f8c198257c0d4c0b00c8ac834f78..d55c1e2f41d02e1725b9b06602111f9526d7d77a 100644 (file)
@@ -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];
index 5ed300aa165b6ef8fc90bb6b5af3a2fe33b47329..391b8a437f8bd79d311b0de5fc0e61ee7574add8 100644 (file)
@@ -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];
index a984e47d85429cbbc5433074e33962b379b12378..b5fda2d5097f7f4624bee03bf1c86ada9e915318 100644 (file)
@@ -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];
index 37791cfcf9df58e21fb6120af7f07998242e2ac3..fe7169158e48c477b7f6c87bf488c8929e5822bb 100644 (file)
@@ -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 {