2
0

check-zti 520 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. N_STRUCTS=300
  3. # Utility routine to "hand" check type infos.
  4. let i=1;
  5. while [ $i != $N_STRUCTS ]; do
  6. sed -n "/^__ZTI.*s$i:/,/\.[sg][el]/p" test-clang.s |
  7. grep -v '\.[sg][el]' | sed 's/(\([0-9][0-9]*\))/\1/' >test-clang-zti
  8. sed -n "/^__ZTI.*s$i:/,/\.[sg][el]/p" test-gcc.s |
  9. grep -v '\.[sg][el]' | sed 's/(\([0-9][0-9]*\))/\1/' >test-gcc-zti
  10. diff -U3 test-gcc-zti test-clang-zti
  11. if [ $? != 0 ]; then
  12. echo "FAIL: s$i type info"
  13. else
  14. echo "PASS: s$i type info"
  15. fi
  16. let i=i+1
  17. done