[Bug c++/81042] Too many constexpr interations on unreachable loop.
maxmati4 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sun Aug 20 12:56:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81042
Mateusz Nowotynski <maxmati4 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxmati4 at gmail dot com
--- Comment #2 from Mateusz Nowotynski <maxmati4 at gmail dot com> ---
I also experienced this bug on gcc (Gentoo 6.4.0 p1.0) 6.4.0 and gcc (GCC)
8.0.0 20170819 (experimental). On version 6.4 it results in never ending
compilation and on 8.0 it trigers same error as @KevinCox.
Whats more for me it looks like regrsion since my code compiles fine on gcc
(Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005 haven't tried @KevinCox version.
My program triggering this error:
struct Table
{
constexpr Table() : primes()
{
for(int i = 1; i < 100; ++i){
if(!primes[i]) continue;
for(int j = 1; j < 100; ++j);
}
}
bool primes[100];
};
int main(){
constexpr auto primes = Table();
}
More information about the Gcc-bugs
mailing list