|
From: Paul F. <pj...@wa...> - 2020-05-05 21:17:37
|
With some help, I've just been looking at memcheck/tests/varinfo1 This fails when compiled with clang (on Linux and FreeBSD). 1. It seems that clang with optimization elides the calls to malloc. This can be worked around by making the variables volatile without any impact on GCC. 2. The two package versions of clangs that I've installed on FreeBSD (8.0.1 and 9.0.1) don't produce the lineinfo for the last error. (I haven't done any debugging in Valgrind to see if there is a problem there). 3. clang built from source (11.0.0) does produce the lineinfo but the test _still_ fails because there's a diff in the frame number. Does it sound reasonable to a) make the variable volatile and b) add a varinfo1.stderr.exp-clang ? A+ Paul |