This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/30637] The options -fno-unit-at-a-time and -finline-functions generates erroneous code
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Feb 2007 01:16:57 -0000
- Subject: [Bug c++/30637] The options -fno-unit-at-a-time and -finline-functions generates erroneous code
- References: <bug-30637-14016@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from reichelt at gcc dot gnu dot org 2007-02-09 01:16 -------
The bug has nothing to do with -fno-unit-at-a-time.
(It is ignored for C++ anyways.)
The bug is fixed since GCC 4.0.0.
Btw, here's a shorter self-contained program that hangs when compiled with
"g++ -O -finline-functions" by GCC 3.4.x:
====================================
struct A
{
virtual void FOO() {}
};
struct B
{
A* p;
B() : p(new A) {}
A* foo();
void bar();
};
A* B::foo()
{
return p;
}
void B::bar()
{
foo()->FOO();
}
int main()
{
B().bar();
return 0;
}
====================================
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30637