diff options
author | Marek Polacek <polacek@redhat.com> | 2014-11-18 14:55:44 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-11-18 14:55:44 +0000 |
commit | bebcdc6742b065545ae976c8ed6638de17fe6ed7 (patch) | |
tree | 199a22a70f5272caac9621c1da38551db5437a84 /gcc/testsuite/c-c++-common/ubsan | |
parent | 594bdd53d8f24ad406af1aa192d98d23bc841ae9 (diff) | |
download | gcc-bebcdc6742b065545ae976c8ed6638de17fe6ed7.zip gcc-bebcdc6742b065545ae976c8ed6638de17fe6ed7.tar.gz gcc-bebcdc6742b065545ae976c8ed6638de17fe6ed7.tar.bz2 |
re PR sanitizer/63866 (ICE in C++ printer with -fdump-ipa)
PR sanitizer/63866
* asan.c (asan_global_struct): Create a TYPE_DECL for "__asan_global",
put it into TYPE_NAME and TYPE_STUB_DECL.
* ubsan.c (ubsan_type_descriptor_type): New variable.
Function renamed to ...
(ubsan_get_type_descriptor_type): ... this. Cache
return value in ubsan_type_descriptor_type variable.
Create a TYPE_DECL for "__ubsan_type_descriptor", put it into
TYPE_NAME and TYPE_STUB_DECL.
(ubsan_get_source_location_type): Create a TYPE_DECL for
"__ubsan_source_location", put it into TYPE_NAME and TYPE_STUB_DECL.
(ubsan_type_descriptor, ubsan_create_data): Call
ubsan_get_type_descriptor_type instead of ubsan_type_descriptor_type.
Create a TYPE_DECL for name, put it into TYPE_NAME and TYPE_STUB_DECL.
* c-c++-common/ubsan/pr63866.c: New test.
From-SVN: r217718
Diffstat (limited to 'gcc/testsuite/c-c++-common/ubsan')
-rw-r--r-- | gcc/testsuite/c-c++-common/ubsan/pr63866.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr63866.c b/gcc/testsuite/c-c++-common/ubsan/pr63866.c new file mode 100644 index 0000000..e70daa7 --- /dev/null +++ b/gcc/testsuite/c-c++-common/ubsan/pr63866.c @@ -0,0 +1,11 @@ +/* PR sanitizer/63866 */ +/* { dg-do compile } */ +/* { dg-options "-fsanitize=undefined -fdump-ipa-cgraph" } */ + +int +foo (int x, int y) +{ + return x + y; +} + +/* { dg-final { cleanup-ipa-dump "cgraph" } } */ |