[Bug c++/90784] New: A loop inside a constexpr function in a constexpr context is not evaluated at compile time
wandersys at aim dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 7 21:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90784
Bug ID: 90784
Summary: A loop inside a constexpr function in a constexpr
context is not evaluated at compile time
Product: gcc
Version: 9.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: wandersys at aim dot com
Target Milestone: ---
Created attachment 46461
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46461&action=edit
constexpr context evaluated in runtime
If constexpr function contains a loop and even if it is used in the constexpr
context, the loop inside it still evaluated in runtime.
Observed on GCC 9.1. GCC 8.x - OK. CLang - OK.
ASM code on godbolt: https://godbolt.org/z/2dxEV7
Example code in attachment.
More information about the Gcc-bugs
mailing list