https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89850
Bug ID: 89850 Summary: long compile times with -fsanitize=undefined and -Wduplicated-branches Product: gcc Version: 8.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: joerg.rich...@pdv-fs.de Target Milestone: --- cat > t.cc <<EOF class FooBar { private: long long value_; public: FooBar() : value_( 0 ) {} bool isUnused() const { return value_ == 0; } }; struct Stream { template<class T> Stream& operator<<( T const& t ) { return *this; } }; void xxx( Stream& os ) { FooBar bar; long long foo = 0; if( !bar.isUnused() ) { os << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo << foo; } } EOF g++ -fsanitize=undefined -Wduplicated-branches -c -o t.o t.cc