internal compiler error: in output_constructor_regular_field, at varasm.c:4821
I'm hitting an ICE in a rather complex C++ code using new features of C++11. I'm working on a simple test case, as I cannot publish what I have there now, but let me start with a description.
The problem occurs when I have derived classes, each with a constexpr constructor (the objects are created in read-only memory that way), which takes one parameter (pointer to const object). The problem I'm seeing is:
> internal compiler error: in output_
There are multiple levels of inheritance. The private field in base class is set with a constructor parameter, this parameter is passed verbatim from the most derived class to the base class with constructors. Derived classes have virtual functions.
Now some of my findings:
1. The strangest one - if the base class has an accessor for this field it fails, but if this accessor is virtual (it's not overridden anywhere) it works (probably related to vtable?)
2. If the constructors are not "constexpr" it works fine
Was there a similar bug for gcc? I see that there are some changes in this file and in this function in the trunk of GCC, but I don't know whether it changes anything...
I'll work on a testcase...
Thx for help!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Freddie Chopin for more information if necessary.