diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-09-26 05:44:58 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-09-27 10:37:28 +0000 |
commit | 76773d3fea4daaaf5b0f6d79d9f48ffe6b3c97fd (patch) | |
tree | ed14fe1b825df651ce04d07ea69a56d85f3ee273 /gcc/go/go-lang.c | |
parent | d5f8abe1d3f718a75cbff0a453c1d961be5939b7 (diff) | |
download | gcc-76773d3fea4daaaf5b0f6d79d9f48ffe6b3c97fd.zip gcc-76773d3fea4daaaf5b0f6d79d9f48ffe6b3c97fd.tar.gz gcc-76773d3fea4daaaf5b0f6d79d9f48ffe6b3c97fd.tar.bz2 |
Fix PR c/94726: ICE with __builtin_shuffle and changing of types
The problem here is __builtin_shuffle when called with two arguments
instead of 1, uses a SAVE_EXPR to put in for the 1st and 2nd operand
of VEC_PERM_EXPR and when we go and gimplify the SAVE_EXPR, the type
is now error_mark_node and that fails hard.
This fixes the problem by adding a simple check for type of operand
of SAVE_EXPR not to be error_mark_node.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
gcc/ChangeLog:
PR c/94726
* gimplify.c (gimplify_save_expr): Return early
if the type of val is error_mark_node.
gcc/testsuite/ChangeLog:
PR c/94726
* gcc.dg/pr94726.c: New test.
Diffstat (limited to 'gcc/go/go-lang.c')
0 files changed, 0 insertions, 0 deletions