[Bug c/46163] New: GCC Produces Invalid Assembly Code from Anonymous Function Syntax
kerrg at ccs dot neu.edu
gcc-bugzilla@gcc.gnu.org
Mon Oct 25 05:30:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46163
Summary: GCC Produces Invalid Assembly Code from Anonymous
Function Syntax
Product: gcc
Version: 4.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kerrg@ccs.neu.edu
Host: Linux x86_64
Target: Linux x86_64
Created attachment 22143
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22143
verbose outpuit from compilation
When compiling the following code:
int main(void)
{
int (*func)(void *) = ({ int $(int (*x)()) { x(x); }; $($); });
int x = func(func);
return 0;
}
GCC compiles it to bad assembly code, causing the following error:
func.s: Assembler messages:
func.s:38: Error: suffix or operands invalid for `call'
The particular problem line is this:
call $.1597
I have attached more verbose output.
More information about the Gcc-bugs
mailing list