[Bug c++/103326] New: constexpr crashing when uses with vector extensions

unlvsur at live dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 19 03:27:19 GMT 2021


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

            Bug ID: 103326
           Summary: constexpr crashing when uses with vector extensions
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

using x86_64_v16qi [[gnu::__vector_size__ (16)]] = char;

template<typename T>
void foo()
{
        constexpr x86_64_v16qi zero{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0};
}

void foo2()
{
        foo<int>();
}

D:\hg\fast_io\.tmp>g++ -S simd_constexpr_crashing.cc -Ofast -std=c++20
-march=native -I../include
simd_constexpr_crashing.cc: In instantiation of 'void foo() [with T = int]':
simd_constexpr_crashing.cc:11:10:   required from here
simd_constexpr_crashing.cc:6:32: internal compiler error: in tsubst_copy, at
cp/pt.c:17303
    6 |         constexpr x86_64_v16qi zero{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
      |                                ^~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


More information about the Gcc-bugs mailing list