https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122188
Bug ID: 122188
Summary: [16 Regression] crash on __builtin_ctzg: Segmentation
fault
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: xxs_chy at outlook dot com
Target Milestone: ---
Reproducer: https://godbolt.org/z/9aoecnsc6
Reduced testcase:
#include <stdint.h>
#define BS_VEC(type, num) __attribute__((vector_size(sizeof(type))))
uint32;
typedef uint64_t uint64;
func_8() {
const p_12;
BS_VEC(uint32, 4) BS_TEMP_0;
__builtin_ctzg((uint64)p_12 ? : 4081577, BS_TEMP_0[3];
}
Output:
<source>:9:3: internal compiler error: Segmentation fault
9 | __builtin_ctzg((uint64)p_12 ? : 4081577,
BS_TEMP_0[3];
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 | }
Note that the unreduced testcase is a well-defined program compilable for
Clang.