https://bugs.llvm.org/show_bug.cgi?id=42148
Bug ID: 42148
Summary: clang hangs when compiling a code sample
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
My command line is clang++ -O3, its version is 9.0.0
The code line is as follows:
typedef unsigned __int128 u128_t;
typedef __float128 f128_t;
typedef union
{
f128_t f;
u128_t i;
} union128_t;
int test(volatile f128_t *start_X_ptr, volatile f128_t *start_Y_ptr)
{
for (unsigned iter_count = 1; iter_count <= 2; iter_count++)
{
union128_t read_valX = { .f = *start_X_ptr };
union128_t read_valY = { .f = *start_Y_ptr };
u128_t expected_val = ((iter_count - 1) * read_valY.i);
if (read_valX.i != expected_val)
{
return -1;
}
union128_t write_valX = { .i = (iter_count * (read_valX.i + 1)) };
union128_t write_valY = { .i = (read_valX.i + 1) };
*start_X_ptr = write_valX.f;
*start_Y_ptr = write_valY.f;
}
return 0;
}
clang hangs when it compiles the code. It consumes a lot of CPU time.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs