This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC (DECL_CONSTRUCTOR_P): C++ PATCH for c++/83911, ICE with multiversioned constructor


On 02/16/2018 05:48 PM, Jason Merrill wrote:
We hit the bug in this testcase because build_over_call replaces the
constructor with a dispatcher function, and then build_aggr_init_expr
doesn't recognize it as a constructor.

Messing with the DECL_NAME of the dispatcher seems messy, but copying
the DECL_CXX_CONSTRUCTOR_P flag is easy.  So we can change the test in
build_aggr_init_expr, or change the definition of DECL_CONSTRUCTOR_P.
I lean toward the latter as more uniform, but not strongly.  Do you
have an opinion?

Yeah, I think copying DECL_CXX_CONSTRUCTOR_P is the right approach. I wondered about dtors, operator fns and conversion fns. They also rely on identifier flags.

dtors ICEs add_method (feel free to file a defect and assign to me). assignment operator seems ok. That assop is ok, suggests the change to mangle.c isn;t needed -- we mangle the name early enough?

[We could move CXX_{CON,DE}STRUCTOR_P functionality into the operator enumeration to free up a couple of flags, but that's definitely a stage 1 change]

nathan
--
Nathan Sidwell


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]