aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-03-31 06:18:58 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-03-31 06:18:58 -0500
commit5bb3d1ddedca80d88fd56a6b3c18a987567f6ae1 (patch)
treeb3961426cb261426ddb7a5e1f17343782facf5d7 /gcc
parente4329280ac5f866a44f552a247b5b7f356495dd3 (diff)
downloadgcc-5bb3d1ddedca80d88fd56a6b3c18a987567f6ae1.zip
gcc-5bb3d1ddedca80d88fd56a6b3c18a987567f6ae1.tar.gz
gcc-5bb3d1ddedca80d88fd56a6b3c18a987567f6ae1.tar.bz2
(layout_decl): Don't make a bitfield an integral mode if the mode of
the field type is not MODE_INT. From-SVN: r11647
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stor-layout.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 7669106..a67418b 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1,5 +1,5 @@
/* C-compiler utilities for types and variables storage layout
- Copyright (C) 1987, 88, 92, 93, 94, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -260,7 +260,8 @@ layout_decl (decl, known_align)
if (DECL_BIT_FIELD (decl)
&& TYPE_SIZE (type) != 0
- && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
+ && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
+ && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT)
{
register enum machine_mode xmode
= mode_for_size (TREE_INT_CST_LOW (DECL_SIZE (decl)), MODE_INT, 1);