]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR lto/69589
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Mar 2016 16:02:55 +0000 (16:02 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Mar 2016 16:02:55 +0000 (16:02 +0000)
* tree.c (free_lang_data_in_decl): Clear visibility of TYPE_DECL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234113 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index ab621ae922f8dfdf3ef8c19abe0e60b597d099fd..df399095f085b0c68f7b94d9a5f83852ab743feb 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-10  Jan Hubicka  <hubicka@ucw.cz>
+
+       PR lto/69589
+       * tree.c (free_lang_data_in_decl): Clear visibility of TYPE_DECL.
+
 2016-03-10  Jan Hubicka  <hubicka@ucw.cz>
 
        PR lto/69589
index c1cfcd4ecc93b4a9d8e4bae9cce97ac9f8b6ef78..ed28429b1e1006384f6232f79b893a6fa3fac0ce 100644 (file)
@@ -5473,8 +5473,13 @@ free_lang_data_in_decl (tree decl)
          || (decl_function_context (decl) && !TREE_STATIC (decl)))
        DECL_INITIAL (decl) = NULL_TREE;
     }
-  else if (TREE_CODE (decl) == TYPE_DECL
-          || TREE_CODE (decl) == FIELD_DECL)
+  else if (TREE_CODE (decl) == TYPE_DECL)
+    {
+      DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+      DECL_VISIBILITY_SPECIFIED (decl) = 0;
+      DECL_INITIAL (decl) = NULL_TREE;
+    }
+  else if (TREE_CODE (decl) == FIELD_DECL)
     DECL_INITIAL (decl) = NULL_TREE;
   else if (TREE_CODE (decl) == TRANSLATION_UNIT_DECL
            && DECL_INITIAL (decl)