https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
--- Comment #46 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #45)
>
> We SRA a bool field into a QItype variable and then think we need a VCE to
> get back to bool. Could the SRA variable have type bool?
A semi-wild guess, would the following make SRA not invent the V_C_E (and do
what you want)?
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 5561ea6f655..c3551b469f1 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2515,7 +2515,7 @@ analyze_access_subtree (struct access *root, struct
access *parent,
/* Always create access replacements that cover the whole access.
For integral types this means the precision has to match.
Avoid assumptions based on the integral type kind, too. */
- if (INTEGRAL_TYPE_P (root->type)
+ if (false && INTEGRAL_TYPE_P (root->type)
&& (TREE_CODE (root->type) != INTEGER_TYPE
|| TYPE_PRECISION (root->type) != root->size)
/* But leave bitfield accesses alone. */