Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / const-1.c
index 2657c9b..a5b2b16 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
 /* { dg-options "-O2 -Wsuggest-attribute=const" } */
 
 extern int extern_const(int a) __attribute__ ((const));
@@ -35,10 +35,10 @@ foo2b(int n)
 
 /* Unbounded loops are not safe.  */
 static int __attribute__ ((noinline))
-foo3(int n)  /* { dg-warning "const\[^\n\]* normally" "detect const candidate" } */
+foo3(unsigned int n)  /* { dg-warning "const\[^\n\]* normally" "detect const candidate" } */
 {
   int ret = 0;
-  int i;
+  unsigned int i;
   for (i=0; extern_const (i+n); n++)
     ret+=extern_const (i);
   return ret;