Created attachment 31025 [details] testcase hi, on the attached testcase you can see that location of LASF{10,12,28} in the output assembly varies. this prevents ccache from reuse objects. LASF24 content change is not a problem and can be unified in the other way. $ ./bug.sh + rm -f t1.s t2.s + CXXFLAGS='-Wall -gno-record-gcc-switches -g2 -gdwarf-4 --save-temps' + g++ -Wall -gno-record-gcc-switches -g2 -gdwarf-4 --save-temps repo/branch1/t.cpp -S + mv t.s t1.s + mv t.ii t1.ii + g++ -Wall -gno-record-gcc-switches -g2 -gdwarf-4 --save-temps repo/branch2/t.cpp -S + mv t.s t2.s + mv t.ii t2.ii + diff -u t1.s t2.s --- t1.s 2013-10-17 11:38:03.084369344 +0200 +++ t2.s 2013-10-17 11:38:03.177702172 +0200 @@ -407,6 +407,8 @@ .string "nothrow_t" .LASF22: .string "bool" +.LASF12: + .string "signed char" .LASF18: .string "float" .LASF5: @@ -423,16 +425,14 @@ .string "__gnu_debug" .LASF2: .string "__gnu_cxx" -.LASF12: - .string "signed char" +.LASF24: + .string "repo/branch2/t.cpp" .LASF11: .string "long long unsigned int" .LASF9: .string "unsigned int" .LASF32: .string "_ZN9__gnu_cxx24__numeric_traits_integerIlE5__maxE" -.LASF10: - .string "long unsigned int" .LASF8: .string "short unsigned int" .LASF21: @@ -445,8 +445,8 @@ .string "GNU C++ 4.8.1 20130531 (release)" .LASF4: .string "__max" -.LASF28: - .string "nothrow" +.LASF10: + .string "long unsigned int" .LASF17: .string "double" .LASF3: @@ -457,7 +457,7 @@ .string "__debug" .LASF6: .string "__digits" -.LASF24: - .string "repo/branch1/t.cpp" +.LASF28: + .string "nothrow" .ident "GCC: (PLD-Linux) 4.8.1 20130531 (release)" .section .note.GNU-stack,"",@progbits
The output of the strings is based on the the traverse of the hashtable. this might mean the output of the strings in the hashtable be outputted at a different location based on the hash of the strings. In this case it is because "repo/branch2/t.cpp" and "repo/branch1/t.cpp" are going to be different hashes which is causing the difference in the hash table traversal.