diff options
author | Giuliano Procida <gprocida@google.com> | 2023-11-15 12:09:42 +0000 |
---|---|---|
committer | Giuliano Procida <gprocida@google.com> | 2023-11-20 12:57:32 +0000 |
commit | ea4d117b5f4b2b6d48337ed9c91542fb8baf5dda (patch) | |
tree | ee5ba9cd4d7744e97f463050168d50b6b357dec9 /test_cases | |
parent | 57f3d70d719c7cd6c1edb2c8d8356d227b203282 (diff) | |
download | stg-ea4d117b5f4b2b6d48337ed9c91542fb8baf5dda.tar.gz |
test cases: adjust function/methods diff test to work with gcc -O2
This case is tweaked to avoid triggering a GCC bug where optimisation
destroys some debug information.
It suffices to ensure that all the functions compile to different code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112372
PiperOrigin-RevId: 582619794
Change-Id: Iafe51250d6fdcb6bf60421194b5dbef9a83e3700
Diffstat (limited to 'test_cases')
-rw-r--r-- | test_cases/diff_tests/function/methods.0.cc | 10 | ||||
-rw-r--r-- | test_cases/diff_tests/function/methods.1.cc | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test_cases/diff_tests/function/methods.0.cc b/test_cases/diff_tests/function/methods.0.cc index 46a3d75..78fcb66 100644 --- a/test_cases/diff_tests/function/methods.0.cc +++ b/test_cases/diff_tests/function/methods.0.cc @@ -15,8 +15,8 @@ struct Func { } var; int Func::change_return_type() { return 0; } -int Func::add_parameter() { return 0; } -int Func::remove_parameter(int) { return 0; } -int Func::change_parameter_type(int) { return 0; } -int Func::rename_old() { return 0; } -int Func::change_parameter_name(int) { return 0; } +int Func::add_parameter() { return 1; } +int Func::remove_parameter(int) { return 2; } +int Func::change_parameter_type(int) { return 3; } +int Func::rename_old() { return 4; } +int Func::change_parameter_name(int) { return 5; } diff --git a/test_cases/diff_tests/function/methods.1.cc b/test_cases/diff_tests/function/methods.1.cc index e30f53b..b1ed1cf 100644 --- a/test_cases/diff_tests/function/methods.1.cc +++ b/test_cases/diff_tests/function/methods.1.cc @@ -15,8 +15,8 @@ struct Func { } var; long Func::change_return_type() { return 0; } -int Func::add_parameter(int) { return 0; } -int Func::remove_parameter() { return 0; } -int Func::change_parameter_type(long) { return 0; } -int Func::rename_new() { return 0; } -int Func::change_parameter_name(int) { return 0; } +int Func::add_parameter(int) { return 1; } +int Func::remove_parameter() { return 2; } +int Func::change_parameter_type(long) { return 3; } +int Func::rename_new() { return 4; } +int Func::change_parameter_name(int) { return 5; } |