gcc/testsuite/
[official-gcc.git] / gcc / testsuite / g++.dg / other / pr39496.C
blobc9e55df436fc6ecdc9356d83805e1d97f4966b4f
1 // PR target/39496
2 // { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } }
3 // { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" }
5 // Verify that {foo,bar}{,2}param are all passed on the stack, using
6 // normal calling conventions, when not optimizing.
7 // { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*fooparam," } }
8 // { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*barparam," } }
9 // { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*foo2param," } }
10 // { dg-final { scan-assembler "\[^0-9-\]8\\(%ebp\\),\[^\n\]*bar2param," } }
12 static inline int foo (int fooparam)
14   return fooparam;
17 static int bar (int barparam)
19   return foo (barparam);
22 static inline double foo2 (double foo2param)
24   return foo2param;
27 static double bar2 (double bar2param)
29   return foo2 (bar2param);
32 int
33 main ()
35   return bar (0) + bar2 (0.0);