Open tschwinge opened 7 years ago
This behavior got implemented in commit bd12880f83fe393d66229ae7ed34236cd7645f23 "Deal with .file and .loc directives".
I'll asume that the reason lies in PTX 3.1, 10.5 DEBUGGING DIRECTIVES, Table 162. Debugging Directives: .file stating that "The .file directive is allowed only in the outermost scope".
So, the reordering of .file
directives seems to be intentional, after all. But, it needs to be documented properly.
While filing https://gcc.gnu.org/PR82202, I noticed that nvptx-as reorders
.file
directives, for example compilinglibgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c
with-fopenacc -O2 -foffload=nvptx-none='-save-temps -g'
we got:I don't think this is intentional?