http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60805
Bug ID: 60805 Summary: Validate const expressions created by var-tracking / debug information across targets. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: ramana at gcc dot gnu.org While fixing PR60655 Jakub noted that the problem really was that var-tracking and debug info generation can play a bit fast and loose in the types of expressions that are generated. Particularly the problem is when const expressions involving sym_refs are created, targets need to be able to handle / given a chance to decide on what kinds of expressions are valid and what not. Additionally const_ok_for_output_1 and friends in dwarf2out.c don't necessarily have the entire information on this and require some guess work in this. For 4.10 we need to instrument the compiler to produce some traces of the typical kinds of debug expressions that are generated, for a variety of targets and attempt to handle these in a common manner and only allow the basic common subset and possibly allowing targets to enable further constants to be generated.