[Bug target/97318] [nvptx] Function splitting results in invalid function name

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Oct 10 21:35:01 GMT 2020


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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@gcc.gnu.org>:

https://gcc.gnu.org/g:e88b04bda8a4bdcd03f867fc23f07d5d80f3f19a

commit r11-3778-ge88b04bda8a4bdcd03f867fc23f07d5d80f3f19a
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Oct 10 17:22:01 2020 +0200

    [nvptx] Replace dots in function names

    When function splitting clones a function sinf in the host compiler, the
clone
    is callled sinf.part.0.  However, ptx does not allows dots in identifiers,
so
    we run into:
    ...
    ptxas test.o, line 23; fatal   : Parsing error near '.part': syntax error
    ptxas fatal   : Ptx assembly aborted due to errors
    nvptx-as: ptxas returned 255 exit status
    ...

    Rename such functions by replacing the dots with dollar signs.

    Tested check-gcc on nvptx.

    Tested libgomp on x86_64-linux with nvptx accelerator.

    gcc/ChangeLog:

    2020-10-10  Tom de Vries  <tdevries@suse.de>

            PR target/97318
            * config/nvptx/nvptx.c (nvptx_replace_dot): New function.
            (write_fn_proto, write_fn_proto_from_insn, nvptx_output_call_insn):
            Use nvptx_replace_dot.


More information about the Gcc-bugs mailing list