This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add testcase for PR36318


Slightly adjusted from Alexanders submission, tested and installed.

Richard.

Alexander Strange <astrange@ithinksw.com>

	PR tree-optimization/36318
	* gcc.dg/tree-ssa/sra-7.c: New test.

Index: testsuite/gcc.dg/tree-ssa/sra-7.c
===================================================================
--- testsuite/gcc.dg/tree-ssa/sra-7.c	(revision 0)
+++ testsuite/gcc.dg/tree-ssa/sra-7.c	(revision 0)
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+typedef struct { char f[4]; } __attribute__((aligned (4))) s;
+
+void a(s *s1, s *s2)
+{
+  *s1 = *s2;
+}
+
+/* Struct copies should not be split into members.  */
+/* { dg-final { scan-tree-dump "\\\*s1_.\\\(D\\\) = \\\*s2"  "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]