From a2d366026e8042675482657128836760d547e593 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 18 Oct 2004 15:01:51 -0700 Subject: [PATCH] c-common.c (handle_mode_attribute): Allow scalar->vector type changes yet. * c-common.c (handle_mode_attribute): Allow scalar->vector type changes yet. From-SVN: r89248 --- gcc/ChangeLog | 5 +++++ gcc/c-common.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac8efa95bb3..28a3177fd1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-18 Richard Henderson + + * c-common.c (handle_mode_attribute): Allow scalar->vector + type changes yet. + 2004-10-18 Kazu Hirata * expr.c (expand_expr_real_1) [MODIFY_EXPR]: Don't request a diff --git a/gcc/c-common.c b/gcc/c-common.c index c05779c33ad..271b4365961 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4386,7 +4386,9 @@ handle_mode_attribute (tree *node, tree name, tree args, TYPE_PRECISION (type) = TYPE_PRECISION (typefm); typefm = type; } - else if (TREE_CODE (type) != TREE_CODE (typefm)) + else if (VECTOR_MODE_P (mode) + ? TREE_CODE (type) != TREE_CODE (TREE_TYPE (typefm)) + : TREE_CODE (type) != TREE_CODE (typefm)) { error ("mode %qs applied to inappropriate type", p); return NULL_TREE;