Bug 1450335 - internal compiler error: in expand_expr_real_1, at expr.c:9358
Summary: internal compiler error: in expand_expr_real_1, at expr.c:9358
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-12 09:41 UTC by obn
Modified: 2017-07-18 21:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-18 21:02:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
(auto generated by the comiler) /tmp/ccKWSr0p.out (796.72 KB, text/x-csrc)
2017-05-12 09:41 UTC, obn
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 55240 0 None None None 2017-05-12 09:55:54 UTC

Description obn 2017-05-12 09:41:59 UTC
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

Comment 2 Jakub Jelinek 2017-05-12 09:54:55 UTC
This is invalid code, rejected by GCC starting with http://gcc.gnu.org/r196727
aka PR55240.

Comment 5 Jeff Law 2017-07-18 21:02:44 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.