blob: 66581f9fa47791e79877c0732ec68054b84c7493 [file] [log] [blame]
/* APPLE LOCAL file 4284121 */
/* { dg-do run } */
/* APPLE LOCAL x86_64 */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2" } */
/* Test stack computations with stdcall attribute. */
/* Primarily for darwin, although should work elsewhere. */
extern void abort();
int ww = 5;
int __attribute__((__stdcall__)) __attribute__((noinline)) bar(int x)
{
return ww+x;
}
int y = 5;
int main() {
volatile int xx = 3;
int i;
int z = bar(y);
for (i=0; i<20; i++)
{
ww += 5;
z += bar(y);
}
if (z!=1260)
abort();
if (xx != 3)
abort();
return 0;
}