diff options
-rw-r--r-- | gcc/gimple-lower-bitint.cc | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/bitint-107.c | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/gimple-lower-bitint.cc b/gcc/gimple-lower-bitint.cc index 56e5f82..f955f3e 100644 --- a/gcc/gimple-lower-bitint.cc +++ b/gcc/gimple-lower-bitint.cc @@ -6630,7 +6630,10 @@ gimple_lower_bitint (void) continue; if (gimple_code (use_stmt) == GIMPLE_PHI || is_gimple_call (use_stmt) - || gimple_code (use_stmt) == GIMPLE_ASM) + || gimple_code (use_stmt) == GIMPLE_ASM + || (is_gimple_assign (use_stmt) + && (gimple_assign_rhs_code (use_stmt) + == COMPLEX_EXPR))) { optimizable_load = false; break; diff --git a/gcc/testsuite/gcc.dg/bitint-107.c b/gcc/testsuite/gcc.dg/bitint-107.c new file mode 100644 index 0000000..a3f5f53 --- /dev/null +++ b/gcc/testsuite/gcc.dg/bitint-107.c @@ -0,0 +1,16 @@ +/* PR tree-optimization/115544 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O -fno-tree-fre -fno-tree-ccp -fno-tree-forwprop" } */ + +#if __BITINT_MAXWIDTH__ >= 129 +typedef _BitInt(129) B; +#else +typedef _BitInt(63) B; +#endif +B a, b; + +int +foo (void) +{ + return __builtin_mul_overflow (a, 1, &b); +} |