Created attachment 1278115 [details] (auto generated by the comiler) /tmp/ccKWSr0p.out Description of problem: Compiling of the C++ file causes an internal compiler error Version-Release number of selected component (if applicable): $ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. How reproducible: 100 % reproducible Steps to Reproduce: 1. The following code to compile Actual results: cd '/home//CppApplicationForProbes' /usr/bin/gmake -f Makefile CONF=Debug "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf gmake[1]: Entering directory `/home/CppApplicationForProbes' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux/cppapplicationforprobes gmake[2]: Entering directory `/home/CppApplicationForProbes' mkdir -p build/Debug/GNU-Linux rm -f "build/Debug/GNU-Linux/main.o.d" g++ -c -g -std=c++11 -MMD -MP -MF "build/Debug/GNU-Linux/main.o.d" -o build/Debug/GNU-Linux/main.o main.cpp main.cpp: In constructor ‘constexpr main()::A::A()’: main.cpp:37:12: internal compiler error: in expand_expr_real_1, at expr.c:9358 struct A ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccKWSr0p.out file, please attach this to your bugreport. Expected results: the file is compiled well or the compiler reports an error Additional info: --- file contents (begin) ------ #include <cstdlib> #include <iostream> #include <map> #include <set> #include <sstream> #include <iomanip> #include <type_traits> int main() { struct B { int value1; }; B b; b.value1 = 2; auto my_value_1 = &b; std::set<int> value_g_2; struct A { int value1 = my_value_1->value1; std::set<int> & value2 = value_g_2;; }; A a; return 0; } ----- file contents (end) ----- - - - - preprocessed file is in the attachment
This is invalid code, rejected by GCC starting with http://gcc.gnu.org/r196727 aka PR55240.
Our engineering staff have investigated this issue and while it has been fixed upstream, the fix is considered too risky to include into RHEL 7.