Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / builtins2.C
blob68cb4e2a1908360c515619ec2954fa40da3416a8
1 // { dg-do run  }
2 // { dg-options "-O2" }
3 // Test whether this builtin minimally works in G++.
4 // Origin: Kaveh Ghazi Jan 16, 2001
5 // Copyright (C) 2001 Free Software Foundation.
6 //
8 namespace std 
10   extern "C" void abort (void);
13 int main ()
15   using namespace std;
16   char f[16];
17   
18   if (::__builtin_strcpy (f, "hello world") != f
19       || __builtin_memcmp (f, "hello world", sizeof ("hello world")))
20     abort ();
21   
22   return 0;