David Greene | 4a37a69 | 2009-07-16 22:24:20 +0000 | [diff] [blame] | 1 | // This is a regression test on debug info to make sure that we can |
| 2 | // print line numbers in asm. |
| 3 | // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \ |
Dan Gohman | 2d65d35 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 4 | // RUN: llc --disable-fp-elim -O0 -relocation-model=pic | grep {# SrcLine 25} |
Evan Cheng | 6f49855 | 2009-07-29 17:40:28 +0000 | [diff] [blame] | 5 | // XFAIL: * |
David Greene | 4a37a69 | 2009-07-16 22:24:20 +0000 | [diff] [blame] | 6 | |
| 7 | #include <stdlib.h> |
| 8 | |
| 9 | class DeepStack { |
| 10 | int seedVal; |
| 11 | public: |
| 12 | DeepStack(int seed) : seedVal(seed) {} |
| 13 | |
| 14 | int shallowest( int x ) { return shallower(x + 1); } |
| 15 | int shallower ( int x ) { return shallow(x + 2); } |
| 16 | int shallow ( int x ) { return deep(x + 3); } |
| 17 | int deep ( int x ) { return deeper(x + 4); } |
| 18 | int deeper ( int x ) { return deepest(x + 6); } |
| 19 | int deepest ( int x ) { return x + 7; } |
| 20 | |
| 21 | int runit() { return shallowest(seedVal); } |
| 22 | }; |
| 23 | |
| 24 | int main ( int argc, char** argv) { |
| 25 | |
| 26 | DeepStack DS9( (argc > 1 ? atoi(argv[1]) : 0) ); |
| 27 | return DS9.runit(); |
| 28 | } |