public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix gcc.dg/guality/asm-1.c regressions on 4.6 branch
@ 2011-10-18 16:42 Jakub Jelinek
  2011-10-19  8:48 ` Richard Guenther
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2011-10-18 16:42 UTC (permalink / raw)
  To: Jason Merrill; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

Hi!

Apparently a recent change (2011-10-1[23] or so) regressed
gcc.dg/guality/asm-1.c test on x86_64-linux on the 4.6 branch.
This turned out to be a bug in loc_descriptor which has been passing wrong
mode on the recursive call, so when we had var_location note containing
SImode subreg of some DImode expression, the inner loc_descriptor would
just give up because of the mode mismatch.

Fixed thusly (here the trunk version of the patch, attached 4.6 version),
bootstrapped/regtested on x86_64-linux and i686-linux (both branches in each
case), ok for trunk/4.6?

2011-10-18  Jakub Jelinek  <jakub@redhat.com>

	* dwarf2out.c (loc_descriptor): For SUBREG pass SUBREG_REG's mode as
	second argument instead of mode.

--- gcc/dwarf2out.c.jj	2011-09-08 11:21:10.000000000 +0200
+++ gcc/dwarf2out.c	2011-10-18 14:09:46.000000000 +0200
@@ -12502,7 +12502,8 @@ loc_descriptor (rtx rtl, enum machine_mo
 	 legitimate to make the Dwarf info refer to the whole register which
 	 contains the given subreg.  */
       if (REG_P (SUBREG_REG (rtl)) && subreg_lowpart_p (rtl))
-	loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized);
+	loc_result = loc_descriptor (SUBREG_REG (rtl),
+				     GET_MODE (SUBREG_REG (rtl)), initialized);
       else
 	goto do_default;
       break;

	Jakub

[-- Attachment #2: Z --]
[-- Type: text/plain, Size: 706 bytes --]

2011-10-18  Jakub Jelinek  <jakub@redhat.com>

	* dwarf2out.c (loc_descriptor): For SUBREG pass SUBREG_REG's mode as
	second argument instead of mode.

--- gcc/dwarf2out.c.jj	2011-08-02 10:42:23.000000000 +0200
+++ gcc/dwarf2out.c	2011-10-18 11:21:38.000000000 +0200
@@ -14608,7 +14608,8 @@ loc_descriptor (rtx rtl, enum machine_mo
 	 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);
+      loc_result = loc_descriptor (SUBREG_REG (rtl),
+				   GET_MODE (SUBREG_REG (rtl)), initialized);
       break;
 
     case REG:

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix gcc.dg/guality/asm-1.c regressions on 4.6 branch
  2011-10-18 16:42 [PATCH] Fix gcc.dg/guality/asm-1.c regressions on 4.6 branch Jakub Jelinek
@ 2011-10-19  8:48 ` Richard Guenther
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2011-10-19  8:48 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Jason Merrill, gcc-patches

On Tue, Oct 18, 2011 at 5:37 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> Apparently a recent change (2011-10-1[23] or so) regressed
> gcc.dg/guality/asm-1.c test on x86_64-linux on the 4.6 branch.
> This turned out to be a bug in loc_descriptor which has been passing wrong
> mode on the recursive call, so when we had var_location note containing
> SImode subreg of some DImode expression, the inner loc_descriptor would
> just give up because of the mode mismatch.
>
> Fixed thusly (here the trunk version of the patch, attached 4.6 version),
> bootstrapped/regtested on x86_64-linux and i686-linux (both branches in each
> case), ok for trunk/4.6?

Ok.

Thanks,
Richard.

> 2011-10-18  Jakub Jelinek  <jakub@redhat.com>
>
>        * dwarf2out.c (loc_descriptor): For SUBREG pass SUBREG_REG's mode as
>        second argument instead of mode.
>
> --- gcc/dwarf2out.c.jj  2011-09-08 11:21:10.000000000 +0200
> +++ gcc/dwarf2out.c     2011-10-18 14:09:46.000000000 +0200
> @@ -12502,7 +12502,8 @@ loc_descriptor (rtx rtl, enum machine_mo
>         legitimate to make the Dwarf info refer to the whole register which
>         contains the given subreg.  */
>       if (REG_P (SUBREG_REG (rtl)) && subreg_lowpart_p (rtl))
> -       loc_result = loc_descriptor (SUBREG_REG (rtl), mode, initialized);
> +       loc_result = loc_descriptor (SUBREG_REG (rtl),
> +                                    GET_MODE (SUBREG_REG (rtl)), initialized);
>       else
>        goto do_default;
>       break;
>
>        Jakub
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-19  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-18 16:42 [PATCH] Fix gcc.dg/guality/asm-1.c regressions on 4.6 branch Jakub Jelinek
2011-10-19  8:48 ` Richard Guenther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).