public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/5171: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881
@ 2001-12-23 10:42 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2001-12-23 10:42 UTC (permalink / raw)
  To: aliberi, armandl, gcc-bugs, gcc-prs, nobody

Synopsis: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Dec 23 10:42:29 2001
State-Changed-Why:
    With gcc 3.0.3 there is no internal compiler error, just
    the following compilation failures:
    a.c:13: incompatible types in assignment
    a.c:16: confused by earlier errors, bailing out
    
    If I comment out the line 'asm("%0":"=r" (lots));
    I get various assembler errors.
    
    I recommend that you look at the tutorials
    at http://www.linuxassembly.org to learn the correct
    gcc inline assembly syntax.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5171


^ permalink raw reply	[flat|nested] 2+ messages in thread

* other/5171: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881
@ 2001-12-21 18:56 armandl
  0 siblings, 0 replies; 2+ messages in thread
From: armandl @ 2001-12-21 18:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: aliberi


>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:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-12-23 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-23 10:42 other/5171: Internal compiler error in instantiate_virtual_regs_1', at function.c:3881 rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2001-12-21 18:56 armandl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).