diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-18 14:55:44 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-18 14:55:44 +0000 |
commit | 530273ed65ede88c762ccb88782453d0c178da08 (patch) | |
tree | 199a22a70f5272caac9621c1da38551db5437a84 /gcc/testsuite | |
parent | 9d296e7df69a8c208de6ac8b248d0b7cace94dde (diff) | |
download | gcc-530273ed65ede88c762ccb88782453d0c178da08.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/ubsan/pr63866.c | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 679db5b350e..ca77cc0035d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-11-18 Marek Polacek <polacek@redhat.com> + + PR sanitizer/63866 + * c-c++-common/ubsan/pr63866.c: New test. + 2014-11-18 Richard Biener <rguenther@suse.de> PR tree-optimization/63914 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 00000000000..e70daa72e18 --- /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" } } */ |