Ticket #63 (new bug)

Opened 3 years ago

Virtual bases not correctly initialized inside template clases

Reported by: verm Assigned to: tendra
Priority: normal Milestone: 5.0.0
Component: Producers Version: HEAD
Severity: normal Keywords:
Cc: Operating System: Any
Hardware: Any Sub Component: Producers - cpp

Description

Reporter: Jose Juan Mendoza Rodriguez <josejuanmr@iespana.es> Opened: 2003-12-30 09:53

Virtual base pointers are not correctly initialized when some initializer for an intermediate class (not the virtual base) is called with arguments that depend (value-wise or type-wise) on template parameters. Schematically,

class B : public virtual A { ... };
template <int N> class C : public B {
C(...) : A(...), B(N) {...}
};

The origin of this bug lies at line 2608 of construct.c, in function convert_constr.