[Bug target/106187] armhf: Miscompilation at O2 level (O0 / O1 are working)

malat at debian dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 8 14:18:07 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106187

--- Comment #18 from Mathieu Malaterre <malat at debian dot org> ---
The complete line to generate the *.ii file is:

```
% /usr/bin/g++ -DHWY_STATIC_DEFINE -I/home/malat/highway -O2 -fstrict-aliasing
-ggdb3 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden
-Wno-builtin-macro-redefined -D__DATE__=\"redacted\"
-D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fmerge-all-constants
-Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor
-fmath-errno -fno-exceptions -DHWY_IS_TEST=1 -DGTEST_HAS_PTHREAD=1 -MD -MT
CMakeFiles/mul_test.dir/hwy/tests/mul_test.cc.o -MF
CMakeFiles/mul_test.dir/hwy/tests/mul_test.cc.o.d -o
CMakeFiles/mul_test.dir/hwy/tests/mul_test.cc.o -save-temps -c
/home/malat/highway/hwy/tests/mul_test.cc
```

Where the important cmake setup is:

```
CMAKE_BUILD_TYPE:STRING=None
CMAKE_CXX_FLAGS:STRING=-O2 -fstrict-aliasing -ggdb3
```


More information about the Gcc-bugs mailing list