re PR sanitizer/66343 ("Error: .Lubsan_type3 already defined" with UBSan and precompi...
authorJakub Jelinek <jakub@redhat.com>
Wed, 5 Oct 2016 19:03:28 +0000 (21:03 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 5 Oct 2016 19:03:28 +0000 (21:03 +0200)
commit875825211ba723311fa12b2c8aaa7c808bfa972f
treeee83b0609b3dd177b1acb9736c0be5f27ba694f6
parent8b7033e0e1d10099b5c531a9a3b960fded60e24c
re PR sanitizer/66343 ("Error: .Lubsan_type3 already defined" with UBSan and precompiled headers)

PR sanitizer/66343
* ubsan.c (ubsan_ids): New GTY(()) array.
(ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids
instead of static local counters.

* gcc.dg/pch/pr66343-1.c: New test.
* gcc.dg/pch/pr66343-1.hs: New file.
* gcc.dg/pch/pr66343-2.c: New test.
* gcc.dg/pch/pr66343-2.hs: New file.

From-SVN: r240803
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pch/pr66343-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/pr66343-1.hs [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/pr66343-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pch/pr66343-2.hs [new file with mode: 0644]
gcc/ubsan.c