Fix typo in test case
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / builtins3.C
blob4a67b28e969fccedb8f6d26d095fa3602ac282c2
1 // Test whether this builtin minimally works in G++.
2 // Origin: Kaveh Ghazi Jan 16, 2001
3 // Copyright (C) 2001 Free Software Foundation.
4 //
5 // Special g++ Options: -O2
7 namespace std 
9   extern "C" void abort (void);
10   extern "C" void *alloca (__SIZE_TYPE__);
13 int main ()
15   using namespace std;
16   void *foo;
17   
18   foo = alloca (32);
19   if (!foo)
20     abort ();
22   foo = std::alloca (32);
23   if (!foo)
24     abort ();
26   foo = ::__builtin_alloca (32);
27   if (!foo)
28     abort ();
30   return 0;
33 extern "C"
35   static void * ::alloca (__SIZE_TYPE__)
36   {
37     std::abort ();
38   }