[Bug tree-optimization/106322] tree-vectorize: Wrong code at O2 level (-fno-tree-vectorize is working)

malat at debian dot org gcc-bugzilla@gcc.gnu.org
Tue Aug 9 12:58:42 GMT 2022


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

--- Comment #21 from Mathieu Malaterre <malat at debian dot org> ---
(In reply to Martin Liška from comment #20)
> Hmm, can't reproduce with x86_64 compiler with -m32:
> 
> $ g++ --version
> g++ (SUSE Linux) 12.1.1 20220721 [revision
> 4f15d2234608e82159d030dadb17af678cfad626
> ...
> $ g++ *.cc -O2 -m32 && ./a.out && echo Ok
> Ok

I also confirm the behavior over here. However my x86 binary produces the
expected 'abort' from my multi-arch amd64.

There is no point in attaching *.o here, right ? A quick check seems to
indicate that the issue is:

schroot-32 $ g++ -O2 -c -o demo.o demo.cc
schroot-32 $ <ctrl+d>
amd64 $ g++ -O2 -m32 -c -o bytes.o bytes.cc
amd64 $ g++ -O2 -m32 -o demo demo.o bytes.o
amd64 $ ./demo
zsh: abort      ./demo


More information about the Gcc-bugs mailing list