OSDN Git Service

2010-03-31 Martin Jambor <mjambor@suse.cz>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / sms-7.c
index 35f04a5..29791ff 100644 (file)
@@ -1,9 +1,10 @@
 /* { dg-do run } */
-/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing " } */
+/* { dg-options "-O2 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms" } */
 
 extern void abort (void);
 
-void foo (int *a, short * __restrict__ b, short * __restrict__ c) 
+__attribute__ ((noinline))
+void foo (int * __restrict__ a, int * __restrict__ b, short * c) 
 {
    int i;
    for(i = 0; i < 100; i+=4)
@@ -15,12 +16,17 @@ void foo (int *a, short * __restrict__ b, short * __restrict__ c)
      }
 }   
 
-int a[100];
-short b[100], c[100];
+int a[100], b[100];
+short c[100];
 
 int main()
 {
+#if (__SIZEOF_INT__ <= 2)
+  int i;
+  long res;
+#else
   int i, res;
+#endif  
   for(i = 0; i < 100; i++)
     {
       b[i] = c[i] = i;
@@ -38,4 +44,7 @@ int main()
   return 0;        
 }
 
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms"  { target spu-*-* } } } */
+/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3  "sms" { target powerpc*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "sms" } } */