This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46163] New: GCC Produces Invalid Assembly Code from Anonymous Function Syntax
- From: "kerrg at ccs dot neu.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Oct 2010 05:29:56 +0000
- Subject: [Bug c/46163] New: GCC Produces Invalid Assembly Code from Anonymous Function Syntax
- Auto-submitted: auto-generated
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.