[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#780718: return in ?:-operator with function calls is incorrectly optimized



On 03/18/2015 11:39 AM, David Kalnischkies wrote:
> Package: g++
> Version: 4:4.7.2-1
> Severity: normal
> 
> Hi,
> 
> while testing apt with gcc-5 suite I noticed that while it compiles just
> fine, the resulting binaries produce incorrect results failing our
> integration tests (which aren't run at package buildtime, so this wasn't
> detected in the gcc-5 mass-rebuild).
> 
> While trying to come up with a smaller testcase I noticed¹ that with
> a slight variation even the g++-4.x series² emits the same strange
> results… clang on the other hand produces the expected results, neither
> of them generates any warnings about the code.
>
>
> Attached is as far as I got in terms of a testcase. Still depends on
> libapt as if I make the method directly available everything is fine…

would it be possible to have a test case which doesn't link the library, maybe
by including all relevant files so that we have a single translation unit?


Reply to: