From: Eric Botcazou <ebotcazou@adacore.com>
To: gcc-patches@gcc.gnu.org
Subject: Fix var-tracking for special record parameters passed indirectly
Date: Wed, 24 May 2017 08:25:00 -0000 [thread overview]
Message-ID: <2244478.hX7oRJZ8It@polaris> (raw)
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
var-tracking doesn't track structures and arrays as a whole because it cannot
track values for multiple-part variables, but it has a special provision for
Ada fat pointer types, which are structures with integral mode containing a
pair of pointers and are pervasive in the language (see param-[123].c in the
guality testsuite). This works fine e.g. on x86 or x86-64, but not on SPARC
or Visium which pass these structures indirectly as per their ABI.
Tested on x86_64-suse-linux and visium-elf, applied on mainline as obvious.
2017-05-24 Eric Botcazou <ebotcazou@adacore.com>
* var-tracking.c (track_expr_p): Do not return 0 for tracked record
parameters passed indirectly.
--
Eric Botcazou
[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 641 bytes --]
Index: var-tracking.c
===================================================================
--- var-tracking.c (revision 248140)
+++ var-tracking.c (working copy)
@@ -5220,8 +5220,9 @@ track_expr_p (tree expr, bool need_rtl)
if (decl_rtl && MEM_P (decl_rtl))
{
/* Do not track structures and arrays. */
- if (GET_MODE (decl_rtl) == BLKmode
- || AGGREGATE_TYPE_P (TREE_TYPE (realdecl)))
+ if ((GET_MODE (decl_rtl) == BLKmode
+ || AGGREGATE_TYPE_P (TREE_TYPE (realdecl)))
+ && !tracked_record_parameter_p (realdecl))
return 0;
if (MEM_SIZE_KNOWN_P (decl_rtl)
&& MEM_SIZE (decl_rtl) > MAX_VAR_PARTS)
reply other threads:[~2017-05-24 8:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=2244478.hX7oRJZ8It@polaris \
--to=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/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).