public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ami_stuff at o2 dot pl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/42522] New: [m68k] Wrong code generated with -O2/-O3 Date: Mon, 28 Dec 2009 20:15:00 -0000 [thread overview] Message-ID: <bug-42522-17839@http.gcc.gnu.org/bugzilla/> (raw) Hi, This is a code from "libavformat/flvdec.c": static int flv_probe(AVProbeData *p) { const uint8_t *d; d = p->buf; if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0 && AV_RB32(d+5)>8) { return AVPROBE_SCORE_MAX; } return 0; } When I compile FFmpeg with -O2/-O3 options, FFmpeg doesn't recognize FLV files ("Unknown format"), but when I use -O1 everything works correctly. Here is asm output when I compile flvdec.c file with -O2: _flv_probe: clr.l d0 rts .even and here when I use -O1: _flv_probe: move.l 4(sp),a0 move.l 4(a0),a0 cmp.b #70,(a0) jne L3 cmp.b #76,1(a0) jne L4 cmp.b #86,2(a0) jne L5 cmp.b #4,3(a0) jhi L6 tst.b 5(a0) jne L7 move.l 5(a0),d0 moveq #8,d1 cmp.l d0,d1 jcs L8 clr.l d0 rts L3: clr.l d0 rts L4: clr.l d0 rts L5: clr.l d0 rts L6: clr.l d0 rts L7: clr.l d0 rts L8: moveq #100,d0 rts .even I attache proprocessed files + asm output in the archive. -- Summary: [m68k] Wrong code generated with -O2/-O3 Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ami_stuff at o2 dot pl GCC host triplet: i686-cygwin GCC target triplet: m68k-amigaos http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42522
next reply other threads:[~2009-12-28 20:15 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-28 20:15 ami_stuff at o2 dot pl [this message] 2009-12-28 20:18 ` [Bug c/42522] " ami_stuff at o2 dot pl 2009-12-28 20:23 ` [Bug target/42522] " pinskia at gcc dot gnu dot org 2009-12-28 20:39 ` [Bug c/42522] " ami_stuff at o2 dot pl 2009-12-28 23:31 ` schwab at linux-m68k dot org 2009-12-28 23:38 ` ami_stuff at o2 dot pl 2009-12-29 1:20 ` ami_stuff at o2 dot pl 2009-12-29 11:58 ` schwab at linux-m68k dot org 2009-12-29 18:52 ` nospamname at web dot de 2009-12-31 13:35 ` nospamname at web dot de 2009-12-31 17:01 ` mikpe at it dot uu dot se 2009-12-31 17:06 ` [Bug target/42522] " jsm28 at gcc dot gnu dot org 2009-12-31 18:04 ` nospamname at web dot de 2010-01-17 22:27 ` [Bug rtl-optimization/42522] (zero_extract:SI (mem:QI) ...) misoptimized schwab at linux-m68k dot org 2010-01-17 22:35 ` schwab at linux-m68k dot org 2010-01-18 10:26 ` rguenth at gcc dot gnu dot org 2010-05-09 13:54 ` ami_stuff at o2 dot pl
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-42522-17839@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).