This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/48853] [4.7 Regression] Wrong DWARF codegen when Pmode != ptr_mode
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 6 May 2011 22:50:53 +0000
- Subject: [Bug debug/48853] [4.7 Regression] Wrong DWARF codegen when Pmode != ptr_mode
- Auto-submitted: auto-generated
- References: <bug-48853-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48853
--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> 2011-05-06 22:43:36 UTC ---
(In reply to comment #17)
> loc_descriptor change in
>
> http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg01406.html
>
> @@ -14469,7 +15018,10 @@
> up an entire register. For now, just assume that it is
> legitimate to make the Dwarf info refer to the whole register which
> contains the given subreg. */
> - loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized);
> + if (REG_P (SUBREG_REG (rtl)) && subreg_lowpart_p (rtl))
> + loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized);
> + else
> + goto do_default;
> break;
>
> case REG:
>
> doesn't handle:
>
> Breakpoint 5, loc_descriptor (rtl=0x7ffff0b24c30, mode=SImode,
> initialized=VAR_INIT_STATUS_INITIALIZED)
> at /export/gnu/import/git/gcc-x32/gcc/dwarf2out.c:15035
> 15035 if ((REG_P (SUBREG_REG (rtl))
> (gdb) call debug_rtx (rtl)
> (subreg:SI (symbol_ref:DI ("a") [flags 0x2] <var_decl 0x7ffff0a9c500 a>) 0)
> (gdb)
>
Also
Breakpoint 5, loc_descriptor (rtl=0x7ffff086be88, mode=SImode,
initialized=VAR_INIT_STATUS_INITIALIZED)
at /export/gnu/import/git/gcc-x32/gcc/dwarf2out.c:15035
15035 if ((REG_P (SUBREG_REG (rtl))
(subreg:SI (const:DI (plus:DI (symbol_ref:DI ("a") [flags 0x2] <var_decl
0x7ffff0993e60 a>)
(const_int 4 [0x4]))) 0)
(gdb)
gcc.dg/guality/pr45882.c failures may expose other issues.