https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49130

David Blaikie <dblaikie at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dblaikie at gmail dot com

--- Comment #12 from David Blaikie <dblaikie at gmail dot com> ---
> Note that both DW_AT_name and DW_TAG_template_value_param are
> incorrect.  The demangler gets it right:
> 
>    void f<double>(S2<double, sizeof (double*)>)

Yeah, the problem here is that the /type/ is correctly `S2<double, 8ul>` -
that's the same type no matter how it's written. But the mangling of `f` is
distinct depending on how the expression is written...

I'm not really sure how we should encode that in DWARF - it'd be problematic to
encode a different `S2` instantiation for this context compared to some other
place that names the type differently - in terms of the debugger being able to
treat them as the same type, match declarations and definitions, etc. I guess
S2<double, sizeof (double*)> could be emitted as an alias/typedef of the
underlying S2<double, 8ul>?

Or some other way to carry the mangle-equivalent details on the
DW_TAG_template_*_parameter directly?

Though these expression template issues only apply to functions, yeah? Is there
a need to deduplicate function definitions - generally the linker has already
done this & the DWARF describes the function definition - I guess the issue
here is that two different functions will have the same DW_AT_name & confuse
the debugger/user if they're trying to call the functions in an expression
evaluator, etc.

Reply via email to