aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/ubsan/pr81148.c
diff options
context:
space:
mode:
authorEdward Smith-Rowland <3dw4rd@verizon.net>2017-08-12 19:09:40 +0000
committerEdward Smith-Rowland <3dw4rd@verizon.net>2017-08-12 19:09:40 +0000
commit40fa8ee5f9da161462fde48776ef6262366f9a13 (patch)
treed3c3bf913950c59ef83b8d9ede50b0978ec0c12f /gcc/testsuite/c-c++-common/ubsan/pr81148.c
parent3acaf2e51caf356a9afc763cfd70b91d1ab094b5 (diff)
Merged revisions r232323 through r251067 to the branchtr29124
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/tr29124@251068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/c-c++-common/ubsan/pr81148.c')
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr81148.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr81148.c b/gcc/testsuite/c-c++-common/ubsan/pr81148.c
new file mode 100644
index 00000000000..f2d46c8dc56
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr81148.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined -fsanitize-undefined-trap-on-error" } */
+
+int x = -106;
+int main()
+{
+ // -123 - (0x8000000000000000 - -1)
+ return (-123 - ((9223372036854775806LL ^ ~(x && 1)) - -1)) == 0;
+}