From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23451 invoked by alias); 9 Mar 2008 18:17:54 -0000 Received: (qmail 23326 invoked by uid 48); 9 Mar 2008 18:17:11 -0000 Date: Sun, 09 Mar 2008 18:17:00 -0000 Subject: [Bug c/35516] New: option -masm=intel generates wrong assembly code with globals X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "21valy at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00610.txt.bz2 Hi *********************************** unsigned long long foo=0; int main (void) { foo=0; return 0; } *********************************** valy@desktop:~/dev/C/test4$ gcc -Wall -save-temps -march=opteron -masm=intel test1.c -o intel_asm_sample test1.s: Assembler messages: test1.s:19: Error: invalid operand for 'mov' ('(' unexpected) *********************************** valy@desktop:~/dev/C/test4$ gcc -v Utilisation des specs internes. libraries: x86_64-linux-gnu Configuré avec: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu Modèle de thread: posix version gcc 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) *********************************** Everything is OK without "-masm=intel" Everything is OK with variable "foo" inside main() Everything is worse when variable "foo" > 0x7fffffff: we have the same error twice. This gcc was released with xubuntu 7.10, I may try a newer gcc version. Regards -- Summary: option -masm=intel generates wrong assembly code with globals Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: 21valy at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35516