https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67285
Bug ID: 67285
Summary: ICE with (rdiv (POW:s @0 REAL_CST@1) @0)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hs.naveen2u at gmail dot com
Target Milestone: ---
The following pattern should work as expected:-
+ /* Simplify pow(x,c) / x -> pow(x,c-1). */
+ (simplify
+ (rdiv (POW:s @0 REAL_CST@1) @0)
+ (if (!TREE_OVERFLOW (@1))
+ (POW @0 (minus @1 { build_one_cst (type); }))))
However, it generates the following error:-
internal compiler error: tree check: expected ssa_name, have var_decl in
simplify_builtin_call, at tree-ssa-forwprop.c:1259
Its due to REAL_CST@1