This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/69714] New: [5 Regression] ffmpeg crc.c test miscompiled
- From: "danglin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Feb 2016 00:36:01 +0000
- Subject: [Bug middle-end/69714] New: [5 Regression] ffmpeg crc.c test miscompiled
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69714
Bug ID: 69714
Summary: [5 Regression] ffmpeg crc.c test miscompiled
Product: gcc
Version: 5.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
Build: hppa-unknown-linux-gnu
Created attachment 37622
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37622&action=edit
Preprocessed source
The attached preprocessed source file is miscompiled without
'-fno-expensive-optimizations'. Compile command is:
gcc -S -fpreprocessed crc.i -dumpbase crc.c -g -g -O2 -O3 -Wdate-time
-Wformat=1 -Werror=format-security -Wdeclaration-after-statement -Wall
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings
-Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
-Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch
-Wno-format-zero-length -Wno-pointer-sign -Werror=format-security
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type -Werror=vla -Wformat=1 -Wno-maybe-uninitialized -std=c99
-fno-strict-overflow -fstack-protector-all -fomit-frame-pointer -fPIC
-fno-optimize-sibling-calls -fno-math-errno -fno-signed-zeros
-fno-tree-vectorize -fdiagnostics-color=auto -o crc.s
Main assembly difference is:
dave@mx3210:~/crc$ diff -u crc.s-expensive-opt crc.s-no-expensive-opt|less
--- crc.s-expensive-opt 2016-02-07 19:25:52.859388388 -0500
+++ crc.s-no-expensive-opt 2016-02-07 19:03:10.848495110 -0500
@@ -340,16 +340,15 @@
.LVL54:
.L42:
.loc 1 367 0
- ldw 0(%r31),%r21
- zdep %r21,23,8,%r28
- extru %r21,16+8-1,8,%r21
- ldh 2(%r31),%r20
- or %r28,%r21,%r28
+ ldw 0(%r31),%r20
extru %r20,16+8-1,8,%r21
+ zdep %r20,23,8,%r28
+ or %r28,%r21,%r28
+ extru %r20,7,8,%r21
zdep %r28,15,16,%r28
- zdep %r20,23,24,%r22
+ extru %r20,15,16,%r22
+ zdep %r22,23,8,%r22
or %r22,%r21,%r20
- extru %r20,31,16,%r20
or %r28,%r20,%r20
xor %r20,%r25,%r28
This bug is also believed to affect mips:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813858