This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12268] New: Miscompilation of fortran/match.c
- From: "pbrook at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2003 15:32:11 -0000
- Subject: [Bug optimization/12268] New: Miscompilation of fortran/match.c
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12268
Summary: Miscompilation of fortran/match.c
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
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
GCC build triplet: i686-unknown-linux-gnu
GCC host triplet: i686-unknown-linux-gnu
GCC target triplet: i686-unknown-linux-gnu
The following testcase fails when compiled with -O. Somewhere along the line
the assignment in test() gets removed. Code derived from fortran/match.c.
int glob;
void
fn2(int ** q)
{
*q = &glob;
}
void test()
{
int *p;
fn2(&p);
*p=42;
}
int main()
{
test();
if (glob != 42) abort();
exit (0);
}