summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-18 14:55:44 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-18 14:55:44 +0000
commit530273ed65ede88c762ccb88782453d0c178da08 (patch)
tree199a22a70f5272caac9621c1da38551db5437a84 /gcc/testsuite/c-c++-common
parent9d296e7df69a8c208de6ac8b248d0b7cace94dde (diff)
downloadgcc-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/c-c++-common')
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr63866.c11
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 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" } } */