[Bug c++/71910] ICE on invalid OpenMP code

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 18 15:00:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71910

--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
Created attachment 38922
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38922&action=edit
preprocessed testcase

I can also reproduce this on 5.4 and trunk with a cross-compiler configured
with --target=x86_64-w64-mingw32, using a preprocessed input. I've modified the
testcase like this (attaching preprocessed source):

#include <vector>
extern "C" void exit(int);
int main(void)
{
        std::vector<double> vec(10);
        #pragma omp parallel
                exit(0);
}

The backtrace on trunk at the point of segfault is:

t.cc: In function ‘int main()’:
t.cc:12:1: internal compiler error: Segmentation fault
0xd8b11f crash_signal
        ../../gcc/gcc/toplev.c:335
0xbb2e1e inline_edge_summary
        ../../gcc/gcc/ipa-inline.h:285
0xbb2e1e estimate_function_body_sizes
        ../../gcc/gcc/ipa-inline-analysis.c:2698
0xbb734e compute_inline_parameters(cgraph_node*, bool)
        ../../gcc/gcc/ipa-inline-analysis.c:3030
0xe6ca08 convert_callers_for_node
        ../../gcc/gcc/tree-sra.c:5112
0xe72628 cgraph_node::call_for_symbol_and_aliases(bool (*)(cgraph_node*,
void*), void*, bool)
        ../../gcc/gcc/cgraph.h:3137
0xe72628 convert_callers
        ../../gcc/gcc/tree-sra.c:5127
0xe72628 modify_function
        ../../gcc/gcc/tree-sra.c:5183
0xe7bad3 ipa_early_sra
        ../../gcc/gcc/tree-sra.c:5411
0xe7bad3 execute
        ../../gcc/gcc/tree-sra.c:5458


More information about the Gcc-bugs mailing list