[PATCH] Fix ubsan ICE (PR sanitizer/60569)

2014-03-19 Thread Marek Polacek
Apparently with LTO we can get a TYPE_NAME without a DECL_NAME, so check that it exists before accessing it. Note that the test has to be run; only compiling wasn't enough to provoke the ICE. Ran ubsan testsuite on x86_64-linux, ok for trunk? 2014-03-19 Marek Polacek pola...@redhat.com

Re: [PATCH] Fix ubsan ICE (PR sanitizer/60569)

2014-03-19 Thread Jakub Jelinek
On Wed, Mar 19, 2014 at 12:13:57PM +0100, Marek Polacek wrote: Apparently with LTO we can get a TYPE_NAME without a DECL_NAME, so check that it exists before accessing it. Note that the test has to be run; only compiling wasn't enough to provoke the ICE. ?? Shouldn't // { dg-do link } be

Re: [PATCH] Fix ubsan ICE (PR sanitizer/60569)

2014-03-19 Thread Marek Polacek
On Wed, Mar 19, 2014 at 12:17:19PM +0100, Jakub Jelinek wrote: On Wed, Mar 19, 2014 at 12:13:57PM +0100, Marek Polacek wrote: Apparently with LTO we can get a TYPE_NAME without a DECL_NAME, so check that it exists before accessing it. Note that the test has to be run; only compiling wasn't