diff --git a/.gitignore b/.gitignore
index e6739e774c8..edac3d3e326 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,8 +31,6 @@ src/ansi-c/gcc_builtin_headers_ia32-2.inc
src/ansi-c/gcc_builtin_headers_ia32.inc
src/ansi-c/gcc_builtin_headers_mips.inc
src/ansi-c/gcc_builtin_headers_power.inc
-src/util/irep_ids.h
-src/util/irep_ids.inc
# regression/test files
*.out
diff --git a/.travis.yml b/.travis.yml
index 8c98d3e8e9b..3318b3abe67 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,30 +7,46 @@ matrix:
- os: linux
sudo: required
compiler: gcc
+ cache: ccache
services:
- docker
before_install:
- - docker pull diffblue/cbmc-builder:alpine
+ - docker pull diffblue/cbmc-builder:alpine-0.0.1
env:
- - PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc diffblue/cbmc-builder:alpine"
- - COMPILER=g++
+ - PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.1"
+ - COMPILER="ccache g++"
# OS X using g++
- os: osx
sudo: false
compiler: gcc
+ cache: ccache
+ before_install:
+ #we create symlink to non-ccache gcc, to be used in tests
+ - mkdir bin ; ln -s /usr/bin/gcc bin/gcc
+ - HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
+ - export PATH=/usr/local/opt/ccache/libexec:$PATH
+ - ccache -M 1G
env: COMPILER=g++
# OS X using clang++
- os: osx
sudo: false
compiler: clang
- env: COMPILER=clang++
+ cache: ccache
+ before_install:
+ - HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
+ - export PATH=/usr/local/opt/ccache/libexec:$PATH
+ - ccache -M 1G
+ env:
+ - COMPILER="ccache clang++ -Qunused-arguments -fcolor-diagnostics"
+ - CCACHE_CPP2=yes
# Ubuntu Linux with glibc using g++-5
- os: linux
sudo: false
compiler: gcc
+ cache: ccache
addons:
apt:
sources:
@@ -42,12 +58,57 @@ matrix:
before_install:
- mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
- env: COMPILER=g++-5
+ env: COMPILER="g++-5"
+
+ # Ubuntu Linux with glibc using g++-5, debug mode
+ - os: linux
+ sudo: false
+ compiler: gcc
+ cache: ccache
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ packages:
+ - libwww-perl
+ - g++-5
+ - libubsan0
+ before_install:
+ - mkdir bin ; ln -s /usr/bin/gcc-5 bin/gcc
+ # env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
+ env:
+ - COMPILER="g++-5"
+ - EXTRA_CXXFLAGS="-DDEBUG"
+ script: echo "Not running any tests for a debug build."
# Ubuntu Linux with glibc using clang++-3.7
- os: linux
sudo: false
compiler: clang
+ cache: ccache
+ addons:
+ apt:
+ sources:
+ - ubuntu-toolchain-r-test
+ - llvm-toolchain-precise-3.7
+ packages:
+ - libwww-perl
+ - clang-3.7
+ - libstdc++-5-dev
+ - libubsan0
+ before_install:
+ - mkdir bin ; ln -s /usr/bin/clang-3.7 bin/gcc
+ - export CCACHE_CPP2=yes
+ # env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
+ env:
+ - COMPILER="ccache clang++-3.7 -Qunused-arguments -fcolor-diagnostics"
+ - CCACHE_CPP2=yes
+
+ # Ubuntu Linux with glibc using clang++-3.7, debug mode
+ - os: linux
+ sudo: false
+ compiler: clang
+ cache: ccache
addons:
apt:
sources:
@@ -60,25 +121,39 @@ matrix:
- libubsan0
before_install:
- mkdir bin ; ln -s /usr/bin/clang-3.7 bin/gcc
+ - export CCACHE_CPP2=yes
# env: COMPILER=clang++-3.7 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined,integer -fno-omit-frame-pointer"
- env: COMPILER=clang++-3.7
+ env:
+ - COMPILER="ccache clang++-3.7 -Qunused-arguments -fcolor-diagnostics"
+ - CCACHE_CPP2=yes
+ - EXTRA_CXXFLAGS="-DDEBUG"
+ script: echo "Not running any tests for a debug build."
- env: NAME="CPP-LINT"
- script: scripts/travis_lint.sh || true
+ install:
+ script: scripts/travis_lint.sh
+ before_cache:
+
+ allow_failures:
+ - env: NAME="CPP-LINT"
+ install:
+ script: scripts/travis_lint.sh
+ before_cache:
+
+install:
+ - COMMAND="make -C src minisat2-download" &&
+ eval ${PRE_COMMAND} ${COMMAND}
+ - COMMAND="make -C src boost-download" &&
+ eval ${PRE_COMMAND} ${COMMAND}
+ - COMMAND="make -C src CXX=\"$COMPILER\" CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DUSE_BOOST $EXTRA_CXXFLAGS\" -j2" &&
+ eval ${PRE_COMMAND} ${COMMAND}
+ - COMMAND="make -C src CXX=\"$COMPILER\" CXXFLAGS=\"$FLAGS $EXTRA_CXXFLAGS\" -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
+ eval ${PRE_COMMAND} ${COMMAND}
script:
- - if [ -L bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
- COMMAND="make -C src minisat2-download" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
- COMMAND="make -C src boost-download" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
- COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O2 -g -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DUSE_BOOST\" -j2" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
+ - if [ -e bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
- COMMAND="make -C src CXX=$COMPILER CXXFLAGS=$FLAGS -j2 cegis.dir clobber.dir memory-models.dir musketeer.dir" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
- COMMAND="make -C src clean" &&
- eval ${PRE_COMMAND} ${COMMAND} &&
- COMMAND="make -C src CXX=$COMPILER CXXFLAGS=\"-Wall -O0 -ggdb3 -Werror -Wno-deprecated-register -pedantic -Wno-sign-compare -DDEBUG\" -j2" &&
eval ${PRE_COMMAND} ${COMMAND}
+
+before_cache:
+ - ccache -s
diff --git a/CHANGELOG b/CHANGELOG
index 0f15c3d5081..1718d32243d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,14 @@
+5.8
+===
+
+* GOTO-INSTRUMENT: --reachability-slice can be used with --property to slice
+ down to a single property only.
+* GOTO-INSTRUMENT: New option --list-calls-args
+* GOTO-INSTRUMENT: New option --print-path-lenghts
+* GOTO-ANALYZER: New option --unreachable-functions, --reachable-functions
+* GOTO-INSTRUMENT: New option --undefined-function-is-assume-false
+
+
5.7
===
diff --git a/README.md b/README.md
index bb1bf51de0a..e1c2b090091 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![Build Status][build_img]][travis]
+[![Build Status][travis_img]][travis] [![Build Status][appveyor_img]][appveyor]
[CProver Wiki](http://www.cprover.org/wiki)
@@ -19,5 +19,7 @@ License
=======
4-clause BSD license, see `LICENSE` file.
-[build_img]: https://travis-ci.org/diffblue/cbmc.svg?branch=master
[travis]: https://travis-ci.org/diffblue/cbmc
+[travis_img]: https://travis-ci.org/diffblue/cbmc.svg?branch=master
+[appveyor]: https://ci.appveyor.com/project/diffblue/cbmc/
+[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/diffblue/cbmc?svg=true&branch=master
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000000..5f287b193d4
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,110 @@
+version: 1.0.{build}
+image: Visual Studio 2013
+clone_depth: 50
+environment:
+ BUILD_ENV: MSVC
+ PATH: C:\projects\cbmc\deps\bin;%PATH%
+ INCLUDE: C:\projects\cbmc\deps\include
+install:
+- ps: |
+ #check if dependencies were copied from cache, if not, download them.
+ if (!(Test-Path deps)) {
+ md deps
+ }
+ cd deps
+ if (!(Test-Path bin\bison.exe)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/bison-2.4.1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=JAPFzNPMJDI4IViAVlJAEc6l8aHB3k17NpZRdoWDMLbALaJNX88vfwocuezU1tfhyrSJxfo2fTK4rgP5OULkikJs7MBZI9ovp2V%2BMT6yg87KDdH9EIOlMgltGfbP%2BoZkwBY7kXb3W5puSlt4OTE%2Bw7CRlHF9MNqFXVBqVBfa%2BGw0gXDe5Jd9qV%2BvUXZzRuBl9ERSQkSD%2B%2B%2BxFo24FZoOeYkgBHJz03%2BHuIMnlmcLgneTB2aiZZU3%2B6UTPceUxLus9%2Bksb5UbqEVaVE06TIXl76VKwqAgXM2LWaNyeJDog%2BT%2BhjW4v4ypxh6mIBo5KRNXVLPc1MxSPFQB3ITlIXv9Zg%3D%3D"
+ & 7z x bison-2.4.1-bin.zip
+ }
+ if (!(Test-Path bin\flex.exe)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/flex-2.5.4a-1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=WriP8S047Mmq271ZHWL0MCPGx1gEFsuc%2BKMmChoXhXFRkn0GlIgCxZEiOu52ke9fT1kAvycWXePNBFAyCHjpF%2BJkXCwisQ6FLIf3NL%2F92849YgQKdJkDUOcZ%2Bh82XVTwNBrljKIkExkak7QEyhOf3buTC1oeuatCUV5Ez42RZjgtRiJaqcFW6xLbhfuVONr39KxH5hGx%2FDUi2RRXPbgoKDwavc9s56NP1rNbWMTE6NdNHzJeaf43E%2BSMemlVO%2BhhIY6W0f%2FtaQ7fYF%2F6YaqxdQ0sB8W5DnG4Hb%2F0CyQlrTZpGDXGr301rV0M4WBkYLmfauq4IyJsBaR095tXGW%2BzmA%3D%3D"
+ & 7z x flex-2.5.4a-1-bin.zip
+ }
+ if (!(Test-Path include\FlexLexer.h)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/flex-2.5.4a-1-lib.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=H%2FLeKGv2QqKAGDTP%2F6TYPhDzuL6K%2F5dFOt61HfYBm1vUWVUNmAYVGvUAcvnUqBnhEHwZgtc8vZt1H7k3W8azxCUc7l6ZhlCDbqQ6Mg2VhfpBaQMbL1V%2BjSq5ePpWcuLMBntKk2br38PF1NtiAwCCpRTRPptaYPeGs%2BOjAH%2BN8aIIxjvj45QAgt9mcg6dfBsyfj5fdJmpHRQFuJ7%2FnsG50fmN5JDvdvmBWloB6rjxVWaN4XO6VTWZFZ34JWFyOqgWNEw9aDN3HdsSuJ0Uz19AbdwZBIWe5Elrl71rRJjn1lijCknDB7D4sAmP33k71e%2BB0qvsNl1Shuh9FkY8Z6y05Q%3D%3D"
+ & 7z x flex-2.5.4a-1-lib.zip
+ }
+ if (!(Test-Path bin\iconv.exe)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/libiconv-1.9.2-1-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=sS3Y2lC1oWOhBDsL8C9ASuO4LOM%2BpB%2F8PwG5w5CdB9JnPfLqhb3FnA1zkkZJoSNuIYS3DM6CN2qxoWjpJbLEtVQe0PpxziQZjLpJw2MpxXdJiJHRDu8x9THgzwuZ3ze5BWHzPoCBQPdRkKzVPezf1HwptUsm3Y9c2jlWljQjhc8NVsI4iPmjEOwT8E%2BYpR5fsLs2GsRjuoyqKa%2Bi4JJ6MbpXVX1IgR4fzp1Li9SnE39ujHDb%2FyI3c96eCdVm1Oa6jNxzSJNfq%2FgOZM8BIxlR55a%2BtM3oBQhU0voEtDOABwuO7ZBay8dLt%2FG5vz1%2Bi%2FIlRLFxQfICaprPLzw6pXRm8Q%3D%3D"
+ & 7z x libiconv-1.9.2-1-bin.zip
+ }
+ if (!(Test-Path bin\libintl3.dll)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/libintl-0.14.4-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=lJViGr6bl%2F4i%2B6nIfeYChreq%2FKfgid9QqGSq7Ie%2FMG%2Fmr9nPyPUA%2BLtT7jn1ogunTzQLZP%2FNxVFcYqyd8gyuT%2Bn2MF80Ds4Whw4cRYnXPb2LZg4%2FiEqZV6wgBMIQfq5v2l3lAsglISVErOik%2BQAHec5gZe2%2BKaVjRnJnhPRziZkQyzF9Xdf2xsPi28hBaX4RQx8XqSLcY1kQpY13PDBZDi9lmdKHf0pBKu%2F0WXspmRAU02HtleMk6Zeg5vEDFcwoe8C3fb4vwtpwGwN9TX5ddaq56yUVn70zh%2BH2KgKIsRl26avnrCpeWF9M5lLck0ngaqFX84w%2BgxmZu40IVU%2Ff0A%3D%3D"
+ & 7z x libintl-0.14.4-bin.zip
+ }
+ if (!(Test-Path bin\make.exe)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/make-3.81-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=PRC97AWzJ2ZAyjEK4p7eCbA3RAEr8sTf8TUK5zoMBcrXPUHWYjnCwXRMnIxUUufBYjsAx8t1XnOQdlTuAPJYpcha%2FFJRlcxMmfQjNbpNEQFJuqEpA5c%2FGhFYxSD3a26vjpgReUW5MuQXeLeNh7PziLB0GP0sdRHN%2B1eDiHeCJWYNMYhrEY9BAkf5rXeRQWr1ZG0Hzq%2FxZEHceypx8xyaT%2BFzREYQOyKjGdre1QXtI%2FXo4ImA1xWt%2F8TnlGcAnCEaTltxuSRVB%2F7s1ShMr9KoagCb%2BjBWq6BgbcNGxyzyOZfi2Sjjo39mhudF9DNbKbkczes9Kp3ySgXmrXSWjIG4Iw%3D%3D"
+ & 7z x make-3.81-bin.zip
+ }
+ if (!(Test-Path bin\regex2.dll)) {
+ & appveyor DownloadFile "https://storage.googleapis.com/diffblue-mirror/appveyor-deps/regex-2.7-bin.zip?GoogleAccessId=diffbluemaster@diffblue-cr.iam.gserviceaccount.com&Expires=1519839050&Signature=bXRvFV%2Be4Dpm8vzp%2F1bJWwgkERE6WakcPTBN57n9vNh0dr42jDTXv8JF%2BWCmTIb%2Fy4XzxYl0faggt3g6TqTLYn5UDVUBYx%2FMLmNVVNEv%2BaBlDd87UAZGLi6fkEV5oAP4W4FYsqEnKRDfGPOBoL7D7CuW9Kcxy3Moubxdl%2Bmes%2BMI%2FzWJ6BgLD3Oj04GyD42zLCYVtAzkeDAX0UADoh06ExhpTjI4BNnQ%2FhzSlPtPG7mon4q81%2F2tDNskKVJS466eR%2F8XV6H4QT3LoCkh6dxQ9%2B9ZnkWJplundRbiIlpj43vmdvjIChczl4jbAgL6zFj5Gz6u58uvCV%2FbOuyx3Sw1fg%3D%3D"
+ & 7z x regex-2.7-bin.zip
+ }
+ if (!(Test-Path minisat2-2.2.1)) {
+ & appveyor DownloadFile http://ftp.debian.org/debian/pool/main/m/minisat2/minisat2_2.2.1.orig.tar.gz
+ & 7z x minisat2_2.2.1.orig.tar.gz
+ &7z x minisat2_2.2.1.orig.tar
+ }
+ cd ..
+
+cache: deps
+
+build_script:
+- cmd: |
+ cp -r deps/minisat2-2.2.1 minisat-2.2.1
+ patch -d minisat-2.2.1 -p1 < scripts/minisat-2.2.1-patch
+ call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x64
+ sed -i "s/BUILD_ENV.*/BUILD_ENV = MSVC/" src/config.inc
+ make -C src -j2
+
+test_script:
+- cmd: |
+ cd regression
+ sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" ansi-c/Makefile
+ sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" cpp/Makefile
+ sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-instrument/chain.sh
+ sed -i "15s/.*/$goto_cc $name.c/" goto-instrument/chain.sh
+ sed -i "16i mv $name.exe $name.gb" goto-instrument/chain.sh
+ sed -i "23s/.*/ $goto_cc ${name}-mod.c/" goto-instrument/chain.sh
+ sed -i "24i mv ${name}-mod.exe $name-mod.gb" goto-instrument/chain.sh
+ cat goto-instrument/chain.sh
+
+ sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-instrument-typedef/chain.sh || true
+ sed -i "12s/.*/$GC $NAME.c --function fun/" goto-instrument-typedef/chain.sh || true
+ sed -i "13i mv $NAME.exe $NAME.gb" goto-instrument-typedef/chain.sh || true
+ cat goto-instrument-typedef/chain.sh || true
+
+ rem HACK disable failing tests
+ rmdir /s /q ansi-c\Forward_Declaration2
+ rmdir /s /q ansi-c\Incomplete_Type1
+ rmdir /s /q ansi-c\Union_Padding1
+ rmdir /s /q ansi-c\Universal_characters1
+ rmdir /s /q ansi-c\function_return1
+ rmdir /s /q ansi-c\gcc_attributes7
+ rmdir /s /q ansi-c\struct6
+ rmdir /s /q ansi-c\struct7
+ rmdir /s /q cbmc\Malloc23
+ rmdir /s /q cbmc\byte_update2
+ rmdir /s /q cbmc\byte_update3
+ rmdir /s /q cbmc\byte_update4
+ rmdir /s /q cbmc\byte_update5
+ rmdir /s /q cbmc\byte_update6
+ rmdir /s /q cbmc\byte_update7
+ rmdir /s /q cbmc\pipe1
+ rmdir /s /q cbmc\unsigned___int128
+ rmdir /s /q cpp\Decltype1
+ rmdir /s /q cpp\Decltype2
+ rmdir /s /q cpp\Function_Overloading1
+ rmdir /s /q cpp\enum2
+ rmdir /s /q cpp\enum7
+ rmdir /s /q cpp\enum8
+ rmdir /s /q cpp\nullptr1
+ rmdir /s /q cpp\sizeof1
+ rmdir /s /q cpp\static_assert1
+ rmdir /s /q cbmc-java\VarLengthArrayTrace1
+ rmdir /s /q cbmc-java\classpath1
+ rmdir /s /q cbmc-java\jar-file3
+ rmdir /s /q cbmc-java\tableswitch2
+ rmdir /s /q goto-instrument\slice08
+
+ make test
diff --git a/regression/Makefile b/regression/Makefile
index 5c59fd6e34c..296f583cc5e 100644
--- a/regression/Makefile
+++ b/regression/Makefile
@@ -5,6 +5,7 @@ DIRS = ansi-c \
cbmc-java \
goto-analyzer \
goto-instrument \
+ goto-instrument-typedef \
test-script \
# Empty last line
diff --git a/regression/acceleration/Makefile b/regression/acceleration/Makefile
index 396fa63f22d..805ebaec1e8 100644
--- a/regression/acceleration/Makefile
+++ b/regression/acceleration/Makefile
@@ -14,5 +14,5 @@ show:
done;
clean:
- rm -f tests.log
- rm -f */main.out
+ $(RM) tests.log
+ $(RM) */main.out
diff --git a/regression/acceleration/array_unsafe1/test.desc b/regression/acceleration/array_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/array_unsafe1/test.desc
+++ b/regression/acceleration/array_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/array_unsafe2/test.desc b/regression/acceleration/array_unsafe2/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/array_unsafe2/test.desc
+++ b/regression/acceleration/array_unsafe2/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/array_unsafe3/test.desc b/regression/acceleration/array_unsafe3/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/array_unsafe3/test.desc
+++ b/regression/acceleration/array_unsafe3/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/array_unsafe4/test.desc b/regression/acceleration/array_unsafe4/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/array_unsafe4/test.desc
+++ b/regression/acceleration/array_unsafe4/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/const_unsafe1/test.desc b/regression/acceleration/const_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/const_unsafe1/test.desc
+++ b/regression/acceleration/const_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/diamond_unsafe1/test.desc b/regression/acceleration/diamond_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/diamond_unsafe1/test.desc
+++ b/regression/acceleration/diamond_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/diamond_unsafe2/test.desc b/regression/acceleration/diamond_unsafe2/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/diamond_unsafe2/test.desc
+++ b/regression/acceleration/diamond_unsafe2/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/functions_unsafe1/test.desc b/regression/acceleration/functions_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/functions_unsafe1/test.desc
+++ b/regression/acceleration/functions_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/multivar_unsafe1/test.desc b/regression/acceleration/multivar_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/multivar_unsafe1/test.desc
+++ b/regression/acceleration/multivar_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/nested_unsafe1/test.desc b/regression/acceleration/nested_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/nested_unsafe1/test.desc
+++ b/regression/acceleration/nested_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/overflow_unsafe1/test.desc b/regression/acceleration/overflow_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/overflow_unsafe1/test.desc
+++ b/regression/acceleration/overflow_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/phases_unsafe1/test.desc b/regression/acceleration/phases_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/phases_unsafe1/test.desc
+++ b/regression/acceleration/phases_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/simple_unsafe1/test.desc b/regression/acceleration/simple_unsafe1/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/simple_unsafe1/test.desc
+++ b/regression/acceleration/simple_unsafe1/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/simple_unsafe2/test.desc b/regression/acceleration/simple_unsafe2/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/simple_unsafe2/test.desc
+++ b/regression/acceleration/simple_unsafe2/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/simple_unsafe3/test.desc b/regression/acceleration/simple_unsafe3/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/simple_unsafe3/test.desc
+++ b/regression/acceleration/simple_unsafe3/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/acceleration/simple_unsafe4/test.desc b/regression/acceleration/simple_unsafe4/test.desc
index 200554d997b..e6fe08aeb20 100644
--- a/regression/acceleration/simple_unsafe4/test.desc
+++ b/regression/acceleration/simple_unsafe4/test.desc
@@ -1,7 +1,6 @@
CORE
main.c
--no-unwinding-assertions
-
^EXIT=10$
^SIGNAL=0$
^VERIFICATION FAILED$
diff --git a/regression/ansi-c/Makefile b/regression/ansi-c/Makefile
index b03e120015b..87af55e3306 100644
--- a/regression/ansi-c/Makefile
+++ b/regression/ansi-c/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/ansi-c/gcc_types_compatible_p1/main.c b/regression/ansi-c/gcc_types_compatible_p1/main.c
index 403596c4276..4f327d51085 100644
--- a/regression/ansi-c/gcc_types_compatible_p1/main.c
+++ b/regression/ansi-c/gcc_types_compatible_p1/main.c
@@ -7,6 +7,14 @@ double d;
typedef enum T1 { hot, dog, poo, bear } dingos;
typedef enum T2 { janette, laura, amanda } cranberry;
+typedef enum AnonEnum { jim, bob, fred } names;
+
+typedef dingos altdingos;
+typedef dingos diffdingos;
+
+typedef names altnames;
+typedef names diffnames;
+
typedef float same1;
typedef float same2;
@@ -52,6 +60,9 @@ STATIC_ASSERT(__builtin_types_compatible_p(typeof (dingos), unsigned)); // ha!
STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot), typeof (laura)));
STATIC_ASSERT(__builtin_types_compatible_p(int[5], int[]));
STATIC_ASSERT(__builtin_types_compatible_p(same1, same2));
+STATIC_ASSERT(__builtin_types_compatible_p(dingos, altdingos));
+STATIC_ASSERT(__builtin_types_compatible_p(diffdingos, altdingos));
+STATIC_ASSERT(__builtin_types_compatible_p(diffnames, altnames));
STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot) *, int *));
STATIC_ASSERT(__builtin_types_compatible_p(typeof (hot), typeof (janette)));
STATIC_ASSERT(__builtin_types_compatible_p(__int128, signed __int128));
@@ -84,7 +95,6 @@ STATIC_ASSERT(!__builtin_types_compatible_p(__float128, long double));
STATIC_ASSERT(!__builtin_types_compatible_p(__float128, double));
STATIC_ASSERT(!__builtin_types_compatible_p(__int128, unsigned __int128));
#endif
-
#endif
int main(void)
diff --git a/regression/ansi-c/gcc_types_compatible_p4/main.c b/regression/ansi-c/gcc_types_compatible_p4/main.c
new file mode 100644
index 00000000000..69b84a8304b
--- /dev/null
+++ b/regression/ansi-c/gcc_types_compatible_p4/main.c
@@ -0,0 +1,27 @@
+#define STATIC_ASSERT(condition) \
+ int some_array[(condition) ? 1 : -1];
+
+typedef struct struct_tag
+{
+ int x;
+ float y;
+} struct_typedef;
+
+typedef struct struct_tag alt_typedef;
+typedef struct_typedef another_typedef;
+
+#ifdef __GNUC__
+
+
+STATIC_ASSERT(__builtin_types_compatible_p(struct struct_tag, struct_typedef));
+STATIC_ASSERT(__builtin_types_compatible_p(struct struct_tag, alt_typedef));
+STATIC_ASSERT(__builtin_types_compatible_p(struct struct_tag, another_typedef));
+STATIC_ASSERT(__builtin_types_compatible_p(struct_typedef, alt_typedef));
+STATIC_ASSERT(__builtin_types_compatible_p(struct_typedef, another_typedef));
+STATIC_ASSERT(__builtin_types_compatible_p(alt_typedef, another_typedef));
+
+#endif
+
+int main(void)
+{
+}
diff --git a/regression/ansi-c/gcc_types_compatible_p4/test.desc b/regression/ansi-c/gcc_types_compatible_p4/test.desc
new file mode 100644
index 00000000000..466da18b2b5
--- /dev/null
+++ b/regression/ansi-c/gcc_types_compatible_p4/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+
+^EXIT=0$
+^SIGNAL=0$
+--
+^warning: ignoring
+^CONVERSION ERROR$
diff --git a/regression/ansi-c/static_inline1/test.desc b/regression/ansi-c/static_inline1/test.desc
index 5717777037a..52168c7eba4 100644
--- a/regression/ansi-c/static_inline1/test.desc
+++ b/regression/ansi-c/static_inline1/test.desc
@@ -4,6 +4,5 @@ main.c
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
-
--
^warning: ignoring
diff --git a/regression/ansi-c/static_inline2/test.desc b/regression/ansi-c/static_inline2/test.desc
index c5c5692745d..6a006f47021 100644
--- a/regression/ansi-c/static_inline2/test.desc
+++ b/regression/ansi-c/static_inline2/test.desc
@@ -4,6 +4,5 @@ main.c
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
-
--
^warning: ignoring
diff --git a/regression/array-refinement-with-incr/Makefile b/regression/array-refinement-with-incr/Makefile
index 579de53f6c3..67153d5df71 100644
--- a/regression/array-refinement-with-incr/Makefile
+++ b/regression/array-refinement-with-incr/Makefile
@@ -14,3 +14,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/array-refinement/Makefile b/regression/array-refinement/Makefile
index 41e06e86158..0fd2a56b6f6 100644
--- a/regression/array-refinement/Makefile
+++ b/regression/array-refinement/Makefile
@@ -14,3 +14,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-concurrency/Makefile b/regression/cbmc-concurrency/Makefile
index f40172c17a2..bf0682a5381 100644
--- a/regression/cbmc-concurrency/Makefile
+++ b/regression/cbmc-concurrency/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-cover/Makefile b/regression/cbmc-cover/Makefile
index cbdd3378bac..9a14abc905f 100644
--- a/regression/cbmc-cover/Makefile
+++ b/regression/cbmc-cover/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-cpp/Makefile b/regression/cbmc-cpp/Makefile
index f40172c17a2..bf0682a5381 100644
--- a/regression/cbmc-cpp/Makefile
+++ b/regression/cbmc-cpp/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-from-CVS/Makefile b/regression/cbmc-from-CVS/Makefile
index f40172c17a2..bf0682a5381 100644
--- a/regression/cbmc-from-CVS/Makefile
+++ b/regression/cbmc-from-CVS/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-incr-oneloop/Makefile b/regression/cbmc-incr-oneloop/Makefile
index 4c5b7ceffd3..00c5ea25db4 100644
--- a/regression/cbmc-incr-oneloop/Makefile
+++ b/regression/cbmc-incr-oneloop/Makefile
@@ -14,5 +14,5 @@ show:
done;
clean:
- @rm -f *.log
- @(for dir in *; do rm -f $$dir/*.out; done;)
+ @$(RM) *.log
+ @(for dir in *; do $(RM) $$dir/*.out; done;)
diff --git a/regression/cbmc-incr-oneloop/unwind-forever1/test.desc b/regression/cbmc-incr-oneloop/unwind-forever1/test.desc
index 617547e56ad..5d03502707e 100644
--- a/regression/cbmc-incr-oneloop/unwind-forever1/test.desc
+++ b/regression/cbmc-incr-oneloop/unwind-forever1/test.desc
@@ -3,6 +3,5 @@ main.c
--incremental-check main.0
^EXIT=142$
^SIGNAL=0$
-
--
^warning: ignoring
diff --git a/regression/cbmc-incr-oneloop/unwind-forever2/test.desc b/regression/cbmc-incr-oneloop/unwind-forever2/test.desc
index bff68c7e0c8..920f3890da5 100644
--- a/regression/cbmc-incr-oneloop/unwind-forever2/test.desc
+++ b/regression/cbmc-incr-oneloop/unwind-forever2/test.desc
@@ -3,6 +3,5 @@ main.c
--incremental-check main.0
^EXIT=142$
^SIGNAL=0$
-
--
^warning: ignoring
diff --git a/regression/cbmc-incr/Makefile b/regression/cbmc-incr/Makefile
index 965ce493fc5..08b694ea9b5 100644
--- a/regression/cbmc-incr/Makefile
+++ b/regression/cbmc-incr/Makefile
@@ -17,5 +17,5 @@ show:
done;
clean:
- @rm -f *.log
- @(for dir in *; do rm -f $$dir/*.out; done;)
+ @$(RM) *.log
+ @(for dir in *; do $(RM) $$dir/*.out; done;)
diff --git a/regression/cbmc-java/Makefile b/regression/cbmc-java/Makefile
index cee83cba67a..a1b44c5a948 100644
--- a/regression/cbmc-java/Makefile
+++ b/regression/cbmc-java/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.java" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc-java/classpath2/jarfile3$A.class b/regression/cbmc-java/classpath2/jarfile3$A.class
new file mode 100644
index 00000000000..22a9c4c39f9
Binary files /dev/null and b/regression/cbmc-java/classpath2/jarfile3$A.class differ
diff --git a/regression/cbmc-java/classpath2/jarfile3$B.class b/regression/cbmc-java/classpath2/jarfile3$B.class
new file mode 100644
index 00000000000..11284e5ebe1
Binary files /dev/null and b/regression/cbmc-java/classpath2/jarfile3$B.class differ
diff --git a/regression/cbmc-java/classpath2/jarfile3.class b/regression/cbmc-java/classpath2/jarfile3.class
new file mode 100644
index 00000000000..ececc4cc305
Binary files /dev/null and b/regression/cbmc-java/classpath2/jarfile3.class differ
diff --git a/regression/cbmc-java/classpath2/jarfile3.java b/regression/cbmc-java/classpath2/jarfile3.java
new file mode 100644
index 00000000000..c9c0cff46d1
--- /dev/null
+++ b/regression/cbmc-java/classpath2/jarfile3.java
@@ -0,0 +1,19 @@
+public class jarfile3
+{
+ public class A
+ {
+ int x=1;
+ }
+ public class B
+ {
+ int x=1;
+ }
+
+ void f(int i)
+ {
+ A a=new A();
+ B b=new B();
+ assert(a.x==1);
+ assert(b.x==1);
+ }
+}
diff --git a/regression/cbmc-java/classpath2/test.desc b/regression/cbmc-java/classpath2/test.desc
new file mode 100644
index 00000000000..ba3ea35b785
--- /dev/null
+++ b/regression/cbmc-java/classpath2/test.desc
@@ -0,0 +1,10 @@
+CORE
+jarfile3.class
+--function jarfile3.f --java-cp-include-files "jarfile3\.class"
+^EXIT=10$
+^SIGNAL=0$
+.*SUCCESS$
+.*FAILURE$
+^VERIFICATION FAILED
+--
+^warning: ignoring
diff --git a/regression/cbmc-java/exceptions1/test.desc b/regression/cbmc-java/exceptions1/test.desc
index 638351f4397..1405444f649 100644
--- a/regression/cbmc-java/exceptions1/test.desc
+++ b/regression/cbmc-java/exceptions1/test.desc
@@ -4,7 +4,7 @@ test.class
^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 26 function.*: FAILURE$
-\*\* 1 of 9 failed \(2 iterations\)$
+\*\* 1 of [0-9]* failed \(2 iterations\)$
^VERIFICATION FAILED$
--
^warning: ignoring
diff --git a/regression/cbmc-java/exceptions2/test.desc b/regression/cbmc-java/exceptions2/test.desc
index 8645e5ea074..724e37b0677 100644
--- a/regression/cbmc-java/exceptions2/test.desc
+++ b/regression/cbmc-java/exceptions2/test.desc
@@ -4,7 +4,7 @@ test.class
^EXIT=10$
^SIGNAL=0$
^.*assertion at file test.java line 15 function.*: FAILURE$
-^\*\* 1 of 5 failed \(2 iterations\)$
+^\*\* 1 of [0-9]* failed \(2 iterations\)$
^VERIFICATION FAILED$
--
^warning: ignoring
diff --git a/regression/cbmc-java/lazyloading3/A.class b/regression/cbmc-java/lazyloading3/A.class
index affb565d625..3c3c1f09997 100644
Binary files a/regression/cbmc-java/lazyloading3/A.class and b/regression/cbmc-java/lazyloading3/A.class differ
diff --git a/regression/cbmc-java/lazyloading3/B.class b/regression/cbmc-java/lazyloading3/B.class
index 9a4ab54d369..092984f5b11 100644
Binary files a/regression/cbmc-java/lazyloading3/B.class and b/regression/cbmc-java/lazyloading3/B.class differ
diff --git a/regression/cbmc-java/lazyloading3/C.class b/regression/cbmc-java/lazyloading3/C.class
index c249e24ace4..ba5fbcb0c55 100644
Binary files a/regression/cbmc-java/lazyloading3/C.class and b/regression/cbmc-java/lazyloading3/C.class differ
diff --git a/regression/cbmc-java/lazyloading3/D.class b/regression/cbmc-java/lazyloading3/D.class
index 7e16bd6527d..33579be8902 100644
Binary files a/regression/cbmc-java/lazyloading3/D.class and b/regression/cbmc-java/lazyloading3/D.class differ
diff --git a/regression/cbmc-java/lazyloading3/test.class b/regression/cbmc-java/lazyloading3/test.class
index 8e470f64650..5df466fc9ea 100644
Binary files a/regression/cbmc-java/lazyloading3/test.class and b/regression/cbmc-java/lazyloading3/test.class differ
diff --git a/regression/cbmc-java/lazyloading3/test.java b/regression/cbmc-java/lazyloading3/test.java
index 6d3129d1261..f69a9898472 100644
--- a/regression/cbmc-java/lazyloading3/test.java
+++ b/regression/cbmc-java/lazyloading3/test.java
@@ -5,6 +5,8 @@ public class test
{
public static void main(C c)
{
+ if(c==null)
+ return;
c.a.f();
}
}
diff --git a/regression/cbmc-java/tableswitch2/test.desc b/regression/cbmc-java/tableswitch2/test.desc
index b9e08d5d49b..baee77bb8e9 100644
--- a/regression/cbmc-java/tableswitch2/test.desc
+++ b/regression/cbmc-java/tableswitch2/test.desc
@@ -1,7 +1,6 @@
CORE
table_switch_neg_offset.class
--function table_switch_neg_offset.f
-
^EXIT=0$
^SIGNAL=0$
^VERIFICATION SUCCESSFUL$
diff --git a/regression/cbmc-with-incr/Makefile b/regression/cbmc-with-incr/Makefile
index 4ab60f487d0..4389f3bb8ef 100644
--- a/regression/cbmc-with-incr/Makefile
+++ b/regression/cbmc-with-incr/Makefile
@@ -14,5 +14,5 @@ show:
done;
clean:
- @rm -f *.log
- @for dir in *; do rm -f $$dir/*.out; done;
+ @$(RM) *.log
+ @for dir in *; do $(RM) $$dir/*.out; done;
diff --git a/regression/cbmc/Makefile b/regression/cbmc/Makefile
index cbdd3378bac..9a14abc905f 100644
--- a/regression/cbmc/Makefile
+++ b/regression/cbmc/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cbmc/graphml_witness1/test.desc b/regression/cbmc/graphml_witness1/test.desc
index bfd4cf4f3f4..cb22eaba5d0 100644
--- a/regression/cbmc/graphml_witness1/test.desc
+++ b/regression/cbmc/graphml_witness1/test.desc
@@ -49,7 +49,7 @@ main.c
true
-
+
main.c
21
diff --git a/regression/cbmc/typedef-anon-struct1/main.c b/regression/cbmc/typedef-anon-struct1/main.c
new file mode 100644
index 00000000000..d1e7196a3b1
--- /dev/null
+++ b/regression/cbmc/typedef-anon-struct1/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-anon-struct1/test.desc b/regression/cbmc/typedef-anon-struct1/test.desc
new file mode 100644
index 00000000000..d9d9769f677
--- /dev/null
+++ b/regression/cbmc/typedef-anon-struct1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-anon-struct2/main.c b/regression/cbmc/typedef-anon-struct2/main.c
new file mode 100644
index 00000000000..35475513f7d
--- /dev/null
+++ b/regression/cbmc/typedef-anon-struct2/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ MYSTRUCT mystruct_var = {.x = 10, .y = 3.1f}, another_mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-anon-struct2/test.desc b/regression/cbmc/typedef-anon-struct2/test.desc
new file mode 100644
index 00000000000..83af4f59a9f
--- /dev/null
+++ b/regression/cbmc/typedef-anon-struct2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+Base name\.+: another_mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-anon-union1/main.c b/regression/cbmc/typedef-anon-union1/main.c
new file mode 100644
index 00000000000..9322c77cb6e
--- /dev/null
+++ b/regression/cbmc/typedef-anon-union1/main.c
@@ -0,0 +1,11 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-anon-union1/test.desc b/regression/cbmc/typedef-anon-union1/test.desc
new file mode 100644
index 00000000000..6f74f9f5574
--- /dev/null
+++ b/regression/cbmc/typedef-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-anon-union2/main.c b/regression/cbmc/typedef-anon-union2/main.c
new file mode 100644
index 00000000000..b2dd6594432
--- /dev/null
+++ b/regression/cbmc/typedef-anon-union2/main.c
@@ -0,0 +1,11 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ MYUNION myunion_var = {.y = 2.1f}, another_myunion_var = {.y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-anon-union2/test.desc b/regression/cbmc/typedef-anon-union2/test.desc
new file mode 100644
index 00000000000..f5242dc7ac7
--- /dev/null
+++ b/regression/cbmc/typedef-anon-union2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+Base name\.+: another_myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-const-struct1/main.c b/regression/cbmc/typedef-const-struct1/main.c
new file mode 100644
index 00000000000..ab8137e82e4
--- /dev/null
+++ b/regression/cbmc/typedef-const-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ const struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ const MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-const-struct1/test.desc b/regression/cbmc/typedef-const-struct1/test.desc
new file mode 100644
index 00000000000..f6c2d8e4b48
--- /dev/null
+++ b/regression/cbmc/typedef-const-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: const struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: const MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-const-type1/main.c b/regression/cbmc/typedef-const-type1/main.c
new file mode 100644
index 00000000000..8cd4a4346eb
--- /dev/null
+++ b/regression/cbmc/typedef-const-type1/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ const int int_var = 3;
+ const MYINT myint_var = 5;
+}
diff --git a/regression/cbmc/typedef-const-type1/test.desc b/regression/cbmc/typedef-const-type1/test.desc
new file mode 100644
index 00000000000..0e1b67ce3da
--- /dev/null
+++ b/regression/cbmc/typedef-const-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: const signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: const MYINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-const-union1/main.c b/regression/cbmc/typedef-const-union1/main.c
new file mode 100644
index 00000000000..b8defe635a6
--- /dev/null
+++ b/regression/cbmc/typedef-const-union1/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ const union tag_union_name tag_union_var = {1};
+ const MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-const-union1/test.desc b/regression/cbmc/typedef-const-union1/test.desc
new file mode 100644
index 00000000000..019a6551911
--- /dev/null
+++ b/regression/cbmc/typedef-const-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: const union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: const MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-anon-struct1/main.c b/regression/cbmc/typedef-param-anon-struct1/main.c
new file mode 100644
index 00000000000..e8f3fb8fd7c
--- /dev/null
+++ b/regression/cbmc/typedef-param-anon-struct1/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun(MYSTRUCT mystruct_param)
+{
+
+}
diff --git a/regression/cbmc/typedef-param-anon-struct1/test.desc b/regression/cbmc/typedef-param-anon-struct1/test.desc
new file mode 100644
index 00000000000..1d7c939008a
--- /dev/null
+++ b/regression/cbmc/typedef-param-anon-struct1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_param\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-anon-union1/main.c b/regression/cbmc/typedef-param-anon-union1/main.c
new file mode 100644
index 00000000000..71791d9adfc
--- /dev/null
+++ b/regression/cbmc/typedef-param-anon-union1/main.c
@@ -0,0 +1,10 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun(MYUNION myunion_param)
+{
+}
diff --git a/regression/cbmc/typedef-param-anon-union1/test.desc b/regression/cbmc/typedef-param-anon-union1/test.desc
new file mode 100644
index 00000000000..34c29cefda9
--- /dev/null
+++ b/regression/cbmc/typedef-param-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_param\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-struct1/main.c b/regression/cbmc/typedef-param-struct1/main.c
new file mode 100644
index 00000000000..a358c15a030
--- /dev/null
+++ b/regression/cbmc/typedef-param-struct1/main.c
@@ -0,0 +1,10 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun(struct tag_struct_name tag_struct_param, MYSTRUCT mystruct_param)
+{
+}
diff --git a/regression/cbmc/typedef-param-struct1/test.desc b/regression/cbmc/typedef-param-struct1/test.desc
new file mode 100644
index 00000000000..ad0d23ed7a9
--- /dev/null
+++ b/regression/cbmc/typedef-param-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_param\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_param\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-type1/main.c b/regression/cbmc/typedef-param-type1/main.c
new file mode 100644
index 00000000000..b4c915066b6
--- /dev/null
+++ b/regression/cbmc/typedef-param-type1/main.c
@@ -0,0 +1,7 @@
+
+typedef int MYINT;
+
+void fun(int int_param, MYINT myint_param)
+{
+
+}
diff --git a/regression/cbmc/typedef-param-type1/test.desc b/regression/cbmc/typedef-param-type1/test.desc
new file mode 100644
index 00000000000..14659940cde
--- /dev/null
+++ b/regression/cbmc/typedef-param-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-type2/main.c b/regression/cbmc/typedef-param-type2/main.c
new file mode 100644
index 00000000000..b5974fb6bbb
--- /dev/null
+++ b/regression/cbmc/typedef-param-type2/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+void fun(int int_param, MYINT myint_param, ALTINT altint_param)
+{
+
+}
diff --git a/regression/cbmc/typedef-param-type2/test.desc b/regression/cbmc/typedef-param-type2/test.desc
new file mode 100644
index 00000000000..14e7db9d3d4
--- /dev/null
+++ b/regression/cbmc/typedef-param-type2/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+Base name\.+: altint_param\nMode\.+: C\nType\.+: ALTINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-type3/main.c b/regression/cbmc/typedef-param-type3/main.c
new file mode 100644
index 00000000000..4d542e10c13
--- /dev/null
+++ b/regression/cbmc/typedef-param-type3/main.c
@@ -0,0 +1,7 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+void fun(int int_param, MYINT myint_param, CHAINEDINT chainedint_param)
+{
+}
diff --git a/regression/cbmc/typedef-param-type3/test.desc b/regression/cbmc/typedef-param-type3/test.desc
new file mode 100644
index 00000000000..1f10dea2551
--- /dev/null
+++ b/regression/cbmc/typedef-param-type3/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+Base name\.+: chainedint_param\nMode\.+: C\nType\.+: CHAINEDINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-param-union1/main.c b/regression/cbmc/typedef-param-union1/main.c
new file mode 100644
index 00000000000..8f961614e5d
--- /dev/null
+++ b/regression/cbmc/typedef-param-union1/main.c
@@ -0,0 +1,10 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun(union tag_union_name tag_union_param, MYUNION myunion_param)
+{
+}
diff --git a/regression/cbmc/typedef-param-union1/test.desc b/regression/cbmc/typedef-param-union1/test.desc
new file mode 100644
index 00000000000..37ab0aee08c
--- /dev/null
+++ b/regression/cbmc/typedef-param-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_param\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_param\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-anon-struct1/main.c b/regression/cbmc/typedef-return-anon-struct1/main.c
new file mode 100644
index 00000000000..0195b955cdd
--- /dev/null
+++ b/regression/cbmc/typedef-return-anon-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+MYSTRUCT fun()
+{
+ MYSTRUCT return_variable = {.x = 1, .y = 3.14f};
+ return return_variable;
+}
diff --git a/regression/cbmc/typedef-return-anon-struct1/test.desc b/regression/cbmc/typedef-return-anon-struct1/test.desc
new file mode 100644
index 00000000000..420ac1295ac
--- /dev/null
+++ b/regression/cbmc/typedef-return-anon-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: return\nMode\.+: C\nType\.+: MYSTRUCT
+Base name\.+: fun\nMode\.+: C\nType\.+: MYSTRUCT \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-anon-union1/main.c b/regression/cbmc/typedef-return-anon-union1/main.c
new file mode 100644
index 00000000000..3bc7d19d5b7
--- /dev/null
+++ b/regression/cbmc/typedef-return-anon-union1/main.c
@@ -0,0 +1,15 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+
+MYUNION fun()
+{
+ MYUNION return_variable = {1};
+ return return_variable;
+}
+
+
diff --git a/regression/cbmc/typedef-return-anon-union1/test.desc b/regression/cbmc/typedef-return-anon-union1/test.desc
new file mode 100644
index 00000000000..8d8d41a4dfe
--- /dev/null
+++ b/regression/cbmc/typedef-return-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYUNION \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-struct1/main.c b/regression/cbmc/typedef-return-struct1/main.c
new file mode 100644
index 00000000000..30c1323555c
--- /dev/null
+++ b/regression/cbmc/typedef-return-struct1/main.c
@@ -0,0 +1,20 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+struct tag_struct_name fun()
+{
+ struct tag_struct_name return_variable = { .x = 1, .y = 3.14f};
+ return return_variable;
+}
+
+MYSTRUCT fun2()
+{
+ MYSTRUCT return_variable = { .x = 1, .y = 3.14f};
+ return return_variable;
+}
+
+
diff --git a/regression/cbmc/typedef-return-struct1/test.desc b/regression/cbmc/typedef-return-struct1/test.desc
new file mode 100644
index 00000000000..c4a9dc3550c
--- /dev/null
+++ b/regression/cbmc/typedef-return-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: struct tag_struct_name \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYSTRUCT \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-type1/main.c b/regression/cbmc/typedef-return-type1/main.c
new file mode 100644
index 00000000000..1ba7f426f89
--- /dev/null
+++ b/regression/cbmc/typedef-return-type1/main.c
@@ -0,0 +1,12 @@
+
+typedef int MYINT;
+
+int fun()
+{
+ return 4;
+}
+
+MYINT fun2()
+{
+ return 5;
+}
diff --git a/regression/cbmc/typedef-return-type1/test.desc b/regression/cbmc/typedef-return-type1/test.desc
new file mode 100644
index 00000000000..0ebbe5109a7
--- /dev/null
+++ b/regression/cbmc/typedef-return-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: signed int \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYINT \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-type2/main.c b/regression/cbmc/typedef-return-type2/main.c
new file mode 100644
index 00000000000..0d94ab54da3
--- /dev/null
+++ b/regression/cbmc/typedef-return-type2/main.c
@@ -0,0 +1,13 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+MYINT fun()
+{
+
+}
+
+ALTINT fun2()
+{
+
+}
diff --git a/regression/cbmc/typedef-return-type2/test.desc b/regression/cbmc/typedef-return-type2/test.desc
new file mode 100644
index 00000000000..27b2e77902d
--- /dev/null
+++ b/regression/cbmc/typedef-return-type2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYINT \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: ALTINT \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-type3/main.c b/regression/cbmc/typedef-return-type3/main.c
new file mode 100644
index 00000000000..e246757c692
--- /dev/null
+++ b/regression/cbmc/typedef-return-type3/main.c
@@ -0,0 +1,12 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+MYINT fun()
+{
+}
+
+CHAINEDINT fun2()
+{
+
+}
\ No newline at end of file
diff --git a/regression/cbmc/typedef-return-type3/test.desc b/regression/cbmc/typedef-return-type3/test.desc
new file mode 100644
index 00000000000..7cfecafece9
--- /dev/null
+++ b/regression/cbmc/typedef-return-type3/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYINT \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: CHAINEDINT \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-return-union1/main.c b/regression/cbmc/typedef-return-union1/main.c
new file mode 100644
index 00000000000..ad69cb04545
--- /dev/null
+++ b/regression/cbmc/typedef-return-union1/main.c
@@ -0,0 +1,20 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+union tag_union_name fun()
+{
+ union tag_union_name return_variable = {1};
+ return return_variable;
+}
+
+MYUNION fun2()
+{
+ MYUNION return_variable = {1};
+ return return_variable;
+}
+
+
diff --git a/regression/cbmc/typedef-return-union1/test.desc b/regression/cbmc/typedef-return-union1/test.desc
new file mode 100644
index 00000000000..b1668066f08
--- /dev/null
+++ b/regression/cbmc/typedef-return-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: union tag_union_name \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYUNION \(\)
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-struct1/main.c b/regression/cbmc/typedef-struct1/main.c
new file mode 100644
index 00000000000..dac5abf77b8
--- /dev/null
+++ b/regression/cbmc/typedef-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-struct1/test.desc b/regression/cbmc/typedef-struct1/test.desc
new file mode 100644
index 00000000000..90f1c22933a
--- /dev/null
+++ b/regression/cbmc/typedef-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-struct2/main.c b/regression/cbmc/typedef-struct2/main.c
new file mode 100644
index 00000000000..dac5abf77b8
--- /dev/null
+++ b/regression/cbmc/typedef-struct2/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-struct2/test.desc b/regression/cbmc/typedef-struct2/test.desc
new file mode 100644
index 00000000000..90f1c22933a
--- /dev/null
+++ b/regression/cbmc/typedef-struct2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-type1/main.c b/regression/cbmc/typedef-type1/main.c
new file mode 100644
index 00000000000..43f028c7772
--- /dev/null
+++ b/regression/cbmc/typedef-type1/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+}
diff --git a/regression/cbmc/typedef-type1/test.desc b/regression/cbmc/typedef-type1/test.desc
new file mode 100644
index 00000000000..08d1f5abfcd
--- /dev/null
+++ b/regression/cbmc/typedef-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-type2/main.c b/regression/cbmc/typedef-type2/main.c
new file mode 100644
index 00000000000..acb1cce2da4
--- /dev/null
+++ b/regression/cbmc/typedef-type2/main.c
@@ -0,0 +1,10 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+ ALTINT altint_var = 7;
+}
diff --git a/regression/cbmc/typedef-type2/test.desc b/regression/cbmc/typedef-type2/test.desc
new file mode 100644
index 00000000000..76d1d114a19
--- /dev/null
+++ b/regression/cbmc/typedef-type2/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: altint_var\nMode\.+: C\nType\.+: ALTINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-type3/main.c b/regression/cbmc/typedef-type3/main.c
new file mode 100644
index 00000000000..5855e0c24cb
--- /dev/null
+++ b/regression/cbmc/typedef-type3/main.c
@@ -0,0 +1,10 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+ CHAINEDINT chainedint_var = 5;
+}
diff --git a/regression/cbmc/typedef-type3/test.desc b/regression/cbmc/typedef-type3/test.desc
new file mode 100644
index 00000000000..cc5ad52d953
--- /dev/null
+++ b/regression/cbmc/typedef-type3/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: chainedint_var\nMode\.+: C\nType\.+: CHAINEDINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-type4/main.c b/regression/cbmc/typedef-type4/main.c
new file mode 100644
index 00000000000..aa2ec9ad7fb
--- /dev/null
+++ b/regression/cbmc/typedef-type4/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5, another_myint_var = 10;
+}
diff --git a/regression/cbmc/typedef-type4/test.desc b/regression/cbmc/typedef-type4/test.desc
new file mode 100644
index 00000000000..1c0c063b8e1
--- /dev/null
+++ b/regression/cbmc/typedef-type4/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: another_myint_var\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-union1/main.c b/regression/cbmc/typedef-union1/main.c
new file mode 100644
index 00000000000..6f56f3c731b
--- /dev/null
+++ b/regression/cbmc/typedef-union1/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ union tag_union_name tag_union_var = {1};
+ MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/cbmc/typedef-union1/test.desc b/regression/cbmc/typedef-union1/test.desc
new file mode 100644
index 00000000000..e7ce9b6b459
--- /dev/null
+++ b/regression/cbmc/typedef-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/typedef-union2/main.c b/regression/cbmc/typedef-union2/main.c
new file mode 100644
index 00000000000..9ca707cf767
--- /dev/null
+++ b/regression/cbmc/typedef-union2/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ union tag_union_name tag_union_var = {1}, another_tag_union_var = {1};
+ MYUNION myunion_var = {.y = 2.1f}, another_myunion_var = {.y = 3.1f};
+}
diff --git a/regression/cbmc/typedef-union2/test.desc b/regression/cbmc/typedef-union2/test.desc
new file mode 100644
index 00000000000..33cbbff29af
--- /dev/null
+++ b/regression/cbmc/typedef-union2/test.desc
@@ -0,0 +1,13 @@
+CORE
+main.c
+--show-symbol-table --function fun
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: another_tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+Base name\.+: another_myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/cbmc/unsigned___int128/main.c b/regression/cbmc/unsigned___int128/main.c
index b695484a332..b3bfbd5ea28 100644
--- a/regression/cbmc/unsigned___int128/main.c
+++ b/regression/cbmc/unsigned___int128/main.c
@@ -1,6 +1,6 @@
# include
-typedef unsigned __int128 uint128_t;
+typedef unsigned __int128 uint128_t;
typedef uint64_t limb;
typedef uint128_t widelimb;
@@ -8,9 +8,9 @@ typedef uint128_t widelimb;
typedef limb felem[4];
typedef widelimb widefelem[7];
-felem p = {0x1FFFFFFFFFFFFFF,
- 0xFFFFFFFFFFFFFF,
- 0xFFFFE000000000,
+felem p = {0x1FFFFFFFFFFFFFF,
+ 0xFFFFFFFFFFFFFF,
+ 0xFFFFE000000000,
0x00000000000002};
@@ -18,13 +18,20 @@ felem p = {0x1FFFFFFFFFFFFFF,
* Reduce seven 128-bit coefficients to four 64-bit coefficients.
* Requires in[i] < 2^126,
* ensures out[0] < 2^56, out[1] < 2^56, out[2] < 2^56, out[3] <= 2^56 + 2^16 */
-void reduce(felem out, const widefelem in)
+void reduce(
+ limb out0, limb out1, limb out2, limb out3, widelimb in0, widelimb in1,
+ widelimb in2, widelimb in3, widelimb in4, widelimb in5, widelimb in6)
{
+ felem out = {out0, out1, out2, out3};
+ const widefelem in = {in0, in1, in2, in3, in4, in5, in6};
__CPROVER_assume(in[0]<(widelimb)((widelimb)1<<126));
__CPROVER_assume(in[1]<((widelimb)1<<126));
__CPROVER_assume(in[2]<((widelimb)1<<126));
__CPROVER_assume(in[3]<((widelimb)1<<126));
+ __CPROVER_assume(in[4]<((widelimb)1<<126));
+ __CPROVER_assume(in[5]<((widelimb)1<<126));
+ __CPROVER_assume(in[6]<((widelimb)1<<126));
static const widelimb two127p15 = (((widelimb) 1) << 127) +
(((widelimb) 1) << 15);
@@ -75,9 +82,9 @@ void reduce(felem out, const widefelem in)
output[2] += output[1] >> 56;
/* output[2] < 2^57 + 2^72 */
-
+
assert(output[2] < (((widelimb)1)<<57)+(((widelimb)1)<<72));
-
+
out[1] = output[1] & 0x00ffffffffffffff;
output[3] += output[2] >> 56;
/* output[3] <= 2^56 + 2^16 */
diff --git a/regression/cpp-from-CVS/Makefile b/regression/cpp-from-CVS/Makefile
index b092e240b99..e28536a2988 100644
--- a/regression/cpp-from-CVS/Makefile
+++ b/regression/cpp-from-CVS/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/main.c" "$$dir/main.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cpp-linter/Makefile b/regression/cpp-linter/Makefile
index b84f9ae3d18..097b463fce5 100644
--- a/regression/cpp-linter/Makefile
+++ b/regression/cpp-linter/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/cpp-linter/function-comment-header1/test.desc b/regression/cpp-linter/function-comment-header1/test.desc
index efaae0b7391..708eecf0783 100644
--- a/regression/cpp-linter/function-comment-header1/test.desc
+++ b/regression/cpp-linter/function-comment-header1/test.desc
@@ -3,6 +3,5 @@ main.cpp
^main\.cpp:26: Could not find function header comment for foo \[readability/function_comment\] \[4\]
^Total errors found: 1$
-
^SIGNAL=0$
--
diff --git a/regression/cpp-linter/struct-inline-decl/test.desc b/regression/cpp-linter/struct-inline-decl/test.desc
index 4a53c26c870..12418d892f4 100644
--- a/regression/cpp-linter/struct-inline-decl/test.desc
+++ b/regression/cpp-linter/struct-inline-decl/test.desc
@@ -1,7 +1,6 @@
CORE
main.cpp
-
^Total errors found: 0$
^EXIT=0$
^SIGNAL=0$
diff --git a/regression/cpp/Makefile b/regression/cpp/Makefile
index b03e120015b..87af55e3306 100644
--- a/regression/cpp/Makefile
+++ b/regression/cpp/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/fault-localization/Makefile b/regression/fault-localization/Makefile
index cbdd3378bac..9a14abc905f 100644
--- a/regression/fault-localization/Makefile
+++ b/regression/fault-localization/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/goto-analyzer/Makefile b/regression/goto-analyzer/Makefile
index 2630bf17097..ca7e7707afe 100644
--- a/regression/goto-analyzer/Makefile
+++ b/regression/goto-analyzer/Makefile
@@ -18,3 +18,8 @@ show:
vim -o "$$dir/*.java" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/goto-analyzer/approx-array-variable-const-fp/main.c b/regression/goto-analyzer/approx-array-variable-const-fp/main.c
new file mode 100644
index 00000000000..7896e3402c0
--- /dev/null
+++ b/regression/goto-analyzer/approx-array-variable-const-fp/main.c
@@ -0,0 +1,34 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ fp_tbl[i]();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-array-variable-const-fp/test.desc b/regression/goto-analyzer/approx-array-variable-const-fp/test.desc
new file mode 100644
index 00000000000..38027f70600
--- /dev/null
+++ b/regression/goto-analyzer/approx-array-variable-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f2 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f3 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f9 THEN GOTO [0-9]$
+^warning: ignoring
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/main.c
new file mode 100644
index 00000000000..8fda2e71af4
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/main.c
@@ -0,0 +1,41 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void(* const fp_tbl[3])(void) =
+{
+ (void(*)())f2,
+ (void(*)())f3,
+ (void(*)())f4,
+};
+
+
+void func(int i)
+{
+ const void_fp fp = fp_tbl[i];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/test.desc
new file mode 100644
index 00000000000..e6f1f4b5752
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-cast-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/main.c
new file mode 100644
index 00000000000..72a600aa80c
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4, 0};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ const void_fp fp = fp_tbl[i];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/test.desc
new file mode 100644
index 00000000000..e6f1f4b5752
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp-with-null/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/main.c
new file mode 100644
index 00000000000..7eea22141bd
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ const void_fp fp = fp_tbl[i];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/test.desc
new file mode 100644
index 00000000000..e6f1f4b5752
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..67d256f0c7b
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c
@@ -0,0 +1,50 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ void_fp fun;
+};
+
+const struct action rec = { .fun = f2 };
+const struct action rec2 = { .fun = f3 };
+const struct action rec3 = { .fun = f4 };
+
+const struct action * const action_list[4] =
+{
+ &rec,
+ &rec2,
+ &rec3,
+ &rec
+};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ const void_fp fp = action_list[i]->fun;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..e6f1f4b5752
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..e058e5f3c4f
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/main.c
@@ -0,0 +1,51 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+struct stable
+{
+ int x;
+ void (*fp)(void);
+};
+
+const struct stable stable_table [3] =
+{
+ { 1, f2 },
+ { 2, f3 },
+ { 3, f4 }
+};
+
+const struct stable another_table = { 4, f5 };
+
+
+void func(int i)
+{
+ const void_fp fp = stable_table[i].fp;
+
+ // Illegal
+ // stable_table[1] = another_table;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..e6f1f4b5752
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-const-struct-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/main.c b/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/main.c
new file mode 100644
index 00000000000..ca882ffd6b3
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/main.c
@@ -0,0 +1,77 @@
+#include
+
+int f1 (void)
+{
+ printf("%i\n", 1);
+ return 1;
+}
+int f2 (void)
+{
+ printf("%i\n", 2);
+ return 2;
+}
+int f3 (void)
+{
+ printf("%i\n", 3);
+ return 3;
+}
+int f4 (void)
+{
+ printf("%i\n", 4);
+ return 4;
+}
+int f5 (void)
+{
+ printf("%i\n", 5);
+ return 5;
+}
+int f6 (void)
+{
+ printf("%i\n", 6);
+ return 6;
+}
+int f7 (void)
+{
+ printf("%i\n", 7);
+ return 7;
+}
+int f8 (void)
+{
+ printf("%i\n", 8);
+ return 8;
+}
+int f9 (void)
+{
+ printf("%i\n", 9);
+ return 9;
+}
+
+typedef void(*void_fp)(void);
+typedef int(*int_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const int_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void(* const fp_tbl[3])(void) =
+{
+ (void(*)())f2,
+ (void(*)())f3,
+ (void(*)())f4,
+};
+
+
+void func(int i)
+{
+ const void_fp fp = fp_tbl[i];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+ return 0;
+}
diff --git a/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/test.desc b/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/test.desc
new file mode 100644
index 00000000000..661ac93a14f
--- /dev/null
+++ b/regression/goto-analyzer/approx-const-fp-array-variable-invalid-cast-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == \(const void_fp\)f2 THEN GOTO [0-9]$
+^\s*IF fp == \(const void_fp\)f3 THEN GOTO [0-9]$
+^\s*IF fp == \(const void_fp\)f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
+^\s*IF fp_tbl\[\(signed long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed long int\)i\] == f9 THEN GOTO [0-9]$
diff --git a/regression/goto-analyzer/constant_propagation_01/constant_propagation1.c b/regression/goto-analyzer/constant_propagation_01/constant_propagation1.c
new file mode 100644
index 00000000000..801a21535a9
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_01/constant_propagation1.c
@@ -0,0 +1,14 @@
+#include
+
+int main()
+{
+ int i, j=20;
+
+ if (j==20)
+ {
+ int x=1,y=2,z;
+ z=x+y;
+ assert(z==3);
+ }
+
+}
diff --git a/regression/goto-analyzer/constant_propagation_01/test.desc b/regression/goto-analyzer/constant_propagation_01/test.desc
new file mode 100644
index 00000000000..1eb849c3c7a
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_01/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation1.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 12, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_02/constant_propagation_02.c b/regression/goto-analyzer/constant_propagation_02/constant_propagation_02.c
new file mode 100644
index 00000000000..ff139437bd8
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_02/constant_propagation_02.c
@@ -0,0 +1,13 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ if (i==0)
+ {
+ i++;
+ j++;
+ }
+ assert(j!=3);
+}
diff --git a/regression/goto-analyzer/constant_propagation_02/original b/regression/goto-analyzer/constant_propagation_02/original
new file mode 100644
index 00000000000..13a9e245c81
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_02/original
@@ -0,0 +1,3 @@
+Task defaults to --show
+Domain defaults to --constants
+GOTO-ANALYSER version 5.5 64-bit x86_64 linux
diff --git a/regression/goto-analyzer/constant_propagation_02/simplified b/regression/goto-analyzer/constant_propagation_02/simplified
new file mode 100644
index 00000000000..6c722a607de
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_02/simplified
@@ -0,0 +1,81 @@
+Reading GOTO program from `out.goto'
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+main /* main */
+ // 0 file constant_propagation_02.c line 5 function main
+ signed int i;
+ // 1 file constant_propagation_02.c line 5 function main
+ i = 0;
+ // 2 file constant_propagation_02.c line 5 function main
+ signed int j;
+ // 3 file constant_propagation_02.c line 5 function main
+ j = 2;
+ // 4 file constant_propagation_02.c line 7 function main
+ IF FALSE THEN GOTO 1
+ // 5 file constant_propagation_02.c line 9 function main
+ 0 = 1;
+ // 6 file constant_propagation_02.c line 10 function main
+ 2 = 3;
+ // 7 no location
+ 1: SKIP
+ // 8 file constant_propagation_02.c line 12 function main
+ ASSERT FALSE // assertion j!=3
+ // 9 file constant_propagation_02.c line 12 function main
+ GOTO 2
+ // 10 file constant_propagation_02.c line 12 function main
+ (void)0;
+ // 11 no location
+ 2: SKIP
+ // 12 file constant_propagation_02.c line 13 function main
+ dead j;
+ // 13 file constant_propagation_02.c line 13 function main
+ dead i;
+ // 14 file constant_propagation_02.c line 13 function main
+ main#return_value = NONDET(signed int);
+ // 15 file constant_propagation_02.c line 13 function main
+ END_FUNCTION
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+_start /* _start */
+ // 16 no location
+ __CPROVER_initialize();
+ // 17 file constant_propagation_02.c line 3
+ main();
+ // 18 file constant_propagation_02.c line 3
+ return' = main#return_value;
+ // 19 file constant_propagation_02.c line 3
+ dead main#return_value;
+ // 20 file constant_propagation_02.c line 3
+ OUTPUT("return", return');
+ // 21 no location
+ END_FUNCTION
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+__CPROVER_initialize /* __CPROVER_initialize */
+ // 22 no location
+ // Labels: __CPROVER_HIDE
+ SKIP
+ // 23 file line 39
+ __CPROVER_dead_object = NULL;
+ // 24 file line 38
+ __CPROVER_deallocated = NULL;
+ // 25 file line 42
+ __CPROVER_malloc_is_new_array = FALSE;
+ // 26 file line 40
+ __CPROVER_malloc_object = NULL;
+ // 27 file line 41
+ __CPROVER_malloc_size = 0ul;
+ // 28 file line 43
+ __CPROVER_memory_leak = NULL;
+ // 29 file line 31
+ __CPROVER_next_thread_id = 0ul;
+ // 30 file line 85
+ __CPROVER_pipe_count = 0u;
+ // 31 file line 65
+ __CPROVER_rounding_mode = 0;
+ // 32 file line 29
+ __CPROVER_thread_id = 0ul;
+ // 33 file line 30
+ __CPROVER_threads_exited = ARRAY_OF(FALSE);
+ // 34 no location
+ END_FUNCTION
diff --git a/regression/goto-analyzer/constant_propagation_02/test.desc b/regression/goto-analyzer/constant_propagation_02/test.desc
new file mode 100644
index 00000000000..20cc5fcf86e
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_02/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_02.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_03/constant_propagation_03.c b/regression/goto-analyzer/constant_propagation_03/constant_propagation_03.c
new file mode 100644
index 00000000000..f08f6020d82
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_03/constant_propagation_03.c
@@ -0,0 +1,13 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ if (i==0)
+ {
+ i++;
+ j++;
+ }
+ assert(j==3);
+}
diff --git a/regression/goto-analyzer/constant_propagation_03/test.desc b/regression/goto-analyzer/constant_propagation_03/test.desc
new file mode 100644
index 00000000000..2225c1a666e
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_03/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_03.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_04/constant_propagation_04.c b/regression/goto-analyzer/constant_propagation_04/constant_propagation_04.c
new file mode 100644
index 00000000000..ca003ccd2b8
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_04/constant_propagation_04.c
@@ -0,0 +1,13 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ if (i<50)
+ {
+ i++;
+ j++;
+ }
+ assert(j==3);
+}
diff --git a/regression/goto-analyzer/constant_propagation_04/test.desc b/regression/goto-analyzer/constant_propagation_04/test.desc
new file mode 100644
index 00000000000..2510b3f8a5e
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_04/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_04.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_05/constant_propagation_05.c b/regression/goto-analyzer/constant_propagation_05/constant_propagation_05.c
new file mode 100644
index 00000000000..037fbbe0632
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_05/constant_propagation_05.c
@@ -0,0 +1,13 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ if (i<50)
+ {
+ i++;
+ j++;
+ }
+ assert(j!=3);
+}
diff --git a/regression/goto-analyzer/constant_propagation_05/test.desc b/regression/goto-analyzer/constant_propagation_05/test.desc
new file mode 100644
index 00000000000..ddb22cc3616
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_05/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+constant_propagation_05.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_05.c line 12 function main, assertion j!=3: FAILURE (if reachable)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_06/constant_propagation_06.c b/regression/goto-analyzer/constant_propagation_06/constant_propagation_06.c
new file mode 100644
index 00000000000..d1d29427250
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_06/constant_propagation_06.c
@@ -0,0 +1,30 @@
+#include
+
+int main()
+{
+ int i, j=20;
+
+ if(i>=20)
+ assert(i>=10); // success
+
+ if(i>=10 && i<=20)
+ assert(i!=30); // success
+
+ if(i>=10 && i<=20)
+ assert(i!=15); // fails
+
+ if(i<1 && i>10)
+ assert(0); // success
+
+ if(i>=10 && j>=i)
+ assert(j>=10); // success
+
+ if(i>=j)
+ assert(i>=j); // unknown
+
+ if(i>10)
+ assert(i>=11); // success
+
+ if(i<=100 && j=10: SUCCESS$
+^\[main.assertion.2\] file constant_propagation_06.c line 11 function main, assertion i!=30: SUCCESS$
+^\[main.assertion.3\] file constant_propagation_06.c line 14 function main, assertion i!=15: UNKNOWN$
+^\[main.assertion.4\] file constant_propagation_06.c line 17 function main, assertion 0: SUCCESS$
+^\[main.assertion.5\] file constant_propagation_06.c line 20 function main, assertion j>=10: SUCCESS$
+^\[main.assertion.6\] file constant_propagation_06.c line 23 function main, assertion i>=j: UNKNOWN$
+^\[main.assertion.7\] file constant_propagation_06.c line 26 function main, assertion i>=11: SUCCESS$
+^\[main.assertion.8\] file constant_propagation_06.c line 29 function main, assertion j<100: SUCCESS$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_07/constant_propagation_07.c b/regression/goto-analyzer/constant_propagation_07/constant_propagation_07.c
new file mode 100644
index 00000000000..40b04edfdd0
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_07/constant_propagation_07.c
@@ -0,0 +1,14 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ while (i<50)
+ {
+ i++;
+ j++;
+ }
+ assert(i<51);
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_07/test.desc b/regression/goto-analyzer/constant_propagation_07/test.desc
new file mode 100644
index 00000000000..615893d4f78
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_07/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+constant_propagation_07.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_07.c line 12 function main, assertion i<51: UNKNOWN$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_08/constant_propagation_08.c b/regression/goto-analyzer/constant_propagation_08/constant_propagation_08.c
new file mode 100644
index 00000000000..3909e3889e4
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_08/constant_propagation_08.c
@@ -0,0 +1,16 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ while (i<=50)
+ {
+ i++;
+ j++;
+ }
+ assert(i<50);
+ assert(i<51);
+ assert(i<52);
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_08/test.desc b/regression/goto-analyzer/constant_propagation_08/test.desc
new file mode 100644
index 00000000000..994c2c532df
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_08/test.desc
@@ -0,0 +1,10 @@
+FUTURE
+constant_propagation_08.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_08.c line 12 function main, assertion i<50: UNKNOWN$
+^\[main.assertion.2\] file constant_propagation_08.c line 13 function main, assertion i<51: UNKNOWN$
+^\[main.assertion.3\] file constant_propagation_08.c line 14 function main, assertion i<52: SUCCESS$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_09/constant_propagation_09.c b/regression/goto-analyzer/constant_propagation_09/constant_propagation_09.c
new file mode 100644
index 00000000000..002e9063228
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_09/constant_propagation_09.c
@@ -0,0 +1,14 @@
+#include
+
+int main()
+{
+ int i=0, j=2;
+
+ while (i<=50)
+ {
+ i++;
+ j++;
+ }
+ assert(j<52);
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_09/test.desc b/regression/goto-analyzer/constant_propagation_09/test.desc
new file mode 100644
index 00000000000..6a1b75f0c1b
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_09/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_09.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+******** Function main
+^\[main.assertion.1\] file constant_propagation_09.c line 12 function main, assertion j<52: UNKNOWN$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_10/constant_propagation_10.c b/regression/goto-analyzer/constant_propagation_10/constant_propagation_10.c
new file mode 100644
index 00000000000..169f7965b9d
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_10/constant_propagation_10.c
@@ -0,0 +1,25 @@
+#include
+int main()
+{
+ signed int i;
+ signed int j;
+ i = 0;
+ if(!(i >= 2))
+ {
+ j = j + 1;
+ i = i + 1;
+ if(!(i >= 2))
+ {
+ j = j + 1;
+ i = i + 1;
+ if(!(i >= 2))
+ {
+ j = j + 1;
+ i = i + 1;
+ }
+ assert(!(i < 2));
+ }
+ }
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_10/test.desc b/regression/goto-analyzer/constant_propagation_10/test.desc
new file mode 100644
index 00000000000..52d98cb611b
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_10/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_10.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 4, assigns: 10, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 1, assigns: 10, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_11/constant_propagation_11.c b/regression/goto-analyzer/constant_propagation_11/constant_propagation_11.c
new file mode 100644
index 00000000000..3022a4f0f19
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_11/constant_propagation_11.c
@@ -0,0 +1,17 @@
+#include
+int main()
+{
+ int a[2];
+ int i;
+ i = 0;
+
+ if (i==0)
+ a[0]=1;
+ else
+ a[1]=2;
+
+ assert(a[0]==1 || a[1]==2);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_11/test.desc b/regression/goto-analyzer/constant_propagation_11/test.desc
new file mode 100644
index 00000000000..7c849326cf6
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_11/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_11.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 4, assigns: 13, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_12/constant_propagation_12.c b/regression/goto-analyzer/constant_propagation_12/constant_propagation_12.c
new file mode 100644
index 00000000000..55ea9ac7fc2
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_12/constant_propagation_12.c
@@ -0,0 +1,13 @@
+#include
+int main()
+{
+ int a[2]={0,0};
+
+ if (a[0]==0)
+ a[0]=1;
+
+ assert(a[0]==0);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_12/test.desc b/regression/goto-analyzer/constant_propagation_12/test.desc
new file mode 100644
index 00000000000..ca5803363ad
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_12/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_12.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 3, assigns: 4, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_13/constant_propagation_13.c b/regression/goto-analyzer/constant_propagation_13/constant_propagation_13.c
new file mode 100644
index 00000000000..ac5933e9177
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_13/constant_propagation_13.c
@@ -0,0 +1,14 @@
+#include
+int main()
+{
+ int a[2]={0,0};
+ int i, y;
+
+ if (a[0]==0)
+ a[0]=1;
+
+ assert(a[0]==2);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_13/test.desc b/regression/goto-analyzer/constant_propagation_13/test.desc
new file mode 100644
index 00000000000..22f10d125e3
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_13/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+constant_propagation_13.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_13.c line 10 function main, assertion a\[0\]==2: FAILURE$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_14/constant_propagation_14.c b/regression/goto-analyzer/constant_propagation_14/constant_propagation_14.c
new file mode 100644
index 00000000000..124d1e30a20
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_14/constant_propagation_14.c
@@ -0,0 +1,13 @@
+#include
+int main()
+{
+ int a[2]={0,0};
+
+ if (a[0]==0)
+ a[0]=1;
+
+ assert(a[0]==1 /*|| a[0]==2*/);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_14/test.desc b/regression/goto-analyzer/constant_propagation_14/test.desc
new file mode 100644
index 00000000000..a39a1f66cda
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_14/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_14.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
+^UNKNOWN: assert: 0, assume: 0, goto: 0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_15/constant_propagation_15.c b/regression/goto-analyzer/constant_propagation_15/constant_propagation_15.c
new file mode 100644
index 00000000000..9a7e7692d62
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_15/constant_propagation_15.c
@@ -0,0 +1,13 @@
+#include
+int main()
+{
+ int i=0, y;
+
+ if (i==0)
+ y=1;
+
+ assert(y==1);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_15/test.desc b/regression/goto-analyzer/constant_propagation_15/test.desc
new file mode 100644
index 00000000000..20d36183eb0
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_15/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_15.c
+--constants --simplify out.goto
+^EXIT=0$
+^SIGNAL=0$
+^SIMPLIFIED: assert: 1, assume: 0, goto: 1, assigns: 4, function calls: 0$
+^UNMODIFIED: assert: 0, assume: 0, goto: 2, assigns: 11, function calls: 2$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_16/constant_propagation_16.c b/regression/goto-analyzer/constant_propagation_16/constant_propagation_16.c
new file mode 100644
index 00000000000..102cfd7f812
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_16/constant_propagation_16.c
@@ -0,0 +1,13 @@
+#include
+int main()
+{
+ int i=0, y;
+
+ if (i==0)
+ y=1;
+
+ assert(y==0);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_16/test.desc b/regression/goto-analyzer/constant_propagation_16/test.desc
new file mode 100644
index 00000000000..b56c871deb4
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_16/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+constant_propagation_16.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_16.c line 9 function main, assertion y==0: FAILURE (if reachable)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_17/constant_propagation_17.c b/regression/goto-analyzer/constant_propagation_17/constant_propagation_17.c
new file mode 100644
index 00000000000..8b426fe84b5
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_17/constant_propagation_17.c
@@ -0,0 +1,16 @@
+#include
+int main()
+{
+ int a[2]={0,0};
+
+ if (a[0]==0)
+ a[0]=1;
+ else
+ a[0]=2;
+
+ assert(a[0]==1 || a[0]==2);
+ assert(a[0]==1 && a[0]==2);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_17/test.desc b/regression/goto-analyzer/constant_propagation_17/test.desc
new file mode 100644
index 00000000000..acecb91eb0a
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_17/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+constant_propagation_17.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_17.c line 11 function main, assertion a\[0\]==1 || a\[0\]==2: SUCCESS$
+^\[main.assertion.2\] file constant_propagation_17.c line 12 function main, assertion a\[0\]==1 && a\[0\]==2: FAILURE$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/constant_propagation_18/constant_propagation_18.c b/regression/goto-analyzer/constant_propagation_18/constant_propagation_18.c
new file mode 100644
index 00000000000..6639f9b5c81
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_18/constant_propagation_18.c
@@ -0,0 +1,13 @@
+#include
+int main()
+{
+ int a[2]={0,0};
+
+ if (a[0]==0)
+ a[0]=1;
+
+ assert(a[0]==2);
+
+ return 0;
+}
+
diff --git a/regression/goto-analyzer/constant_propagation_18/test.desc b/regression/goto-analyzer/constant_propagation_18/test.desc
new file mode 100644
index 00000000000..7ea74c4d264
--- /dev/null
+++ b/regression/goto-analyzer/constant_propagation_18/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+constant_propagation_18.c
+--constants --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file constant_propagation_18.c line 9 function main, assertion a\[0\]==2: FAILURE$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/intervals1/intervals1.c b/regression/goto-analyzer/intervals1/intervals1.c
index a797452b198..cdec490fe6d 100644
--- a/regression/goto-analyzer/intervals1/intervals1.c
+++ b/regression/goto-analyzer/intervals1/intervals1.c
@@ -2,8 +2,8 @@
int main()
{
- int i, j;
-
+ int i, j=20;
+
if(i>=20)
assert(i>=10);
diff --git a/regression/goto-analyzer/intervals1/test.desc b/regression/goto-analyzer/intervals1/test.desc
index 3e81f14023a..5a9802eeb20 100644
--- a/regression/goto-analyzer/intervals1/test.desc
+++ b/regression/goto-analyzer/intervals1/test.desc
@@ -1,6 +1,6 @@
-CORE
+KNOWNBUG
intervals1.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file intervals1.c line 8 function main, assertion i>=10: SUCCESS$
diff --git a/regression/goto-analyzer/intervals10/intervals10.c b/regression/goto-analyzer/intervals10/intervals10.c
new file mode 100644
index 00000000000..b27cc6f2001
--- /dev/null
+++ b/regression/goto-analyzer/intervals10/intervals10.c
@@ -0,0 +1,21 @@
+#include
+
+int main()
+{
+ int i, j;
+
+ if(i<=100 && j100); // fails
+
+ if(i<=100 && j100: FAILURE (if reachable)$
+^\[main.assertion.4\] file intervals10.c line 17 function main, assertion j<99: UNKNOWN$
+^\[main.assertion.5\] file intervals10.c line 20 function main, assertion j==100: FAILURE (if reachable)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/intervals11/intervals11.c b/regression/goto-analyzer/intervals11/intervals11.c
new file mode 100644
index 00000000000..2f061cd554d
--- /dev/null
+++ b/regression/goto-analyzer/intervals11/intervals11.c
@@ -0,0 +1,43 @@
+#include
+const int xLen = 10;
+const int Alen = 2;
+const int Blen = 1;
+float nondet_float();
+int main() {
+ float A[] = {1.0f,-0.5f};
+ float B[] = {1.0f};
+ int i,j;
+ float x[xLen];
+ float x_aux[xLen];
+ float y[xLen];
+ float y_aux[xLen];
+ float total=0;
+ for (i=0;i=-1 && x[i]<=1);
+ x_aux[i]=0;
+ y_aux[i]=0;
+ }
+ for(i=0;i=1;j--)
+ x_aux[j] = x_aux[j-1];
+ x_aux[0] = x[i];
+ /* Num, x values */
+ for (j = 0; j < Blen; j++) {
+ y[i] = y[i] + B[j]*x_aux[j];
+ assert(y[i]>=-1.0f && y[i]<=1.0f); //success
+ }
+ /* Den, y values */
+ for(j=0;j=-1.0f && y[i]<=1.0f); //fails
+ }
+ /* Update past y values */
+ for(j=Alen-2;j>=1;j--)
+ y_aux[j] = y_aux[j-1];
+ y_aux[0] = y[i];
+ }
+}
+
diff --git a/regression/goto-analyzer/intervals11/test.desc b/regression/goto-analyzer/intervals11/test.desc
new file mode 100644
index 00000000000..039cbffbeb0
--- /dev/null
+++ b/regression/goto-analyzer/intervals11/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+intervals11.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file intervals11.c line 30 function main, assertion y\[i\]>=-1.0f && y\[i\]<=1.0f: UNKNOWN$
+^\[main.assertion.2\] file intervals11.c line 35 function main, assertion y\[i\]>=-1.0f && y\[i\]<=1.0f: UNKNOWN$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/intervals12/intervals12.c b/regression/goto-analyzer/intervals12/intervals12.c
new file mode 100644
index 00000000000..15d865adf80
--- /dev/null
+++ b/regression/goto-analyzer/intervals12/intervals12.c
@@ -0,0 +1,16 @@
+#include
+
+int main (void) {
+ int i;
+ int j;
+
+ if (i <= 0 && j < i)
+ assert(j < 0);
+
+ if (j < i && i <= 0)
+ assert(j < 0);
+
+ return 0;
+}
+
+
diff --git a/regression/goto-analyzer/intervals12/test.desc b/regression/goto-analyzer/intervals12/test.desc
new file mode 100644
index 00000000000..59a724c28b5
--- /dev/null
+++ b/regression/goto-analyzer/intervals12/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+intervals12.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+^[main.assertion.1] file intervals12.c line 8 function main, assertion j < 0: SUCCESS$
+^[main.assertion.2] file intervals12.c line 11 function main, assertion j < 0: SUCCESS$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/intervals2/intervals2.c b/regression/goto-analyzer/intervals2/intervals2.c
index d1eaf25240e..d542854bb6a 100644
--- a/regression/goto-analyzer/intervals2/intervals2.c
+++ b/regression/goto-analyzer/intervals2/intervals2.c
@@ -2,10 +2,10 @@
int main(){
int x;
- if (x > 0) {
- if (x < 20) {
+ if (x > 0 && x < 20) {
+ //if (x < 20) {
assert(x > -10 && x < 100);
- }
+ //}
}
return 0;
}
diff --git a/regression/goto-analyzer/intervals2/test.desc b/regression/goto-analyzer/intervals2/test.desc
index 16a8ca559e2..65aae030db1 100644
--- a/regression/goto-analyzer/intervals2/test.desc
+++ b/regression/goto-analyzer/intervals2/test.desc
@@ -1,6 +1,6 @@
KNOWNBUG
intervals2.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file intervals2.c line 7 function main, assertion x > -10 && x < 100: SUCCESS$
diff --git a/regression/goto-analyzer/intervals3/test.desc b/regression/goto-analyzer/intervals3/test.desc
index 5db07df08a4..69ded2182ee 100644
--- a/regression/goto-analyzer/intervals3/test.desc
+++ b/regression/goto-analyzer/intervals3/test.desc
@@ -1,6 +1,6 @@
-CORE
+KNOWNBUG
intervals3.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file intervals3.c line 7 function main, assertion x > -10 || x < 100: SUCCESS$
diff --git a/regression/goto-analyzer/intervals4/test.desc b/regression/goto-analyzer/intervals4/test.desc
index 97d222012ad..2b725180e3f 100644
--- a/regression/goto-analyzer/intervals4/test.desc
+++ b/regression/goto-analyzer/intervals4/test.desc
@@ -1,6 +1,6 @@
KNOWNBUG
intervals4.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file intervals4.c line 9 function main, assertion i >= 1 && i <= 2: SUCCESS$
diff --git a/regression/goto-analyzer/intervals5/test.desc b/regression/goto-analyzer/intervals5/test.desc
index 42554724e2d..eb64fbc13d1 100644
--- a/regression/goto-analyzer/intervals5/test.desc
+++ b/regression/goto-analyzer/intervals5/test.desc
@@ -1,6 +1,6 @@
-CORE
+KNOWNBUG
intervals5.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
^\[main.assertion.1\] file intervals5.c line 9 function main, assertion i >= 1 || i <= 2: SUCCESS$
diff --git a/regression/goto-analyzer/intervals6/test.desc b/regression/goto-analyzer/intervals6/test.desc
index 14fd64f33dd..6e36b7948d2 100644
--- a/regression/goto-analyzer/intervals6/test.desc
+++ b/regression/goto-analyzer/intervals6/test.desc
@@ -1,8 +1,8 @@
-CORE
+FUTURE
intervals6.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
-^\[main.assertion.1\] file intervals6.c line 7 function main, assertion x < -10 || x > 100: UNKNOWN$
+^\[main.assertion.1\] file intervals6.c line 7 function main, assertion x < -10 || x > 100: FAILURE (if reachable)$
--
^warning: ignoring
diff --git a/regression/goto-analyzer/intervals7/test.desc b/regression/goto-analyzer/intervals7/test.desc
index aeeb24bd0a9..6a42b4a30ec 100644
--- a/regression/goto-analyzer/intervals7/test.desc
+++ b/regression/goto-analyzer/intervals7/test.desc
@@ -1,8 +1,8 @@
-CORE
+FUTURE
intervals7.c
---intervals
+--intervals --verify
^EXIT=0$
^SIGNAL=0$
-^\[main.assertion.1\] file intervals7.c line 7 function main, assertion x < -10 && x > 100: UNKNOWN$
+^\[main.assertion.1\] file intervals7.c line 7 function main, assertion x < -10 && x > 100: FAILURE (if reachable)$
--
^warning: ignoring
diff --git a/regression/goto-analyzer/intervals8/intervals8.c b/regression/goto-analyzer/intervals8/intervals8.c
new file mode 100644
index 00000000000..4128ac07ce5
--- /dev/null
+++ b/regression/goto-analyzer/intervals8/intervals8.c
@@ -0,0 +1,9 @@
+#include
+
+int main(){
+ int x;
+ if (x > 0 && x < 20) {
+ assert(x < -10 && x < 100);
+ }
+ return 0;
+}
diff --git a/regression/goto-analyzer/intervals8/test.desc b/regression/goto-analyzer/intervals8/test.desc
new file mode 100644
index 00000000000..7500059a717
--- /dev/null
+++ b/regression/goto-analyzer/intervals8/test.desc
@@ -0,0 +1,8 @@
+FUTURE
+intervals8.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file intervals8.c line 6 function main, assertion x < -10 && x < 100: FAILURE (if reachable)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/intervals9/intervals9.c b/regression/goto-analyzer/intervals9/intervals9.c
new file mode 100644
index 00000000000..27739c7aa28
--- /dev/null
+++ b/regression/goto-analyzer/intervals9/intervals9.c
@@ -0,0 +1,12 @@
+#include
+
+int main()
+{
+ int i;
+
+ if(i>0)
+ if(i<3)
+ assert(i>=1 && i<=2);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/intervals9/test.desc b/regression/goto-analyzer/intervals9/test.desc
new file mode 100644
index 00000000000..37c33b97288
--- /dev/null
+++ b/regression/goto-analyzer/intervals9/test.desc
@@ -0,0 +1,8 @@
+KNOWNBUG
+intervals9.c
+--intervals --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] file intervals9.c line 9 function main, assertion i>=1 && i<=2: SUCCESS$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-array-literal-const-fp-null/main.c b/regression/goto-analyzer/no-match-array-literal-const-fp-null/main.c
new file mode 100644
index 00000000000..93ed0af0d47
--- /dev/null
+++ b/regression/goto-analyzer/no-match-array-literal-const-fp-null/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, NULL ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ fp_tbl[1]();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-array-literal-const-fp-null/test.desc b/regression/goto-analyzer/no-match-array-literal-const-fp-null/test.desc
new file mode 100644
index 00000000000..4786993cade
--- /dev/null
+++ b/regression/goto-analyzer/no-match-array-literal-const-fp-null/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/main.c b/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/main.c
new file mode 100644
index 00000000000..a17acab6166
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/main.c
@@ -0,0 +1,41 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp start_fp = f2;
+ const void_fp * const fp_tbl[] = { &start_fp, &start_fp, &start_fp };
+
+ // warning: loses const
+ void_fp * arr_ptr=fp_tbl[0];
+ (*arr_ptr) = f5;
+ arr_ptr++;
+ (*arr_ptr) = f5;
+
+ const void_fp * const fp = fp_tbl[1];
+
+
+ (*fp)();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/test.desc b/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/test.desc
new file mode 100644
index 00000000000..cb389930278
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-array-const-pointer-const-fp-const-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*fp == f1 THEN GOTO [0-9]$
+^\s*IF \*fp == f2 THEN GOTO [0-9]$
+^\s*IF \*fp == f3 THEN GOTO [0-9]$
+^\s*IF \*fp == f4 THEN GOTO [0-9]$
+^\s*IF \*fp == f5 THEN GOTO [0-9]$
+^\s*IF \*fp == f6 THEN GOTO [0-9]$
+^\s*IF \*fp == f7 THEN GOTO [0-9]$
+^\s*IF \*fp == f8 THEN GOTO [0-9]$
+^\s*IF \*fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/main.c b/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/main.c
new file mode 100644
index 00000000000..ee9ba95cb57
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/main.c
@@ -0,0 +1,36 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i, int j)
+{
+ const void_fp fp_tbl[] = {fp_all[i*2], fp_all[j+1]};
+ // Illegal:
+ //fp_tbl[1] = f4;
+ const void_fp fp = fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i,0);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/test.desc b/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-const-fp-run-time/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/main.c b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/main.c
new file mode 100644
index 00000000000..fa1cf231a50
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/main.c
@@ -0,0 +1,34 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i, int j)
+{
+ void_fp fp_tbl[] = {fp_all[i*2], fp_all[j+1]};
+ const void_fp fp = fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i,0);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/test.desc b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp-run-time/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/main.c
new file mode 100644
index 00000000000..88b4edcf448
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/main.c
@@ -0,0 +1,38 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+void_fp fp_tbl[] = {f2, f3, f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(void_fp fp, int i)
+{
+ // It is concievable this could be checked and seen the first value
+ // of the array is unchanged but is kind of a weird edge case.
+ fp_tbl[2] = fp;
+ const void_fp fp2 = fp_tbl[1];
+ fp2();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(fp_all[i+3], i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/test.desc
new file mode 100644
index 00000000000..13d0c5353ce
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-literal-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp2 == f1 THEN GOTO [0-9]$
+^\s*IF fp2 == f2 THEN GOTO [0-9]$
+^\s*IF fp2 == f3 THEN GOTO [0-9]$
+^\s*IF fp2 == f4 THEN GOTO [0-9]$
+^\s*IF fp2 == f5 THEN GOTO [0-9]$
+^\s*IF fp2 == f6 THEN GOTO [0-9]$
+^\s*IF fp2 == f7 THEN GOTO [0-9]$
+^\s*IF fp2 == f8 THEN GOTO [0-9]$
+^\s*IF fp2 == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/main.c
new file mode 100644
index 00000000000..38d09cfb14e
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/main.c
@@ -0,0 +1,36 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+void_fp fp_tbl[] = {f2, f3, f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(void_fp fp, int i)
+{
+ fp_tbl[2] = fp;
+ const void_fp fp2 = fp_tbl[2];
+ fp2();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(fp_all[i+3], i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/test.desc
new file mode 100644
index 00000000000..13d0c5353ce
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-array-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp2 == f1 THEN GOTO [0-9]$
+^\s*IF fp2 == f2 THEN GOTO [0-9]$
+^\s*IF fp2 == f3 THEN GOTO [0-9]$
+^\s*IF fp2 == f4 THEN GOTO [0-9]$
+^\s*IF fp2 == f5 THEN GOTO [0-9]$
+^\s*IF fp2 == f6 THEN GOTO [0-9]$
+^\s*IF fp2 == f7 THEN GOTO [0-9]$
+^\s*IF fp2 == f8 THEN GOTO [0-9]$
+^\s*IF fp2 == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/main.c b/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/main.c
new file mode 100644
index 00000000000..7f5c0ea3755
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+
+ // Warning: this loses const-ness of f2
+ void_fp * p2fp = 0 + ((void_fp*)&fp);
+ *p2fp = &f4;
+
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/test.desc b/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/test.desc
new file mode 100644
index 00000000000..b9a72f79cfe
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-binary-op-const-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/main.c b/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/main.c
new file mode 100644
index 00000000000..b3dafeff777
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/main.c
@@ -0,0 +1,40 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+ // warning: loses const
+ void_fp * arr_ptr=&fp_tbl[0];
+ (*arr_ptr) = f5;
+ arr_ptr++;
+ (*arr_ptr) = f5;
+
+ const void_fp * const fp = &fp_tbl[1];
+
+
+ (*fp)();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/test.desc b/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/test.desc
new file mode 100644
index 00000000000..cb389930278
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-array-index-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*fp == f1 THEN GOTO [0-9]$
+^\s*IF \*fp == f2 THEN GOTO [0-9]$
+^\s*IF \*fp == f3 THEN GOTO [0-9]$
+^\s*IF \*fp == f4 THEN GOTO [0-9]$
+^\s*IF \*fp == f5 THEN GOTO [0-9]$
+^\s*IF \*fp == f6 THEN GOTO [0-9]$
+^\s*IF \*fp == f7 THEN GOTO [0-9]$
+^\s*IF \*fp == f8 THEN GOTO [0-9]$
+^\s*IF \*fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-array-lost/main.c b/regression/goto-analyzer/no-match-const-fp-const-array-lost/main.c
new file mode 100644
index 00000000000..d27da78d0b7
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-array-lost/main.c
@@ -0,0 +1,40 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+ // warning: loses const
+ void_fp * arr_ptr=fp_tbl;
+ (*arr_ptr) = f5;
+ arr_ptr++;
+ (*arr_ptr) = f5;
+
+ const void_fp * const fp = &fp_tbl[1];
+
+
+ (*fp)();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-array-lost/test.desc b/regression/goto-analyzer/no-match-const-fp-const-array-lost/test.desc
new file mode 100644
index 00000000000..cb389930278
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-array-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*fp == f1 THEN GOTO [0-9]$
+^\s*IF \*fp == f2 THEN GOTO [0-9]$
+^\s*IF \*fp == f3 THEN GOTO [0-9]$
+^\s*IF \*fp == f4 THEN GOTO [0-9]$
+^\s*IF \*fp == f5 THEN GOTO [0-9]$
+^\s*IF \*fp == f6 THEN GOTO [0-9]$
+^\s*IF \*fp == f7 THEN GOTO [0-9]$
+^\s*IF \*fp == f8 THEN GOTO [0-9]$
+^\s*IF \*fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-cast/main.c b/regression/goto-analyzer/no-match-const-fp-const-cast/main.c
new file mode 100644
index 00000000000..b9bd141e6f0
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-cast/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+
+ // Warning: this loses const-ness of f2
+ void_fp * p2fp = (void_fp*)&fp;
+ *p2fp = &f4;
+
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-cast/test.desc b/regression/goto-analyzer/no-match-const-fp-const-cast/test.desc
new file mode 100644
index 00000000000..b9a72f79cfe
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-cast/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-fp-null/main.c b/regression/goto-analyzer/no-match-const-fp-const-fp-null/main.c
new file mode 100644
index 00000000000..67c501302a6
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-fp-null/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = NULL;
+ const void_fp fp2 = fp;
+ fp2();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-fp-null/test.desc b/regression/goto-analyzer/no-match-const-fp-const-fp-null/test.desc
new file mode 100644
index 00000000000..4786993cade
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-fp-null/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-lost/main.c b/regression/goto-analyzer/no-match-const-fp-const-lost/main.c
new file mode 100644
index 00000000000..d2724684066
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-lost/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+
+ // Warning: this loses const-ness of f2
+ void_fp * p2fp = &fp;
+ *p2fp = &f4;
+
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-lost/test.desc b/regression/goto-analyzer/no-match-const-fp-const-lost/test.desc
new file mode 100644
index 00000000000..b9a72f79cfe
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/main.c b/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/main.c
new file mode 100644
index 00000000000..76671ef3829
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/main.c
@@ -0,0 +1,44 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+
+typedef struct fp_container
+{
+ int x;
+ const void_fp pointer;
+} fp_container;
+
+
+
+void func()
+{
+ const fp_container container = {.x = 10, .pointer = f3};
+ const fp_container container2 = {.x = 10, .pointer = f4};
+ const fp_container * const container_ptr = NULL;
+
+ // Illegal:
+ //container_ptr = &container2;
+ //container_ptr->pointer = f4;
+
+ container_ptr->pointer();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/test.desc b/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/test.desc
new file mode 100644
index 00000000000..4786993cade
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-pointer-const-struct-const-fp-null/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/main.c
new file mode 100644
index 00000000000..3f55ff255dd
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/main.c
@@ -0,0 +1,47 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct state
+{
+ int x; // Mutable!
+ const void_fp go;
+};
+struct state thing = {0, &f2};
+struct state other_thing = {0, &f4};
+struct state * const pts = &thing;
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ // Illegal
+ //pts=&other_thing;
+ // thing.go=&f6;
+ thing = other_thing;
+ const void_fp fp = pts->go;
+
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-const-pointer-non-const-struct-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/main.c b/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/main.c
new file mode 100644
index 00000000000..e4048adb8cb
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/main.c
@@ -0,0 +1,36 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f3;
+ const void_fp fp2 = f4;
+ const void_fp* const p2fp = NULL;
+ // Illegal:
+ //p2fp = &fp2;
+ //fp = f5;
+ const void_fp final_fp=*p2fp;
+ final_fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/test.desc b/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/test.desc
new file mode 100644
index 00000000000..4786993cade
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dereference-const-pointer-null/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..30e4947c2d7
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/main.c
@@ -0,0 +1,40 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f3;
+ const void_fp fp2 = f4;
+ const void_fp* p2fp = &fp;
+
+
+ // Illegal:
+ //fp = f5;
+
+ // legal:
+ p2fp = &fp2;
+ const void_fp final_fp=*p2fp;
+ final_fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..f7f42277bae
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dereference-non-const-pointer-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF final_fp == f1 THEN GOTO [0-9]$
+^\s*IF final_fp == f2 THEN GOTO [0-9]$
+^\s*IF final_fp == f3 THEN GOTO [0-9]$
+^\s*IF final_fp == f4 THEN GOTO [0-9]$
+^\s*IF final_fp == f5 THEN GOTO [0-9]$
+^\s*IF final_fp == f6 THEN GOTO [0-9]$
+^\s*IF final_fp == f7 THEN GOTO [0-9]$
+^\s*IF final_fp == f8 THEN GOTO [0-9]$
+^\s*IF final_fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/main.c
new file mode 100644
index 00000000000..d7d4820d29c
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/main.c
@@ -0,0 +1,39 @@
+#include
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ void_fp * const fp_tbl= malloc(sizeof(void_fp) * 3);
+ fp_tbl[0]=f2;
+ fp_tbl[1]=f3;
+ fp_tbl[2]=f4;
+
+ // Illegal
+ //fp_tbl = malloc(sizeof(void_fp) * 10);
+
+ const void_fp fp = fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-dynamic-array-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/main.c b/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/main.c
new file mode 100644
index 00000000000..6c9ba5514e7
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ void_fp fp = f2;
+ fp = f3;
+ const void_fp fp2 = fp;
+ fp2();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/test.desc b/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/test.desc
new file mode 100644
index 00000000000..13d0c5353ce
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-fp-direct-assignment/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp2 == f1 THEN GOTO [0-9]$
+^\s*IF fp2 == f2 THEN GOTO [0-9]$
+^\s*IF fp2 == f3 THEN GOTO [0-9]$
+^\s*IF fp2 == f4 THEN GOTO [0-9]$
+^\s*IF fp2 == f5 THEN GOTO [0-9]$
+^\s*IF fp2 == f6 THEN GOTO [0-9]$
+^\s*IF fp2 == f7 THEN GOTO [0-9]$
+^\s*IF fp2 == f8 THEN GOTO [0-9]$
+^\s*IF fp2 == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/main.c
new file mode 100644
index 00000000000..bb40b1a53c1
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/main.c
@@ -0,0 +1,47 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct state
+{
+ int x; // Mutable!
+ const void_fp go;
+};
+struct state thing = {0, &f2};
+struct state other_thing = {0, &f4};
+
+// This shouldn't work
+struct state * pts = &thing;
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ // This shouldn't work since
+ pts = &other_thing;
+ const void_fp fp = pts->go;
+ fp();
+}
+
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-pointer-non-const-struct-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/main.c
new file mode 100644
index 00000000000..ed86d4c39c6
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/main.c
@@ -0,0 +1,43 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct state
+{
+ int x; // Mutable!
+ const void_fp go;
+};
+struct state thing = {0, &f2};
+
+struct state other_thing = {0, &f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ thing = other_thing;
+ const void_fp fp = thing.go;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-struct-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/main.c b/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..7d8b2584388
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/main.c
@@ -0,0 +1,43 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ int x;
+ void_fp fun;
+};
+
+struct action rec = { .x = 4, .fun = f2 };
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ // Can mutate
+ rec.fun=f4;
+ const void_fp fp = rec.fun;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-non-const-struct-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-null/main.c b/regression/goto-analyzer/no-match-const-fp-null/main.c
new file mode 100644
index 00000000000..16c65f9f845
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-null/main.c
@@ -0,0 +1,30 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = NULL;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-null/test.desc b/regression/goto-analyzer/no-match-const-fp-null/test.desc
new file mode 100644
index 00000000000..d8e8d833238
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-null/test.desc
@@ -0,0 +1,7 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/main.c b/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/main.c
new file mode 100644
index 00000000000..ba5bcad694a
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/main.c
@@ -0,0 +1,36 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int x)
+{
+ const void_fp fp = f2;
+ void_fp non_const_fp = f7;
+
+ // Warning: this loses const-ness of f2
+ void_fp * p2fp = x > 0 ? ((void_fp*)&fp) : &non_const_fp;
+ *p2fp = &f4;
+
+ fp();
+}
+
+int main()
+{
+ func(1);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/test.desc b/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/test.desc
new file mode 100644
index 00000000000..b9a72f79cfe
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-fp-ternerary-op-const-lost/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/main.c b/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/main.c
new file mode 100644
index 00000000000..b7b9e4d2b30
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/main.c
@@ -0,0 +1,45 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ void_fp fp;
+} fp_cc;
+
+
+
+void func()
+{
+ const fp_cc container_container = { .fp = f2, .x = 4 };
+
+ const fp_cc * const container_pointer = &container_container;
+
+ fp_cc* container_pointer_modifier = (fp_cc*) container_pointer;
+ container_pointer_modifier->fp = f4;
+
+ // Illegal:
+ // container_container.container = &f4;
+
+ container_pointer->fp();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/test.desc b/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/test.desc
new file mode 100644
index 00000000000..4e6fda43498
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-pointer-const-struct-const-fp-const-cast/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF container_pointer->fp == f1 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f2 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f3 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f4 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f5 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f6 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f7 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f8 THEN GOTO [0-9]$
+^\s*IF container_pointer->fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/main.c b/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/main.c
new file mode 100644
index 00000000000..bf4bb45d094
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/main.c
@@ -0,0 +1,43 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct state
+{
+ int x; // Mutable!
+ const void_fp go;
+};
+struct state thing = {0, &f2};
+struct state other_thing = {0, &f4};
+struct state const * const pts = &thing;
+
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ thing = other_thing;
+ pts->go();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/test.desc b/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/test.desc
new file mode 100644
index 00000000000..eaad08aafe0
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-pointer-non-const-struct-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF pts->go == f1 THEN GOTO [0-9]$
+^\s*IF pts->go == f2 THEN GOTO [0-9]$
+^\s*IF pts->go == f3 THEN GOTO [0-9]$
+^\s*IF pts->go == f4 THEN GOTO [0-9]$
+^\s*IF pts->go == f5 THEN GOTO [0-9]$
+^\s*IF pts->go == f6 THEN GOTO [0-9]$
+^\s*IF pts->go == f7 THEN GOTO [0-9]$
+^\s*IF pts->go == f8 THEN GOTO [0-9]$
+^\s*IF pts->go == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/main.c b/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/main.c
new file mode 100644
index 00000000000..6e24a0d8d4c
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/main.c
@@ -0,0 +1,40 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ int x;
+ const void_fp fun;
+};
+
+const struct action rec = { .x = 4, .fun = NULL };
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ rec.fun();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/test.desc b/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/test.desc
new file mode 100644
index 00000000000..4786993cade
--- /dev/null
+++ b/regression/goto-analyzer/no-match-const-struct-non-const-fp-null/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*ASSERT FALSE // invalid function pointer$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/main.c b/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/main.c
new file mode 100644
index 00000000000..5d857ffcfe7
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/main.c
@@ -0,0 +1,52 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_container
+{
+ int x;
+ const void_fp* const fp_tbl[3];
+} fp_container;
+
+
+
+void func()
+{
+ void_fp f2meta = &f2;
+ void_fp f3meta = &f3;
+ void_fp f4meta = &f4;
+
+ void_fp f5meta = &f5;
+ void_fp f6meta = &f6;
+ void_fp f7meta = &f7;
+
+ const fp_container container = { .x = 4, .fp_tbl = {&f2meta ,&f3meta, &f4meta} };
+ const fp_container container2 = { .x = 5, .fp_tbl = {&f5meta ,&f6meta, &f7meta} };
+
+ f3meta = &f5;
+ // Illegal:
+ // container.fp_tbl = alternatate_fp_tbl;
+ // container.fp_tbl[1] = f4;
+ const fp_container * const container_ptr=&container;
+ //container_ptr=&container2;
+ (*container_ptr->fp_tbl[1])();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/test.desc b/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..ef491f67113
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f1 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f2 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f3 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f4 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f5 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f6 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f7 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f8 THEN GOTO [0-9]$
+^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/main.c b/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..b0be4e4837c
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/main.c
@@ -0,0 +1,46 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ const void_fp * const container;
+} fp_cc;
+
+
+
+void func()
+{
+ const void_fp meta_fp = &f3;
+ const void_fp meta_fp2 = &f4;
+
+ fp_cc container_container2 = { .container = &meta_fp2, .x = 4 };
+ fp_cc container_container = { .container = &meta_fp, .x = 4 };
+ container_container = container_container2;
+
+ // Illegal:
+ //meta_fp = &f4;
+ //container_container.container = &f4;
+
+ (*container_container.container)();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/test.desc b/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..662bd323844
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-non-const-struct-const-pointer-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*container_container\.container == f1 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f2 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f3 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f4 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f5 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f6 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f7 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f8 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/main.c b/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..28110c56d01
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/main.c
@@ -0,0 +1,43 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ const void_fp * container;
+} fp_cc;
+
+
+
+void func()
+{
+ const void_fp meta_fp = &f3;
+ const void_fp meta_fp2 = &f4;
+ fp_cc container_container = { .container = &meta_fp, .x = 4 };
+
+ // Illegal:
+ //meta_fp = &f4;
+ container_container.container = &meta_fp2;
+
+ (*container_container.container)();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/test.desc b/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..662bd323844
--- /dev/null
+++ b/regression/goto-analyzer/no-match-dereference-non-const-struct-non-const-pointer-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF \*container_container\.container == f1 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f2 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f3 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f4 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f5 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f6 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f7 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f8 THEN GOTO [0-9]$
+^\s*IF \*container_container\.container == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/main.c b/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/main.c
new file mode 100644
index 00000000000..4487db8b047
--- /dev/null
+++ b/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/main.c
@@ -0,0 +1,33 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+ const void_fp fp3 = f4;
+ void_fp fp2 = fp;
+ fp2 = fp3;
+ fp2();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/test.desc b/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/test.desc
new file mode 100644
index 00000000000..13d0c5353ce
--- /dev/null
+++ b/regression/goto-analyzer/no-match-non-const-fp-const-fp-direct-assignment/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp2 == f1 THEN GOTO [0-9]$
+^\s*IF fp2 == f2 THEN GOTO [0-9]$
+^\s*IF fp2 == f3 THEN GOTO [0-9]$
+^\s*IF fp2 == f4 THEN GOTO [0-9]$
+^\s*IF fp2 == f5 THEN GOTO [0-9]$
+^\s*IF fp2 == f6 THEN GOTO [0-9]$
+^\s*IF fp2 == f7 THEN GOTO [0-9]$
+^\s*IF fp2 == f8 THEN GOTO [0-9]$
+^\s*IF fp2 == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-non-const-fp/main.c b/regression/goto-analyzer/no-match-non-const-fp/main.c
new file mode 100644
index 00000000000..80c8c863ff5
--- /dev/null
+++ b/regression/goto-analyzer/no-match-non-const-fp/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ void_fp fp = f2;
+ fp = f3;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-non-const-fp/test.desc b/regression/goto-analyzer/no-match-non-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-parameter-const-fp/main.c b/regression/goto-analyzer/no-match-parameter-const-fp/main.c
new file mode 100644
index 00000000000..23e73aabdc0
--- /dev/null
+++ b/regression/goto-analyzer/no-match-parameter-const-fp/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(const void_fp fp)
+{
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(fp_all[i]);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-parameter-const-fp/test.desc b/regression/goto-analyzer/no-match-parameter-const-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-parameter-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-parameter-fp/main.c b/regression/goto-analyzer/no-match-parameter-fp/main.c
new file mode 100644
index 00000000000..332df257368
--- /dev/null
+++ b/regression/goto-analyzer/no-match-parameter-fp/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(void_fp fp)
+{
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(fp_all[i]);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/no-match-parameter-fp/test.desc b/regression/goto-analyzer/no-match-parameter-fp/test.desc
new file mode 100644
index 00000000000..a73805f5730
--- /dev/null
+++ b/regression/goto-analyzer/no-match-parameter-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/main.c b/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/main.c
new file mode 100644
index 00000000000..c9d632f43b9
--- /dev/null
+++ b/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/main.c
@@ -0,0 +1,42 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_container
+{
+ void_fp fp_tbl[3];
+} fp_container;
+
+
+
+void func()
+{
+ const fp_container container = { .fp_tbl = {f2 ,f3, f4} };
+ const void_fp alternatate_fp_tbl[] = {f5 ,f6, f7};
+ const fp_container container2 = { .fp_tbl = {f5 ,f6, f7} };
+ // Illegal:
+ // container.fp_tbl = alternatate_fp_tbl;
+ // container.fp_tbl[1] = f4;
+ const fp_container *container_ptr=&container;
+ container_ptr=&container2;
+ container_ptr->fp_tbl[1]();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/test.desc b/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/test.desc
new file mode 100644
index 00000000000..a85714b51a1
--- /dev/null
+++ b/regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/test.desc
@@ -0,0 +1,16 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f1 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f2 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f3 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f4 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f5 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f6 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f7 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f8 THEN GOTO [0-9]$
+^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-array-calculation-const-fp/main.c b/regression/goto-analyzer/precise-array-calculation-const-fp/main.c
new file mode 100644
index 00000000000..a61d95186aa
--- /dev/null
+++ b/regression/goto-analyzer/precise-array-calculation-const-fp/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const short short_const_variable=1;
+ fp_tbl[(signed long int)((signed int)short_const_variable & 0x1)]();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-array-calculation-const-fp/test.desc b/regression/goto-analyzer/precise-array-calculation-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-array-calculation-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-array-literal-const-fp/main.c b/regression/goto-analyzer/precise-array-literal-const-fp/main.c
new file mode 100644
index 00000000000..55dab779802
--- /dev/null
+++ b/regression/goto-analyzer/precise-array-literal-const-fp/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ fp_tbl[1]();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-array-literal-const-fp/test.desc b/regression/goto-analyzer/precise-array-literal-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-array-literal-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/main.c
new file mode 100644
index 00000000000..c2465dcb695
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/main.c
@@ -0,0 +1,33 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const int x = 1;
+ const void_fp fp = fp_tbl[x];
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-const-variable-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/main.c b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/main.c
new file mode 100644
index 00000000000..59d51313fde
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp_tbl[] = {f2, f3};
+ // Illegal:
+ //fp_tbl[1] = f4;
+ const void_fp fp = fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ func();
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/test.desc b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/test.desc
new file mode 100644
index 00000000000..ab2a0acefba
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp-run-time/test.desc
@@ -0,0 +1,7 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/main.c
new file mode 100644
index 00000000000..2e9cb8cc4df
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/main.c
@@ -0,0 +1,32 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..26f13fc4c28
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/main.c
@@ -0,0 +1,52 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+struct stable
+{
+ int x;
+ void (*fp)(void);
+};
+
+const struct stable stable_table [3] =
+{
+ { 1, f2 },
+ { 2, f3 },
+ { 3, f4 }
+};
+
+const struct stable another_table = { 4, f5 };
+
+
+void func(int i)
+{
+ const void_fp fp = stable_table[1].fp;
+
+ // Illegal
+ // stable_table[1] = another_table;
+ // stable_table[1].fp = f5;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-literal-const-struct-non-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..c61a7a32499
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/main.c
@@ -0,0 +1,49 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ int x;
+ void_fp fun;
+};
+
+const struct action rec = { .x = 4, .fun = f2 };
+
+const struct action * const action_list[4] =
+{
+ &rec,
+ &rec,
+ &rec,
+ &rec
+};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ const void_fp fp = action_list[i]->fun;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<4;i++)
+{
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..90cd2485ce1
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-array-variable-const-pointer-const-struct-non-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-const-fp/main.c
new file mode 100644
index 00000000000..a1efb8e0934
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-fp/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+ const void_fp fp2 = fp;
+ fp2();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-const-fp/test.desc
new file mode 100644
index 00000000000..40361f6ccc2
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/main.c b/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/main.c
new file mode 100644
index 00000000000..8a05a9b7d4c
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/main.c
@@ -0,0 +1,39 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_container
+{
+ const void_fp fp_tbl[3];
+} fp_container;
+
+
+
+void func()
+{
+ const fp_container container = { .fp_tbl = {f2 ,f3, f4} };
+ const fp_container container2 = { .fp_tbl = {f5 ,f6, f7} };
+ // Illegal:
+ //container = container2;
+ const void_fp fp = container.fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/test.desc b/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-const-array-literal-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/main.c b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/main.c
new file mode 100644
index 00000000000..bc4ffead00e
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/main.c
@@ -0,0 +1,45 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_container
+{
+ int x;
+ void_fp fp_tbl[3];
+} fp_container;
+
+
+
+void func()
+{
+ const fp_container container = { .x = 4, .fp_tbl = {f2 ,f3, f4} };
+ fp_container container2 = { .x = 5, .fp_tbl = {f5 ,f6, f7} };
+ const void_fp alternatate_fp_tbl[] = {f5 ,f6, f7};
+ // Illegal:
+ // container = container2;
+ // container.fp_tbl = alternatate_fp_tbl;
+ // container.fp_tbl[1] = f4;
+ const void_fp fp = container.fp_tbl[1];
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/test.desc b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-array-literal-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..7c3bed93919
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/main.c
@@ -0,0 +1,44 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ int x;
+ void_fp fun;
+};
+
+const struct action rec = { .x = 4, .fun = f2 };
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+
+ // Illegal:
+ //rec.fun = &f5;
+ const void_fp fp = rec.fun;
+ fp();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..90cd2485ce1
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-const-struct-non-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/main.c b/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..efeb3b35d80
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/main.c
@@ -0,0 +1,36 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f3;
+ const void_fp fp2 = f4;
+ const void_fp* const p2fp = &fp;
+ // Illegal:
+ //p2fp = &fp2;
+ //fp = f5;
+ const void_fp final_fp=*p2fp;
+ final_fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp-dereference-const-pointer-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-fp/main.c b/regression/goto-analyzer/precise-const-fp/main.c
new file mode 100644
index 00000000000..b4002c94e5e
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp/main.c
@@ -0,0 +1,30 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-fp/test.desc b/regression/goto-analyzer/precise-const-fp/test.desc
new file mode 100644
index 00000000000..4dd6e7fd098
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-fp/test.desc
@@ -0,0 +1,7 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-pointer-const-struct-fp/main.c b/regression/goto-analyzer/precise-const-pointer-const-struct-fp/main.c
new file mode 100644
index 00000000000..e1671666b2b
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-pointer-const-struct-fp/main.c
@@ -0,0 +1,43 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ void_fp fp;
+} fp_cc;
+
+
+
+void func()
+{
+ const fp_cc container_container = { .fp = f2, .x = 4 };
+
+ const fp_cc * const container_pointer = &container_container;
+
+ // Illegal:
+ //meta_fp = &f4;
+ //container_container.container = &f4;
+
+ container_pointer->fp();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/precise-const-pointer-const-struct-fp/test.desc b/regression/goto-analyzer/precise-const-pointer-const-struct-fp/test.desc
new file mode 100644
index 00000000000..40361f6ccc2
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-pointer-const-struct-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-const-struct-non-const-fp/main.c b/regression/goto-analyzer/precise-const-struct-non-const-fp/main.c
new file mode 100644
index 00000000000..150ea314914
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-struct-non-const-fp/main.c
@@ -0,0 +1,40 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+struct action
+{
+ int x;
+ void_fp fun;
+};
+
+const struct action rec = { .x = 4, .fun = f2 };
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ rec.fun();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-const-struct-non-const-fp/test.desc b/regression/goto-analyzer/precise-const-struct-non-const-fp/test.desc
new file mode 100644
index 00000000000..90cd2485ce1
--- /dev/null
+++ b/regression/goto-analyzer/precise-const-struct-non-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/main.c b/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..78901cc6405
--- /dev/null
+++ b/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/main.c
@@ -0,0 +1,35 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f3;
+ const void_fp fp2 = f4;
+ const void_fp* const p2fp = &fp;
+ // Illegal:
+ //p2fp = &fp2;
+ //fp = f5;
+ (*p2fp)();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/test.desc b/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-derefence-const-pointer-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-derefence/main.c b/regression/goto-analyzer/precise-derefence/main.c
new file mode 100644
index 00000000000..d3bc8a2bc35
--- /dev/null
+++ b/regression/goto-analyzer/precise-derefence/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ // There isn't an obvious reason to write this code, but perhaps some
+ // code can get transformed into this so we should still handle it.
+ (*(&f2))();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-derefence/test.desc b/regression/goto-analyzer/precise-derefence/test.desc
new file mode 100644
index 00000000000..4dd6e7fd098
--- /dev/null
+++ b/regression/goto-analyzer/precise-derefence/test.desc
@@ -0,0 +1,7 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f2\(\);
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/main.c b/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/main.c
new file mode 100644
index 00000000000..e0246369f7b
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/main.c
@@ -0,0 +1,30 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f3;
+ (*(&fp))();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/test.desc b/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-address-pointer-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/main.c b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/main.c
new file mode 100644
index 00000000000..c8694d74a08
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/main.c
@@ -0,0 +1,42 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ const void_fp * const container;
+} fp_cc;
+
+
+
+void func()
+{
+ const void_fp meta_fp = &f3;
+ const fp_cc container_container = { .container = &meta_fp, .x = 4 };
+
+ // Illegal:
+ //meta_fp = &f4;
+ //container_container.container = &f4;
+
+ (*container_container.container)();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/test.desc b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/main.c b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/main.c
new file mode 100644
index 00000000000..4f00ca80765
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/main.c
@@ -0,0 +1,49 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_container
+{
+ int y;
+ const void_fp pointer;
+} fp_container;
+
+typedef struct fp_cc
+{
+ int x;
+ const fp_container * const container;
+} fp_cc;
+
+
+
+void func()
+{
+ const fp_container container = {.y = 10, .pointer = f3};
+ const fp_container container2 = {.y = 10, .pointer = f4};
+ const fp_cc container_container = { .container = &container, .x = 4 };
+
+ // Illegal:
+ //container_container.container = &container2;
+ //container.pointer = f4;
+
+ (*container_container.container).pointer();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/test.desc b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-const-pointer-const-struct-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/main.c b/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/main.c
new file mode 100644
index 00000000000..1d562a42dc8
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/main.c
@@ -0,0 +1,42 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+typedef struct fp_cc
+{
+ int x;
+ const void_fp * container;
+} fp_cc;
+
+
+
+void func()
+{
+ const void_fp meta_fp = &f3;
+ const fp_cc container_container = { .container = &meta_fp, .x = 4 };
+
+ // Illegal:
+ //meta_fp = &f4;
+ //container_container.container = &f4;
+
+ (*container_container.container)();
+}
+
+int main()
+{
+ func();
+}
diff --git a/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/test.desc b/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/test.desc
new file mode 100644
index 00000000000..fad0e6c7a1d
--- /dev/null
+++ b/regression/goto-analyzer/precise-dereference-const-struct-pointer-const-fp/test.desc
@@ -0,0 +1,8 @@
+CORE
+main.c
+--show-goto-functions --verbosity 10 --pointer-check
+^Removing function pointers and virtual functions$
+^\s*f3\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/array_of_array_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/array_of_array_sensitivity_tests.c
new file mode 100644
index 00000000000..63af187ade2
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/array_of_array_sensitivity_tests.c
@@ -0,0 +1,150 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // A uniform constant array
+ int a[3][3]={{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+ // A non-uniform constant array
+ int b[3][3]={{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};
+
+ // Test if we can represent uniform constant arrays
+ assert(a[1][2]==0);
+ assert(a[1][2]==1);
+
+ // Test if we can represent constant arrays which aren't uniform
+ assert(b[1][2]==5);
+ assert(b[1][2]==0);
+
+ // Test alternative syntax for accessing an array value
+ assert(*(b[1]+2)==5);
+ assert(*(b[1]+2)==0);
+ assert((*(b+1))[2]==5);
+ assert((*(b+1))[2]==0);
+ assert(*(*(b+1)+2)==5);
+ assert(*(*(b+1)+2)==0);
+ assert(1[b][2]==5);
+ assert(1[b][2]==0);
+ assert(*(1[b]+2)==5);
+ assert(*(1[b]+2)==0);
+ assert((*(1+b))[2]==5);
+ assert((*(1+b))[2]==0);
+ assert(*(*(1+b)+2)==5);
+ assert(*(*(1+b)+2)==0);
+ assert(2[1[b]]==5);
+ assert(2[1[b]]==0);
+ assert(*(2+1[b])==5);
+ assert(*(2+1[b])==0);
+ assert(*(2+*(1+b))==5);
+ assert(*(2+*(1+b))==0);
+
+ // Test how well we can deal with merging for an array value when there is one
+ // possible value
+ if(argc>2)
+ {
+ a[0][1]=0;
+ }
+ assert(a[0][1]==0);
+ assert(a[0][1]==1);
+ assert(a[0][2]==0);
+
+ // Test how well we can deal with merging for an array value when there are
+ // two possible values
+ if(argc>2)
+ {
+ b[0][1]=2;
+ }
+ assert(b[0][1]==2);
+ assert(b[0][1]==3);
+ assert(b[0][2]==2);
+
+ // Reset this change to ensure tests later work as expected
+ b[0][1]=1;
+
+ // The variables i, j and k will be used as indexes into arrays of size 3.
+ // They all require merging paths in the CFG. For i there is only one value on
+ // both paths, which is a valid index. The rest can each take two different
+ // values. For j both of these values are valid indexes. For k one is and one
+ // isn't.
+ int i=0;
+ int j=0;
+ int k=0;
+ if(argc>3)
+ {
+ i=0;
+ j=1;
+ k=100;
+ }
+
+ // Test how well we can deal with merging for an index on a uniform array when
+ // the index has one possible value
+ assert(a[i][1]==0);
+ assert(a[i][1]==1);
+ assert(a[1][i]==0);
+ assert(a[1][i]==1);
+ assert(a[i][i]==0);
+ assert(a[i][i]==1);
+
+ // Test how well we can deal with merging for an index on a uniform array when
+ // the index has two possible values
+ assert(a[j][1]==0);
+ assert(a[j][1]==1);
+ assert(a[1][j]==0);
+ assert(a[1][j]==1);
+ assert(a[j][j]==0);
+ assert(a[j][j]==1);
+
+ // Test how well we can deal with merging for an index on a non-uniform array
+
+ assert(b[i][1]==1);
+ assert(b[i][1]==11);
+ assert(b[1][i]==3);
+ assert(b[1][i]==11);
+ assert(b[i][i]==0);
+ assert(b[i][i]==11);
+
+ // Test how well we can deal with merging for an index on a non-uniform array
+ assert(b[j][1]==1);
+ assert(b[j][1]==11);
+ assert(b[1][j]==3);
+ assert(b[1][j]==11);
+ assert(b[j][j]==0);
+ assert(b[j][j]==11);
+
+ // Test how we deal with reading off the end of an array
+ assert(a[100][0]==0);
+ assert(a[0][100]==0);
+
+ // Test how we deal with writing off the end of an array
+ int c=0;
+ a[100][0]=1;
+ assert(c==0);
+ c=0;
+ a[0][100]=1;
+ assert(c==0);
+
+ // Test how we deal with merging for an index with one possible value when
+ // writing to an array
+ int ei[3][3]={{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+ ei[i][1]=1;
+ assert(ei[0][1]==1);
+ assert(ei[0][1]==0);
+ assert(ei[2][1]==0);
+ assert(ei[2][1]==1);
+
+ // Test how we deal with merging for an index with two possible values when
+ // writing to an array
+ int ej[3][3]={{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+ ej[j][1]=1;
+ assert(ej[0][1]==0);
+ assert(ej[2][1]==0);
+
+ // Test how we deal with merging for an index with two possible values when
+ // it means writing to an array element that may be out of bounds
+ int ek[3][3]={{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
+ c=0;
+ ek[k][1]=1;
+ assert(ek[0][1]==0);
+ assert(c==0);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c
new file mode 100644
index 00000000000..907fc4180ad
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c
@@ -0,0 +1,156 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent arrays of pointers
+ int a0=0;
+ int a1=1;
+ int a2=2;
+ int a3=3;
+ int b0=10;
+ int b1=11;
+ int b2=12;
+ int b3=13;
+ int c0=20;
+ int c1=21;
+ int c2=22;
+ int c3=23;
+ int d0=30;
+ int d1=31;
+ int d2=32;
+ int d3=33;
+ // A uniform constant array
+ int *a[3]={&a0, &a0, &a0};
+ // A non-uniform constant array
+ int *b[3]={&b0, &b1, &b2};
+
+ // Test if we can represent uniform constant arrays
+ assert(a[1]==&a0);
+ assert(a[1]==&a3);
+ assert(*a[1]==0);
+ assert(*a[1]==3);
+
+ // Test if we can represent constant arrays which aren't uniform
+ assert(b[1]==&b1);
+ assert(b[1]==&b3);
+ assert(*b[1]==11);
+ assert(*b[1]==13);
+
+ // Test alternative syntax for accessing an array value
+ assert(*(b+1)==&b1);
+ assert(*(b+1)==&b3);
+ assert(*(1+b)==&b1);
+ assert(*(1+b)==&b3);
+ assert(1[b]==&b1);
+ assert(1[b]==&b3);
+ assert(**(b+1)==11);
+ assert(**(b+1)==13);
+ assert(**(1+b)==11);
+ assert(**(1+b)==13);
+ assert(*1[b]==11);
+ assert(*1[b]==13);
+
+ // c and d are arrays whose values requiring merging paths in the CFG. For
+ // c[0] there is only one possibility after merging and for d[0] there are
+ // two.
+ int *c[3]={&c0, &c1, &c2};
+ int *d[3]={&d0, &d1, &d2};
+ if(argc>2)
+ {
+ c[0]=&c3;
+ d[0]=&d3;
+ }
+
+ // Test how well we can deal with merging for an array value
+ assert(c[0]==&c0);
+ assert(c[0]==&c3);
+ assert(d[0]==&d0);
+ assert(d[0]==&d3);
+ assert(*c[0]==20);
+ assert(*c[0]==23);
+ assert(*d[0]==30);
+ assert(*d[0]==33);
+
+ // The variables i, j and k will be used as indexes into arrays of size 3.
+ // They all require merging paths in the CFG. For i there is only one value on
+ // both paths, which is a valid index. The rest can each take two different
+ // values. For j both of these values are valid indexes. For k one is and one
+ // isn't.
+ int i=0;
+ int j=0;
+ int k=0;
+ if(argc>3)
+ {
+ i=0;
+ j=1;
+ k=100;
+ }
+
+ // Test how well we can deal with merging for an index on a uniform array
+ assert(a[i]==&a0);
+ assert(a[i]==&a3);
+ assert(a[j]==&a0);
+ assert(a[j]==&a3);
+ assert(*a[i]==0);
+ assert(*a[i]==3);
+ assert(*a[j]==0);
+ assert(*a[j]==3);
+
+ // Test how well we can deal with merging for an index on a non-uniform array
+ assert(b[i]==&b0);
+ assert(b[i]==&b1);
+ assert(b[j]==&b0);
+ assert(b[j]==&b3);
+ assert(*b[i]==10);
+ assert(*b[i]==11);
+ assert(*b[j]==10);
+ assert(*b[j]==13);
+
+ // Test how we deal with reading off the end of an array
+ assert(a[100]==&a2);
+ assert(*a[100]==2);
+
+ // Test how we deal with writing off the end of an array
+ a[100]=&a2;
+ assert(b[1]==&b1);
+ assert(*b[1]==11);
+
+ // Test how we deal with merging for an index with one possible value when
+ // writing to an array
+ int ei0=40;
+ int ei1=41;
+ int *ei[3]={&ei0, &ei0, &ei0};
+ ei[i]=&ei1;
+ assert(ei[0]==&ei1);
+ assert(ei[0]==&ei0);
+ assert(ei[2]==&ei0);
+ assert(ei[2]==&ei1);
+ assert(*ei[0]==41);
+ assert(*ei[0]==40);
+ assert(*ei[2]==40);
+ assert(*ei[2]==41);
+
+ // Test how we deal with merging for an index with two possible values when
+ // writing to an array
+ int ej0=50;
+ int ej1=51;
+ int *ej[3]={&ej0, &ej0, &ej0};
+ ej[j]=&ej1;
+ assert(ej[0]==&ej0);
+ assert(ej[2]==&ej0);
+ assert(ej[2]==&ej1);
+ assert(*ej[0]==50);
+ assert(*ej[2]==50);
+ assert(*ej[2]==51);
+
+ // Test how we deal with merging for an index with two possible values when
+ // it means writing to an array element that may be out of bounds
+ int ek0=60;
+ int ek1=61;
+ int *ek[3]={&ek0, &ek0, &ek0};
+ ek[k]=&ek1;
+ assert(ek[0]==&ek0);
+ assert(*ek[0]==60);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/array_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/array_sensitivity_tests.c
new file mode 100644
index 00000000000..68bace194c8
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/array_sensitivity_tests.c
@@ -0,0 +1,101 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // A uniform constant array
+ int a[3]={0, 0, 0};
+ // A non-uniform constant array
+ int b[3]={1, 0, 0};
+
+ // Test if we can represent uniform constant arrays
+ assert(a[1]==0);
+ assert(a[1]==1);
+
+ // Test if we can represent constant arrays which aren't uniform
+ assert(b[1]==0);
+ assert(b[1]==1);
+
+ // Test alternative syntax for accessing an array value
+ assert(*(b+1)==0);
+ assert(*(b+1)==1);
+ assert(*(1+b)==0);
+ assert(*(1+b)==1);
+ assert(1[b]==0);
+ assert(1[b]==1);
+
+ // c and d are arrays whose values requiring merging paths in the CFG. For
+ // c[0] there is only one possibility after merging and for d[0] there are
+ // two.
+ int c[3]={0, 0, 0};
+ int d[3]={0, 0, 0};
+ if(argc>2)
+ {
+ c[0]=0;
+ d[0]=1;
+ }
+
+ // Test how well we can deal with merging for an array value
+ assert(c[0]==0);
+ assert(c[0]==1);
+ assert(d[0]==0);
+ assert(d[0]==2);
+ assert(d[1]==0);
+
+ // The variables i, j and k will be used as indexes into arrays of size 3.
+ // They all require merging paths in the CFG. For i there is only one value on
+ // both paths, which is a valid index. The rest can each take two different
+ // values. For j both of these values are valid indexes. For k one is and one
+ // isn't.
+ int i=0;
+ int j=0;
+ int k=0;
+ if(argc>3)
+ {
+ i=0;
+ j=1;
+ k=100;
+ }
+
+ // Test how well we can deal with merging for an index on a uniform array
+ assert(a[i]==0);
+ assert(a[i]==1);
+ assert(a[j]==0);
+ assert(a[j]==1);
+
+ // Test how well we can deal with merging for an index on a non-uniform array
+ assert(b[i]==1);
+ assert(b[i]==0);
+ assert(b[j]==0);
+ assert(b[j]==1);
+
+ // Test how we deal with reading off the end of an array
+ assert(a[100]==0);
+
+ // Test how we deal with writing off the end of an array
+ a[100]=1;
+ assert(b[1]==0);
+
+ // Test how we deal with merging for an index with one possible value when
+ // writing to an array
+ int ei[3]={0, 0, 0};
+ ei[i]=1;
+ assert(ei[0]==1);
+ assert(ei[0]==0);
+ assert(ei[2]==0);
+ assert(ei[2]==1);
+
+ // Test how we deal with merging for an index with two possible values when
+ // writing to an array
+ int ej[3]={0, 0, 0};
+ ej[j]=1;
+ assert(ej[0]==0);
+ assert(ej[2]==0);
+
+ // Test how we deal with merging for an index with two possible values when
+ // it means writing to an array element that may be out of bounds
+ int ek[3]={0, 0, 0};
+ ek[k]=1;
+ assert(ek[0]==0);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/char_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/char_sensitivity_tests.c
new file mode 100644
index 00000000000..9e87454b68e
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/char_sensitivity_tests.c
@@ -0,0 +1,10 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test if we can represent constant chars
+ char x='a';
+ assert(x=='a');
+ assert(x=='b');
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/float_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/float_sensitivity_tests.c
new file mode 100644
index 00000000000..1f73fae4a6c
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/float_sensitivity_tests.c
@@ -0,0 +1,10 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test if we can represent constant floats
+ float x=0.0;
+ assert(x==0.0);
+ assert(x==1.0);
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/int_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/int_sensitivity_tests.c
new file mode 100644
index 00000000000..ab4265a051f
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/int_sensitivity_tests.c
@@ -0,0 +1,55 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent ints, and also that the transformers are
+ // working correctly.
+ int x=0;
+ int y=0;
+ if(argc>2)
+ {
+ y=1;
+ }
+ assert(x==0);
+ assert(x==1);
+ assert(x==y);
+
+ assert(x<1);
+ assert(x<-1);
+ assert(x-1);
+ assert(x>1);
+ assert(x>y);
+
+ assert(x!=1);
+ assert(x!=0);
+ assert(x!=y);
+
+ assert(!(x==1));
+ assert(!(x==0));
+ assert(!(x==y));
+
+ // Test how well we can represent an int when it has more than one possible
+ // value
+ assert(y<2);
+ assert(y>2);
+ assert(y==1);
+
+ // Try copying a variable and then modifying the original
+ int z=x;
+ x=10;
+ assert(z==0);
+ assert(z==10);
+
+ // Test how we treat assertions in unreachable code
+ x=0;
+ if(0)
+ {
+ assert(x==0);
+ assert(x==1);
+ assert(y==0);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/pointer_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/pointer_sensitivity_tests.c
new file mode 100644
index 00000000000..be328fa4a5d
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/pointer_sensitivity_tests.c
@@ -0,0 +1,53 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent pointers
+ // Basic use of addresses
+ int a=0;
+ int b=0;
+ int c=0;
+ int *x=&a;
+ int *x2=&a;
+ int *y=&b;
+ assert(x==&a);
+ assert(x==&b);
+ assert(x==x2);
+ assert(x==y);
+
+ // Reading from a dereferenced pointer
+ assert(*x==0);
+ assert(*x==1);
+
+ // Modify the referenced value and access it through the pointer again
+ a=1;
+ assert(*x==1);
+ assert(*x==0);
+
+ // Writing to a dereferenced pointer
+ *x=2;
+ assert(a==2);
+ assert(a==0);
+
+ // Conditionally reassign the pointer, but to the same value
+ if(argc>2)
+ {
+ x=&a;
+ }
+ assert(x==&a);
+
+ // Conditionally reassign the pointer, to a different value this time
+ if(argc>3)
+ {
+ x=&b;
+ }
+ else
+ {
+ x=&c;
+ }
+ assert(*x==0);
+ assert(x==&a);
+ assert(x==&b);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c
new file mode 100644
index 00000000000..db9fe720e15
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c
@@ -0,0 +1,59 @@
+#include
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test reading from an array using a pointer
+ int a[3]={1, 2, 3};
+ int *p=a;
+ assert(p==&a[0]);
+ assert(*p==1);
+
+ // Test pointer arithmetic
+ int *q=&a[1];
+ assert(q==p+1);
+ assert(*q==2);
+
+ // Test pointer diffs
+ ptrdiff_t x=1;
+ assert(q-p==x);
+
+ // Test writing into an array using a pointer
+ *q=4;
+ assert(a[1]==4);
+ a[1]=2;
+
+ // We now explore pointers and indexes each with more than one possible value
+ int *r=&a[1];
+ int b[3]={0, 0, 0};
+ int *s=&b[1];
+ int i=1;
+ if (argc>2)
+ {
+ r=&a[2];
+ s=&b[2];
+ i=2;
+ }
+
+ // Test reading from an array using a pointer with more than one possible
+ // value
+ assert(*r==2);
+ assert(*r==1);
+ assert(*s==0);
+ assert(*s==1);
+
+ // Test pointer arithmetic with an unknown index
+ int *t=&a[i];
+ assert(t==p+i);
+
+ // Test pointer diffs with an unknown index
+ ptrdiff_t y=i;
+ assert(t-p==y);
+
+ // Test writing into an array using a pointer with an unknown index
+ *r=5;
+ assert(a[i]==5);
+ assert(a[1]==5);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_pointer_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_pointer_sensitivity_tests.c
new file mode 100644
index 00000000000..ee29a7059db
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_pointer_sensitivity_tests.c
@@ -0,0 +1,24 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent pointers to pointers
+ // Basic use of addresses
+ int a=0;
+ int *p=&a;
+ int **x=&p;
+
+ // Reading from a pointer to a pointer that's been dereferenced twice
+ assert(**x==0);
+ assert(**x==1);
+ a=1;
+ assert(**x==1);
+ assert(**x==0);
+
+ // Writing to a pointer to a pointer that's been dereferenced twice
+ **x=2;
+ assert(a==2);
+ assert(a==1);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c
new file mode 100644
index 00000000000..e0092afae4a
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c
@@ -0,0 +1,28 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent pointers to structs
+ struct int_float
+ {
+ int a;
+ float b;
+ };
+ struct int_float x={0, 1.0};
+ x.a=0;
+ x.b=1.0;
+ struct int_float *p=&x;
+ assert((*p).a==0);
+ assert((*p).a==1);
+
+ // Test alternative syntax
+ assert(p->a==0);
+ assert(p->a==1);
+
+ // Test writing to the struct through the pointer
+ p->b=2.0;
+ assert(p->b==2.0);
+ assert(p->b==1.0);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/struct_of_array_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_array_sensitivity_tests.c
new file mode 100644
index 00000000000..d5924b71ed7
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_array_sensitivity_tests.c
@@ -0,0 +1,58 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent structs
+ struct int_array_float_array
+ {
+ int a[3];
+ float b[3];
+ };
+ struct int_array_float_array x={{0, 1, 2}, {3.0f, 4.0f, 5.0f}};
+ x.a[0]=0;
+ x.a[1]=1;
+ x.a[2]=2;
+ x.b[0]=3.0f;
+ x.b[1]=4.0f;
+ x.b[2]=5.0f;
+ assert(x.a[0]==0);
+ assert(*(x.a+0)==0);
+ assert(*(0+x.a)==0);
+ assert(0[x.a]==0);
+
+ // Test merging when there is only one value on both paths
+ if(argc>2)
+ {
+ x.a[0]=0;
+ }
+ assert(x.a[0]==0);
+ assert(x.a[1]==1);
+ assert(x.b[0]==3.0f);
+
+ // Test merging when there is one value for a and two values for b, to test if
+ // we are representing them separately
+ if(argc>3)
+ {
+ x.a[0]=0;
+ x.b[2]=15.0f;
+ }
+ assert(x.a[0]==0);
+ assert(x.a[1]==1);
+ assert(x.b[2]>0.0f);
+ assert(x.b[2]==15.0f);
+ assert(x.b[2]==1.0f);
+ assert(x.b[0]==3.0f);
+
+ // Test merging when there are two values for a and b
+ if(argc>4)
+ {
+ x.a[0]=11;
+ x.b[2]=25.0f;
+ }
+ assert(x.a[0]<12);
+ assert(x.a[0]>2);
+ assert(x.a[0]==0);
+ assert(x.a[1]==1);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c
new file mode 100644
index 00000000000..3cde8011c2b
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c
@@ -0,0 +1,71 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent structs of pointers
+ int a1=0;
+ int a2=1;
+ int a3=2;
+ float b1=10.0f;
+ float b2=11.0f;
+ float b3=12.0f;
+ float b4=13.0f;
+ struct int_float
+ {
+ int *a;
+ float *b;
+ };
+ struct int_float x;
+ x.a=&a1;
+ x.b=&b1;
+ assert(x.a==&a1);
+ assert(x.a==&a2);
+ assert(x.b==&b1);
+ assert(x.b==&b2);
+ assert(*x.a==0);
+ assert(*x.a==100);
+ assert(*x.b==10.0f);
+ assert(*x.b==110.0f);
+
+ // Test merging when there is only one value on both paths
+ if(argc>2)
+ {
+ x.a=&a1;
+ x.b=&b1;
+ }
+ assert(x.a==&a1);
+ assert(x.a==&a2);
+ assert(*x.a==0);
+ assert(*x.a==100);
+
+ // Test merging when there is one value for a and two values for b, to test if
+ // we are representing them separately
+ if(argc>3)
+ {
+ x.a=&a1;
+ x.b=&b2;
+ }
+ assert(x.a==&a1);
+ assert(x.b==&b2);
+ assert(x.b==&b3);
+ assert(*x.a==0);
+ assert(*x.b==11.0f);
+ assert(*x.b==12.0f);
+
+ // Test merging when there are two values for a and b
+ if(argc>4)
+ {
+ x.a=&a2;
+ x.b=&b3;
+ }
+ assert(x.a==&a2);
+ assert(x.a==&a3);
+ assert(x.b==&b3);
+ assert(x.b==&b4);
+ assert(*x.a==1);
+ assert(*x.a==2);
+ assert(*x.b==12.0f);
+ assert(*x.b==13.0f);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/struct_of_struct_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_struct_sensitivity_tests.c
new file mode 100644
index 00000000000..ac6a32a0086
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/struct_of_struct_sensitivity_tests.c
@@ -0,0 +1,55 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent structs of structs
+ struct int_float
+ {
+ int a;
+ float b;
+ };
+ struct two_int_floats
+ {
+ struct int_float s1;
+ struct int_float s2;
+ };
+ struct two_int_floats x;
+ x.s1.a=0;
+ x.s1.b=1.0;
+ x.s2.a=2;
+ x.s2.b=3.0f;
+ assert(x.s1.a==0);
+ assert(x.s2.b==3.0f);
+
+ // Test merging when there is only one value on both paths
+ if(argc>2)
+ {
+ x.s1.a=0;
+ }
+ assert(x.s1.a==0);
+ assert(x.s1.a==10);
+
+ // Test merging when there is one value for s1 and two values for s2, to test
+ // if we are representing them separately
+ if(argc>3)
+ {
+ x.s1.b=1.0f;
+ x.s2.b=13.0f;
+ }
+ assert(x.s1.b==1.0f);
+ assert(x.s2.b==3.0f);
+ assert(x.s2.b==0.0f);
+
+ // Test merging when there are two values for s1 and s2
+ if(argc>4)
+ {
+ x.s1.a=20;
+ x.s2.a=22;
+ }
+ assert(x.s1.a==20);
+ assert(x.s1.a<30);
+ assert(x.s2.a==22);
+ assert(x.s2.a<30);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-common-files/struct_sensitivity_tests.c b/regression/goto-analyzer/sensitivity-test-common-files/struct_sensitivity_tests.c
new file mode 100644
index 00000000000..a4ad229e34c
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-common-files/struct_sensitivity_tests.c
@@ -0,0 +1,47 @@
+#include
+
+int main(int argc, char *argv[])
+{
+ // Test how well we can represent structs
+ struct int_float
+ {
+ int a;
+ float b;
+ };
+ struct int_float x={0, 1.0f};
+ x.a=0;
+ x.b=1.0f;
+ assert(x.a==0);
+ assert(x.a==1);
+
+ // Test merging when there is only one value on both paths
+ if(argc>2)
+ {
+ x.a=0;
+ x.b=1.0f;
+ }
+ assert(x.a==0);
+
+ // Test merging when there is one value for a and two values for b, to test if
+ // we are representing them separately
+ if(argc>3)
+ {
+ x.a=0;
+ x.b=2.0f;
+ }
+ assert(x.a==0);
+ assert(x.b>0.0f);
+ assert(x.b==1.0f);
+
+ // Test merging when there are two values for a and b
+ if(argc>4)
+ {
+ x.a=1;
+ x.b=2.0f;
+ }
+ assert(x.a<2);
+ assert(x.a>2);
+ assert(x.a==1);
+
+ return 0;
+}
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/sensitivity_test_constants_array_of_constants_array.c b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/sensitivity_test_constants_array_of_constants_array.c
new file mode 100644
index 00000000000..103849f7a32
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/sensitivity_test_constants_array_of_constants_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_of_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/test.desc
new file mode 100644
index 00000000000..c8db44a2c09
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-array/test.desc
@@ -0,0 +1,73 @@
+FUTURE
+sensitivity_test_constants_array_of_constants_array.c
+--variable --arrays --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]\[2\]==0: Success$
+^\[main.assertion.2\] .* assertion a\[1\]\[2\]==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion b\[1\]\[2\]==5: Success$
+^\[main.assertion.4\] .* assertion b\[1\]\[2\]==0: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion \*\(b\[1\]\+2\)==5: Success$
+^\[main.assertion.6\] .* assertion \*\(b\[1\]\+2\)==0: Failure \(if reachable\)$
+^\[main.assertion.7\] .* assertion \(\*\(b\+1\)\)\[2\]==5: Success$
+^\[main.assertion.8\] .* assertion \(\*\(b\+1\)\)\[2\]==0: Failure \(if reachable\)$
+^\[main.assertion.9\] .* assertion \*\(\*\(b\+1\)\+2\)==5: Success$
+^\[main.assertion.10\] .* assertion \*\(\*\(b\+1\)\+2\)==0: Failure \(if reachable\)$
+^\[main.assertion.11\] .* assertion 1\[b\]\[2\]==5: Success$
+^\[main.assertion.12\] .* assertion 1\[b\]\[2\]==0: Failure \(if reachable\)$
+^\[main.assertion.13\] .* assertion \*\(1\[b\]\+2\)==5: Success$
+^\[main.assertion.14\] .* assertion \*\(1\[b\]\+2\)==0: Failure \(if reachable\)$
+^\[main.assertion.15\] .* assertion \(\*\(1\+b\)\)\[2\]==5: Unknown$
+^\[main.assertion.16\] .* assertion \(\*\(1\+b\)\)\[2\]==0: Unknown$
+^\[main.assertion.17\] .* assertion \*\(\*\(1\+b\)\+2\)==5: Unknown$
+^\[main.assertion.18\] .* assertion \*\(\*\(1\+b\)\+2\)==0: Unknown$
+^\[main.assertion.19\] .* assertion 2\[1\[b\]\]==5: Success$
+^\[main.assertion.20\] .* assertion 2\[1\[b\]\]==0: Failure \(if reachable\)$
+^\[main.assertion.21\] .* assertion \*\(2\+1\[b\]\)==5: Unknown$
+^\[main.assertion.22\] .* assertion \*\(2\+1\[b\]\)==0: Unknown$
+^\[main.assertion.23\] .* assertion \*\(2\+\*\(1\+b\)\)==5: Unknown$
+^\[main.assertion.24\] .* assertion \*\(2\+\*\(1\+b\)\)==0: Unknown$
+^\[main.assertion.25\] .* assertion a\[0\]\[1\]==0: Success$
+^\[main.assertion.26\] .* assertion a\[0\]\[1\]==1: Failure \(if reachable\)$
+^\[main.assertion.27\] .* assertion a\[0\]\[2\]==0: Success$
+^\[main.assertion.28\] .* assertion b\[0\]\[1\]==2: Unknown$
+^\[main.assertion.29\] .* assertion b\[0\]\[1\]==3: Unknown$
+^\[main.assertion.30\] .* assertion b\[0\]\[2\]==2: Success$
+^\[main.assertion.31\] .* assertion a\[i\]\[1\]==0: Success$
+^\[main.assertion.32\] .* assertion a\[i\]\[1\]==1: Failure \(if reachable\)$
+^\[main.assertion.33\] .* assertion a\[1\]\[i\]==0: Success$
+^\[main.assertion.34\] .* assertion a\[1\]\[i\]==1: Failure \(if reachable\)$
+^\[main.assertion.35\] .* assertion a\[i\]\[i\]==0: Success$
+^\[main.assertion.36\] .* assertion a\[i\]\[i\]==1: Failure \(if reachable\)$
+^\[main.assertion.37\] .* assertion a\[j\]\[1\]==0: Unknown$
+^\[main.assertion.38\] .* assertion a\[j\]\[1\]==1: Unknown$
+^\[main.assertion.39\] .* assertion a\[1\]\[j\]==0: Unknown$
+^\[main.assertion.40\] .* assertion a\[1\]\[j\]==1: Unknown$
+^\[main.assertion.41\] .* assertion a\[j\]\[j\]==0: Unknown$
+^\[main.assertion.42\] .* assertion a\[j\]\[j\]==1: Unknown$
+^\[main.assertion.43\] .* assertion b\[i\]\[1\]==1: Success$
+^\[main.assertion.44\] .* assertion b\[i\]\[1\]==11: Failure \(if reachable\)$
+^\[main.assertion.45\] .* assertion b\[1\]\[i\]==3: Success$
+^\[main.assertion.46\] .* assertion b\[1\]\[i\]==11: Failure \(if reachable\)$
+^\[main.assertion.47\] .* assertion b\[i\]\[i\]==0: Success$
+^\[main.assertion.48\] .* assertion b\[i\]\[i\]==11: Failure \(if reachable\)$
+^\[main.assertion.49\] .* assertion b\[j\]\[1\]==1: Unknown$
+^\[main.assertion.50\] .* assertion b\[j\]\[1\]==11: Unknown$
+^\[main.assertion.51\] .* assertion b\[1\]\[j\]==3: Unknown$
+^\[main.assertion.52\] .* assertion b\[1\]\[j\]==11: Unknown$
+^\[main.assertion.53\] .* assertion b\[j\]\[j\]==0: Unknown$
+^\[main.assertion.54\] .* assertion b\[j\]\[j\]==11: Unknown$
+^\[main.assertion.55\] .* assertion a\[100\]\[0\]==0: Unknown$
+^\[main.assertion.56\] .* assertion a\[0\]\[100\]==0: Unknown$
+^\[main.assertion.57\] .* assertion c==0: Success$
+^\[main.assertion.58\] .* assertion c==0: Success$
+^\[main.assertion.59\] .* assertion ei\[0\]\[1\]==1: Success$
+^\[main.assertion.60\] .* assertion ei\[0\]\[1\]==0: Failure \(if reachable\)$
+^\[main.assertion.61\] .* assertion ei\[2\]\[1\]==0: Success$
+^\[main.assertion.62\] .* assertion ei\[2\]\[1\]==1: Failure \(if reachable\)$
+^\[main.assertion.63\] .* assertion ej\[0\]\[1\]==0: Unknown$
+^\[main.assertion.64\] .* assertion ej\[2\]\[1\]==0: Unknown$
+^\[main.assertion.65\] .* assertion ek\[0\]\[1\]==0: Unknown$
+^\[main.assertion.66\] .* assertion c==0: Success$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/sensitivity_test_constants_array_of_constants_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/sensitivity_test_constants_array_of_constants_pointer.c
new file mode 100644
index 00000000000..66edcccfbfb
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/sensitivity_test_constants_array_of_constants_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/test.desc
new file mode 100644
index 00000000000..9242552c707
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-constants-pointer/test.desc
@@ -0,0 +1,71 @@
+FUTURE
+sensitivity_test_constants_array_of_constants_pointer.c
+--variable --arrays --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]==&a0: Success$
+^\[main.assertion.2\] .* assertion a\[1\]==&a3: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion \*a\[1\]==0: Success$
+^\[main.assertion.4\] .* assertion \*a\[1\]==3: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion b\[1\]==&b1: Success$
+^\[main.assertion.6\] .* assertion b\[1\]==&b3: Failure \(if reachable\)$
+^\[main.assertion.7\] .* assertion \*b\[1\]==11: Success$
+^\[main.assertion.8\] .* assertion \*b\[1\]==13: Failure \(if reachable\)$
+^\[main.assertion.9\] .* assertion \*\(b\+1\)==&b1: Success$
+^\[main.assertion.10\] .* assertion \*\(b\+1\)==&b3: Failure \(if reachable\)$
+^\[main.assertion.11\] .* assertion \*\(1\+b\)==&b1: Unknown$
+^\[main.assertion.12\] .* assertion \*\(1\+b\)==&b3: Unknown$
+^\[main.assertion.13\] .* assertion 1\[b\]==&b1: Success$
+^\[main.assertion.14\] .* assertion 1\[b\]==&b3: Failure \(if reachable\)$
+^\[main.assertion.15\] .* assertion \*\*\(b\+1\)==11: Success$
+^\[main.assertion.16\] .* assertion \*\*\(b\+1\)==13: Failure \(if reachable\)$
+^\[main.assertion.17\] .* assertion \*\*\(1\+b\)==11: Unknown$
+^\[main.assertion.18\] .* assertion \*\*\(1\+b\)==13: Unknown$
+^\[main.assertion.19\] .* assertion \*1\[b\]==11: Success$
+^\[main.assertion.20\] .* assertion \*1\[b\]==13: Failure \(if reachable\)$
+^\[main.assertion.21\] .* assertion c\[0\]==&c0: Unknown$
+^\[main.assertion.22\] .* assertion c\[0\]==&c3: Unknown$
+^\[main.assertion.23\] .* assertion d\[0\]==&d0: Unknown$
+^\[main.assertion.24\] .* assertion d\[0\]==&d3: Unknown$
+^\[main.assertion.25\] .* assertion \*c\[0\]==20: Unknown$
+^\[main.assertion.26\] .* assertion \*c\[0\]==23: Unknown$
+^\[main.assertion.27\] .* assertion \*d\[0\]==30: Unknown$
+^\[main.assertion.28\] .* assertion \*d\[0\]==33: Unknown$
+^\[main.assertion.29\] .* assertion a\[i\]==&a0: Success$
+^\[main.assertion.30\] .* assertion a\[i\]==&a3: Failure \(if reachable\)$
+^\[main.assertion.31\] .* assertion a\[j\]==&a0: Unknown$
+^\[main.assertion.32\] .* assertion a\[j\]==&a3: Unknown$
+^\[main.assertion.33\] .* assertion \*a\[i\]==0: Success$
+^\[main.assertion.34\] .* assertion \*a\[i\]==3: Failure \(if reachable\)$
+^\[main.assertion.35\] .* assertion \*a\[j\]==0: Unknown$
+^\[main.assertion.36\] .* assertion \*a\[j\]==3: Unknown$
+^\[main.assertion.37\] .* assertion b\[i\]==&b0: Success$
+^\[main.assertion.38\] .* assertion b\[i\]==&b1: Failure \(if reachable\)$
+^\[main.assertion.39\] .* assertion b\[j\]==&b0: Unknown$
+^\[main.assertion.40\] .* assertion b\[j\]==&b3: Unknown$
+^\[main.assertion.41\] .* assertion \*b\[i\]==10: Success$
+^\[main.assertion.42\] .* assertion \*b\[i\]==11: Failure \(if reachable\)$
+^\[main.assertion.43\] .* assertion \*b\[j\]==10: Unknown$
+^\[main.assertion.44\] .* assertion \*b\[j\]==13: Unknown$
+^\[main.assertion.45\] .* assertion a\[100\]==&a2: Unknown$
+^\[main.assertion.46\] .* assertion \*a\[100\]==2: Unknown$
+^\[main.assertion.47\] .* assertion b\[1\]==&b1: Success$
+^\[main.assertion.48\] .* assertion \*b\[1\]==11: Success$
+^\[main.assertion.49\] .* assertion ei\[0\]==&ei1: Success$
+^\[main.assertion.50\] .* assertion ei\[0\]==&ei0: Failure \(if reachable\)$
+^\[main.assertion.51\] .* assertion ei\[2\]==&ei0: Success$
+^\[main.assertion.52\] .* assertion ei\[2\]==&ei1: Failure \(if reachable\)$
+^\[main.assertion.53\] .* assertion \*ei\[0\]==41: Success$
+^\[main.assertion.54\] .* assertion \*ei\[0\]==40: Failure \(if reachable\)$
+^\[main.assertion.55\] .* assertion \*ei\[2\]==40: Success$
+^\[main.assertion.56\] .* assertion \*ei\[2\]==41: Failure \(if reachable\)$
+^\[main.assertion.57\] .* assertion ej\[0\]==&ej0: Unknown$
+^\[main.assertion.58\] .* assertion ej\[2\]==&ej0: Unknown$
+^\[main.assertion.59\] .* assertion ej\[2\]==&ej1: Unknown$
+^\[main.assertion.60\] .* assertion \*ej\[0\]==50: Unknown$
+^\[main.assertion.61\] .* assertion \*ej\[2\]==50: Unknown$
+^\[main.assertion.62\] .* assertion \*ej\[2\]==51: Unknown$
+^\[main.assertion.63\] .* assertion ek\[0\]==&ek0: Unknown$
+^\[main.assertion.64\] .* assertion \*ek\[0\]==60: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/sensitivity_test_constants_array_of_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/sensitivity_test_constants_array_of_two_value_pointer.c
new file mode 100644
index 00000000000..66edcccfbfb
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/sensitivity_test_constants_array_of_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/test.desc
new file mode 100644
index 00000000000..74f5f128ed6
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array-of-two-value-pointer/test.desc
@@ -0,0 +1,71 @@
+FUTURE
+sensitivity_test_constants_array_of_two_value_pointer.c
+--variable --arrays --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]==&a0: Unknown$
+^\[main.assertion.2\] .* assertion a\[1\]==&a3: Unknown$
+^\[main.assertion.3\] .* assertion \*a\[1\]==0: Unknown$
+^\[main.assertion.4\] .* assertion \*a\[1\]==3: Unknown$
+^\[main.assertion.5\] .* assertion b\[1\]==&b1: Unknown$
+^\[main.assertion.6\] .* assertion b\[1\]==&b3: Unknown$
+^\[main.assertion.7\] .* assertion \*b\[1\]==11: Unknown$
+^\[main.assertion.8\] .* assertion \*b\[1\]==13: Unknown$
+^\[main.assertion.9\] .* assertion \*\(b\+1\)==&b1: Unknown$
+^\[main.assertion.10\] .* assertion \*\(b\+1\)==&b3: Unknown$
+^\[main.assertion.11\] .* assertion \*\(1\+b\)==&b1: Unknown$
+^\[main.assertion.12\] .* assertion \*\(1\+b\)==&b3: Unknown$
+^\[main.assertion.13\] .* assertion 1\[b\]==&b1: Unknown$
+^\[main.assertion.14\] .* assertion 1\[b\]==&b3: Unknown$
+^\[main.assertion.15\] .* assertion \*\*\(b\+1\)==11: Unknown$
+^\[main.assertion.16\] .* assertion \*\*\(b\+1\)==13: Unknown$
+^\[main.assertion.17\] .* assertion \*\*\(1\+b\)==11: Unknown$
+^\[main.assertion.18\] .* assertion \*\*\(1\+b\)==13: Unknown$
+^\[main.assertion.19\] .* assertion \*1\[b\]==11: Unknown$
+^\[main.assertion.20\] .* assertion \*1\[b\]==13: Unknown$
+^\[main.assertion.21\] .* assertion c\[0\]==&c0: Unknown$
+^\[main.assertion.22\] .* assertion c\[0\]==&c3: Unknown$
+^\[main.assertion.23\] .* assertion d\[0\]==&d0: Unknown$
+^\[main.assertion.24\] .* assertion d\[0\]==&d3: Unknown$
+^\[main.assertion.25\] .* assertion \*c\[0\]==20: Unknown$
+^\[main.assertion.26\] .* assertion \*c\[0\]==23: Unknown$
+^\[main.assertion.27\] .* assertion \*d\[0\]==30: Unknown$
+^\[main.assertion.28\] .* assertion \*d\[0\]==33: Unknown$
+^\[main.assertion.29\] .* assertion a\[i\]==&a0: Unknown$
+^\[main.assertion.30\] .* assertion a\[i\]==&a3: Unknown$
+^\[main.assertion.31\] .* assertion a\[j\]==&a0: Unknown$
+^\[main.assertion.32\] .* assertion a\[j\]==&a3: Unknown$
+^\[main.assertion.33\] .* assertion \*a\[i\]==0: Unknown$
+^\[main.assertion.34\] .* assertion \*a\[i\]==3: Unknown$
+^\[main.assertion.35\] .* assertion \*a\[j\]==0: Unknown$
+^\[main.assertion.36\] .* assertion \*a\[j\]==3: Unknown$
+^\[main.assertion.37\] .* assertion b\[i\]==&b0: Unknown$
+^\[main.assertion.38\] .* assertion b\[i\]==&b1: Unknown$
+^\[main.assertion.39\] .* assertion b\[j\]==&b0: Unknown$
+^\[main.assertion.40\] .* assertion b\[j\]==&b3: Unknown$
+^\[main.assertion.41\] .* assertion \*b\[i\]==10: Unknown$
+^\[main.assertion.42\] .* assertion \*b\[i\]==11: Unknown$
+^\[main.assertion.43\] .* assertion \*b\[j\]==10: Unknown$
+^\[main.assertion.44\] .* assertion \*b\[j\]==13: Unknown$
+^\[main.assertion.45\] .* assertion a\[100\]==&a2: Unknown$
+^\[main.assertion.46\] .* assertion \*a\[100\]==2: Unknown$
+^\[main.assertion.47\] .* assertion b\[1\]==&b1: Unknown$
+^\[main.assertion.48\] .* assertion \*b\[1\]==11: Unknown$
+^\[main.assertion.49\] .* assertion ei\[0\]==&ei1: Unknown$
+^\[main.assertion.50\] .* assertion ei\[0\]==&ei0: Unknown$
+^\[main.assertion.51\] .* assertion ei\[2\]==&ei0: Unknown$
+^\[main.assertion.52\] .* assertion ei\[2\]==&ei1: Unknown$
+^\[main.assertion.53\] .* assertion \*ei\[0\]==41: Unknown$
+^\[main.assertion.54\] .* assertion \*ei\[0\]==40: Unknown$
+^\[main.assertion.55\] .* assertion \*ei\[2\]==40: Unknown$
+^\[main.assertion.56\] .* assertion \*ei\[2\]==41: Unknown$
+^\[main.assertion.57\] .* assertion ej\[0\]==&ej0: Unknown$
+^\[main.assertion.58\] .* assertion ej\[2\]==&ej0: Unknown$
+^\[main.assertion.59\] .* assertion ej\[2\]==&ej1: Unknown$
+^\[main.assertion.60\] .* assertion \*ej\[0\]==50: Unknown$
+^\[main.assertion.61\] .* assertion \*ej\[2\]==50: Unknown$
+^\[main.assertion.62\] .* assertion \*ej\[2\]==51: Unknown$
+^\[main.assertion.63\] .* assertion ek\[0\]==&ek0: Unknown$
+^\[main.assertion.64\] .* assertion \*ek\[0\]==60: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array/sensitivity_test_constants_array.c b/regression/goto-analyzer/sensitivity-test-constants-array/sensitivity_test_constants_array.c
new file mode 100644
index 00000000000..e0a5a37a2a2
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array/sensitivity_test_constants_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-array/test.desc
new file mode 100644
index 00000000000..b48a2c823ca
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-array/test.desc
@@ -0,0 +1,39 @@
+FUTURE
+sensitivity_test_constants_array.c
+--variable --arrays --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]==0: Success$
+^\[main.assertion.2\] .* assertion a\[1\]==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion b\[1\]==0: Success$
+^\[main.assertion.4\] .* assertion b\[1\]==1: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion \*\(b\+1\)==0: Success$
+^\[main.assertion.6\] .* assertion \*\(b\+1\)==1: Failure \(if reachable\)$
+^\[main.assertion.7\] .* assertion \*\(1\+b\)==0: Unknown$
+^\[main.assertion.8\] .* assertion \*\(1\+b\)==1: Unknown$
+^\[main.assertion.9\] .* assertion 1\[b\]==0: Success$
+^\[main.assertion.10\] .* assertion 1\[b\]==1: Failure \(if reachable\)$
+^\[main.assertion.11\] .* assertion c\[0\]==0: Success$
+^\[main.assertion.12\] .* assertion c\[0\]==1: Failure \(if reachable\)$
+^\[main.assertion.13\] .* assertion d\[0\]==0: Unknown$
+^\[main.assertion.14\] .* assertion d\[0\]==2: Unknown$
+^\[main.assertion.15\] .* assertion d\[1\]==0: Success$
+^\[main.assertion.16\] .* assertion a\[i\]==0: Success$
+^\[main.assertion.17\] .* assertion a\[i\]==1: Failure \(if reachable\)$
+^\[main.assertion.18\] .* assertion a\[j\]==0: Unknown$
+^\[main.assertion.19\] .* assertion a\[j\]==1: Unknown$
+^\[main.assertion.20\] .* assertion b\[i\]==1: Success$
+^\[main.assertion.21\] .* assertion b\[i\]==0: Failure \(if reachable\)$
+^\[main.assertion.22\] .* assertion b\[j\]==0: Unknown$
+^\[main.assertion.23\] .* assertion b\[j\]==1: Unknown$
+^\[main.assertion.24\] .* assertion a\[100\]==0: Unknown$
+^\[main.assertion.25\] .* assertion b\[1\]==0: Success$
+^\[main.assertion.26\] .* assertion ei\[0\]==1: Success$
+^\[main.assertion.27\] .* assertion ei\[0\]==0: Failure \(if reachable\)$
+^\[main.assertion.28\] .* assertion ei\[2\]==0: Success$
+^\[main.assertion.29\] .* assertion ei\[2\]==1: Failure \(if reachable\)$
+^\[main.assertion.30\] .* assertion ej\[0\]==0: Unknown$
+^\[main.assertion.31\] .* assertion ej\[2\]==0: Unknown$
+^\[main.assertion.32\] .* assertion ek\[0\]==0: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-char/sensitivity_test_constants_char.c b/regression/goto-analyzer/sensitivity-test-constants-char/sensitivity_test_constants_char.c
new file mode 100644
index 00000000000..b97be63e211
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-char/sensitivity_test_constants_char.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/char_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-char/test.desc b/regression/goto-analyzer/sensitivity-test-constants-char/test.desc
new file mode 100644
index 00000000000..4ae7832010b
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-char/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+sensitivity_test_constants_char.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x=='a': Success$
+^\[main.assertion.2\] .* assertion x=='b': Failure \(if reachable\)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-float/sensitivity_test_constants_float.c b/regression/goto-analyzer/sensitivity-test-constants-float/sensitivity_test_constants_float.c
new file mode 100644
index 00000000000..4e801235552
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-float/sensitivity_test_constants_float.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/float_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-float/test.desc b/regression/goto-analyzer/sensitivity-test-constants-float/test.desc
new file mode 100644
index 00000000000..634ea862f56
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-float/test.desc
@@ -0,0 +1,9 @@
+FUTURE
+sensitivity_test_constants_float.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x==0.0: Success$
+^\[main.assertion.2\] .* assertion x==1.0: Failure \(if reachable\)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-int/sensitivity_test_constants_int.c b/regression/goto-analyzer/sensitivity-test-constants-int/sensitivity_test_constants_int.c
new file mode 100644
index 00000000000..8a0f75feb97
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-int/sensitivity_test_constants_int.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/int_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-int/test.desc b/regression/goto-analyzer/sensitivity-test-constants-int/test.desc
new file mode 100644
index 00000000000..d3c274a9447
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-int/test.desc
@@ -0,0 +1,30 @@
+FUTURE
+sensitivity_test_constants_int.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x==0: Success$
+^\[main.assertion.2\] .* assertion x==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion x==y: Unknown$
+^\[main.assertion.4\] .* assertion x<1: Success$
+^\[main.assertion.5\] .* assertion x<-1: Failure \(if reachable\)$
+^\[main.assertion.6\] .* assertion x-1: Success$
+^\[main.assertion.8\] .* assertion x>1: Failure \(if reachable\)$
+^\[main.assertion.9\] .* assertion x>y: Unknown$
+^\[main.assertion.10\] .* assertion x!=1: Success$
+^\[main.assertion.11\] .* assertion x!=0: Failure \(if reachable\)$
+^\[main.assertion.12\] .* assertion x!=y: Unknown$
+^\[main.assertion.13\] .* assertion !\(x==1\): Success$
+^\[main.assertion.14\] .* assertion !\(x==0\): Failure \(if reachable\)$
+^\[main.assertion.15\] .* assertion !\(x==y\): Unknown$
+^\[main.assertion.16\] .* assertion y<2: Unknown$
+^\[main.assertion.17\] .* assertion y>2: Unknown$
+^\[main.assertion.18\] .* assertion y==1: Unknown$
+^\[main.assertion.19\] .* assertion z==0: Success$
+^\[main.assertion.20\] .* assertion z==10: Failure \(if reachable\)$
+^\[main.assertion.21\] .* assertion x==0: Success \(unreachable\)$
+^\[main.assertion.22\] .* assertion x==1: Success \(unreachable\)$
+^\[main.assertion.23\] .* assertion y==0: Success \(unreachable\)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/sensitivity_test_constants_pointer_to_constants_array.c b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/sensitivity_test_constants_pointer_to_constants_array.c
new file mode 100644
index 00000000000..082fe2e62c8
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/sensitivity_test_constants_pointer_to_constants_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/test.desc
new file mode 100644
index 00000000000..7ccb164ab0f
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-array/test.desc
@@ -0,0 +1,21 @@
+FUTURE
+sensitivity_test_constants_pointer_to_constants_array.c
+--variable --pointers --arrays --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion p==&a\[0\]: Success$
+^\[main.assertion.2\] .* assertion \*p==1: Success$
+^\[main.assertion.3\] .* assertion q==p\+1: Unknown$
+^\[main.assertion.4\] .* assertion \*q==2: Unknown$
+^\[main.assertion.5\] .* assertion q-p==x: Unknown$
+^\[main.assertion.6\] .* assertion a\[1\]==4: Unknown$
+^\[main.assertion.7\] .* assertion \*r==2: Unknown$
+^\[main.assertion.8\] .* assertion \*r==1: Unknown$
+^\[main.assertion.9\] .* assertion \*s==0: Unknown$
+^\[main.assertion.10\] .* assertion \*s==1: Unknown$
+^\[main.assertion.11\] .* assertion t==p\+i: Unknown$
+^\[main.assertion.12\] .* assertion t-p==y: Unknown$
+^\[main.assertion.13\] .* assertion a\[i\]==5: Unknown$
+^\[main.assertion.14\] .* assertion a\[1\]==5: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/sensitivity_test_constants_pointer_to_constants_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/sensitivity_test_constants_pointer_to_constants_pointer.c
new file mode 100644
index 00000000000..56e6edc1093
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/sensitivity_test_constants_pointer_to_constants_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/test.desc
new file mode 100644
index 00000000000..f7fa1706d6a
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-pointer/test.desc
@@ -0,0 +1,13 @@
+FUTURE
+sensitivity_test_constants_pointer_to_constants_pointer.c
+--variable --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion \*\*x==0: Success$
+^\[main.assertion.2\] .* assertion \*\*x==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion \*\*x==1: Success$
+^\[main.assertion.4\] .* assertion \*\*x==0: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion a==2: Success$
+^\[main.assertion.6\] .* assertion a==1: Failure \(if reachable\)$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/sensitivity_test_constants_pointer_to_constants_struct.c b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/sensitivity_test_constants_pointer_to_constants_struct.c
new file mode 100644
index 00000000000..8f86047a407
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/sensitivity_test_constants_pointer_to_constants_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/test.desc
new file mode 100644
index 00000000000..c7abd5e6821
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-constants-struct/test.desc
@@ -0,0 +1,16 @@
+KNOWNBUG
+sensitivity_test_constants_pointer_to_constants_struct.c
+--variable --pointers --structs --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion \(\*p\).a==0: Success$
+^\[main.assertion.2\] .* assertion \(\*p\).a==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion p->a==0: Success$
+^\[main.assertion.4\] .* assertion p->a==1: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion p->b==2.0: Success$
+^\[main.assertion.6\] .* assertion p->b==1.0: Failure \(if reachable\)$
+--
+^warning: ignoring
+--
+The final two assertions are the wrong way round as modifying the pointer
+does not seem to be propogating through. See #96
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/sensitivity_test_constants_pointer_to_two_value_array.c b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/sensitivity_test_constants_pointer_to_two_value_array.c
new file mode 100644
index 00000000000..082fe2e62c8
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/sensitivity_test_constants_pointer_to_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/test.desc
new file mode 100644
index 00000000000..7121e17040d
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-array/test.desc
@@ -0,0 +1,21 @@
+FUTURE
+sensitivity_test_constants_pointer_to_two_value_array.c
+--variable --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion p==&a\[0\]: Success$
+^\[main.assertion.2\] .* assertion \*p==1: Unknown$
+^\[main.assertion.3\] .* assertion q==p\+1: Unknown$
+^\[main.assertion.4\] .* assertion \*q==2: Unknown$
+^\[main.assertion.5\] .* assertion q-p==x: Unknown$
+^\[main.assertion.6\] .* assertion a\[1\]==4: Unknown$
+^\[main.assertion.7\] .* assertion \*r==2: Unknown$
+^\[main.assertion.8\] .* assertion \*r==1: Unknown$
+^\[main.assertion.9\] .* assertion \*s==0: Unknown$
+^\[main.assertion.10\] .* assertion \*s==1: Unknown$
+^\[main.assertion.11\] .* assertion t==p\+i: Unknown$
+^\[main.assertion.12\] .* assertion t-p==y: Unknown$
+^\[main.assertion.13\] .* assertion a\[i\]==5: Unknown$
+^\[main.assertion.14\] .* assertion a\[1\]==5: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/sensitivity_test_constants_pointer_to_two_value_struct.c b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/sensitivity_test_constants_pointer_to_two_value_struct.c
new file mode 100644
index 00000000000..8f86047a407
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/sensitivity_test_constants_pointer_to_two_value_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/test.desc
new file mode 100644
index 00000000000..a214499b34b
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer-to-two-value-struct/test.desc
@@ -0,0 +1,13 @@
+FUTURE
+sensitivity_test_constants_pointer_to_two_value_struct.c
+--variable --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion \(\*p\).a==0: Unknown$
+^\[main.assertion.2\] .* assertion \(\*p\).a==1: Unknown$
+^\[main.assertion.3\] .* assertion p->a==0: Unknown$
+^\[main.assertion.4\] .* assertion p->a==1: Unknown$
+^\[main.assertion.5\] .* assertion p->b==2.0: Unknown$
+^\[main.assertion.6\] .* assertion p->b==1.0: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer/sensitivity_test_constants_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-pointer/sensitivity_test_constants_pointer.c
new file mode 100644
index 00000000000..a2167bc68f4
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer/sensitivity_test_constants_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-pointer/test.desc
new file mode 100644
index 00000000000..22c179f2233
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-pointer/test.desc
@@ -0,0 +1,21 @@
+FUTURE
+sensitivity_test_constants_pointer.c
+--variable --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x==&a: Success$
+^\[main.assertion.2\] .* assertion x==&b: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion x==x2: Success$
+^\[main.assertion.4\] .* assertion x==y: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion \*x==0: Success$
+^\[main.assertion.6\] .* assertion \*x==1: Failure \(if reachable\)$
+^\[main.assertion.7\] .* assertion \*x==1: Success$
+^\[main.assertion.8\] .* assertion \*x==0: Failure \(if reachable\)$
+^\[main.assertion.9\] .* assertion a==2: Success$
+^\[main.assertion.10\] .* assertion a==0: Failure \(if reachable\)$
+^\[main.assertion.11\] .* assertion x==&a: Success$
+^\[main.assertion.12\] .* assertion \*x==0: Unknown$
+^\[main.assertion.13\] .* assertion x==&a: Unknown$
+^\[main.assertion.14\] .* assertion x==&b: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/sensitivity_test_constants_struct_of_constants_array.c b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/sensitivity_test_constants_struct_of_constants_array.c
new file mode 100644
index 00000000000..d50aea1ea24
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/sensitivity_test_constants_struct_of_constants_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/test.desc
new file mode 100644
index 00000000000..7b6ae24bf61
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-array/test.desc
@@ -0,0 +1,24 @@
+FUTURE
+sensitivity_test_constants_struct_of_constants_array.c
+--variable --structs --arrays --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a\[0\]==0: Success$
+^\[main.assertion.2\] .* assertion \*\(x.a\+0\)==0: Success$
+^\[main.assertion.3\] .* assertion \*\(0\+x.a\)==0: Success$
+^\[main.assertion.4\] .* assertion 0\[x.a\]==0: Success$
+^\[main.assertion.5\] .* assertion x.a\[0\]==0: Success$
+^\[main.assertion.6\] .* assertion x.a\[1\]==1: Success$
+^\[main.assertion.7\] .* assertion x.b\[0\]==3.0f: Success$
+^\[main.assertion.8\] .* assertion x.a\[0\]==0: Success$
+^\[main.assertion.9\] .* assertion x.a\[1\]==1: Success$
+^\[main.assertion.10\] .* assertion x.b\[2\]>0.0f: Unknown$
+^\[main.assertion.11\] .* assertion x.b\[2\]==15.0f: Unknown$
+^\[main.assertion.12\] .* assertion x.b\[2\]==1.0f: Unknown$
+^\[main.assertion.13\] .* assertion x.b\[0\]==3.0f: Success$
+^\[main.assertion.14\] .* assertion x.a\[0\]<12: Unknown$
+^\[main.assertion.15\] .* assertion x.a\[0\]>2: Unknown$
+^\[main.assertion.16\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.17\] .* assertion x.a\[1\]==1: Success$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/sensitivity_test_constants_struct_of_constants_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/sensitivity_test_constants_struct_of_constants_pointer.c
new file mode 100644
index 00000000000..ab7d896ae5d
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/sensitivity_test_constants_struct_of_constants_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/test.desc
new file mode 100644
index 00000000000..b278a7ed47c
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-pointer/test.desc
@@ -0,0 +1,33 @@
+FUTURE
+sensitivity_test_constants_struct_of_constants_pointer.c
+--variable --structs --pointers --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a==&a1: Success$
+^\[main.assertion.2\] .* assertion x.a==&a2: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion x.b==&b1: Success$
+^\[main.assertion.4\] .* assertion x.b==&b2: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion \*x.a==0: Success$
+^\[main.assertion.6\] .* assertion \*x.a==100: Failure \(if reachable\)$
+^\[main.assertion.7\] .* assertion \*x.b==10.0f: Success$
+^\[main.assertion.8\] .* assertion \*x.b==110.0f: Failure \(if reachable\)$
+^\[main.assertion.9\] .* assertion x.a==&a1: Success$
+^\[main.assertion.10\] .* assertion x.a==&a2: Failure \(if reachable\)$
+^\[main.assertion.11\] .* assertion \*x.a==0: Success$
+^\[main.assertion.12\] .* assertion \*x.a==100: Failure \(if reachable\)$
+^\[main.assertion.13\] .* assertion x.a==&a1: Success$
+^\[main.assertion.14\] .* assertion x.b==&b2: Unknown$
+^\[main.assertion.15\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.16\] .* assertion \*x.a==0: Success$
+^\[main.assertion.17\] .* assertion \*x.b==11.0f: Unknown$
+^\[main.assertion.18\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.19\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.20\] .* assertion x.a==&a3: Unknown$
+^\[main.assertion.21\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.22\] .* assertion x.b==&b4: Unknown$
+^\[main.assertion.23\] .* assertion \*x.a==1: Unknown$
+^\[main.assertion.24\] .* assertion \*x.a==2: Unknown$
+^\[main.assertion.25\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.26\] .* assertion \*x.b==13.0f: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/sensitivity_test_constants_struct_of_constants_struct.c b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/sensitivity_test_constants_struct_of_constants_struct.c
new file mode 100644
index 00000000000..ae2ab34d038
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/sensitivity_test_constants_struct_of_constants_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/test.desc
new file mode 100644
index 00000000000..28f2e09614a
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-constants-struct/test.desc
@@ -0,0 +1,18 @@
+FUTURE
+sensitivity_test_constants_struct_of_constants_struct.c
+--variable --structs --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.s1.a==0: Success$
+^\[main.assertion.2\] .* assertion x.s2.b==3.0f: Success$
+^\[main.assertion.3\] .* assertion x.s1.a==0: Success$
+^\[main.assertion.4\] .* assertion x.s1.a==10: Failure \(if reachable\)$
+^\[main.assertion.5\] .* assertion x.s1.b==1.0f: Success$
+^\[main.assertion.6\] .* assertion x.s2.b==3.0f: Unknown$
+^\[main.assertion.7\] .* assertion x.s2.b==0.0f: Unknown$
+^\[main.assertion.8\] .* assertion x.s1.a==20: Unknown$
+^\[main.assertion.9\] .* assertion x.s1.a<30: Unknown$
+^\[main.assertion.10\] .* assertion x.s2.a==22: Unknown$
+^\[main.assertion.11\] .* assertion x.s2.a<30: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/sensitivity_test_constants_struct_of_two_value_array.c b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/sensitivity_test_constants_struct_of_two_value_array.c
new file mode 100644
index 00000000000..d50aea1ea24
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/sensitivity_test_constants_struct_of_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/test.desc
new file mode 100644
index 00000000000..30edb4b598c
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-array/test.desc
@@ -0,0 +1,24 @@
+FUTURE
+sensitivity_test_constants_struct_of_two_value_array.c
+--variable --structs --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.2\] .* assertion \*\(x.a\+0\)==0: Unknown$
+^\[main.assertion.3\] .* assertion \*\(0\+x.a\)==0: Unknown$
+^\[main.assertion.4\] .* assertion 0\[x.a\]==0: Unknown$
+^\[main.assertion.5\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.6\] .* assertion x.a\[1\]==1: Unknown$
+^\[main.assertion.7\] .* assertion x.b\[0\]==3.0f: Unknown$
+^\[main.assertion.8\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.9\] .* assertion x.a\[1\]==1: Unknown$
+^\[main.assertion.10\] .* assertion x.b\[2\]>0.0f: Unknown$
+^\[main.assertion.11\] .* assertion x.b\[2\]==15.0f: Unknown$
+^\[main.assertion.12\] .* assertion x.b\[2\]==1.0f: Unknown$
+^\[main.assertion.13\] .* assertion x.b\[0\]==3.0f: Unknown$
+^\[main.assertion.14\] .* assertion x.a\[0\]<12: Unknown$
+^\[main.assertion.15\] .* assertion x.a\[0\]>2: Unknown$
+^\[main.assertion.16\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.17\] .* assertion x.a\[1\]==1: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/sensitivity_test_constants_struct_of_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/sensitivity_test_constants_struct_of_two_value_pointer.c
new file mode 100644
index 00000000000..ab7d896ae5d
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/sensitivity_test_constants_struct_of_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/test.desc
new file mode 100644
index 00000000000..ea3a9cadb69
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct-of-two-value-pointer/test.desc
@@ -0,0 +1,33 @@
+FUTURE
+sensitivity_test_constants_struct_of_two_value_pointer.c
+--variable --structs --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.2\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.3\] .* assertion x.b==&b1: Unknown$
+^\[main.assertion.4\] .* assertion x.b==&b2: Unknown$
+^\[main.assertion.5\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.6\] .* assertion \*x.a==100: Unknown$
+^\[main.assertion.7\] .* assertion \*x.b==10.0f: Unknown$
+^\[main.assertion.8\] .* assertion \*x.b==110.0f: Unknown$
+^\[main.assertion.9\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.10\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.11\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.12\] .* assertion \*x.a==100: Unknown$
+^\[main.assertion.13\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.14\] .* assertion x.b==&b2: Unknown$
+^\[main.assertion.15\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.16\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.17\] .* assertion \*x.b==11.0f: Unknown$
+^\[main.assertion.18\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.19\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.20\] .* assertion x.a==&a3: Unknown$
+^\[main.assertion.21\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.22\] .* assertion x.b==&b4: Unknown$
+^\[main.assertion.23\] .* assertion \*x.a==1: Unknown$
+^\[main.assertion.24\] .* assertion \*x.a==2: Unknown$
+^\[main.assertion.25\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.26\] .* assertion \*x.b==13.0f: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct/sensitivity_test_constants_struct.c b/regression/goto-analyzer/sensitivity-test-constants-struct/sensitivity_test_constants_struct.c
new file mode 100644
index 00000000000..946ec769d9e
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct/sensitivity_test_constants_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-constants-struct/test.desc b/regression/goto-analyzer/sensitivity-test-constants-struct/test.desc
new file mode 100644
index 00000000000..64a15fcae85
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-constants-struct/test.desc
@@ -0,0 +1,16 @@
+FUTURE
+sensitivity_test_constants_struct.c
+--variable --structs --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a==0: Success$
+^\[main.assertion.2\] .* assertion x.a==1: Failure \(if reachable\)$
+^\[main.assertion.3\] .* assertion x.a==0: Success$
+^\[main.assertion.4\] .* assertion x.a==0: Success$
+^\[main.assertion.5\] .* assertion x.b>0.0f: Unknown$
+^\[main.assertion.6\] .* assertion x.b==1.0f: Unknown$
+^\[main.assertion.7\] .* assertion x.a<2: Unknown$
+^\[main.assertion.8\] .* assertion x.a>2: Unknown$
+^\[main.assertion.9\] .* assertion x.a==1: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/sensitivity_test_two_value_array_of_two_value_array.c b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/sensitivity_test_two_value_array_of_two_value_array.c
new file mode 100644
index 00000000000..103849f7a32
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/sensitivity_test_two_value_array_of_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_of_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/test.desc
new file mode 100644
index 00000000000..2c2c3ed15a8
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-array/test.desc
@@ -0,0 +1,73 @@
+FUTURE
+sensitivity_test_two_value_array_of_two_value_array.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]\[2\]==0: Unknown$
+^\[main.assertion.2\] .* assertion a\[1\]\[2\]==1: Unknown$
+^\[main.assertion.3\] .* assertion b\[1\]\[2\]==5: Unknown$
+^\[main.assertion.4\] .* assertion b\[1\]\[2\]==0: Unknown$
+^\[main.assertion.5\] .* assertion \*\(b\[1\]\+2\)==5: Unknown$
+^\[main.assertion.6\] .* assertion \*\(b\[1\]\+2\)==0: Unknown$
+^\[main.assertion.7\] .* assertion \(\*\(b\+1\)\)\[2\]==5: Unknown$
+^\[main.assertion.8\] .* assertion \(\*\(b\+1\)\)\[2\]==0: Unknown$
+^\[main.assertion.9\] .* assertion \*\(\*\(b\+1\)\+2\)==5: Unknown$
+^\[main.assertion.10\] .* assertion \*\(\*\(b\+1\)\+2\)==0: Unknown$
+^\[main.assertion.11\] .* assertion 1\[b\]\[2\]==5: Unknown$
+^\[main.assertion.12\] .* assertion 1\[b\]\[2\]==0: Unknown$
+^\[main.assertion.13\] .* assertion \*\(1\[b\]\+2\)==5: Unknown$
+^\[main.assertion.14\] .* assertion \*\(1\[b\]\+2\)==0: Unknown$
+^\[main.assertion.15\] .* assertion \(\*\(1\+b\)\)\[2\]==5: Unknown$
+^\[main.assertion.16\] .* assertion \(\*\(1\+b\)\)\[2\]==0: Unknown$
+^\[main.assertion.17\] .* assertion \*\(\*\(1\+b\)\+2\)==5: Unknown$
+^\[main.assertion.18\] .* assertion \*\(\*\(1\+b\)\+2\)==0: Unknown$
+^\[main.assertion.19\] .* assertion 2\[1\[b\]\]==5: Unknown$
+^\[main.assertion.20\] .* assertion 2\[1\[b\]\]==0: Unknown$
+^\[main.assertion.21\] .* assertion \*\(2\+1\[b\]\)==5: Unknown$
+^\[main.assertion.22\] .* assertion \*\(2\+1\[b\]\)==0: Unknown$
+^\[main.assertion.23\] .* assertion \*\(2\+\*\(1\+b\)\)==5: Unknown$
+^\[main.assertion.24\] .* assertion \*\(2\+\*\(1\+b\)\)==0: Unknown$
+^\[main.assertion.25\] .* assertion a\[0\]\[1\]==0: Unknown$
+^\[main.assertion.26\] .* assertion a\[0\]\[1\]==1: Unknown$
+^\[main.assertion.27\] .* assertion a\[0\]\[2\]==0: Unknown$
+^\[main.assertion.28\] .* assertion b\[0\]\[1\]==2: Unknown$
+^\[main.assertion.29\] .* assertion b\[0\]\[1\]==3: Unknown$
+^\[main.assertion.30\] .* assertion b\[0\]\[2\]==2: Unknown$
+^\[main.assertion.31\] .* assertion a\[i\]\[1\]==0: Unknown$
+^\[main.assertion.32\] .* assertion a\[i\]\[1\]==1: Unknown$
+^\[main.assertion.33\] .* assertion a\[1\]\[i\]==0: Unknown$
+^\[main.assertion.34\] .* assertion a\[1\]\[i\]==1: Unknown$
+^\[main.assertion.35\] .* assertion a\[i\]\[i\]==0: Unknown$
+^\[main.assertion.36\] .* assertion a\[i\]\[i\]==1: Unknown$
+^\[main.assertion.37\] .* assertion a\[j\]\[1\]==0: Unknown$
+^\[main.assertion.38\] .* assertion a\[j\]\[1\]==1: Unknown$
+^\[main.assertion.39\] .* assertion a\[1\]\[j\]==0: Unknown$
+^\[main.assertion.40\] .* assertion a\[1\]\[j\]==1: Unknown$
+^\[main.assertion.41\] .* assertion a\[j\]\[j\]==0: Unknown$
+^\[main.assertion.42\] .* assertion a\[j\]\[j\]==1: Unknown$
+^\[main.assertion.43\] .* assertion b\[i\]\[1\]==1: Unknown$
+^\[main.assertion.44\] .* assertion b\[i\]\[1\]==11: Unknown$
+^\[main.assertion.45\] .* assertion b\[1\]\[i\]==3: Unknown$
+^\[main.assertion.46\] .* assertion b\[1\]\[i\]==11: Unknown$
+^\[main.assertion.47\] .* assertion b\[i\]\[i\]==0: Unknown$
+^\[main.assertion.48\] .* assertion b\[i\]\[i\]==11: Unknown$
+^\[main.assertion.49\] .* assertion b\[j\]\[1\]==1: Unknown$
+^\[main.assertion.50\] .* assertion b\[j\]\[1\]==11: Unknown$
+^\[main.assertion.51\] .* assertion b\[1\]\[j\]==3: Unknown$
+^\[main.assertion.52\] .* assertion b\[1\]\[j\]==11: Unknown$
+^\[main.assertion.53\] .* assertion b\[j\]\[j\]==0: Unknown$
+^\[main.assertion.54\] .* assertion b\[j\]\[j\]==11: Unknown$
+^\[main.assertion.55\] .* assertion a\[100\]\[0\]==0: Unknown$
+^\[main.assertion.56\] .* assertion a\[0\]\[100\]==0: Unknown$
+^\[main.assertion.57\] .* assertion c==0: Success$
+^\[main.assertion.58\] .* assertion c==0: Success$
+^\[main.assertion.59\] .* assertion ei\[0\]\[1\]==1: Unknown$
+^\[main.assertion.60\] .* assertion ei\[0\]\[1\]==0: Unknown$
+^\[main.assertion.61\] .* assertion ei\[2\]\[1\]==0: Unknown$
+^\[main.assertion.62\] .* assertion ei\[2\]\[1\]==1: Unknown$
+^\[main.assertion.63\] .* assertion ej\[0\]\[1\]==0: Unknown$
+^\[main.assertion.64\] .* assertion ej\[2\]\[1\]==0: Unknown$
+^\[main.assertion.65\] .* assertion ek\[0\]\[1\]==0: Unknown$
+^\[main.assertion.66\] .* assertion c==0: Success$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/sensitivity_test_two_value_array_of_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/sensitivity_test_two_value_array_of_two_value_pointer.c
new file mode 100644
index 00000000000..66edcccfbfb
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/sensitivity_test_two_value_array_of_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/test.desc
new file mode 100644
index 00000000000..f9de8e20a03
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array-of-two-value-pointer/test.desc
@@ -0,0 +1,71 @@
+FUTURE
+sensitivity_test_two_value_array_of_two_value_pointer.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]==&a0: Unknown$
+^\[main.assertion.2\] .* assertion a\[1\]==&a3: Unknown$
+^\[main.assertion.3\] .* assertion \*a\[1\]==0: Unknown$
+^\[main.assertion.4\] .* assertion \*a\[1\]==3: Unknown$
+^\[main.assertion.5\] .* assertion b\[1\]==&b1: Unknown$
+^\[main.assertion.6\] .* assertion b\[1\]==&b3: Unknown$
+^\[main.assertion.7\] .* assertion \*b\[1\]==11: Unknown$
+^\[main.assertion.8\] .* assertion \*b\[1\]==13: Unknown$
+^\[main.assertion.9\] .* assertion \*\(b\+1\)==&b1: Unknown$
+^\[main.assertion.10\] .* assertion \*\(b\+1\)==&b3: Unknown$
+^\[main.assertion.11\] .* assertion \*\(1\+b\)==&b1: Unknown$
+^\[main.assertion.12\] .* assertion \*\(1\+b\)==&b3: Unknown$
+^\[main.assertion.13\] .* assertion 1\[b\]==&b1: Unknown$
+^\[main.assertion.14\] .* assertion 1\[b\]==&b3: Unknown$
+^\[main.assertion.15\] .* assertion \*\*\(b\+1\)==11: Unknown$
+^\[main.assertion.16\] .* assertion \*\*\(b\+1\)==13: Unknown$
+^\[main.assertion.17\] .* assertion \*\*\(1\+b\)==11: Unknown$
+^\[main.assertion.18\] .* assertion \*\*\(1\+b\)==13: Unknown$
+^\[main.assertion.19\] .* assertion \*1\[b\]==11: Unknown$
+^\[main.assertion.20\] .* assertion \*1\[b\]==13: Unknown$
+^\[main.assertion.21\] .* assertion c\[0\]==&c0: Unknown$
+^\[main.assertion.22\] .* assertion c\[0\]==&c3: Unknown$
+^\[main.assertion.23\] .* assertion d\[0\]==&d0: Unknown$
+^\[main.assertion.24\] .* assertion d\[0\]==&d3: Unknown$
+^\[main.assertion.25\] .* assertion \*c\[0\]==20: Unknown$
+^\[main.assertion.26\] .* assertion \*c\[0\]==23: Unknown$
+^\[main.assertion.27\] .* assertion \*d\[0\]==30: Unknown$
+^\[main.assertion.28\] .* assertion \*d\[0\]==33: Unknown$
+^\[main.assertion.29\] .* assertion a\[i\]==&a0: Unknown$
+^\[main.assertion.30\] .* assertion a\[i\]==&a3: Unknown$
+^\[main.assertion.31\] .* assertion a\[j\]==&a0: Unknown$
+^\[main.assertion.32\] .* assertion a\[j\]==&a3: Unknown$
+^\[main.assertion.33\] .* assertion \*a\[i\]==0: Unknown$
+^\[main.assertion.34\] .* assertion \*a\[i\]==3: Unknown$
+^\[main.assertion.35\] .* assertion \*a\[j\]==0: Unknown$
+^\[main.assertion.36\] .* assertion \*a\[j\]==3: Unknown$
+^\[main.assertion.37\] .* assertion b\[i\]==&b0: Unknown$
+^\[main.assertion.38\] .* assertion b\[i\]==&b1: Unknown$
+^\[main.assertion.39\] .* assertion b\[j\]==&b0: Unknown$
+^\[main.assertion.40\] .* assertion b\[j\]==&b3: Unknown$
+^\[main.assertion.41\] .* assertion \*b\[i\]==10: Unknown$
+^\[main.assertion.42\] .* assertion \*b\[i\]==11: Unknown$
+^\[main.assertion.43\] .* assertion \*b\[j\]==10: Unknown$
+^\[main.assertion.44\] .* assertion \*b\[j\]==13: Unknown$
+^\[main.assertion.45\] .* assertion a\[100\]==&a2: Unknown$
+^\[main.assertion.46\] .* assertion \*a\[100\]==2: Unknown$
+^\[main.assertion.47\] .* assertion b\[1\]==&b1: Unknown$
+^\[main.assertion.48\] .* assertion \*b\[1\]==11: Unknown$
+^\[main.assertion.49\] .* assertion ei\[0\]==&ei1: Unknown$
+^\[main.assertion.50\] .* assertion ei\[0\]==&ei0: Unknown$
+^\[main.assertion.51\] .* assertion ei\[2\]==&ei0: Unknown$
+^\[main.assertion.52\] .* assertion ei\[2\]==&ei1: Unknown$
+^\[main.assertion.53\] .* assertion \*ei\[0\]==41: Unknown$
+^\[main.assertion.54\] .* assertion \*ei\[0\]==40: Unknown$
+^\[main.assertion.55\] .* assertion \*ei\[2\]==40: Unknown$
+^\[main.assertion.56\] .* assertion \*ei\[2\]==41: Unknown$
+^\[main.assertion.57\] .* assertion ej\[0\]==&ej0: Unknown$
+^\[main.assertion.58\] .* assertion ej\[2\]==&ej0: Unknown$
+^\[main.assertion.59\] .* assertion ej\[2\]==&ej1: Unknown$
+^\[main.assertion.60\] .* assertion \*ej\[0\]==50: Unknown$
+^\[main.assertion.61\] .* assertion \*ej\[2\]==50: Unknown$
+^\[main.assertion.62\] .* assertion \*ej\[2\]==51: Unknown$
+^\[main.assertion.63\] .* assertion ek\[0\]==&ek0: Unknown$
+^\[main.assertion.64\] .* assertion \*ek\[0\]==60: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array/sensitivity_test_two_value_array.c b/regression/goto-analyzer/sensitivity-test-two-value-array/sensitivity_test_two_value_array.c
new file mode 100644
index 00000000000..e0a5a37a2a2
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array/sensitivity_test_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-array/test.desc
new file mode 100644
index 00000000000..23ee78bd74f
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-array/test.desc
@@ -0,0 +1,39 @@
+FUTURE
+sensitivity_test_two_value_array.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion a\[1\]==0: Unknown$
+^\[main.assertion.2\] .* assertion a\[1\]==1: Unknown$
+^\[main.assertion.3\] .* assertion b\[1\]==0: Unknown$
+^\[main.assertion.4\] .* assertion b\[1\]==1: Unknown$
+^\[main.assertion.5\] .* assertion \*\(b\+1\)==0: Unknown$
+^\[main.assertion.6\] .* assertion \*\(b\+1\)==1: Unknown$
+^\[main.assertion.7\] .* assertion \*\(1\+b\)==0: Unknown$
+^\[main.assertion.8\] .* assertion \*\(1\+b\)==1: Unknown$
+^\[main.assertion.9\] .* assertion 1\[b\]==0: Unknown$
+^\[main.assertion.10\] .* assertion 1\[b\]==1: Unknown$
+^\[main.assertion.11\] .* assertion c\[0\]==0: Unknown$
+^\[main.assertion.12\] .* assertion c\[0\]==1: Unknown$
+^\[main.assertion.13\] .* assertion d\[0\]==0: Unknown$
+^\[main.assertion.14\] .* assertion d\[0\]==2: Unknown$
+^\[main.assertion.15\] .* assertion d\[1\]==0: Unknown$
+^\[main.assertion.16\] .* assertion a\[i\]==0: Unknown$
+^\[main.assertion.17\] .* assertion a\[i\]==1: Unknown$
+^\[main.assertion.18\] .* assertion a\[j\]==0: Unknown$
+^\[main.assertion.19\] .* assertion a\[j\]==1: Unknown$
+^\[main.assertion.20\] .* assertion b\[i\]==1: Unknown$
+^\[main.assertion.21\] .* assertion b\[i\]==0: Unknown$
+^\[main.assertion.22\] .* assertion b\[j\]==0: Unknown$
+^\[main.assertion.23\] .* assertion b\[j\]==1: Unknown$
+^\[main.assertion.24\] .* assertion a\[100\]==0: Unknown$
+^\[main.assertion.25\] .* assertion b\[1\]==0: Unknown$
+^\[main.assertion.26\] .* assertion ei\[0\]==1: Unknown$
+^\[main.assertion.27\] .* assertion ei\[0\]==0: Unknown$
+^\[main.assertion.28\] .* assertion ei\[2\]==0: Unknown$
+^\[main.assertion.29\] .* assertion ei\[2\]==1: Unknown$
+^\[main.assertion.30\] .* assertion ej\[0\]==0: Unknown$
+^\[main.assertion.31\] .* assertion ej\[2\]==0: Unknown$
+^\[main.assertion.32\] .* assertion ek\[0\]==0: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/sensitivity_test_two_value_pointer_to_two_value_array.c b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/sensitivity_test_two_value_pointer_to_two_value_array.c
new file mode 100644
index 00000000000..082fe2e62c8
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/sensitivity_test_two_value_pointer_to_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/test.desc
new file mode 100644
index 00000000000..974705f9fc1
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-array/test.desc
@@ -0,0 +1,21 @@
+FUTURE
+sensitivity_test_two_value_pointer_to_two_value_array.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion p==&a\[0\]: Unknown$
+^\[main.assertion.2\] .* assertion \*p==1: Unknown$
+^\[main.assertion.3\] .* assertion q==p\+1: Unknown$
+^\[main.assertion.4\] .* assertion \*q==2: Unknown$
+^\[main.assertion.5\] .* assertion q-p==x: Unknown$
+^\[main.assertion.6\] .* assertion a\[1\]==4: Unknown$
+^\[main.assertion.7\] .* assertion \*r==2: Unknown$
+^\[main.assertion.8\] .* assertion \*r==1: Unknown$
+^\[main.assertion.9\] .* assertion \*s==0: Unknown$
+^\[main.assertion.10\] .* assertion \*s==1: Unknown$
+^\[main.assertion.11\] .* assertion t==p\+i: Unknown$
+^\[main.assertion.12\] .* assertion t-p==y: Unknown$
+^\[main.assertion.13\] .* assertion a\[i\]==5: Unknown$
+^\[main.assertion.14\] .* assertion a\[1\]==5: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/sensitivity_test_two_value_pointer_to_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/sensitivity_test_two_value_pointer_to_two_value_pointer.c
new file mode 100644
index 00000000000..56e6edc1093
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/sensitivity_test_two_value_pointer_to_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/test.desc
new file mode 100644
index 00000000000..e3582834688
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-pointer/test.desc
@@ -0,0 +1,13 @@
+FUTURE
+sensitivity_test_two_value_pointer_to_two_value_pointer.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion \*\*x==0: Unknown$
+^\[main.assertion.2\] .* assertion \*\*x==1: Unknown$
+^\[main.assertion.3\] .* assertion \*\*x==1: Unknown$
+^\[main.assertion.4\] .* assertion \*\*x==0: Unknown$
+^\[main.assertion.5\] .* assertion a==2: Unknown$
+^\[main.assertion.6\] .* assertion a==1: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/sensitivity_test_two_value_pointer_to_two_value_struct.c b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/sensitivity_test_two_value_pointer_to_two_value_struct.c
new file mode 100644
index 00000000000..8f86047a407
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/sensitivity_test_two_value_pointer_to_two_value_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_to_struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/test.desc
new file mode 100644
index 00000000000..56a0be48407
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer-to-two-value-struct/test.desc
@@ -0,0 +1,13 @@
+FUTURE
+sensitivity_test_two_value_pointer_to_two_value_struct.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion \(\*p\).a==0: Unknown$
+^\[main.assertion.2\] .* assertion \(\*p\).a==1: Unknown$
+^\[main.assertion.3\] .* assertion p->a==0: Unknown$
+^\[main.assertion.4\] .* assertion p->a==1: Unknown$
+^\[main.assertion.5\] .* assertion p->b==2.0: Unknown$
+^\[main.assertion.6\] .* assertion p->b==1.0: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer/sensitivity_test_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-two-value-pointer/sensitivity_test_two_value_pointer.c
new file mode 100644
index 00000000000..a2167bc68f4
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer/sensitivity_test_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-pointer/test.desc
new file mode 100644
index 00000000000..da9abe2464f
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-pointer/test.desc
@@ -0,0 +1,21 @@
+FUTURE
+sensitivity_test_two_value_pointer.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x==&a: Unknown$
+^\[main.assertion.2\] .* assertion x==&b: Unknown$
+^\[main.assertion.3\] .* assertion x==x2: Unknown$
+^\[main.assertion.4\] .* assertion x==y: Unknown$
+^\[main.assertion.5\] .* assertion \*x==0: Unknown$
+^\[main.assertion.6\] .* assertion \*x==1: Unknown$
+^\[main.assertion.7\] .* assertion \*x==1: Unknown$
+^\[main.assertion.8\] .* assertion \*x==0: Unknown$
+^\[main.assertion.9\] .* assertion a==2: Unknown$
+^\[main.assertion.10\] .* assertion a==0: Unknown$
+^\[main.assertion.11\] .* assertion x==&a: Unknown$
+^\[main.assertion.12\] .* assertion \*x==0: Unknown$
+^\[main.assertion.13\] .* assertion x==&a: Unknown$
+^\[main.assertion.14\] .* assertion x==&b: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/sensitivity_test_two_value_struct_of_two_value_array.c b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/sensitivity_test_two_value_struct_of_two_value_array.c
new file mode 100644
index 00000000000..d50aea1ea24
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/sensitivity_test_two_value_struct_of_two_value_array.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_array_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/test.desc
new file mode 100644
index 00000000000..e8773cf68fc
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-array/test.desc
@@ -0,0 +1,24 @@
+FUTURE
+sensitivity_test_two_value_struct_of_two_value_array.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.2\] .* assertion \*\(x.a\+0\)==0: Unknown$
+^\[main.assertion.3\] .* assertion \*\(0\+x.a\)==0: Unknown$
+^\[main.assertion.4\] .* assertion 0\[x.a\]==0: Unknown$
+^\[main.assertion.5\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.6\] .* assertion x.a\[1\]==1: Unknown$
+^\[main.assertion.7\] .* assertion x.b\[0\]==3.0f: Unknown$
+^\[main.assertion.8\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.9\] .* assertion x.a\[1\]==1: Unknown$
+^\[main.assertion.10\] .* assertion x.b\[2\]>0.0f: Unknown$
+^\[main.assertion.11\] .* assertion x.b\[2\]==15.0f: Unknown$
+^\[main.assertion.12\] .* assertion x.b\[2\]==1.0f: Unknown$
+^\[main.assertion.13\] .* assertion x.b\[0\]==3.0f: Unknown$
+^\[main.assertion.14\] .* assertion x.a\[0\]<12: Unknown$
+^\[main.assertion.15\] .* assertion x.a\[0\]>2: Unknown$
+^\[main.assertion.16\] .* assertion x.a\[0\]==0: Unknown$
+^\[main.assertion.17\] .* assertion x.a\[1\]==1: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/sensitivity_test_two_value_struct_of_two_value_pointer.c b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/sensitivity_test_two_value_struct_of_two_value_pointer.c
new file mode 100644
index 00000000000..ab7d896ae5d
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/sensitivity_test_two_value_struct_of_two_value_pointer.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_pointer_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/test.desc
new file mode 100644
index 00000000000..06ebb29d047
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-pointer/test.desc
@@ -0,0 +1,33 @@
+FUTURE
+sensitivity_test_two_value_struct_of_two_value_pointer.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.2\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.3\] .* assertion x.b==&b1: Unknown$
+^\[main.assertion.4\] .* assertion x.b==&b2: Unknown$
+^\[main.assertion.5\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.6\] .* assertion \*x.a==100: Unknown$
+^\[main.assertion.7\] .* assertion \*x.b==10.0f: Unknown$
+^\[main.assertion.8\] .* assertion \*x.b==110.0f: Unknown$
+^\[main.assertion.9\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.10\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.11\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.12\] .* assertion \*x.a==100: Unknown$
+^\[main.assertion.13\] .* assertion x.a==&a1: Unknown$
+^\[main.assertion.14\] .* assertion x.b==&b2: Unknown$
+^\[main.assertion.15\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.16\] .* assertion \*x.a==0: Unknown$
+^\[main.assertion.17\] .* assertion \*x.b==11.0f: Unknown$
+^\[main.assertion.18\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.19\] .* assertion x.a==&a2: Unknown$
+^\[main.assertion.20\] .* assertion x.a==&a3: Unknown$
+^\[main.assertion.21\] .* assertion x.b==&b3: Unknown$
+^\[main.assertion.22\] .* assertion x.b==&b4: Unknown$
+^\[main.assertion.23\] .* assertion \*x.a==1: Unknown$
+^\[main.assertion.24\] .* assertion \*x.a==2: Unknown$
+^\[main.assertion.25\] .* assertion \*x.b==12.0f: Unknown$
+^\[main.assertion.26\] .* assertion \*x.b==13.0f: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/sensitivity_test_two_value_struct_of_two_value_struct.c b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/sensitivity_test_two_value_struct_of_two_value_struct.c
new file mode 100644
index 00000000000..ae2ab34d038
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/sensitivity_test_two_value_struct_of_two_value_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_of_struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/test.desc
new file mode 100644
index 00000000000..450055d2be6
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct-of-two-value-struct/test.desc
@@ -0,0 +1,18 @@
+FUTURE
+sensitivity_test_two_value_struct_of_two_value_struct.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.s1.a==0: Unknown$
+^\[main.assertion.2\] .* assertion x.s2.b==3.0f: Unknown$
+^\[main.assertion.3\] .* assertion x.s1.a==0: Unknown$
+^\[main.assertion.4\] .* assertion x.s1.a==10: Unknown$
+^\[main.assertion.5\] .* assertion x.s1.b==1.0f: Unknown$
+^\[main.assertion.6\] .* assertion x.s2.b==3.0f: Unknown$
+^\[main.assertion.7\] .* assertion x.s2.b==0.0f: Unknown$
+^\[main.assertion.8\] .* assertion x.s1.a==20: Unknown$
+^\[main.assertion.9\] .* assertion x.s1.a<30: Unknown$
+^\[main.assertion.10\] .* assertion x.s2.a==22: Unknown$
+^\[main.assertion.11\] .* assertion x.s2.a<30: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct/sensitivity_test_two_value_struct.c b/regression/goto-analyzer/sensitivity-test-two-value-struct/sensitivity_test_two_value_struct.c
new file mode 100644
index 00000000000..946ec769d9e
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct/sensitivity_test_two_value_struct.c
@@ -0,0 +1 @@
+#include "../sensitivity-test-common-files/struct_sensitivity_tests.c"
diff --git a/regression/goto-analyzer/sensitivity-test-two-value-struct/test.desc b/regression/goto-analyzer/sensitivity-test-two-value-struct/test.desc
new file mode 100644
index 00000000000..157a3b25968
--- /dev/null
+++ b/regression/goto-analyzer/sensitivity-test-two-value-struct/test.desc
@@ -0,0 +1,16 @@
+FUTURE
+sensitivity_test_two_value_struct.c
+--variable --verify
+^EXIT=0$
+^SIGNAL=0$
+^\[main.assertion.1\] .* assertion x.a==0: Unknown$
+^\[main.assertion.2\] .* assertion x.a==1: Unknown$
+^\[main.assertion.3\] .* assertion x.a==0: Unknown$
+^\[main.assertion.4\] .* assertion x.a==0: Unknown$
+^\[main.assertion.5\] .* assertion x.b>0.0f: Unknown$
+^\[main.assertion.6\] .* assertion x.b==1.0f: Unknown$
+^\[main.assertion.7\] .* assertion x.a<2: Unknown$
+^\[main.assertion.8\] .* assertion x.a>2: Unknown$
+^\[main.assertion.9\] .* assertion x.a==1: Unknown$
+--
+^warning: ignoring
diff --git a/regression/goto-instrument-typedef/Makefile b/regression/goto-instrument-typedef/Makefile
new file mode 100644
index 00000000000..08fe97ae88c
--- /dev/null
+++ b/regression/goto-instrument-typedef/Makefile
@@ -0,0 +1,31 @@
+
+default: tests.log
+
+test:
+ @if ! ../test.pl -c ../chain.sh ; then \
+ ../failed-tests-printer.pl ; \
+ exit 1; \
+ fi
+
+tests.log:
+ @if ! ../test.pl -c ../chain.sh ; then \
+ ../failed-tests-printer.pl ; \
+ exit 1; \
+ fi
+
+show:
+ @for dir in *; do \
+ if [ -d "$$dir" ]; then \
+ vim -o "$$dir/*.c" "$$dir/*.out"; \
+ fi; \
+ done;
+
+clean:
+ @for dir in *; do \
+ rm -f tests.log; \
+ if [ -d "$$dir" ]; then \
+ cd "$$dir"; \
+ rm -f *.out *.gb; \
+ cd ..; \
+ fi \
+ done
diff --git a/regression/goto-instrument-typedef/chain.sh b/regression/goto-instrument-typedef/chain.sh
new file mode 100755
index 00000000000..9cef4ffdfa4
--- /dev/null
+++ b/regression/goto-instrument-typedef/chain.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+SRC=../../../src
+
+GC=$SRC/goto-cc/goto-cc
+GI=$SRC/goto-instrument/goto-instrument
+
+OPTS=$1
+NAME=${2%.c}
+
+rm $NAME.gb
+$GC $NAME.c --function fun -o $NAME.gb
+echo $GI $OPTS $NAME.gb
+$GI $OPTS $NAME.gb
diff --git a/regression/goto-instrument-typedef/typedef-anon-struct1/main.c b/regression/goto-instrument-typedef/typedef-anon-struct1/main.c
new file mode 100644
index 00000000000..d1e7196a3b1
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-struct1/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-anon-struct1/test.desc b/regression/goto-instrument-typedef/typedef-anon-struct1/test.desc
new file mode 100644
index 00000000000..59aba0e01a6
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-struct1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-anon-struct2/main.c b/regression/goto-instrument-typedef/typedef-anon-struct2/main.c
new file mode 100644
index 00000000000..35475513f7d
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-struct2/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ MYSTRUCT mystruct_var = {.x = 10, .y = 3.1f}, another_mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-anon-struct2/test.desc b/regression/goto-instrument-typedef/typedef-anon-struct2/test.desc
new file mode 100644
index 00000000000..490b6cc2623
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-struct2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+Base name\.+: another_mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-anon-union1/main.c b/regression/goto-instrument-typedef/typedef-anon-union1/main.c
new file mode 100644
index 00000000000..9322c77cb6e
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-union1/main.c
@@ -0,0 +1,11 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-anon-union1/test.desc b/regression/goto-instrument-typedef/typedef-anon-union1/test.desc
new file mode 100644
index 00000000000..86caf078d6a
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-anon-union2/main.c b/regression/goto-instrument-typedef/typedef-anon-union2/main.c
new file mode 100644
index 00000000000..b2dd6594432
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-union2/main.c
@@ -0,0 +1,11 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ MYUNION myunion_var = {.y = 2.1f}, another_myunion_var = {.y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-anon-union2/test.desc b/regression/goto-instrument-typedef/typedef-anon-union2/test.desc
new file mode 100644
index 00000000000..8d8ca64aa93
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-anon-union2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+Base name\.+: another_myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-const-struct1/main.c b/regression/goto-instrument-typedef/typedef-const-struct1/main.c
new file mode 100644
index 00000000000..ab8137e82e4
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ const struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ const MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-const-struct1/test.desc b/regression/goto-instrument-typedef/typedef-const-struct1/test.desc
new file mode 100644
index 00000000000..a6aad1f799a
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: const struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: const MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-const-type1/main.c b/regression/goto-instrument-typedef/typedef-const-type1/main.c
new file mode 100644
index 00000000000..8cd4a4346eb
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-type1/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ const int int_var = 3;
+ const MYINT myint_var = 5;
+}
diff --git a/regression/goto-instrument-typedef/typedef-const-type1/test.desc b/regression/goto-instrument-typedef/typedef-const-type1/test.desc
new file mode 100644
index 00000000000..481b097653f
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: const signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: const MYINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-const-union1/main.c b/regression/goto-instrument-typedef/typedef-const-union1/main.c
new file mode 100644
index 00000000000..b8defe635a6
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-union1/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ const union tag_union_name tag_union_var = {1};
+ const MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-const-union1/test.desc b/regression/goto-instrument-typedef/typedef-const-union1/test.desc
new file mode 100644
index 00000000000..cd303b85195
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-const-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: const union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: const MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-anon-struct1/main.c b/regression/goto-instrument-typedef/typedef-param-anon-struct1/main.c
new file mode 100644
index 00000000000..e8f3fb8fd7c
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-anon-struct1/main.c
@@ -0,0 +1,11 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun(MYSTRUCT mystruct_param)
+{
+
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-anon-struct1/test.desc b/regression/goto-instrument-typedef/typedef-param-anon-struct1/test.desc
new file mode 100644
index 00000000000..537526b4422
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-anon-struct1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: mystruct_param\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-anon-union1/main.c b/regression/goto-instrument-typedef/typedef-param-anon-union1/main.c
new file mode 100644
index 00000000000..71791d9adfc
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-anon-union1/main.c
@@ -0,0 +1,10 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun(MYUNION myunion_param)
+{
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-anon-union1/test.desc b/regression/goto-instrument-typedef/typedef-param-anon-union1/test.desc
new file mode 100644
index 00000000000..270316982a3
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: myunion_param\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-struct1/main.c b/regression/goto-instrument-typedef/typedef-param-struct1/main.c
new file mode 100644
index 00000000000..a358c15a030
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-struct1/main.c
@@ -0,0 +1,10 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun(struct tag_struct_name tag_struct_param, MYSTRUCT mystruct_param)
+{
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-struct1/test.desc b/regression/goto-instrument-typedef/typedef-param-struct1/test.desc
new file mode 100644
index 00000000000..c26ee458459
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_param\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_param\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-type1/main.c b/regression/goto-instrument-typedef/typedef-param-type1/main.c
new file mode 100644
index 00000000000..b4c915066b6
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type1/main.c
@@ -0,0 +1,7 @@
+
+typedef int MYINT;
+
+void fun(int int_param, MYINT myint_param)
+{
+
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-type1/test.desc b/regression/goto-instrument-typedef/typedef-param-type1/test.desc
new file mode 100644
index 00000000000..050ac22b315
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-type2/main.c b/regression/goto-instrument-typedef/typedef-param-type2/main.c
new file mode 100644
index 00000000000..b5974fb6bbb
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type2/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+void fun(int int_param, MYINT myint_param, ALTINT altint_param)
+{
+
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-type2/test.desc b/regression/goto-instrument-typedef/typedef-param-type2/test.desc
new file mode 100644
index 00000000000..53cdc42193e
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type2/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+Base name\.+: altint_param\nMode\.+: C\nType\.+: ALTINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-type3/main.c b/regression/goto-instrument-typedef/typedef-param-type3/main.c
new file mode 100644
index 00000000000..4d542e10c13
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type3/main.c
@@ -0,0 +1,7 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+void fun(int int_param, MYINT myint_param, CHAINEDINT chainedint_param)
+{
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-type3/test.desc b/regression/goto-instrument-typedef/typedef-param-type3/test.desc
new file mode 100644
index 00000000000..6ba9d61f8ca
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-type3/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_param\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_param\nMode\.+: C\nType\.+: MYINT
+Base name\.+: chainedint_param\nMode\.+: C\nType\.+: CHAINEDINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-param-union1/main.c b/regression/goto-instrument-typedef/typedef-param-union1/main.c
new file mode 100644
index 00000000000..8f961614e5d
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-union1/main.c
@@ -0,0 +1,10 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun(union tag_union_name tag_union_param, MYUNION myunion_param)
+{
+}
diff --git a/regression/goto-instrument-typedef/typedef-param-union1/test.desc b/regression/goto-instrument-typedef/typedef-param-union1/test.desc
new file mode 100644
index 00000000000..466dd76ed52
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-param-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_param\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_param\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-anon-struct1/main.c b/regression/goto-instrument-typedef/typedef-return-anon-struct1/main.c
new file mode 100644
index 00000000000..0195b955cdd
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-anon-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+MYSTRUCT fun()
+{
+ MYSTRUCT return_variable = {.x = 1, .y = 3.14f};
+ return return_variable;
+}
diff --git a/regression/goto-instrument-typedef/typedef-return-anon-struct1/test.desc b/regression/goto-instrument-typedef/typedef-return-anon-struct1/test.desc
new file mode 100644
index 00000000000..47964f71f66
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-anon-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: return\nMode\.+: C\nType\.+: MYSTRUCT
+Base name\.+: fun\nMode\.+: C\nType\.+: MYSTRUCT \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-anon-union1/main.c b/regression/goto-instrument-typedef/typedef-return-anon-union1/main.c
new file mode 100644
index 00000000000..3bc7d19d5b7
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-anon-union1/main.c
@@ -0,0 +1,15 @@
+
+typedef union
+{
+ int x;
+ float y;
+} MYUNION;
+
+
+MYUNION fun()
+{
+ MYUNION return_variable = {1};
+ return return_variable;
+}
+
+
diff --git a/regression/goto-instrument-typedef/typedef-return-anon-union1/test.desc b/regression/goto-instrument-typedef/typedef-return-anon-union1/test.desc
new file mode 100644
index 00000000000..5a8d1b2062d
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-anon-union1/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYUNION \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-struct1/main.c b/regression/goto-instrument-typedef/typedef-return-struct1/main.c
new file mode 100644
index 00000000000..30c1323555c
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-struct1/main.c
@@ -0,0 +1,20 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+struct tag_struct_name fun()
+{
+ struct tag_struct_name return_variable = { .x = 1, .y = 3.14f};
+ return return_variable;
+}
+
+MYSTRUCT fun2()
+{
+ MYSTRUCT return_variable = { .x = 1, .y = 3.14f};
+ return return_variable;
+}
+
+
diff --git a/regression/goto-instrument-typedef/typedef-return-struct1/test.desc b/regression/goto-instrument-typedef/typedef-return-struct1/test.desc
new file mode 100644
index 00000000000..eade5942ac8
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: struct tag_struct_name \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYSTRUCT \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-type1/main.c b/regression/goto-instrument-typedef/typedef-return-type1/main.c
new file mode 100644
index 00000000000..1ba7f426f89
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type1/main.c
@@ -0,0 +1,12 @@
+
+typedef int MYINT;
+
+int fun()
+{
+ return 4;
+}
+
+MYINT fun2()
+{
+ return 5;
+}
diff --git a/regression/goto-instrument-typedef/typedef-return-type1/test.desc b/regression/goto-instrument-typedef/typedef-return-type1/test.desc
new file mode 100644
index 00000000000..ba1b96ce6b6
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: signed int \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYINT \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-type2/main.c b/regression/goto-instrument-typedef/typedef-return-type2/main.c
new file mode 100644
index 00000000000..0d94ab54da3
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type2/main.c
@@ -0,0 +1,13 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+MYINT fun()
+{
+
+}
+
+ALTINT fun2()
+{
+
+}
diff --git a/regression/goto-instrument-typedef/typedef-return-type2/test.desc b/regression/goto-instrument-typedef/typedef-return-type2/test.desc
new file mode 100644
index 00000000000..1ecc9ea8e90
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYINT \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: ALTINT \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-type3/main.c b/regression/goto-instrument-typedef/typedef-return-type3/main.c
new file mode 100644
index 00000000000..e246757c692
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type3/main.c
@@ -0,0 +1,12 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+MYINT fun()
+{
+}
+
+CHAINEDINT fun2()
+{
+
+}
\ No newline at end of file
diff --git a/regression/goto-instrument-typedef/typedef-return-type3/test.desc b/regression/goto-instrument-typedef/typedef-return-type3/test.desc
new file mode 100644
index 00000000000..2401af3ce8d
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-type3/test.desc
@@ -0,0 +1,10 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+Base name\.+: fun\nMode\.+: C\nType\.+: MYINT \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: CHAINEDINT \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-return-union1/main.c b/regression/goto-instrument-typedef/typedef-return-union1/main.c
new file mode 100644
index 00000000000..ad69cb04545
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-union1/main.c
@@ -0,0 +1,20 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+union tag_union_name fun()
+{
+ union tag_union_name return_variable = {1};
+ return return_variable;
+}
+
+MYUNION fun2()
+{
+ MYUNION return_variable = {1};
+ return return_variable;
+}
+
+
diff --git a/regression/goto-instrument-typedef/typedef-return-union1/test.desc b/regression/goto-instrument-typedef/typedef-return-union1/test.desc
new file mode 100644
index 00000000000..0855b28f479
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-return-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: fun\nMode\.+: C\nType\.+: union tag_union_name \(\)
+Base name\.+: fun2\nMode\.+: C\nType\.+: MYUNION \(\)
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-struct1/main.c b/regression/goto-instrument-typedef/typedef-struct1/main.c
new file mode 100644
index 00000000000..dac5abf77b8
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-struct1/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-struct1/test.desc b/regression/goto-instrument-typedef/typedef-struct1/test.desc
new file mode 100644
index 00000000000..6a02f2d2174
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-struct1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-struct2/main.c b/regression/goto-instrument-typedef/typedef-struct2/main.c
new file mode 100644
index 00000000000..dac5abf77b8
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-struct2/main.c
@@ -0,0 +1,12 @@
+
+typedef struct tag_struct_name
+{
+ int x;
+ float y;
+} MYSTRUCT;
+
+void fun()
+{
+ struct tag_struct_name tag_struct_var = {.x = 1, .y = 3.14f};
+ MYSTRUCT mystruct_var = {.x = 3, .y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-struct2/test.desc b/regression/goto-instrument-typedef/typedef-struct2/test.desc
new file mode 100644
index 00000000000..6a02f2d2174
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-struct2/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_struct_var\nMode\.+: C\nType\.+: struct tag_struct_name
+Base name\.+: mystruct_var\nMode\.+: C\nType\.+: MYSTRUCT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-type1/main.c b/regression/goto-instrument-typedef/typedef-type1/main.c
new file mode 100644
index 00000000000..43f028c7772
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type1/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+}
diff --git a/regression/goto-instrument-typedef/typedef-type1/test.desc b/regression/goto-instrument-typedef/typedef-type1/test.desc
new file mode 100644
index 00000000000..7599f1759c0
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-type2/main.c b/regression/goto-instrument-typedef/typedef-type2/main.c
new file mode 100644
index 00000000000..acb1cce2da4
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type2/main.c
@@ -0,0 +1,10 @@
+
+typedef int MYINT;
+typedef int ALTINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+ ALTINT altint_var = 7;
+}
diff --git a/regression/goto-instrument-typedef/typedef-type2/test.desc b/regression/goto-instrument-typedef/typedef-type2/test.desc
new file mode 100644
index 00000000000..3cf1e50a5a5
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type2/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: altint_var\nMode\.+: C\nType\.+: ALTINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-type3/main.c b/regression/goto-instrument-typedef/typedef-type3/main.c
new file mode 100644
index 00000000000..5855e0c24cb
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type3/main.c
@@ -0,0 +1,10 @@
+
+typedef int MYINT;
+typedef MYINT CHAINEDINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5;
+ CHAINEDINT chainedint_var = 5;
+}
diff --git a/regression/goto-instrument-typedef/typedef-type3/test.desc b/regression/goto-instrument-typedef/typedef-type3/test.desc
new file mode 100644
index 00000000000..aca9069695c
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type3/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: chainedint_var\nMode\.+: C\nType\.+: CHAINEDINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-type4/main.c b/regression/goto-instrument-typedef/typedef-type4/main.c
new file mode 100644
index 00000000000..aa2ec9ad7fb
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type4/main.c
@@ -0,0 +1,8 @@
+
+typedef int MYINT;
+
+void fun()
+{
+ int int_var = 3;
+ MYINT myint_var = 5, another_myint_var = 10;
+}
diff --git a/regression/goto-instrument-typedef/typedef-type4/test.desc b/regression/goto-instrument-typedef/typedef-type4/test.desc
new file mode 100644
index 00000000000..28163714070
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-type4/test.desc
@@ -0,0 +1,12 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: int_var\nMode\.+: C\nType\.+: signed int
+Base name\.+: myint_var\nMode\.+: C\nType\.+: MYINT
+Base name\.+: another_myint_var\nMode\.+: C\nType\.+: MYINT
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-union1/main.c b/regression/goto-instrument-typedef/typedef-union1/main.c
new file mode 100644
index 00000000000..6f56f3c731b
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-union1/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ union tag_union_name tag_union_var = {1};
+ MYUNION myunion_var = {.y = 2.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-union1/test.desc b/regression/goto-instrument-typedef/typedef-union1/test.desc
new file mode 100644
index 00000000000..8502d149cb1
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-union1/test.desc
@@ -0,0 +1,11 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-typedef/typedef-union2/main.c b/regression/goto-instrument-typedef/typedef-union2/main.c
new file mode 100644
index 00000000000..9ca707cf767
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-union2/main.c
@@ -0,0 +1,12 @@
+
+typedef union tag_union_name
+{
+ int x;
+ float y;
+} MYUNION;
+
+void fun()
+{
+ union tag_union_name tag_union_var = {1}, another_tag_union_var = {1};
+ MYUNION myunion_var = {.y = 2.1f}, another_myunion_var = {.y = 3.1f};
+}
diff --git a/regression/goto-instrument-typedef/typedef-union2/test.desc b/regression/goto-instrument-typedef/typedef-union2/test.desc
new file mode 100644
index 00000000000..0fc908a6ab5
--- /dev/null
+++ b/regression/goto-instrument-typedef/typedef-union2/test.desc
@@ -0,0 +1,13 @@
+CORE
+main.c
+"--show-symbol-table"
+// Enable multi-line checking
+activate-multi-line-match
+EXIT=0
+SIGNAL=0
+Base name\.+: tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: another_tag_union_var\nMode\.+: C\nType\.+: union tag_union_name
+Base name\.+: myunion_var\nMode\.+: C\nType\.+: MYUNION
+Base name\.+: another_myunion_var\nMode\.+: C\nType\.+: MYUNION
+--
+warning: ignoring
diff --git a/regression/goto-instrument-wmm-core/Makefile b/regression/goto-instrument-wmm-core/Makefile
index c1f99d1da81..85c17bf622b 100644
--- a/regression/goto-instrument-wmm-core/Makefile
+++ b/regression/goto-instrument-wmm-core/Makefile
@@ -21,7 +21,7 @@ tests.log: ../test.pl
clean:
@for dir in *; do \
if [ -d "$$dir" ]; then \
- rm $$dir/*.txt $$dir/*.dot $$dir/*.gb $$dir/*.out; \
+ $(RM) $$dir/*.txt $$dir/*.dot $$dir/*.gb $$dir/*.out; \
fi; \
done;
diff --git a/regression/goto-instrument/Makefile b/regression/goto-instrument/Makefile
index 08fe97ae88c..94605814b4a 100644
--- a/regression/goto-instrument/Makefile
+++ b/regression/goto-instrument/Makefile
@@ -22,10 +22,10 @@ show:
clean:
@for dir in *; do \
- rm -f tests.log; \
+ $(RM) tests.log; \
if [ -d "$$dir" ]; then \
cd "$$dir"; \
- rm -f *.out *.gb; \
+ $(RM) *.out *.gb; \
cd ..; \
fi \
done
diff --git a/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/main.c b/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/main.c
new file mode 100644
index 00000000000..3fb230c83fd
--- /dev/null
+++ b/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/main.c
@@ -0,0 +1,34 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ fp_tbl[i]();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
\ No newline at end of file
diff --git a/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/test.desc b/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/test.desc
new file mode 100644
index 00000000000..bc553fa5a0f
--- /dev/null
+++ b/regression/goto-instrument/approx-array-variable-const-fp-only-remove-const/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-const-function-pointers
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f2 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f3 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f9 THEN GOTO [0-9]$
+^warning: ignoring
diff --git a/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/main.c b/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/main.c
new file mode 100644
index 00000000000..7896e3402c0
--- /dev/null
+++ b/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/main.c
@@ -0,0 +1,34 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+const void_fp fp_tbl[] = {f2, f3 ,f4};
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func(int i)
+{
+ fp_tbl[i]();
+}
+
+int main()
+{
+ for(int i=0;i<3;i++)
+ {
+ func(i);
+ }
+
+ return 0;
+}
diff --git a/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/test.desc b/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/test.desc
new file mode 100644
index 00000000000..e9ede02a296
--- /dev/null
+++ b/regression/goto-instrument/approx-array-variable-const-fp-remove-all-fp/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-function-pointers
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f2 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f3 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f4 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f1 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f5 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f6 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f7 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f8 THEN GOTO [0-9]$
+^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f9 THEN GOTO [0-9]$
+^warning: ignoring
diff --git a/regression/goto-instrument/no-match-non-const-fp-only-remove-const/main.c b/regression/goto-instrument/no-match-non-const-fp-only-remove-const/main.c
new file mode 100644
index 00000000000..80c8c863ff5
--- /dev/null
+++ b/regression/goto-instrument/no-match-non-const-fp-only-remove-const/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ void_fp fp = f2;
+ fp = f3;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-instrument/no-match-non-const-fp-only-remove-const/test.desc b/regression/goto-instrument/no-match-non-const-fp-only-remove-const/test.desc
new file mode 100644
index 00000000000..9c23726e83c
--- /dev/null
+++ b/regression/goto-instrument/no-match-non-const-fp-only-remove-const/test.desc
@@ -0,0 +1,7 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-const-function-pointers
+^\s*fp\(\);$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/main.c b/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/main.c
new file mode 100644
index 00000000000..80c8c863ff5
--- /dev/null
+++ b/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/main.c
@@ -0,0 +1,31 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ void_fp fp = f2;
+ fp = f3;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/test.desc b/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/test.desc
new file mode 100644
index 00000000000..46c2f8cd2d4
--- /dev/null
+++ b/regression/goto-instrument/no-match-non-const-fp-remove-all-fp/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-function-pointers
+^\s*IF fp == f1 THEN GOTO [0-9]$
+^\s*IF fp == f2 THEN GOTO [0-9]$
+^\s*IF fp == f3 THEN GOTO [0-9]$
+^\s*IF fp == f4 THEN GOTO [0-9]$
+^\s*IF fp == f5 THEN GOTO [0-9]$
+^\s*IF fp == f6 THEN GOTO [0-9]$
+^\s*IF fp == f7 THEN GOTO [0-9]$
+^\s*IF fp == f8 THEN GOTO [0-9]$
+^\s*IF fp == f9 THEN GOTO [0-9]$
+^SIGNAL=0$
+--
+^warning: ignoring
diff --git a/regression/goto-instrument/precise-const-fp-only-remove-const/main.c b/regression/goto-instrument/precise-const-fp-only-remove-const/main.c
new file mode 100644
index 00000000000..b4002c94e5e
--- /dev/null
+++ b/regression/goto-instrument/precise-const-fp-only-remove-const/main.c
@@ -0,0 +1,30 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-instrument/precise-const-fp-only-remove-const/test.desc b/regression/goto-instrument/precise-const-fp-only-remove-const/test.desc
new file mode 100644
index 00000000000..cdf49005c0b
--- /dev/null
+++ b/regression/goto-instrument/precise-const-fp-only-remove-const/test.desc
@@ -0,0 +1,6 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-const-function-pointers
+^\s*f2\(\);
+--
+^warning: ignoring
diff --git a/regression/goto-instrument/precise-const-fp-remove-all-fp/main.c b/regression/goto-instrument/precise-const-fp-remove-all-fp/main.c
new file mode 100644
index 00000000000..b4002c94e5e
--- /dev/null
+++ b/regression/goto-instrument/precise-const-fp-remove-all-fp/main.c
@@ -0,0 +1,30 @@
+#include
+
+void f1 (void) { printf("%i\n", 1); }
+void f2 (void) { printf("%i\n", 2); }
+void f3 (void) { printf("%i\n", 3); }
+void f4 (void) { printf("%i\n", 4); }
+void f5 (void) { printf("%i\n", 5); }
+void f6 (void) { printf("%i\n", 6); }
+void f7 (void) { printf("%i\n", 7); }
+void f8 (void) { printf("%i\n", 8); }
+void f9 (void) { printf("%i\n", 9); }
+
+typedef void(*void_fp)(void);
+
+// There is a basic check that excludes all functions that aren't used anywhere
+// This ensures that check can't work in this example
+const void_fp fp_all[] = {f1, f2 ,f3, f4, f5 ,f6, f7, f8, f9};
+
+void func()
+{
+ const void_fp fp = f2;
+ fp();
+}
+
+int main()
+{
+ func();
+
+ return 0;
+}
diff --git a/regression/goto-instrument/precise-const-fp-remove-all-fp/test.desc b/regression/goto-instrument/precise-const-fp-remove-all-fp/test.desc
new file mode 100644
index 00000000000..a559b2b1747
--- /dev/null
+++ b/regression/goto-instrument/precise-const-fp-remove-all-fp/test.desc
@@ -0,0 +1,6 @@
+CORE
+main.c
+--verbosity 10 --pointer-check --remove-function-pointers
+^\s*f2\(\);
+--
+^warning: ignoring
diff --git a/regression/k-induction/Makefile b/regression/k-induction/Makefile
index 009b420f259..bfd7ece4734 100644
--- a/regression/k-induction/Makefile
+++ b/regression/k-induction/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/symex-infeasibility/Makefile b/regression/symex-infeasibility/Makefile
index d8a99eec731..120e9a347c0 100644
--- a/regression/symex-infeasibility/Makefile
+++ b/regression/symex-infeasibility/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/symex/Makefile b/regression/symex/Makefile
index d8a99eec731..120e9a347c0 100644
--- a/regression/symex/Makefile
+++ b/regression/symex/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.c" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/taint/Makefile b/regression/taint/Makefile
index 5701431a37e..40dbe9c53be 100644
--- a/regression/taint/Makefile
+++ b/regression/taint/Makefile
@@ -12,3 +12,8 @@ show:
vim -o "$$dir/*.java" "$$dir/*.out"; \
fi; \
done;
+
+clean:
+ find -name '*.out' -execdir $(RM) '{}' \;
+ find -name '*.gb' -execdir $(RM) '{}' \;
+ $(RM) tests.log
diff --git a/regression/test-script/Makefile b/regression/test-script/Makefile
index ba7db5e6250..ee6eaf02884 100644
--- a/regression/test-script/Makefile
+++ b/regression/test-script/Makefile
@@ -37,10 +37,10 @@ show:
clean:
@for dir in *; do \
- rm -f tests.log; \
+ $(RM) tests.log; \
if [ -d "$$dir" ]; then \
cd "$$dir"; \
- rm -f *.out *.gb; \
+ $(RM) *.out *.gb; \
cd ..; \
fi \
done
diff --git a/src/analyses/Makefile b/src/analyses/Makefile
index 89f14e4f768..e05d5be0c42 100644
--- a/src/analyses/Makefile
+++ b/src/analyses/Makefile
@@ -6,7 +6,9 @@ SRC = natural_loops.cpp is_threaded.cpp dirty.cpp interval_analysis.cpp \
local_bitvector_analysis.cpp dependence_graph.cpp \
constant_propagator.cpp replace_symbol_ext.cpp \
flow_insensitive_analysis.cpp \
- custom_bitvector_analysis.cpp escape_analysis.cpp global_may_alias.cpp
+ custom_bitvector_analysis.cpp escape_analysis.cpp global_may_alias.cpp \
+ does_remove_const.cpp \
+ # Empty last line
INCLUDES= -I ..
diff --git a/src/analyses/ai.cpp b/src/analyses/ai.cpp
index 06dd02af83f..2d1f4f6b986 100644
--- a/src/analyses/ai.cpp
+++ b/src/analyses/ai.cpp
@@ -81,6 +81,158 @@ void ai_baset::output(
/*******************************************************************\
+Function: ai_baset::output_json
+
+ Inputs: The namespace and goto_functions
+
+ Outputs: The JSON object
+
+ Purpose: Output the domains for the whole program as JSON
+
+\*******************************************************************/
+
+jsont ai_baset::output_json(
+ const namespacet &ns,
+ const goto_functionst &goto_functions) const
+{
+ json_objectt result;
+
+ forall_goto_functions(f_it, goto_functions)
+ {
+ if(f_it->second.body_available())
+ {
+ result[id2string(f_it->first)]=
+ output_json(ns, f_it->second.body, f_it->first);
+ }
+ else
+ {
+ result[id2string(f_it->first)]=json_arrayt();
+ }
+ }
+
+ return result;
+}
+
+/*******************************************************************\
+
+Function: ai_baset::output_json
+
+ Inputs: The namespace, goto_program and it's identifier
+
+ Outputs: The JSON object
+
+ Purpose: Output the domains for a single function as JSON
+
+\*******************************************************************/
+
+jsont ai_baset::output_json(
+ const namespacet &ns,
+ const goto_programt &goto_program,
+ const irep_idt &identifier) const
+{
+ json_arrayt contents;
+
+ forall_goto_program_instructions(i_it, goto_program)
+ {
+ json_objectt location;
+ location["locationNumber"]=
+ json_numbert(std::to_string(i_it->location_number));
+ location["sourceLocation"]=
+ json_stringt(i_it->source_location.as_string());
+ location["domain"]=find_state(i_it).output_json(*this, ns);
+
+ // Ideally we need output_instruction_json
+ std::ostringstream out;
+ goto_program.output_instruction(ns, identifier, out, i_it);
+ location["instruction"]=json_stringt(out.str());
+
+ contents.push_back(location);
+ }
+
+ return contents;
+}
+
+/*******************************************************************\
+
+Function: ai_baset::output_xml
+
+ Inputs: The namespace and goto_functions
+
+ Outputs: The XML object
+
+ Purpose: Output the domains for the whole program as XML
+
+\*******************************************************************/
+
+xmlt ai_baset::output_xml(
+ const namespacet &ns,
+ const goto_functionst &goto_functions) const
+{
+ xmlt program("program");
+
+ forall_goto_functions(f_it, goto_functions)
+ {
+ xmlt function("function");
+ function.set_attribute("name", id2string(f_it->first));
+ function.set_attribute(
+ "body_available",
+ f_it->second.body_available() ? "true" : "false");
+
+ if(f_it->second.body_available())
+ {
+ function.new_element(output_xml(ns, f_it->second.body, f_it->first));
+ }
+
+ program.new_element(function);
+ }
+
+ return program;
+}
+
+/*******************************************************************\
+
+Function: ai_baset::output_xml
+
+ Inputs: The namespace, goto_program and it's identifier
+
+ Outputs: The XML object
+
+ Purpose: Output the domains for a single function as XML
+
+\*******************************************************************/
+
+xmlt ai_baset::output_xml(
+ const namespacet &ns,
+ const goto_programt &goto_program,
+ const irep_idt &identifier) const
+{
+ xmlt function_body;
+
+ forall_goto_program_instructions(i_it, goto_program)
+ {
+ xmlt location;
+ location.set_attribute(
+ "location_number",
+ std::to_string(i_it->location_number));
+ location.set_attribute(
+ "source_location",
+ i_it->source_location.as_string());
+
+ location.new_element(find_state(i_it).output_xml(*this, ns));
+
+ // Ideally we need output_instruction_xml
+ std::ostringstream out;
+ goto_program.output_instruction(ns, identifier, out, i_it);
+ location.set_attribute("instruction", out.str());
+
+ function_body.new_element(location);
+ }
+
+ return function_body;
+}
+
+/*******************************************************************\
+
Function: ai_baset::entry_state
Inputs:
diff --git a/src/analyses/ai.h b/src/analyses/ai.h
index c506cbbeb08..2894cde3b10 100644
--- a/src/analyses/ai.h
+++ b/src/analyses/ai.h
@@ -11,6 +11,10 @@ Author: Daniel Kroening, kroening@kroening.com
#include