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: [patch] Fix DWARF so types with subprogram definitions don't get moved to type unit (issue4433068)


It's a good check to add, but if it returns true we should abort
rather than
just returning 0.

I couldn't convince myself that a subprogram definition inside a type declaration would never happen, so I took the defensive approach. If you're confident that it can't (or shouldn't) ever happen, then what if I leave the predicate contains_subprogram_definition as is, remove the call from the condition, and instead assert that it returns false just before returning 1 from should_move_die_to_comdat?

(I have found a couple more cases where this happens in gcc 4.4.3, but
they're fixed on trunk.)

-cary

http://codereview.appspot.com/4433068/


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