When running bootstrap-ubsan I got an error in stage2, the issue was
that some Lubsan_types were wrongfully discarded -> link error.
Thus fixed.

Ubsan testsuite passes with -m32/-m64, ok for trunk?

2013-11-25  Marek Polacek  <pola...@redhat.com>

        * ubsan.c (ubsan_type_descriptor): Set DECL_PRESERVE_P on a decl.

--- gcc/ubsan.c.mp3     2013-11-25 19:04:45.221875476 +0100
+++ gcc/ubsan.c 2013-11-25 19:05:06.338954302 +0100
@@ -352,6 +352,7 @@ ubsan_type_descriptor (tree type, bool w
   DECL_ARTIFICIAL (decl) = 1;
   DECL_IGNORED_P (decl) = 1;
   DECL_EXTERNAL (decl) = 0;
+  DECL_PRESERVE_P (decl) = 1;
 
   size_t len = strlen (pretty_name);
   tree str = build_string (len + 1, pretty_name);

        Marek

Reply via email to