[Bug debug/80646] [5/6/7 Regression] wrong type info for extern inline function when compiling Emacs
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 8 08:20:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80646
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |NEW
Known to work| |4.9.4
Keywords| |wrong-debug
Last reconfirmed| |2017-05-08
Ever confirmed|0 |1
Summary|[Regression] wrong type |[5/6/7 Regression] wrong
|info for extern inline |type info for extern inline
|function when compiling |function when compiling
|Emacs |Emacs
Target Milestone|--- |5.5
Known to fail| |5.4.0, 6.3.0, 7.1.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
With GCC 7.1 we get
(gdb) ptype make_number
type = struct {
long i;
} (long)
(gdb) ptype make_natnum
type = int ()
so problem reversed somehow ;)
It sounds like somehow we get a unprototyped state thrown at dwarf2out.c
(even though there are prototypes in the header).
Note that debuginfo looks good but we have pruned one of the prototypes
from the t.c as unused. So gdb should probably show <optimized out>
rather than int (). That's analysis for 7.1 (make_natnum is not used in t.c),
not sure what goes wrong with earlier compilers. gdb should also be improved
(given make_natnum is global) to look into non-current CUs.
I reproduced with
(gdb) start
(gdb) ptype ...
debug info emitted from GCC 6 looks complete but still gdb somehow messes up.
So I start to belive this is a gdb bug.
More information about the Gcc-bugs
mailing list