Hi

***********************************

unsigned long long foo=0;
int main (void)
{
  foo=0;
  return 0;
}

***********************************

[EMAIL PROTECTED]:~/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)

***********************************

[EMAIL PROTECTED]:~/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

Reply via email to