New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest GCC (8) & fix for cse (fixes #1463) #1466
Conversation
Regression test for symenginegh-1463, std::set_intersection called with unsorted ranges in cse.cpp
The build with latest gcc uses |
Next warning to fail:
|
Success, the test triggers the failure:
|
gcov seem to be failing:
is it cache related? |
Are you sure it's not cache related (we've changed gcc version here, right?) xref: But then again, I also saw a bug report gcc which looks similar: |
I reset the cache before the last job. (ccache does track the gcc version so that this shouldn't be an issue at all.) |
Didn't wait for Appyveyor to finish since tests passed for the previous commit, and the last commit only affected gcov. |
@bjodah thanks for fixing it. For reference, why does it now require to use |
We can either do,
or
We had the first one, but we are catching a polymorphic type by value, (A type with a virtual function) which means we only have memory allocated for |
I simply followed @isurf's fix and extended it to the other exception types, since it's a macro I assumed it was simply used as a type specifier in the generated code. Looking at the implementation in catch (in our checked-in version) I see: #define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) and #define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \
do { \
Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \
if( __catchResult.allowThrows() ) \
try { \
static_cast<void>(expr); \
__catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \
} \
catch( exceptionType ) { \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
} \
catch( ... ) { \
__catchResult.useActiveException( resultDisposition ); \
} \
else \
__catchResult.captureResult( Catch::ResultWas::Ok ); \
INTERNAL_CATCH_REACT( __catchResult ) \
} while( Catch::alwaysFalse() ) so I guess it now catches the exception by reference |
I see. Yes, we have to use a reference for a polymorphic type. This looks almost like a bug in Catch itself, since it would be more logical (I would think) to simply write |
While #1465 is functional, in this PR I'll try to make Travis fail for the regression test, before applying the fix.