aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/d-compiler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/d-compiler.cc')
-rw-r--r--gcc/d/d-compiler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/d/d-compiler.cc b/gcc/d/d-compiler.cc
index a8adb98..75ca157 100644
--- a/gcc/d/d-compiler.cc
+++ b/gcc/d/d-compiler.cc
@@ -111,7 +111,7 @@ Compiler::paintAsType (UnionExp *, Expression *expr, Type *type)
}
/* Build vector type. */
- int nunits = ((TypeSArray *) expr->type)->dim->toUInteger ();
+ int nunits = expr->type->isTypeSArray ()->dim->toUInteger ();
Type *telem = expr->type->nextOf ();
tree vectype = build_vector_type (build_ctype (telem), nunits);
@@ -127,7 +127,7 @@ Compiler::paintAsType (UnionExp *, Expression *expr, Type *type)
{
/* Interpret value as a vector of the same size,
then return the array literal. */
- int nunits = ((TypeSArray *) type)->dim->toUInteger ();
+ int nunits = type->isTypeSArray ()->dim->toUInteger ();
Type *elem = type->nextOf ();
tree vectype = build_vector_type (build_ctype (elem), nunits);