This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81042] Too many constexpr interations on unreachable loop.
- From: "v at vsamko dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Oct 2017 15:30:00 +0000
- Subject: [Bug c++/81042] Too many constexpr interations on unreachable loop.
- Auto-submitted: auto-generated
- References: <bug-81042-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81042
Valentine <v at vsamko dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |v at vsamko dot com
--- Comment #3 from Valentine <v at vsamko dot com> ---
I'm having the same problem with gcc 7.2. Clang handles this correctly.
constexpr int gcc_bug() {
for (unsigned int i = 0; i != 1; ++i) {
continue;
int q = 0;
while (q == -1) {}
}
return 0;
}
int main() {
constexpr int x = gcc_bug();
}