benchmark/test
Eric 93bfabc8b8 Fix #342: DoNotOptimize causes compile errors on older GCC versions. (#398)
* Fix #342: DoNotOptimize causes compile errors on older GCC versions.

DoNotOptimize uses inline assembly contraints to tell
the compiler what the type of the input variable. The 'g'
operand allows the input to be any register, memory, or
immediate integer operand. However this constraint seems
to be too weak on older GCC versions, and certain inputs
will cause compile errors.

This patch changes the constraint to 'X', which is documented
as "any operand whatsoever is allowed". This appears to fix
the issues with older GCC versions.

However Clang doesn't seem to like "X", and will attempt
to put the input into a register even when it can't/shouldn't;
causing a compile error. However using "g" seems to work like
"X" with GCC, so for this reason Clang still uses "g".

* Try alternative formulation to placate GCC
2017-06-02 15:47:23 -07:00
..
basic_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
benchmark_test.cc User counters: add more unit tests. ... 2017-04-27 22:11:40 +01:00
CMakeLists.txt Fix #342: DoNotOptimize causes compile errors on older GCC versions. (#398) 2017-06-02 15:47:23 -07:00
complexity_test.cc fix for android NDK r10e (#375) 2017-04-20 20:07:52 -06:00
cxx03_test.cc Add user-defined counters. (#262) 2017-03-01 17:23:42 -07:00
diagnostics_test.cc Enable <cassert> by removing -DNDEBUG when running the tests. 2017-04-17 20:53:39 -06:00
donotoptimize_test.cc Fix #342: DoNotOptimize causes compile errors on older GCC versions. (#398) 2017-06-02 15:47:23 -07:00
filter_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
fixture_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
map_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
multiple_ranges_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
options_test.cc Add Benchmark::Iterations for explicit iteration count control - Fixes #370 (#373) 2017-04-17 21:29:28 -07:00
output_test.h Improve some comments. 2017-05-01 23:02:35 +01:00
output_test_helper.cc Trying again to fix error caused by -Wunused-function. 2017-05-03 00:05:15 +01:00
register_benchmark_test.cc fix android compilation (#372) 2017-04-18 09:48:07 -06:00
reporter_output_test.cc Reporter tests: reuse csv header. 2017-04-27 19:24:06 +01:00
skip_with_error_test.cc Simplify clang-format and apply to tests (#302) 2016-10-07 11:04:50 -07:00
user_counters_tabular_test.cc Extend tabular counter tests to different counter sets. 2017-05-02 23:00:45 +01:00
user_counters_test.cc Fix VS warning. 2017-05-01 23:01:57 +01:00