Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit 854323e

Browse files
authored
Merge pull request #592 from belka-ew/gcc-8-20180107
Update to gcc-8-20180107
2 parents 86fc0d5 + 8ed7e02 commit 854323e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

gcc.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gcc-8-20171231
1+
gcc-8-20180107

gcc/d/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2018-01-08 Eugene Wissner <[email protected]>
2+
3+
* d-builtins.cc (d_eval_constant_expression): Handle polynomial
4+
VECTOR_CST_NELTS.
5+
(build_frontend_type): Handle polynomial TYPE_VECTOR_SUBPARTS.
6+
17
2018-01-08 Iain Buclaw <[email protected]>
28

39
Update copyright years.

gcc/d/d-builtins.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ build_frontend_type (tree type)
197197
dtype = build_frontend_type (TREE_TYPE (type));
198198
if (dtype)
199199
{
200-
dtype = dtype->sarrayOf (TYPE_VECTOR_SUBPARTS (type))->addMod (mod);
200+
poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (type);
201+
dtype = dtype->sarrayOf (nunits.to_constant ())->addMod (mod);
201202

202203
if (dtype->nextOf ()->isTypeBasic () == NULL)
203204
break;
@@ -337,7 +338,7 @@ d_eval_constant_expression (tree cst)
337338
}
338339
else if (code == VECTOR_CST)
339340
{
340-
dinteger_t nunits = VECTOR_CST_NELTS (cst);
341+
dinteger_t nunits = VECTOR_CST_NELTS (cst).to_constant ();
341342
Expressions *elements = new Expressions;
342343
elements->setDim (nunits);
343344

0 commit comments

Comments
 (0)