c/8440: Internal GCC 3.2 compiler error caused by Asm-Statement
bkausbk@web.de
bkausbk@web.de
Sun Nov 3 10:46:00 GMT 2002
>Number: 8440
>Category: c
>Synopsis: Internal GCC 3.2 compiler error caused by Asm-Statement
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sun Nov 03 10:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Benjamin Kalytta
>Release: GCC 3.2
>Organization:
>Environment:
x86(AMD XP2200+) cygwin (1.1.8) Windows 2000 Prof.
>Description:
asm-statement (see attachement test.c [preprocessing is not needed]) caused an internal compiler error, only if optimization level is 0 (default)
test.c: In function `KmAtomicCompareExchange':
test.c:10: Internal compiler error in instantiate_virtual_regs_1, at function.c:
3972
>How-To-Repeat:
execute "gcc -c test.c"
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="test.c"
Content-Disposition: inline; filename="test.c"
inline int KmAtomicCompareExchange(int *Destination, int ExchangeWith, int CompareWith){
int ret=0;
asm(
" cmpxchg [%[Destination]],%[ExchangeWith]\n"
: [CompareWith] "=eax" (ret)
: [Destination] "r" (Destination), [ExchangeWith] "r"(ExchangeWith), "0" (CompareWith)
: "cc", "memory"
);
return ret;
}
int main() {
}
More information about the Gcc-prs
mailing list