fail to parse certificate then build with clang
Description of problem:
Not sure that this is a libtasn1 error or clang.
I am update my desktop to current and claws-mail show me certs errors, I dig inside and found that gnutls_x509_crt_get_fingerprint() fails. At next step I found that if I rebuild libtasn1 with debug then it fixes errors.
I wrote test app to reproduce error and check on other systems. On my home server (12.2) gnutls+libtasn1 was already installed and no errors happen. But after I rebuild libtasn1 - test app show error.
With: clang version 11.0.1 (firstname.lastname@example.org:llvm/llvm-project.git llvmorg-11.0.1-rc2-0-g43ff75f2c3f) 13.0-CURRENT FreeBSD 13.0-CURRENT even -O2 gives code that does not work. -O1, -O0 - work.
With: clang version 10.0.1 (email@example.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2) 12.2-STABLE 5586a4e13931(stable/12) -O1, -O0 - work. gcc9 -O3 - work
Version of libtasn1 used:
Distributor of libtasn1 (e.g., Ubuntu, Fedora, RHEL)
Build test tool: cc gnutls_test.c -O0 -DDEBUG -I/usr/local/include -L/usr/local/lib -lm -lgnutls -o gnutls_test
Run test: ./gnutls_test ./pop.mail.ru.995.cert