[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    [Ada] Properly set TYPE_SIZES_GIMPLIFIED
From:       Eric Botcazou <ebotcazou () adacore ! com>
Date:       2019-06-29 7:39:16
Message-ID: 3126527.eqxgnlxT6s () polaris
[Download RAW message or body]

Another example in the series "how can this have worked for so long?"...

Tested on x86-64/Linux, applied on all active branches.


2019-06-29  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (mark_visited_r): Set TYPE_SIZES_GIMPLIFIED on
	the main variant of a type, if any.

-- 
Eric Botcazou
["p.diff" (p.diff)]

Index: gcc-interface/trans.c
===================================================================
--- gcc-interface/trans.c	(revision 272633)
+++ gcc-interface/trans.c	(working copy)
@@ -9042,8 +9042,9 @@ mark_visited_r (tree *tp, int *walk_subt
   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;
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic