public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Eric Botcazou <ebotcazou@adacore.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch] Fix GC issue triggered by arithmetic overflow checking
Date: Thu, 13 Oct 2016 10:16:00 -0000	[thread overview]
Message-ID: <1624828.Cq9Sk6vVoa@polaris> (raw)
In-Reply-To: <CAFiYyc2YzPFDOh-Pxmna6xWcrkguQ=1YW+uDSJPRyXHApjG-7Q@mail.gmail.com>

> Yes.  But that's not the only source for DECL_UID differences.  Btw,
> I see lots of FOR_EACH_HASH_TABLE_ELEMENT in var-tracking.c
> but they don't look like their outcome is supposed to be dependent on
> element ordering.

This leads to NOTE_INSN_VAR_LOCATION notes emitted in a different order, which 
are then interpreted by dwarf2out_var_location.  In particular:

(note 6350 6349 6351 (var_location temp (nil)) NOTE_INSN_VAR_LOCATION)
(note 6351 6350 6352 (var_location temp$low (mem/c:DI (plus:SI (reg/f:SI 30 
%fp)
        (const_int -112 [0xffffffffffffff90])) [10 MEM[(struct cpp_num 
*)&result + 8B]+0 S8 A64])) NOTE_INSN_VAR_LOCATION)
(note 6352 6351 6353 (var_location temp$8 (nil)) NOTE_INSN_VAR_LOCATION)
[...]
(code_label 2091 6355 2092 79 912 "" [1 uses])
(note 2092 2091 5271 79 [bb 79] NOTE_INSN_BASIC_BLOCK)

is interpreted differently from:

(note 6350 6349 6351 (var_location temp (nil)) NOTE_INSN_VAR_LOCATION)
(note 6351 6350 6352 (var_location temp$8 (nil)) NOTE_INSN_VAR_LOCATION)
(note 6352 6351 6353 (var_location temp$low (mem/c:DI (plus:SI (reg/f:SI 30 
%fp)
        (const_int -112 [0xffffffffffffff90])) [10 MEM[(struct cpp_num 
*)&result + 8B]+0 S8 A64])) NOTE_INSN_VAR_LOCATION)
[...]
(note 2092 2091 5271 79 [bb 79] NOTE_INSN_BASIC_BLOCK)

@@ -32608,6 +32608,17 @@
 	.uleb128 0x8
 	.byte	0x93	! DW_OP_piece
 	.uleb128 0x8
+	.uaword	.LLVL592-.LLtext0	! Location list begin address 
(*.LLLST153)
+	.uaword	.LLVL597-.LLtext0	! Location list end address 
(*.LLLST153)
+	.uahalf	0x9	! Location expression size
+	.byte	0x93	! DW_OP_piece
+	.uleb128 0x8
+	.byte	0x8e	! DW_OP_breg30
+	.sleb128 -112
+	.byte	0x93	! DW_OP_piece
+	.uleb128 0x8
+	.byte	0x93	! DW_OP_piece
+	.uleb128 0x8
 	.uaword	.LLVL695-.LLtext0	! Location list begin address 
(*.LLLST153)
 	.uaword	.LLVL696-.LLtext0	! Location list end address 
(*.LLLST153)
 	.uahalf	0xe	! Location expression size

probably because the non-null location comes last in the second case.

-- 
Eric Botcazou

  reply	other threads:[~2016-10-13 10:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 18:56 Eric Botcazou
2016-10-10  8:59 ` Richard Biener
2016-10-10 10:38   ` Eric Botcazou
2016-10-10 10:45     ` Richard Biener
2016-10-11  8:05       ` Eric Botcazou
2016-10-16 18:57         ` Eric Botcazou
2016-10-17  8:40           ` Richard Biener
2016-10-10 10:49     ` Richard Biener
2016-10-13 10:16       ` Eric Botcazou [this message]
2016-10-13 10:20         ` Richard Biener
2016-10-13 10:37           ` Jakub Jelinek
2016-10-13 10:59             ` Eric Botcazou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624828.Cq9Sk6vVoa@polaris \
    --to=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).