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#46718 - [gcc]Internal Compiler Error: Reentrant error reporting program

Attached to Project: Arch Linux
Opened by 刘力铭 (linux40) - Wednesday, 14 October 2015, 15:57 GMT
Last edited by Allan McRae (Allan) - Tuesday, 15 December 2015, 06:12 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
It happend when i add "auto t4 = glgltinySTL::tuple_cat(t, t3, 'z');" in my source file, and executed "g++ -std=c++11 -c test.cc -o test.o".

the output is as follows:
内部编译器错误:重入错误报告程序。
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.

my code: https://gist.github.com/anonymous/07f968fc0f97a19e044f

Additional info:
gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:/build/gcc/src/gcc-5.2.0/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 --with-default-libstdcxx-abi=gcc4-compatible
线程模型:posix
gcc 版本 5.2.0 (GCC)

Steps to reproduce:every time when i execute "g++ -std=c++11 -c test.cc -o test.o".
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 15 December 2015, 06:12 GMT
Reason for closing:  Upstream
Additional comments about closing:  https://gcc.gnu.org/bugzilla/show_bug.cg i?id=67983
Comment by Allan McRae (Allan) - Thursday, 15 October 2015, 02:34 GMT
Please *attach* a single file an provide the gcc command to demonstrate the issue.
Comment by 刘力铭 (linux40) - Friday, 16 October 2015, 03:15 GMT
Like this file?
   test.cc (21.9 KiB)
Comment by Allan McRae (Allan) - Friday, 16 October 2015, 03:26 GMT
I just compiled that file using "g++ -std=c++11 -c test.cc -o test.o" and got no ICE.
Comment by 刘力铭 (linux40) - Friday, 16 October 2015, 04:09 GMT
Try t1, t2 and t8,i add "//" before these line...
Comment by Allan McRae (Allan) - Saturday, 17 October 2015, 00:03 GMT
From the upstream bug report:

You recursively instantiate:

643 template <typename T, typename... Args> constexpr
644 auto make_single_index(tuple<T, Args...> &t) noexcept
645 -> decltype(make_single_index(const_cast<const tuple<T, Args...>
&>(t)))
646 {
647 return make_single_index(const_cast<const tuple<T, Args...> &>(t));
648 }


Still a bug, but only on bad code.
Comment by 刘力铭 (linux40) - Saturday, 17 October 2015, 02:11 GMT
Dose that mean the bug has been fixed, and I can wait for the release of new packages?
Comment by Allan McRae (Allan) - Saturday, 17 October 2015, 02:24 GMT
The bug has not been fixed upstream yet. But the bug is only tripped on invalid code, so fixing your code will at least hide the bug.
Comment by 刘力铭 (linux40) - Saturday, 17 October 2015, 02:27 GMT
Thanks.
Comment by 刘力铭 (linux40) - Saturday, 17 October 2015, 02:56 GMT
When I execute
const tuple<int, int, int> t(1, 2, 3);
index_holder<0, 0, 0> i = add_equal_index(make_multiple_index<0>(t.data.ot));
I get no ICE,
but if the code is
const tuple<int, int, int> t(1, 2, 3);
index_holder<0, 0, 0> i = make_multiple_index<0>(t.data);
I will get this bug, is this bad code?
Comment by 刘力铭 (linux40) - Saturday, 17 October 2015, 08:02 GMT
Finally, I use decltype to hide the bug successfully. Thanks.
Comment by Allan McRae (Allan) - Tuesday, 15 December 2015, 06:12 GMT
Upstream bug link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67983

Given this is only an error on bad code, and upstream is aware, I will close this bug.

Loading...