Hi, On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: > You could probably make the function static or change its visibility via > a function attribute (there's a visibility attribute which can take the > values default, hidden protected or internal). Default visibility > essentially means the function can be overridden. I think changing it > to "protected" might work. Note if we do that, we may need some kind of > target selector on the test since not all targets support the various > visibility attributes. >
Yes, it works both ways: static works, and __attribute__ ((visibility ("protected"))) works too: make check-gcc-c++ RUNTESTFLAGS="ubsan.exp=object-size-9.c --target_board='unix{-fpic,-mcmodel=medium,-fpic\ -mcmodel=medium,-mcmodel=large,-fpic\ -mcmodel=large}'" has all tests passed, but.. make check-gcc-c++ RUNTESTFLAGS="ubsan.exp=object-size-9.c --target_board='unix{-fno-inline}'" still fails in the same way for all workarounds: inline, static, and __attribute__ ((visibility ("protected"))). Maybe "static" would be preferable? Thanks Bernd.