Bug 1300154
Summary: | g++ internal error during compilation of a small C++ code using c++14 flag | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | suva_aich |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WORKSFORME | QA Contact: | qe-baseos-tools-bugs |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.9 | CC: | mpolacek, suva_aich |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-27 21:55:36 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
suva_aich
2016-01-20 04:42:09 UTC
RHEL 3 never shipped gcc 4.9.2-1, but I believe Developer Toolset 3 also has not shipped 4.9.2-1, just 4.9.2-6 or 4.9.1-*. So, please clarify what compiler and OS version you are actually using, rpm -qf `which g++` glibc kernel etc. Furthermore, g++: internal compiler error: Killed (program cc1plus) is something out of g++ control, it means the kernel has killed the program, so most likely you don't have enough memory to compile it. It would be a bug only if it needed unreasonable amount of memory compared to the complexity of the source. As you haven't stated what source and version of packages you are using, it is impossible to recreate it, we'd need preprocessed source plus know which compiler you're using, all I can say is that with g++ 5.3.1 the testcase compiles just fine with reasonable amount of memory and compile time. Couple of points : 1) There was a syntax error in following line: std::regex reg("<(.*)>(.*)</(\\1.*)>)"); should be: std::regex reg("<(.*)>(.*)</(\\1.*)>"); Even then the problem of internal compiler failure persist. 2) This problem was generated on a publicly available g++ env. This is how you can reproduce: i) go to : http://www.tutorialspoint.com/compile_cpp11_online.php ii) select -std=c++14 option under Project -> Compile Options 3) Copy paste the program & hit compile. 4) The uname -a and g++ -v commands can be run in the provided Terminal window. The RHEL distro and g++ -v option was just copy pasted from there. Also the preprocessed version can be generated quite easily. 5) It may be a memory issue as this program runs without problem in other g++ env, such as, in www.cpp.sh, not sure whether they are running Red Hat though. I've tried running the testcase with GCC 7 and see no issues. Closing; please reopen if you see any problem with a supported GCC version. |