https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96835
Bug ID: 96835 Summary: Constructor in offload template class Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: tobias.weinzierl at durham dot ac.uk Target Milestone: --- I have a simple templated vector class with multiple constructors: #ifdef GPUOffloading #pragma omp declare target #endif template<int Size, typename Scalar> struct tarch::la::Vector { private: Scalar _values[Size]; public: Vector(); Vector (const Scalar& initialValue); [...] This code translates fine and I can use the vector class as long as I do not use one of the constructors (all the other non-overloaded routines work fine). I either get lto1: internal compiler error: Segmentation fault or an undefined symbol error.