Your message dated Wed, 27 May 2020 19:16:27 +0000
with message-id <[email protected]>
and subject line Bug#916837: Removed package(s) from unstable
has caused the Debian Bug report #907649,
regarding clang-6.0: Erroneous loop optimisation with -O2, accessing to wrong 
std::vector element
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
907649: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907649
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: clang-6.0
Version: 1:6.0.1-5
Severity: normal

Dear Maintainer,

When compiling with -O2 the code below, resulting loop is wrongly optimized 
leading
to plainly wrong results (not an approximation), it seems that elements in 
std::vector are not accessed in the right order.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#include <iostream>
#include <vector>

class Foo {
private:
    std::vector<double> _a;
    std::vector<double> _d;

public:
    Foo(const std::vector<double> &x, const std::vector<double> &y)
        : _a(x.size()), _d(x.size()) {

        for (unsigned int i = 0; i < x.size() - 1; i++) {
            _a[i] = x[i + 1] - x[i];
            _d[i] = (y[i + 1] - y[i]) / _a[i];
        }
    }

    const std::vector<double> &a() const noexcept { return _a; }
};

int main() {

    // Read input file
    std::vector<double> x, y;
    while (std::cin) {
        double xi, yi;
        if (std::cin >> xi >> yi) {
            x.push_back(xi);
            y.push_back(yi);
        }
    }

    // Create Foo instance
    Foo foo(x, y);

    // Print computed data
    for (auto a : foo.a()) std::cout << a << '\n';

    return 0;
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

When executing the following commands (assuming that file bug.cpp contains code 
above)

$> clang++-6.0 -std=c++11 -O2 -o bug  bug.cpp
$> paste <(seq 1 5) <(seq 1 5) | ./bug

the expected result is:
1
1
1
1
0

But one gets:
1
2
2
0
0

Nevertheless, the expected result is obtained with -O1.

Best regards,

Juan


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), 
(500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.17.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clang-6.0 depends on:
ii  binutils                 2.31.1-4
ii  libc6                    2.27-5
ii  libc6-dev                2.27-5
ii  libclang-common-6.0-dev  1:6.0.1-5
ii  libclang1-6.0            1:6.0.1-5
ii  libgcc-8-dev             8.2.0-4
ii  libgcc1                  1:8.2.0-4
ii  libjsoncpp1              1.7.4-3
ii  libllvm6.0               1:6.0.1-5
ii  libobjc-8-dev            8.2.0-4
ii  libstdc++-8-dev          8.2.0-4
ii  libstdc++6               8.2.0-4

Versions of packages clang-6.0 recommends:
ii  libomp-dev    6.0.1-1
ii  llvm-6.0-dev  1:6.0.1-5
ii  python        2.7.15-3

Versions of packages clang-6.0 suggests:
pn  clang-6.0-doc  <none>
pn  gnustep        <none>
pn  gnustep-devel  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1:6.0.1-14.1+rm

Dear submitter,

as the package llvm-toolchain-6.0 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/916837

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to