summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-20 12:56:59 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-20 12:56:59 +0000
commit0f08403b7845efe57ead3fd696d1d01f3461e746 (patch)
treec46e1780f50e12eb39b3ecf27d44ccecbeff1967
parent3ef53a668c1ffcfcd825de1247cddb04cba33d09 (diff)
downloadppe42-gcc-0f08403b7845efe57ead3fd696d1d01f3461e746.tar.gz
ppe42-gcc-0f08403b7845efe57ead3fd696d1d01f3461e746.zip
* stor-layout.c (layout_type, case ARRAY_TYPE): Kludge to disable
array-too-large test for signed sizetype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45707 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stor-layout.c11
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6f039c6fd8e..1b17a43b660 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 20 09:00:27 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * stor-layout.c (layout_type, case ARRAY_TYPE): Kludge to disable
+ array-too-large test for signed sizetype.
+
Thu Sep 20 12:19:36 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.md (indirect_jump): Allow Pmode operand.
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index e145b97e5d6..57b839f7724 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1445,9 +1445,16 @@ layout_type (type)
= size_binop (MULT_EXPR, TYPE_SIZE_UNIT (element), length);
/* Complain if the user has requested an array too large to
- fit in size_t. */
+ fit in size_t.
+
+ ??? Disable this test for signed sizetypes. This has the effect
+ of disabling it for Ada, where it will cause trouble. However,
+ this test doesn't make sense for C either since there should
+ be no problem with a type whose size overflows, only an
+ object whose size overflows. */
if (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
- && TREE_OVERFLOW (TYPE_SIZE (type)))
+ && TREE_OVERFLOW (TYPE_SIZE (type))
+ && TREE_UNSIGNED (TREE_TYPE (TYPE_SIZE (type))))
{
error ("requested array too large for target");
OpenPOWER on IntegriCloud