https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188
--- Comment #12 from dave.anglin at bell dot net --- On 2018-09-05 8:50 AM, jamborm at gcc dot gnu.org wrote: > Then I believe SRA is not the culprit, you probably need to trace what > happens to SR.13 afterwards and whether it is correctly expanded to > RTL. If I compile S.cpp with "-O2 -fno-tree-sra", the test passes: gcc -c -fPIC -O2 -fno-tree-sra S.cpp gcc -shared -fPIC -o libS.so S.o export LD_LIBRARY_PATH=`pwd` ./main OK