Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 83481 - Internal compiler error produced by asm statement
Summary: Internal compiler error produced by asm statement
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-04 20:02 UTC by Jeff Rubin
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-02-17 14:35:23 UTC

Attachments (Terms of Use)

Description Jeff Rubin 2003-02-04 20:02:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)

Description of problem:
Consider the following (admittedly bogus) program:

int main(void) {
	typedef struct {
		int i1,i2,i3,i4;
	} foo_t;
	foo_t f;
	asm ("addl %0,$eax" : "=r" (f) : );

Compiling with gcc 3.2 (gcc -S foo.c -o foo.s) produces
foo.c: In function `main':
 foo.c:7: Internal compiler error in instantiate_virtual_regs_1, at 

Same thing if I delete ",i4", but not if I also delete ",i3" or
",i2, i3" from the struct definition.  I know this is asm and so
is not covered by any standard, but I think this behavior isn't
quite right.  I'm not even convinced that it is correct for it to
work with just "i1" as the only member, although this occurs in
glibc, so things would break if it were made illegal.  Is it possible
to describe just what lvalues should be legal here (for f) and
what the semantics are if f is not an integral type?

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.See description

Additional info:

Comment 1 Jakub Jelinek 2003-02-17 14:35:23 UTC
Please file this to
__asm with bogus arguments is IMHO low priority.

Note You need to log in before you can comment on or make changes to this bug.