Skip to content

Merge develop 20170914 #1388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
8584bb0
Add nonstd/optional.hpp library
Aug 23, 2017
43d0602
Add unit tests for nonstd::optional
Aug 25, 2017
4dbf939
Manually fix optional
Aug 30, 2017
ae584df
Move optional unit tests into util directory
Sep 1, 2017
ebbbf5f
Make goto_modelt.output const
Sep 1, 2017
567eaa7
Make basic_blockst.output const
Sep 5, 2017
9be84ea
Make automatont.output const
Sep 5, 2017
211fcc2
Make path_nodet.output const
Sep 5, 2017
388a25e
Make uncaught_exceptions_analysis.output const
Sep 5, 2017
254f133
Merge pull request #1323 from janmroczkowski/janmroczkowski/goto_mode…
Sep 7, 2017
d79067e
Remove long-deprecated c_sizeof in favour of size_of_expr et al.
tautschnig Apr 7, 2017
1fa569f
sizeof(*(void*)) is sizeof(char)
tautschnig Aug 7, 2017
3273bf5
Fix type casts from initializer lists to arrays of unspecified size
tautschnig Aug 18, 2017
3613ebc
When possible, update array types before typechecking initializer
tautschnig Aug 18, 2017
f6d94cf
clean out an unused method
Sep 7, 2017
296349c
Add dry-run mode to test.pl
smowton Sep 7, 2017
359a3e3
Modified verbosity for loaded message
Sep 7, 2017
56b5e25
Merge pull request #1358 from thk123/feature/decrease-message-spam
Sep 7, 2017
1c8d81a
Merge pull request #1356 from smowton/smowton/feature/test_pl_add_dry…
smowton Sep 7, 2017
2217501
Remove unused files
reuk Sep 7, 2017
5863a75
Merge pull request #1333 from tautschnig/remove-c_sizeof
tautschnig Sep 8, 2017
4928f69
Diagnostic output if run/execve fails
tautschnig Jul 29, 2017
08a4077
Make the child process that failed to execvp exit
tautschnig Sep 8, 2017
435c0bf
Merge pull request #1321 from reuk/reuk/remove-unused-files
tautschnig Sep 8, 2017
c125146
Merge pull request #1245 from tautschnig/run-diagnostic
Sep 8, 2017
40fe0f8
simplify API of goto_convert
Aug 22, 2017
9469552
use initialize_goto_model in CBMC/goto-analyse/etc
Aug 25, 2017
fc4d44a
use goto_modelt
Sep 7, 2017
e4498ca
brief list of symbols, from language_uit
Aug 23, 2017
8c4ff7b
remove spurious references to langapi/language_ui.h
Aug 23, 2017
7d30cde
missing copyright header
Sep 7, 2017
fe60e60
pthread_create arguments null/nonnull fix
Sep 10, 2017
95c5e63
Disable Alpine in Travis
reuk Sep 11, 2017
3ddd377
clean-out ill-modeled optimization in string comparisons
Sep 11, 2017
b846858
Merge pull request #1291 from LAJW/optional
Sep 11, 2017
6facf74
Map wrappers: forward more of the std::map interface
smowton Sep 10, 2017
22c2ab9
Add CMakeLists
reuk Aug 30, 2017
e609bbb
Add CMake howto to COMPILING file
reuk Aug 24, 2017
f6e4968
Enable running tests from CMake
reuk Aug 30, 2017
3c36aa5
Enable CMake in Travis
reuk Aug 30, 2017
6251055
Fix and refactor library_check target
reuk Sep 1, 2017
d953327
Enable caching for CMake builds (hopefully)
reuk Sep 1, 2017
9afbced
Disable 32-bit builds in Travis
reuk Sep 6, 2017
5afa929
Quote paths in flex/bison commands
reuk Sep 7, 2017
ad486f8
Set up glucose externalproject
reuk Sep 8, 2017
5ee349f
Control SAT library from makefiles
reuk Sep 8, 2017
7d4e9b5
Make CMake release flags similar to Makefile build
reuk Sep 8, 2017
91684da
Clean up CMake files after #1321
reuk Sep 8, 2017
4dde3c5
Disable glucose in Travis
reuk Sep 8, 2017
8782103
Merge pull request #1365 from smowton/smowton/feature/more_map_forwar…
smowton Sep 11, 2017
0cfd7b0
Remove PRE_COMMAND scaffolding
reuk Sep 11, 2017
4febd10
Merge pull request #1364 from diffblue/phread-create-fix
Sep 11, 2017
73b4357
Merge pull request #1339 from diffblue/initialize_goto_model
Sep 11, 2017
728ac5b
Merge pull request #1367 from reuk/reuk/disable-alpine-in-travis
Sep 11, 2017
8fc714d
use __CPROVER_assert
Sep 11, 2017
3896110
output statements
Sep 11, 2017
211355d
comments on test
Sep 11, 2017
746bff5
remove_returns missing in symex
Sep 11, 2017
430218f
option is now --trace
Sep 11, 2017
5195d24
avoid confusion between SSA lhs and full lhs during assignment
Sep 11, 2017
5d2d07b
enable symex regression testing
Sep 12, 2017
8cd4490
Merge pull request #1373 from diffblue/symex-trace-fix
Sep 12, 2017
6a2fd50
added symex to Appveyor build
Sep 12, 2017
2816b80
revert symex regression until Appvoyer works
Sep 13, 2017
0496142
Account for replaced functions in exceptions_map
pkesseli Sep 12, 2017
e73a884
Attempt to fix the symex appveyor build
Sep 13, 2017
af8d46f
Reverting manually commited fixes
Sep 13, 2017
a31f1d9
remove musketeer
Sep 13, 2017
41bafc0
Merge pull request #1375 from pkesseli/bugfix/uncaught-exceptions-inv…
peterschrammel Sep 13, 2017
91e733d
Manually disable some failing tests
Sep 13, 2017
444f256
Add initial value to languaget::generate_opaque_stubs
pkesseli Sep 13, 2017
d45325c
Merge pull request #1378 from thk123/bugfix/fix-symex-appveyor
peterschrammel Sep 13, 2017
69d05a9
Merge pull request #1382 from pkesseli/bugfix/language-opaque-stubs
peterschrammel Sep 13, 2017
f347a22
Cause a regeneration of the entry method if a --function is provided
Dec 7, 2016
2a3d876
Adding explanatory comment
Dec 7, 2016
ee5fb93
Protect against invalid function label
Dec 7, 2016
cd416bc
Call generate_start_function only when regenerating the start function
Dec 7, 2016
94b7185
Implemented generate_start_function for Java
Dec 7, 2016
71e6800
Added regression test for using --function on a GOTO program
Dec 8, 2016
f0d6d72
Refactored the regenerate function into goto-programs
Dec 12, 2016
2aea88d
Made generate_start_function abstract
Dec 12, 2016
71dec3d
Use ID_main as the default name for entry function
Dec 12, 2016
0732580
Adding missing overrides
Jan 24, 2017
1ccd1a2
Add support for using the --function flag to goto-analyze and symex
Feb 3, 2017
dee89b0
Fixing the method to work with java_bytecode
Sep 7, 2017
15b89fc
Weaked the tests for pointer-function-parameters
Sep 8, 2017
e37d3d5
Disable failing test in the symex directory
Sep 8, 2017
c6f1430
Ensure symex and goto-analyzer regenerate functions
Sep 8, 2017
92a52a5
Corrected doxygen errors
Sep 8, 2017
3ede81b
Merge pull request #1293 from reuk/cmake-develop
peterschrammel Sep 13, 2017
22f06fd
Correcting windows build
Sep 12, 2017
f77822b
Merge pull request #1380 from diffblue/remove-musketeer
peterschrammel Sep 13, 2017
a46ad62
Regenerate malformed binary blobs
reuk Sep 12, 2017
a9806c0
Ensure pointer invariants are maintained
reuk Sep 12, 2017
81f1300
Use PRECONDITION in std_types.h
reuk Sep 13, 2017
00e4555
Fix up CMake build (unrelated)
reuk Sep 13, 2017
63c9a1e
Merge pull request #1374 from reuk/reuk/maintain-pointer-invariants
Sep 14, 2017
e54c0e9
Merge pull request #338 from thk123/bug/function-flag-on-goto-program
Sep 14, 2017
1264b4d
Re-enable old function signatures for test-gen compat
reuk Sep 14, 2017
4df244c
Merge pull request #1383 from reuk/reuk/sync-projects
Sep 14, 2017
e3f3abd
Merge remote-tracking branch 'upstream/develop' into merge-develop-20…
smowton Sep 14, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
65 changes: 36 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ jobs:
# env: COMPILER=g++-5 SAN_FLAGS="-fsanitize=undefined -fno-sanitize-recover -fno-omit-frame-pointer"
env: COMPILER="ccache g++-5"

# Alpine Linux with musl-libc using g++
- stage: Test different OS/CXX/Flags
os: linux
sudo: required
compiler: gcc
cache: ccache
services:
- docker
before_install:
- docker pull diffblue/cbmc-builder:alpine-0.0.3
env:
- PRE_COMMAND="docker run -v ${TRAVIS_BUILD_DIR}:/cbmc -v ${HOME}/.ccache:/root/.ccache diffblue/cbmc-builder:alpine-0.0.3"
- COMPILER="ccache g++"

# OS X using g++
- stage: Test different OS/CXX/Flags
os: osx
Expand Down Expand Up @@ -151,29 +137,50 @@ jobs:
- EXTRA_CXXFLAGS="-DDEBUG"
script: echo "Not running any tests for a debug build."

- stage: Test different OS/CXX/Flags
os: linux
cache: ccache
env:
- BUILD_SYSTEM=cmake
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
install:
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=g++-5'
- cmake --build build -- -j4
script: (cd build; ctest -V -L CORE)

- stage: Test different OS/CXX/Flags
os: osx
cache: ccache
env:
- BUILD_SYSTEM=cmake
- CCACHE_CPP2=yes
install:
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_OSX_ARCHITECTURES=x86_64'
- cmake --build build -- -j4
script: (cd build; ctest -V -L CORE)


allow_failures:
- <<: *linter-stage

install:
- ccache --max-size=1G
- COMMAND="make -C src minisat2-download" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C src boost-download" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C src/ansi-c library_check" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C src CXX=\"$COMPILER\" CXXFLAGS=\"-Wall -Werror -pedantic -O2 -g -DUSE_BOOST $EXTRA_CXXFLAGS\" -j2" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C src CXX=\"$COMPILER\" CXXFLAGS=\"$FLAGS $EXTRA_CXXFLAGS\" -j2 clobber.dir memory-models.dir musketeer.dir" &&
eval ${PRE_COMMAND} ${COMMAND}
- make -C src minisat2-download
- make -C src boost-download
- make -C src/ansi-c library_check
- make -C src "CXX=${COMPILER}" "CXXFLAGS=-Wall -Werror -pedantic -O2 -g -DUSE_BOOST ${EXTRA_CXXFLAGS}" -j2
- make -C src "CXX=${COMPILER}" "CXXFLAGS=-Wall -Werror -pedantic -O2 -g ${EXTRA_CXXFLAGS}" -j2 clobber.dir memory-models.dir

script:
- if [ -e bin/gcc ] ; then export PATH=$PWD/bin:$PATH ; fi ;
COMMAND="env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test CXX=\"$COMPILER\" CXXFLAGS=\"-Wall -Werror -pedantic -O2 -g $EXTRA_CXXFLAGS\"" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C unit CXX=\"$COMPILER\" CXXFLAGS=\"-Wall -Werror -pedantic -O2 -g $EXTRA_CXXFLAGS\" -j2" &&
eval ${PRE_COMMAND} ${COMMAND}
- COMMAND="make -C unit test" && eval ${PRE_COMMAND} ${COMMAND}
- env UBSAN_OPTIONS=print_stacktrace=1 make -C regression test "CXX=${COMPILER}" "CXXFLAGS=-Wall -Werror -pedantic -O2 -g ${EXTRA_CXXFLAGS}"
- make -C unit "CXX=${COMPILER}" "CXXFLAGS=-Wall -Werror -pedantic -O2 -g ${EXTRA_CXXFLAGS}" -j2
- make -C unit test

before_cache:
- ccache -s
41 changes: 41 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cmake_minimum_required(VERSION 3.2)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
message(STATUS "Rule launch compile: ${CCACHE_PROGRAM}")
endif()

set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)

include(GNUInstallDirs)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
)
# Ensure NDEBUG is not set for release builds
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
# Enable lots of warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wpedantic -Werror")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# This would be the place to enable warnings for Windows builds, although
# config.inc doesn't seem to do that currently
endif()

set(enable_cbmc_tests on CACHE BOOL "Whether CBMC tests should be enabled")

set(sat_impl "minisat2" CACHE STRING
"This setting controls the SAT library which is used. Valid values are 'minisat2' and 'glucose'"
)

add_subdirectory(src)

if(${enable_cbmc_tests})
enable_testing()
endif()
add_subdirectory(unit)
add_subdirectory(regression)
49 changes: 48 additions & 1 deletion COMPILING
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Follow these instructions:
BUILD_ENV = MSVC

Open the Visual Studio Command prompt, and then bash.exe -login from
Cygwin from in there.
Cygwin from in there.

3) Type cd src; make - that should do it.

Expand All @@ -183,6 +183,53 @@ can be used for building with MSBuild. Note that you still need to run
flex/bison using "make generated_files" before opening the project.


WORKING WITH CMAKE (EXPERIMENTAL)
---------------------------------

There is an experimental build based on CMake instead of hand-written
makefiles. It should work on a wider variety of systems than the standard
makefile build, and can integrate better with IDEs and static-analysis tools.

0) Run `cmake --version`. If you get a command-not-found error, or the installed
version is lower than 3.2, go and install a new version. Most Linux
distributions have a package for CMake, and Mac users can get it through
Homebrew. Windows users should download it manually from cmake.org.

1) Create a directory to store your build:
`mkdir build`
Run this from the *top level* folder of the project. This is different from
the other builds, which require you to `cd src` first.

2) Generate build files with CMake:
`cmake -H. -Bbuild`
This command tells CMake to use the configuration in the current directory,
and to generate build files into the `build` directory.
This is the point to specify custom build settings, such as compilers and
build back-ends. You can use clang (for example) by adding the argument
`-DCMAKE_CXX_COMPILER=clang++` to the command line. You can also tell
CMake to generate IDE projects by supplying the `-G` flag.
Run `cmake -G` for a comprehensive list of supported back-ends.

Generally it is not necessary to manually specify individual compiler or
linker flags, as CMake defines a number of "build modes" including Debug
and Release modes. To build in a particular mode, add the flag
`-DCMAKE_BUILD_TYPE=Debug` (or `Release`) to the initial invocation.

If you *do* need to manually add flags, use `-DCMAKE_CXX_FLAGS=...` and
`-DCMAKE_EXE_LINKER_FLAGS=...`. This is useful for enabling clang's
sanitizers.

Finally, to enable building universal binaries on macOS, you can pass the
flag `-DCMAKE_OSX_ARCHITECTURES=i386;x86_64`. If you don't supply this flag,
the build will just be for the architecture of your machine.

3) Run the build:
`cmake --build build`
This command tells CMake to invoke the correct tool to run the build in the
`build` directory. You can also use the build back-end directly by invoking
`make`, `ninja`, or opening the generated IDE project as appropriate.


WORKING WITH ECLIPSE
--------------------

Expand Down
31 changes: 19 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,21 @@ build_script:
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
sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-cc-cbmc/chain.sh || true
sed -i "11s/.*/$GC $NAME.c/" goto-cc-cbmc/chain.sh || true
sed -i "12i mv $NAME.exe $NAME.gb" goto-cc-cbmc/chain.sh || true
cat goto-cc-cbmc/chain.sh || true

sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-cc-goto-analyzer/chain.sh || true
sed -i "11s/.*/$gc $name.c/" goto-cc-goto-analyzer/chain.sh || true
sed -i "12i mv $name.exe $name.gb" goto-cc-goto-analyzer/chain.sh || true
cat goto-cc-goto-analyzer/chain.sh || true

sed -i "s/goto-cc\/goto-cc/goto-cc\/goto-cl/" goto-cc-symex/chain.sh || true
sed -i "11s/.*/$gc $name.c/" goto-cc-symex/chain.sh || true
sed -i "12i mv $name.exe $name.gb" goto-cc-symex/chain.sh || true
cat goto-cc-symex/chain.sh || true

rem HACK disable failing tests
rmdir /s /q ansi-c\arch_flags_mcpu_bad
Expand Down Expand Up @@ -111,6 +113,11 @@ test_script:
rmdir /s /q cbmc-java\tableswitch2
rmdir /s /q goto-gcc
rmdir /s /q goto-instrument\slice08
rmdir /s /q symex\va_args_10
rmdir /s /q symex\va_args_2
rmdir /s /q symex\va_args_3
rmdir /s /q symex\va_args_5
rmdir /s /q symex\va_args_6

make test

Expand Down
36 changes: 36 additions & 0 deletions regression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED true)

set(test_pl_path "${CMAKE_CURRENT_SOURCE_DIR}/test.pl")

macro(add_test_pl_profile name cmdline flag profile)
add_test(
NAME "${name}-${profile}"
COMMAND ${test_pl_path} -c ${cmdline} ${flag}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
set_tests_properties("${name}-${profile}" PROPERTIES
LABELS "${profile}"
)
endmacro(add_test_pl_profile)

macro(add_test_pl_tests name cmdline)
add_test_pl_profile("${name}" "${cmdline}" -C CORE)
add_test_pl_profile("${name}" "${cmdline}" -T THOROUGH)
add_test_pl_profile("${name}" "${cmdline}" -F FUTURE)
add_test_pl_profile("${name}" "${cmdline}" -K KNOWNBUG)
endmacro(add_test_pl_tests)

add_subdirectory(ansi-c)
add_subdirectory(cbmc)
add_subdirectory(cbmc-java)
add_subdirectory(cbmc-java-inheritance)
add_subdirectory(cpp)
add_subdirectory(goto-analyzer)
add_subdirectory(goto-diff)
add_subdirectory(goto-instrument)
add_subdirectory(goto-instrument-typedef)
add_subdirectory(invariants)
add_subdirectory(strings)
add_subdirectory(strings-smoke-tests)
add_subdirectory(test-script)
4 changes: 4 additions & 0 deletions regression/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ DIRS = ansi-c \
cbmc-java-inheritance \
cpp \
goto-analyzer \
goto-cc-cbmc \
goto-cc-goto-analyzer \
goto-cc-goto-symex \
goto-diff \
goto-gcc \
goto-instrument \
goto-instrument-typedef \
invariants \
strings \
strings-smoke-tests \
symex \
test-script \
# Empty last line

Expand Down
4 changes: 4 additions & 0 deletions regression/ansi-c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
add_test_pl_tests(
"ansi-c"
"$<TARGET_FILE:goto-cc>"
)
6 changes: 6 additions & 0 deletions regression/ansi-c/Initializer_cast2/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
int main()
{
int A[(sizeof((int[]){1, 2, 3})==3*sizeof(int))?1:-1];

return 0;
}
7 changes: 7 additions & 0 deletions regression/ansi-c/Initializer_cast2/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CORE
main.c

^EXIT=0$
^SIGNAL=0$
--
^CONVERSION ERROR$
13 changes: 11 additions & 2 deletions regression/ansi-c/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
default: tests.log

include ../../src/config.inc
include ../../src/common

ifeq ($(BUILD_ENV_),MSVC)
exe=../../../src/goto-cc/goto-cl
else
exe=../../../src/goto-cc/goto-cc
endif

test:
@if ! ../test.pl -c ../../../src/goto-cc/goto-cc ; then \
@if ! ../test.pl -c $(exe) ; then \
../failed-tests-printer.pl ; \
exit 1 ; \
fi

tests.log: ../test.pl
@if ! ../test.pl -c ../../../src/goto-cc/goto-cc ; then \
@if ! ../test.pl -c $(exe) ; then \
../failed-tests-printer.pl ; \
exit 1 ; \
fi
Expand Down
Binary file modified regression/ansi-c/arch_flags_mcpu_bad/object.intel
Binary file not shown.
Binary file modified regression/ansi-c/arch_flags_mcpu_good/object.arm
Binary file not shown.
4 changes: 4 additions & 0 deletions regression/ansi-c/arch_flags_mcpu_good/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ command line:

goto-cc --native-compiler=arm-none-eabi-gcc -mcpu=cortex-a15 -c source.c

On Ubuntu, you can get a suitable compiler using:

sudo apt install gcc-arm-none-eabi

preproc.i is already pre-processed so that it can be linked in without
needing to invoke a pre-processor from a cross-compile toolchain on your
local machine. Linking it together with the ARM object file, while
Expand Down
Binary file modified regression/ansi-c/arch_flags_mthumb_bad/object.intel
Binary file not shown.
Binary file modified regression/ansi-c/arch_flags_mthumb_good/object.arm
Binary file not shown.
4 changes: 4 additions & 0 deletions regression/ansi-c/arch_flags_mthumb_good/test.desc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ line:

goto-cc --native-compiler=arm-none-eabi-gcc -mthumb -c source.c

On Ubuntu, you can get a suitable compiler using:

sudo apt install gcc-arm-none-eabi

preproc.i is already pre-processed so that it can be linked in without
needing to invoke a pre-processor from a cross-compile toolchain on your
local machine. Linking it together with the ARM object file, while
Expand Down
13 changes: 13 additions & 0 deletions regression/ansi-c/array_initialization3/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#define STATIC_ASSERT_sizeof(condition) \
int[(condition) ? 1 : -1]

int A[];
int B[];

int A[1]={sizeof(A)};
int B[1]={sizeof(STATIC_ASSERT_sizeof(sizeof(B)==sizeof(int)))};

int main()
{
return 0;
}
8 changes: 8 additions & 0 deletions regression/ansi-c/array_initialization3/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
main.c

^EXIT=0$
^SIGNAL=0$
--
^warning: ignoring
^CONVERSION ERROR$
15 changes: 15 additions & 0 deletions regression/ansi-c/sizeof5/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#define STATIC_ASSERT(condition) \
int some_array##__LINE__[(condition) ? 1 : -1];

struct S
{
int x;
};

int main()
{
struct S s;
__typeof__(*((void *)&s.x)) *_s=&s.x;
STATIC_ASSERT(sizeof(*_s)==1);
return 0;
}
Loading