From 4ed9ab2de7fd409e385524ab9ca2e62a3097691e Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sat, 29 Jun 2019 07:37:31 +0000 Subject: [PATCH] trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type, if any. * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on the main variant of a type, if any. From-SVN: r272815 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/trans.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4060019a535..3abcabbf3ba 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2019-06-29 Eric Botcazou + + * gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on + the main variant of a type, if any. + 2019-06-29 Eric Botcazou * gcc-interface/decl.c (set_nonaliased_component_on_array_type): Add diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index e2d2ddae3fe..32dd132c316 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -9042,8 +9042,9 @@ mark_visited_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) else if (!TYPE_IS_DUMMY_P (t)) TREE_VISITED (t) = 1; + /* The test in gimplify_type_sizes is on the main variant. */ if (TYPE_P (t)) - TYPE_SIZES_GIMPLIFIED (t) = 1; + TYPE_SIZES_GIMPLIFIED (TYPE_MAIN_VARIANT (t)) = 1; return NULL_TREE; } -- 2.30.2