From 9797b5ced68886f866e7278413a21870600ae3a2 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Mon, 4 Apr 2022 14:00:56 +0200
Subject: [PATCH] [tests] towards fixing pub/frama-clang#4

---
 tests/basic/init.cc                | 7 ++++++-
 tests/basic/oracle/init.res.oracle | 6 +++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/basic/init.cc b/tests/basic/init.cc
index 337d8039..8047500a 100644
--- a/tests/basic/init.cc
+++ b/tests/basic/init.cc
@@ -11,8 +11,13 @@ typedef struct myStruct {
 
 myStruct s = {};
 
+const int I = -1;
+const long L = -1L;
+const long long LL = -1LL;
+
 int main() {
-     int x = 0;
+     int x = -1;
+     long long ll = I + L + LL;
      A y = { x, 1 };
      y.a++;
      return x;
diff --git a/tests/basic/oracle/init.res.oracle b/tests/basic/oracle/init.res.oracle
index c9baccad..73e0ee39 100644
--- a/tests/basic/oracle/init.res.oracle
+++ b/tests/basic/oracle/init.res.oracle
@@ -46,9 +46,13 @@ struct _frama_c_rtti_name_info_node _frama_c_rtti_name_info =
    .number_of_base_classes = 0,
    .pvmt = (struct _frama_c_vmt *)0};
 myStruct s = {.a = {(char)0}};
+static int const I = (int)4294967295;
+static long const L = (long)4294967295;
+static long long const LL = (long long)(-1);
 int main(void)
 {
-  int x = 0;
+  int x = -1;
+  long long ll = (long long)((long)I + L) + LL;
   struct A y = {.a = & x, .b = 1};
   (*(y.a)) ++;
   return x;
-- 
GitLab