diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-01-18 15:58:48 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-01-18 15:58:48 -0500 |
commit | 02a27e82af8dcf59669678e6a143c45e81a08558 (patch) | |
tree | 37e6ceb752205a901f325fb11129c369cf8a66e4 /gcc | |
parent | a9d07d6e65f690431a892903c89404a9ed291000 (diff) | |
download | gcc-02a27e82af8dcf59669678e6a143c45e81a08558.zip gcc-02a27e82af8dcf59669678e6a143c45e81a08558.tar.gz gcc-02a27e82af8dcf59669678e6a143c45e81a08558.tar.bz2 |
(get_unwidened): Don't crash if FIELD_DECL not layed out.
From-SVN: r13508
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4181,7 +4181,9 @@ get_unwidened (op, for_type) if (TREE_CODE (op) == COMPONENT_REF /* Since type_for_size always gives an integer type. */ - && TREE_CODE (type) != REAL_TYPE) + && TREE_CODE (type) != REAL_TYPE + /* Don't crash if field not layed out yet. */ + && DECL_SIZE (TREE_OPERAND (op, 1)) != 0) { unsigned innerprec = TREE_INT_CST_LOW (DECL_SIZE (TREE_OPERAND (op, 1))); type = type_for_size (innerprec, TREE_UNSIGNED (TREE_OPERAND (op, 1))); |