https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99823
Bug ID: 99823 Summary: -funroll-all-loops bugs when using contexpr variable Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ustcw0ng at mail dot ustc.edu.cn Target Milestone: --- Created attachment 50483 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50483&action=edit constexpr.cpp && unroll.cpp -funroll-all-loops indicates "Unroll all loops, even if their number of iterations is uncertain when the loop is entered. This usually makes programs run more slowly.". But in the following example constexpr.cpp can never turn to unroll.cpp, even if number of iterations is certain due to constexpr. compiler flag: -O3 -std=c++2a -DNDEBUG -funroll-all-loops