This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
other/5171: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881
- From: armandl at mindspring dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: aliberi at acutronic dot com
- Date: 22 Dec 2001 02:49:05 -0000
- Subject: other/5171: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881
- Reply-to: armandl at mindspring dot com
>Number: 5171
>Category: other
>Synopsis: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Dec 21 18:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Armand Liberi
>Release: gcc version 2.95.3-5 (cygwin special)
>Organization:
>Environment:
Windows 98
>Description:
Hello,
I am experimenting with inline asm constraints and received a request to fill out this bug report. The requested information follows this question related to my reasons for compiling the enclosed source.
My interest is actually in learning why
asm("%0"::"m" (lots));
asm("%0"::"m" (i));
asm("%0":"=m" (lots));
asm("%0":"=m" (i));
generates
/APP
LC0
_i
_lots
_i
/NO_APP
In particular, the 'LCO' as a result of 'asm("%0"::"m" (lots));' seems wrong to me. If possible, please comment on that. For some reason, the references to 'i' are treated the same whether declared as inputs or outputs but the references to 'lots' generate different assembler code depending on whether 'lots' is declared an input or an output. If you have time to answer this, I would appreciate it. Thanks.
----------------------------------
Here is the screen output of 'gcc -v -save-temps -o constraint constraint.c:
----------------------------------
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cpp0.exe -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -D_X86_=1 -D_X86_=1 -Asystem(winnt) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) -D_cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem /usr/local/include -idirafter /usr/include -idirafter /usr/include/w32api constraint.c constraint.i
GNU CPP version 2.95.3-5 (cygwin special) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/include
/usr/include
/usr/include/w32api
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/cc1.exe constraint.i -quiet -dumpbase constraint.c -version -o constraint.s
GNU C version 2.95.3-5 (cygwin special) (i686-pc-cygwin) compiled by GNU C version 2.95.3-5 (cygwin special).
constraint.c: In function `main':
constraint.c:12: incompatible types in assignment
constraint.c:15: Internal compiler error in `instantiate_virtual_regs_1', at function.c:3881
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
----------------------------------
The source code follows:
----------------------------------
int i;
unsigned short lots[100];
int main () {
asm("%0"::"m" (lots));
asm("%0"::"m" (i));
asm("%0":"=m" (lots));
asm("%0":"=m" (i));
asm("%0"::"r" (lots));
asm("%0"::"r" (i));
asm("%0":"=r" (lots));
asm("%0":"=r" (i));
return 0;
}
>How-To-Repeat:
Compile the above source code.
>Fix:
Remove the line 'asm("%0":"=r" (lots));
>Release-Note:
>Audit-Trail:
>Unformatted: