Skip to content

nvptx-as reorders ".file" directives #20

@tschwinge

Description

@tschwinge

While filing https://gcc.gnu.org/PR82202, I noticed that nvptx-as reorders .file directives, for example compiling libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c with -fopenacc -O2 -foffload=nvptx-none='-save-temps -g' we got:

$ [...]/nvptx-none-as -o ccfEmvMv.s_ ccfEmvMv.s
$ diff -uw ccfEmvMv.s ccfEmvMv.s_
[...]
 // BEGIN FUNCTION DECL: main$_omp_fn$0
 .entry main$_omp_fn$0 (.param.u64 %in_ar0);
-
+.file 1 "source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c"
 // BEGIN FUNCTION DEF: main$_omp_fn$0
 .entry main$_omp_fn$0 (.param.u64 %in_ar0)
 {
@@ -46,7 +44,6 @@
        @%r54   bra     $L7;
                mov.u64 %r37, %ar0;
                mov.u32 %r36, %ctaid.x;
-       .file 1 "source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-g-1.c"
        .loc 1 20 0
                shl.b32 %r39, %r36, 10;
                add.u32 %r40, %r39, %r36;

I don't think this is intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions