aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-11-09 22:40:44 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-11-09 22:40:44 +0000
commita91c72e2141bbad97e7017a467d80ae0cdcd8eaf (patch)
tree753b3f8e319e891e75281afc0e55d037439842a6 /gcc/tree.h
parent374d022552a1aa11ad0a53ec635255d09f365289 (diff)
downloadgcc-a91c72e2141bbad97e7017a467d80ae0cdcd8eaf.zip
gcc-a91c72e2141bbad97e7017a467d80ae0cdcd8eaf.tar.gz
gcc-a91c72e2141bbad97e7017a467d80ae0cdcd8eaf.tar.bz2
re PR middle-end/68259 ([sso] tree checking failure in reverse_storage_order_for_component_p, at tree.h:4392)
PR middle-end/68259 * tree.h (reverse_storage_order_for_component_p) <COMPONENT_REF>: Check that the type of the first operand is an aggregate type. From-SVN: r230056
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 2a5ccfc..1bb59f2 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4387,8 +4387,9 @@ reverse_storage_order_for_component_p (tree t)
{
case ARRAY_REF:
case COMPONENT_REF:
- /* ??? Fortran can take COMPONENT_REF of a void type. */
- return !VOID_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0)))
+ /* ??? Fortran can take COMPONENT_REF of a VOID_TYPE. */
+ /* ??? UBSan can take COMPONENT_REF of a REFERENCE_TYPE. */
+ return AGGREGATE_TYPE_P (TREE_TYPE (TREE_OPERAND (t, 0)))
&& TYPE_REVERSE_STORAGE_ORDER (TREE_TYPE (TREE_OPERAND (t, 0)));
case BIT_FIELD_REF: