diff mbox

Preserve ubsan_types

Message ID 20131125182033.GR30062@redhat.com
State New
Headers show

Commit Message

Marek Polacek Nov. 25, 2013, 6:20 p.m. UTC
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  <polacek@redhat.com>

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


	Marek

Comments

Marek Polacek Nov. 25, 2013, 7:24 p.m. UTC | #1
On Mon, Nov 25, 2013 at 07:20:33PM +0100, Marek Polacek wrote:
> 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  <polacek@redhat.com>
> 
> 	* ubsan.c (ubsan_type_descriptor): Set DECL_PRESERVE_P on a decl.

Actually, scratch this, we'll need a better fix.  Sorry.

	Marek
diff mbox

Patch

--- 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);