[Bug c++/60299] New: [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

Bug ID: 60299
   Summary: [C++11] Copy constructor calls itself if base class
has a constructor which is a variadic function
template
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: m.lederhil...@ds-automotion.com

I have made a small example (see attachment) which exhibits the problem.

The generated copy constructor of class C calls itself, and then the base
class's constructor - see disassembly (see attachment of gdb session). This
results in an infinite recursion.


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #2 from Martin Lederhilger  ---
Created attachment 32187
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32187&action=edit
Command line used to build the example


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #1 from Martin Lederhilger  ---
Created attachment 32186
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32186&action=edit
Example which exhibits the probelm


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #3 from Martin Lederhilger  ---
Created attachment 32188
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32188&action=edit
GDB session which shows the disassembly of C's copy constructor


[Bug c++/60299] [C++11] Copy constructor calls itself if base class has a constructor which is a variadic function template

2014-02-21 Thread m.lederhil...@ds-automotion.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60299

--- Comment #4 from Martin Lederhilger  ---
Interestingly clang-3.4 produces the same result - is my program somehow wrong?