Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.ext / namedret2.C
blob339fc11e29eb6d60ca3b707e81f9803071405665
1 // { dg-do assemble { target alpha*-*-* } }
2 // { dg-options "-Wno-deprecated" }
4 // This test verifies that return type promotion is working correctly.  
5 // The Alpha ABI specifies that 32-bit return values have bit 31 propagated,
6 // i.e. the value is sign-extended even if the unpromoted type is unsigned.
8 unsigned int f(unsigned int x) return y(x) { } // { dg-error "" } 
10 extern "C" void abort ();
12 int main()
14   typedef long (*long_func)(long);
15   long_func g = reinterpret_cast<long_func>(f);
17   if (g(-1L) != -1L)
18     abort ();
19   return 0;