diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2018-12-29 11:53:36 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2018-12-29 11:53:36 +0100 |
| commit | a4983b7ad84e96ef8914e1d027d7b33f7fb5c4a3 (patch) | |
| tree | c8e09b21dc642ed014458527c995efb184fca84e /gcc/omp-low.c | |
| parent | 2fda71537b379f16b09ca38a2020ff51ca1e99bf (diff) | |
| download | gcc-a4983b7ad84e96ef8914e1d027d7b33f7fb5c4a3.zip gcc-a4983b7ad84e96ef8914e1d027d7b33f7fb5c4a3.tar.gz gcc-a4983b7ad84e96ef8914e1d027d7b33f7fb5c4a3.tar.bz2 | |
re PR ipa/88586 (ICE: Segmentation fault (in free_lang_data_in_decl))
PR ipa/88586
* omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
and ifield. Update TYPE_ALIGN from alignment of field, ifield or
bfield.
* g++.dg/gomp/pr88586.C: New test.
From-SVN: r267461
Diffstat (limited to 'gcc/omp-low.c')
| -rw-r--r-- | gcc/omp-low.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index b406ce7..4517fc1 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -7011,6 +7011,12 @@ lower_omp_task_reductions (omp_context *ctx, enum tree_code code, tree clauses, *last = field; DECL_CHAIN (field) = ifield; last = &DECL_CHAIN (ifield); + DECL_CONTEXT (field) = record_type; + if (TYPE_ALIGN (record_type) < DECL_ALIGN (field)) + SET_TYPE_ALIGN (record_type, DECL_ALIGN (field)); + DECL_CONTEXT (ifield) = record_type; + if (TYPE_ALIGN (record_type) < DECL_ALIGN (ifield)) + SET_TYPE_ALIGN (record_type, DECL_ALIGN (ifield)); } for (int pass = 0; pass < 2; pass++) { @@ -7036,12 +7042,16 @@ lower_omp_task_reductions (omp_context *ctx, enum tree_code code, tree clauses, else SET_DECL_ALIGN (field, TYPE_ALIGN (type)); DECL_CONTEXT (field) = record_type; + if (TYPE_ALIGN (record_type) < DECL_ALIGN (field)) + SET_TYPE_ALIGN (record_type, DECL_ALIGN (field)); *last = field; last = &DECL_CHAIN (field); tree bfield = build_decl (OMP_CLAUSE_LOCATION (c), FIELD_DECL, NULL_TREE, boolean_type_node); DECL_CONTEXT (bfield) = record_type; + if (TYPE_ALIGN (record_type) < DECL_ALIGN (bfield)) + SET_TYPE_ALIGN (record_type, DECL_ALIGN (bfield)); *last = bfield; last = &DECL_CHAIN (bfield); } |
