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]

[testsuite PATCH]: Trivial gcc.dg/visibility-11.c fix for x86_64


Hello!

For x86_64, call to memcpy was fully optimized away, so the scan-assembler condition never triggered. The proposed testsuite "fix" simply enlarges the test array to some convenient value, so the memcpy optimization does not trigger anymore.

Patch was tested for x86_64-pc-linux-gnu and i386-pc-linux-gnu by running the testsuite.

2006-07-03 Uros Bizjak <uros@kss-loka.si>

   * gcc.dg/visibility-11.c: Enlarge test array to 1024 bytes to
   avoid memcpy optimization.

Uros.
Index: gcc.dg/visibility-11.c
===================================================================
--- gcc.dg/visibility-11.c	(revision 115156)
+++ gcc.dg/visibility-11.c	(working copy)
@@ -12,7 +12,7 @@
 extern void* memcpy (void *, const void *, __SIZE_TYPE__);
 #pragma GCC visibility pop
 
-struct a { int a[10]; };
+struct a { int a[1024]; };
 
 extern void *bar (struct a *, struct a *, int);
 

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