Commit 04940ba5 by Jim Wilson Committed by Jeff Law

sdbout.c (plain_type_1, [...]): Verify that TYPE_DOMAIN has integer…

sdbout.c (plain_type_1, [...]): Verify that TYPE_DOMAIN has integer TYPE_{MAX,MIN}_VALUE before using them.

        * sdbout.c (plain_type_1, case ARRAY_TYPE): Verify that TYPE_DOMAIN
        has integer TYPE_{MAX,MIN}_VALUE before using them.
Bring over from the FSF.

From-SVN: r15117
parent f5ffa999
......@@ -25,6 +25,9 @@ Fri Sep 5 10:08:44 1997 Jeffrey A Law (law@cygnus.com)
Fri Sep 5 09:37:50 1997 Jim Wilson (wilson@cygnus.com)
* sdbout.c (plain_type_1, case ARRAY_TYPE): Verify that TYPE_DOMAIN
has integer TYPE_{MAX,MIN}_VALUE before using them.
* m68k/m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Add
__HPUX_ASM__ versions.
......
......@@ -584,6 +584,8 @@ plain_type_1 (type, level)
if (sdb_n_dims < SDB_MAX_DIM)
sdb_dims[sdb_n_dims++]
= (TYPE_DOMAIN (type)
&& TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type))) == INTEGER_CST
&& TREE_CODE (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) == INTEGER_CST
? (TREE_INT_CST_LOW (TYPE_MAX_VALUE (TYPE_DOMAIN (type)))
- TREE_INT_CST_LOW (TYPE_MIN_VALUE (TYPE_DOMAIN (type))) + 1)
: 0);
......
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