Bug 83481 - Internal compiler error produced by asm statement
Internal compiler error produced by asm statement
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-04 15:02 EST by Jeff Rubin
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-17 09:35:23 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Rubin 2003-02-04 15:02:12 EST
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 
function.c:3972

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

Steps to Reproduce:
1.See description
2.
3.
    

Additional info:
Comment 1 Jakub Jelinek 2003-02-17 09:35:23 EST
Please file this to http://gcc.gnu.org/gnats.html.
__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.