Bug 1634288

Summary: GCC ICE
Product: Red Hat Software Collections Reporter: Roger Leigh <rleigh>
Component: devtoolset-7Assignee: Marek Polacek <mpolacek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: v8314CC: rleigh
Target Milestone: alpha   
Target Release: 3.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-01 14:13:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roger Leigh 2018-09-29 15:09:11 UTC
Description of problem:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84785 is present in the current devtoolset-7 GCC version devtoolset-7-gcc-c++.x86_64 0:7.3.1-5.13.el7

It's fixed in 8.0.  I would like to check if this is a candidate for a 7.3 backport in devtoolset-7, as it has been fixed in 7.3 in other distributions.

Earlier devtoolset-7 releases, e.g. with GCC 7.2.1, are not affected.

Thanks,
Roger


Same issue also reported in https://bugzilla.altlinux.org/show_bug.cgi?id=35089 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892719 https://github.com/QuantStack/xtl/issues/71 and I encountered it in https://gitlab.com/rleigh/ome-files-cpp/-/jobs/102933303

Version-Release number of selected component (if applicable):

devtoolset-7-gcc-c++.x86_64 0:7.3.1-5.13.el7

How reproducible:

Always

Steps to Reproduce:
1. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84785 for repro
2. I triggered it with https://github.com/mpark/variant and https://gitlab.com/codelibre/ome-files-cpp/blob/master/lib/ome/files/MetadataMap.h#L87

Actual results:

6/113] Building CXX object lib/ome/files/CMakeFiles/ome-files.dir/CoreMetadata.cpp.o
FAILED: lib/ome/files/CMakeFiles/ome-files.dir/CoreMetadata.cpp.o 
/opt/rh/devtoolset-7/root/usr/bin/c++  -Dome_files_EXPORTS -I../lib -Ilib -isystem ../deps/dist/include -pedantic -Wall -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wextra -Wformat=2 -Wmissing-declarations -Wno-long-long -Wnon-virtual-dtor -Woverlength-strings -Woverloaded-virtual -Wredundant-decls -Wreorder -Wswitch-default -Wunused-variable -Wwrite-strings -Wno-variadic-macros -fstrict-aliasing -g -fPIC   -std=gnu++14 -MD -MT lib/ome/files/CMakeFiles/ome-files.dir/CoreMetadata.cpp.o -MF lib/ome/files/CMakeFiles/ome-files.dir/CoreMetadata.cpp.o.d -o lib/ome/files/CMakeFiles/ome-files.dir/CoreMetadata.cpp.o -c ../lib/ome/files/CoreMetadata.cpp
In file included from ../deps/dist/include/ome/compat/variant.h:46:0,
                 from ../lib/ome/files/MetadataMap.h:52,
                 from ../lib/ome/files/CoreMetadata.h:47,
                 from ../lib/ome/files/CoreMetadata.cpp:38:
../deps/dist/include/ome/compat/detail/variant.hpp: In substitution of ‘template<long unsigned int I, class ... Ts> using type_pack_element_t = typename mpark::lib::type_pack_element_impl::type::type [with long unsigned int I = I; Ts = {std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> >}]’:
../deps/dist/include/ome/compat/detail/variant.hpp:1861:9:   required by substitution of ‘template<class Arg, class Decayed, typename std::enable_if<(! std::is_same<Decayed, mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > > >::value), int>::type <anonymous>, typename std::enable_if<(! mpark::detail::is_in_place_index<Decayed>::value), int>::type <anonymous>, typename std::enable_if<(! mpark::detail::is_in_place_type<Decayed>::value), int>::type <anonymous>, long unsigned int I, class T, typename std::enable_if<std::is_constructible<T, Arg>::value, int>::type <anonymous> > constexpr mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > >::variant(Arg&&) [with Arg = const mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > >&; Decayed = mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > >; typename std::enable_if<(! std::is_same<Decayed, mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > > >::value), int>::type <anonymous> = <missing>; typename std::enable_if<(! mpark::detail::is_in_place_index<Decayed>::value), int>::type <anonymous> = <missing>; typename std::enable_if<(! mpark::detail::is_in_place_type<Decayed>::value), int>::type <anonymous> = <missing>; long unsigned int I = <missing>; T = <missing>; typename std::enable_if<std::is_constructible<T, Arg>::value, int>::type <anonymous> = <missing>]’
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_pair.h:198:12:   required from ‘struct std::pair<const std::basic_string<char>, mpark::variant<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, unsigned char, short unsigned int, unsigned int, long unsigned int, signed char, short int, int, long int, float, double, long double, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::vector<bool, std::allocator<bool> >, std::vector<unsigned char, std::allocator<unsigned char> >, std::vector<short unsigned int, std::allocator<short unsigned int> >, std::vector<unsigned int, std::allocator<unsigned int> >, std::vector<long unsigned int, std::allocator<long unsigned int> >, std::vector<signed char, std::allocator<signed char> >, std::vector<short int, std::allocator<short int> >, std::vector<int, std::allocator<int> >, std::vector<long int, std::allocator<long int> >, std::vector<float, std::allocator<float> >, std::vector<double, std::allocator<double> >, std::vector<long double, std::allocator<long double> > > >’
../lib/ome/files/MetadataMap.h:160:22:   required from here
../deps/dist/include/ome/compat/detail/variant.hpp:1861:9: internal compiler error: unexpected expression ‘I’ of kind template_parm_index
         typename T = lib::type_pack_element_t<I, Ts...>,
         ^~~~~~~~

Expected results:

Successful build without ICE.

Comment 2 Marek Polacek 2018-10-01 14:13:12 UTC

*** This bug has been marked as a duplicate of bug 1629813 ***