bug in gcc-20020225: extended assembler

Benjamin Kalytta bkausbk@web.de
Sat Mar 2 17:33:00 GMT 2002


Hi,

I found some bugs by using asm("") with extended assembler options.
This bugs hadn't been fixed in the last snapshots.

My Compiler: gcc 3.1 (uses cygwin.dll) <snapshot from 2002.02.25>
My System: Windows 2000 (cygwin)
Command line options: gcc.exe source.c -o
output.exe -O2 -mconsole -masm=intel -fomit-frame-pointer
compiler was configured with: bash ../configure
i386-pc-cygwin --enable-languages=c

Source 1:

int main() {
  int a=1,b,c;
  asm("cmpxchg %0,%1"::"m"(a), "n"(c));
}

Compiler Output:

source.c: In function `main':
source.c:3: warning: asm operand 1 probably doesn't match constraints
source.c:4: Internal compiler error in fixup_var_refs_1, at function.c:1911
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Source 2:

int main() {
  int a=1,b,c;
  asm("cmpxchg %0,%1"::"m"(a), "i"(c));
}

Compiler Output 2:

source.c: In function `main':
source.c:3: warning: asm operand 1 probably doesn't match constraints
source.c:4: Internal compiler error in fixup_var_refs_1, at function.c:1911
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

There are some of such errors when replacing "i" with "l", "V" and so on.
Hope this description helps.

rg
Benjamin Kalytta



More information about the Gcc-bugs mailing list