[Bug d/93215] New: If a label is created in an asm block in a templated function, then an error is reported if the function is instantiated multiple times

elronnd at elronnd dot net gcc-bugzilla@gcc.gnu.org
Thu Jan 9 18:33:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93215

            Bug ID: 93215
           Summary: If a label is created in an asm block in a templated
                    function, then an error is reported if the function is
                    instantiated multiple times
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: elronnd at elronnd dot net
  Target Milestone: ---

Basic POC:

void asm_test(int x)() {
        asm {"
                label:
                jmp label
        ";};
}

void main() {
        asm_test!5();
        asm_test!6();
}


More information about the Gcc-bugs mailing list