* Fix var-tracking for special record parameters passed indirectly
@ 2017-05-24 8:25 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2017-05-24 8:25 UTC (permalink / raw)
To: gcc-patches
[-- 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-24 8:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 8:25 Fix var-tracking for special record parameters passed indirectly Eric Botcazou
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).