Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#55066 - [gcc] internal compiler error after system upgrade with gcc 7.1.1-4

Attached to Project: Arch Linux
Opened by Aldrost (aldrost) - Monday, 07 August 2017, 20:33 GMT
Last edited by Bartłomiej Piotrowski (Barthalion) - Monday, 04 September 2017, 06:36 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When compiling a c++ project after system upgrade I got an error telling me to submit a full bug report. Here's the smallest program to which I could reduce the original source:

$ cat foo.cpp
#include <utility>

struct T {
int x = 0, y = x;
};

std::pair<int, T> f() { return {0, {}}; }
$ pacman -Qi gcc | grep Version
Version : 7.1.1-4
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.1.1 20170630 (GCC)
$ g++ foo.cpp
foo.cpp: In function ‘std::pair<int, T> f()’:
foo.cpp:7:38: internal compiler error: in replace_placeholders_r, at cp/tree.c:2795
std::pair<int, T> f() { return {0, {}}; }
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

----------
It doesn't seem to me that this is an arch-specific bug but I can't compare with another distro with the same compiler version.
The code compiles fine with gcc 6.3 (running in Void linux, though).

Downgrading to 7.1.1-2 gives the same error, and unfortunately I can't check with an earlier version as I cleaned the pacman cache recently.
This task depends upon

Closed by  Bartłomiej Piotrowski (Barthalion)
Monday, 04 September 2017, 06:36 GMT
Reason for closing:  Upstream
Comment by Bartłomiej Piotrowski (Barthalion) - Wednesday, 09 August 2017, 06:35 GMT
I believe it's upstream issue, as 7.1.1 20170622 from Fedora 26 also throws this.
Comment by Aldrost (aldrost) - Wednesday, 09 August 2017, 11:00 GMT
I think I must agree with you because I just found a very simmilar bug report on the gcc bug tracker: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79937
I haven't checked there before as the error message explicitly referred to bugs.archlinux.org.

According to the bug guidelines "it might be helpful to post this in the Arch bug tracker" so we probably shouldn't close this for now?
Comment by Bartłomiej Piotrowski (Barthalion) - Thursday, 10 August 2017, 05:57 GMT
The message is mostly there to delegate some work related to filtering bogus reports to distributions, so only real bugs hit upstream bug tracker.

Let's leave it open, but you should probably contact Marek Polacek as his last comment about testing a fix is from March.
Comment by Bartłomiej Piotrowski (Barthalion) - Monday, 04 September 2017, 06:36 GMT
Subscribed to the issue, I will backport the fix if it ever happens.

Loading...