Bug 1372957 - ICE when compiling small C++ openmp program
Summary: ICE when compiling small C++ openmp program
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-04 11:02 UTC by Peter Osterlund
Modified: 2016-10-12 13:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-12 13:57:20 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 71910 0 None None None 2016-10-12 13:57:20 UTC

Description Peter Osterlund 2016-09-04 11:02:45 UTC
Description of problem:
When compiling a program using C++, std::string, openmp and a parallel (not parallel for) directive, I get an internal compiler error.

Version-Release number of selected component (if applicable):
g++ (GCC) 6.1.1 20160621 (Red Hat 6.1.1-3)

Steps to Reproduce:
1. Save the following code in a file test.C:

#include <string>
int main() {
    std::string s = "";
#pragma omp parallel
    {
        while (true) {
            printf(".");
        }
    }
}

2. Compile with the following command:
g++ -fopenmp -O2 -Wall -o test test.C

Actual results:
test.C: In function ‘int main()’:
test.C:10:1: internal compiler error: Segmentation fault
 }
 ^

Expected results:
A valid executable file.

Additional info:
I can reproduce this error also with g++ 6.2.0 from gcc.gnu.org.

Comment 1 Peter Osterlund 2016-09-04 11:33:04 UTC
I accidentally removed the following information:

How reproducible:
always

Comment 2 Jakub Jelinek 2016-10-12 13:57:20 UTC
I've fixed this upstream almost 2 months ago.  So, it should be fixed already in the current erratas (gcc-6.2.1-2.fc24 or gcc-6.2.1-2.fc25).


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