[Bug middle-end/111856] ICE with return type of typedef of void and `#pragma omp declare simd`

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111856

--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrea Pinski <[email protected]>:

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

commit r17-3156-ge212f5ef86f1a87c4471f8076a2cc6843ad10a20
Author: Kevin Stefanov <[email protected]>
Date:   Sat Aug 8 13:41:14 2026 +0300

    OpenMP: Use VOID_TYPE_P to check for void return type in SIMD function
clones.

    This change fixes an issue where functions
    decorated with:
    pragma omp declare simd
    that return void via a typedef would crash
    GCC with an ICE while compiling a program
    containing such a function, by using
    VOID_TYPE_P instead of directly comparing
    to void_type_node. New testcase added.

            PR middle-end/111856

    gcc/ChangeLog:

            * omp-simd-clone.cc (simd_clone_adjust_return_type): Use
VOID_TYPE_P
            when checking for void return type in adjusted functions.
            (simd_clone_adjust): Likewise.

    gcc/testsuite/ChangeLog:

            * gcc.dg/gomp/pr111856.c: New test.

    Signed-off-by: Kevin Stefanov <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.