diff options
author | Giuliano Procida <gprocida@google.com> | 2023-11-13 18:55:13 +0000 |
---|---|---|
committer | Giuliano Procida <gprocida@google.com> | 2023-11-15 09:21:05 +0000 |
commit | 3ffc4fdd0e8fb4503a5361528d9f5c8217694385 (patch) | |
tree | 10e2ed38ac76b68c0a0623b5b5d5b5e2b58aaaa6 | |
parent | 826da9f4d6a0c9c999a81d15d4335349a0945d28 (diff) | |
download | stg-3ffc4fdd0e8fb4503a5361528d9f5c8217694385.tar.gz |
test cases: adjust function/virtual_method info 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: 582018600
Change-Id: I1637699694ec06eda5d7941135400b214ddc25b1
-rw-r--r-- | test_cases/info_tests/function/virtual_method.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test_cases/info_tests/function/virtual_method.cc b/test_cases/info_tests/function/virtual_method.cc index 82f6410..0bf3e48 100644 --- a/test_cases/info_tests/function/virtual_method.cc +++ b/test_cases/info_tests/function/virtual_method.cc @@ -3,5 +3,6 @@ struct Foo { virtual void baz(); } foo; -void Foo::bar() {} -void Foo::baz() {} +void tweak(int); +void Foo::bar() { tweak(0); } +void Foo::baz() { tweak(1); } |