This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81042] Too many constexpr interations on unreachable loop.


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();
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]