This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/41090] [4.3/4.4/4.5 Regression] Using static label reference in c++ class constructor produces wrong code
- From: "jason at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Feb 2010 01:14:59 -0000
- Subject: [Bug c++/41090] [4.3/4.4/4.5 Regression] Using static label reference in c++ class constructor produces wrong code
- References: <bug-41090-3639@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jason at gcc dot gnu dot org 2010-02-03 01:14 -------
The testcase now works, but a variant that uses virtual inheritance does not:
int i;
struct A { A() {} };
struct C: virtual A
{
C();
};
C::C()
{
static void *labelref = &&label;
goto *labelref;
label: i = 1;
}
int main()
{
C c;
}
Unassigning myself now.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
AssignedTo|jason at gcc dot gnu dot org|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41090