public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1578] testsuite: Fix tree-ssa/alias-access-path-13.c on 32bit platforms (PR 106216)
@ 2022-07-08 16:14 Martin Jambor
  0 siblings, 0 replies; only message in thread
From: Martin Jambor @ 2022-07-08 16:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b984b84cbe4bf026edef2ba37685f3958a1dc1cf

commit r13-1578-gb984b84cbe4bf026edef2ba37685f3958a1dc1cf
Author: Martin Jambor <mjambor@suse.cz>
Date:   Fri Jul 8 18:12:26 2022 +0200

    testsuite: Fix tree-ssa/alias-access-path-13.c on 32bit platforms (PR 106216)
    
    For gcc.dg/tree-ssa/alias-access-path-13.c to work, SRA must think of
    accesses to foo.inn.val and to foo itself as different ones, i.e. they
    need to have different offset and size, which on 32bit platforms they
    do not.  Fixed by replacing a dummy long int field of the union with a
    struct of two integers.
    
    Tested by:
      make -k check-gcc RUNTESTFLAGS="tree-ssa.exp=alias-access-path-13.c" and
      make -k check-gcc RUNTESTFLAGS="--target_board=unix'{-m32}' tree-ssa.exp=alias-access-path-13.c"
    on an x86_64-linux, also with patched SRA to verify it still tests the
    original intent.
    
    gcc/testsuite/ChangeLog:
    
    2022-07-08  Martin Jambor  <mjambor@suse.cz>
    
            PR testsuite/106216
            * gcc.dg/tree-ssa/alias-access-path-13.c (union foo): Replace a long
            int field with a struct that is larger than an int also on 32bit
            platforms.

Diff:
---
 gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c
index e502a97bc75..87a94f5bf31 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-13.c
@@ -6,10 +6,15 @@ struct inn
   int val;
 };
 
+struct biggerstruct
+{
+  int a, b;
+};
+
 union foo
 {
   struct inn inn;
-  long int baz;
+  struct biggerstruct baz;
 } *fooptr;
 
 struct bar


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-08 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 16:14 [gcc r13-1578] testsuite: Fix tree-ssa/alias-access-path-13.c on 32bit platforms (PR 106216) Martin Jambor

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).