[Bug optimization/12187] New: Miscompilation of nested functions using host variables
pbrook at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 5 22:34:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12187
Summary: Miscompilation of nested functions using host variables
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pbrook at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
Functions containing nested functions which write to variables in their parent
are miscompiled. This might be rare in C, but is quite common in Fortran.
Simple Testcase
int main()
{
int a;
void test(int i)
{
a = i;
};
a = 0;
test (42);
if (a != 42)
abort ();
exit (0);
}
More information about the Gcc-bugs
mailing list