aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 738c1a7..1d2b1c5 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2743,6 +2743,9 @@ generate_subtree_copies (struct access *access, tree agg,
gimple_stmt_iterator *gsi, bool write,
bool insert_after, location_t loc)
{
+ /* Never write anything into constant pool decls. See PR70602. */
+ if (!write && constant_decl_p (agg))
+ return;
do
{
if (chunk_size && access->offset >= start_offset + chunk_size)