From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8200 invoked by alias); 12 Oct 2006 14:53:09 -0000 Received: (qmail 8163 invoked by uid 48); 12 Oct 2006 14:53:01 -0000 Date: Thu, 12 Oct 2006 14:53:00 -0000 Message-ID: <20061012145301.8162.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/29440] 4.2 20061007 experimental misscompiles libavcodec/h264.o In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "poirierg at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg01029.txt.bz2 List-Id: ------- Comment #5 from poirierg at gmail dot com 2006-10-12 14:53 ------- Hello, (In reply to comment #3) > Does it work when compiled with -O0 instead of -O4? How about -O1? The code compiles and produces the expected result with -O1, O2, but can't be compiled with -O0: In file included from h264.c:36: cabac.h: In function 'get_cabac': cabac.h:454: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm' cabac.h:454: error: 'asm' operand has impossible constraints h264.c: In function 'decode_cabac_residual': h264.c:6120: warning: initialization from incompatible pointer type > Besies above, I noticed that the asm in get_cabac looks to be clobbering memory > but is not marked as such. I can't really comment on that as I'm not too inline-asm fluent... however, I can say that this code can't be compiled without -fomit-frame-pointer. Is GCC supposed to produce valid code with this source to begin with? Guillaume -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29440