aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/attrib-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/ubsan/attrib-2.c')
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/attrib-2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/ubsan/attrib-2.c b/gcc/testsuite/c-c++-common/ubsan/attrib-2.c
index 71f2e58..3f0a9c3 100644
--- a/gcc/testsuite/c-c++-common/ubsan/attrib-2.c
+++ b/gcc/testsuite/c-c++-common/ubsan/attrib-2.c
@@ -68,4 +68,14 @@ float_cast (void)
c = d;
}
+__attribute__((no_sanitize(("undefined"))))
+static void
+float_cast2 (void)
+{
+ volatile double d = 300;
+ volatile signed char c;
+ c = d;
+}
+
+
/* { dg-final { scan-assembler-not "__ubsan_handle" } } */