aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-05-27 11:00:38 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-05-27 11:00:38 +0000
commit469dfae932684a783566ae5f1654504fcf8ffd54 (patch)
treed87a910aa92849bb44796633b36b39da56efa712 /gcc/tree-sra.c
parent3b3c04308eef477c84841ef6090ad28e71315220 (diff)
downloadgcc-469dfae932684a783566ae5f1654504fcf8ffd54.zip
gcc-469dfae932684a783566ae5f1654504fcf8ffd54.tar.gz
gcc-469dfae932684a783566ae5f1654504fcf8ffd54.tar.bz2
tree-sra.c (sra_type_can_be_decomposed_p): Make sure that the bitfield is of integral type before testing its precision.
* tree-sra.c (sra_type_can_be_decomposed_p) <RECORD_TYPE>: Make sure that the bitfield is of integral type before testing its precision. From-SVN: r136009
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 9e15f92..244219f 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -268,6 +268,7 @@ sra_type_can_be_decomposed_p (tree type)
{
/* Reject incorrectly represented bit fields. */
if (DECL_BIT_FIELD (t)
+ && INTEGRAL_TYPE_P (TREE_TYPE (t))
&& (tree_low_cst (DECL_SIZE (t), 1)
!= TYPE_PRECISION (TREE_TYPE (t))))
goto fail;