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

            Bug ID: 62204
           Summary: internal compiler error with -Wall
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: koes at cmu dot edu

Created attachment 33369
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33369&action=edit
preprocessed file for reproducing -Wall related bug

I get an internal compiler error when compiling pharmer (http://pharmer.sf.net)
under Ubuntu 14.04 with the packaged g++ 4.8.2 and with a version of 4.8.3 I
built myself (../configure --enable-languages=c,c++,fortran x86_64-linux-gnu
).  The problem may also be present in 4.9.1, but manifest differently.

The command line to reproduce this error in 4.8.2/4.8.3 is:
 g++  -O3 -Wall -c   main.ii

Interestingly, there is another file in the build that gets a similar error
(PharmerQuery.cpp). For this file removing -Wall does not resolve the crash,
but passing -save-temps does, so it is difficult to provide a preprocessed
file. g++ 4.9.1 also cannot compile this file, although with 4.9.1 this ICE
goes away with the removal of -Wall (as well as -save-temps).

Below I've pasted both the output for main.ii (where removing -Wall fixes the
problem) and the output for PharmerQuery.cpp (where I can't provide a .ii
file).

koes@nova:~/workspace/pharmer/Release$ g++  -O3 -Wall -c   main.ii -v
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-linux-gnu
Configured with: ../configure --enable-languages=c,c++,fortran x86_64-linux-gnu
Thread model: posix
gcc version 4.8.3 (GCC) 
COLLECT_GCC_OPTIONS='-O3' '-Wall' '-c' '-v' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /raid/usr/local/bin/../libexec/gcc/x86_64-linux-gnu/4.8.3/cc1plus
-fpreprocessed main.ii -quiet -dumpbase main.ii -mtune=generic -march=x86-64
-auxbase main -O3 -Wall -version -o /tmp/ccpGqbNt.s
GNU C++ (GCC) version 4.8.3 (x86_64-linux-gnu)
    compiled by GNU C version 4.8.3, GMP version 5.1.3, MPFR version 3.1.2-p3,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (GCC) version 4.8.3 (x86_64-linux-gnu)
    compiled by GNU C version 4.8.3, GMP version 5.1.3, MPFR version 3.1.2-p3,
MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1cbd2130c9c03c77c4428f506cfeafb2
In file included from /usr/include/boost/algorithm/string/split.hpp:16:0,
                 from /usr/include/boost/algorithm/string.hpp:23,
                 from ../queryparsers.h:34,
                 from ../main.cpp:44:
/usr/include/boost/algorithm/string/iter_find.hpp: In instantiation of
‘SequenceSequenceT& boost::algorithm::iter_split(SequenceSequenceT&, RangeT&,
FinderT) [with SequenceSequenceT = std::vector<std::basic_string<char> >;
RangeT = std::basic_string<char>; FinderT =
boost::algorithm::detail::token_finderF<int (*)(int)throw ()>]’:
/usr/include/boost/algorithm/string/split.hpp:149:69:   required from
‘SequenceSequenceT& boost::algorithm::split(SequenceSequenceT&, RangeT&,
PredicateT, boost::algorithm::token_compress_mode_type) [with SequenceSequenceT
= std::vector<std::basic_string<char> >; RangeT = std::basic_string<char>;
PredicateT = int (*)(int)throw ()]’
../queryparsers.h:237:50:   required from here
/usr/include/boost/algorithm/string/iter_find.hpp:182:9: internal compiler
error: Segmentation fault
         }
         ^
0x89ffdf crash_signal
    ../../gcc/toplev.c:332
0x5b236a c_tree_chain_next
    ../../gcc/c-family/c-common.h:1058
0x5b236a gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:158
0x5b2d01 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:495
0x5b3346 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:520
0x5b3743 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:509
0x5b3989 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:260
0x5cd8a5 gt_ggc_mx_cp_binding_level(void*)
    ./gt-cp-name-lookup.h:64
0x5b269f gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:659
0x5b3787 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:366
0x5b2c84 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:476
0x5b3885 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:243
0x5cd993 gt_ggc_mx_cxx_binding(void*)
    ./gt-cp-name-lookup.h:87
0x5b269f gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:659
0x5b3787 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:366
0x5b3755 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:510
0x5b4089 gt_ggc_mx_lang_type(void*)
    ./gt-cp-tree.h:795
0x5b2d4a gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:500
0x5b2d39 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:499
0x5b376b gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:364
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.



g++ -DOUTPUTSMINA -DEIGEN_DISABLE_STACK_SIZE_ASSERT
-I/usr/local/include/openbabel-2.0 -I"/home/dkoes/git/code/src/lib"
-I/usr/include/jsoncpp -I/usr/local/include -I/usr0/local/include -O3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"PharmerQuery.d" -MT"PharmerQuery.d"
-o"PharmerQuery.o" "../PharmerQuery.cpp"
../PharmerQuery.cpp: In constructor ‘std::map<_Key, _Tp, _Compare,
_Alloc>::map() [with _Key = boost::exception_detail::type_info_; _Tp =
boost::shared_ptr<boost::exception_detail::error_info_base>; _Compare =
std::less<boost::exception_detail::type_info_>; _Alloc =
std::allocator<std::pair<const boost::exception_detail::type_info_,
boost::shared_ptr<boost::exception_detail::error_info_base> > >]’:
../PharmerQuery.cpp:836:1: internal compiler error: Segmentation fault
 }
 ^
0x89ffdf crash_signal
    ../../gcc/toplev.c:332
0x5b236a c_tree_chain_next
    ../../gcc/c-family/c-common.h:1058
0x5b236a gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:158
0x5b2d01 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:495
0x5b2d1d gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:497
0x5b3525 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:309
0x5b2d5b gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:501
0x5b4043 gt_ggc_mx_lang_type(void*)
    ./gt-cp-tree.h:790
0x5b2d4a gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:500
0x5b2c76 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:475
0x5b2c76 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:475
0x5b3525 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:309
0x5b2d5b gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:501
0x5b4043 gt_ggc_mx_lang_type(void*)
    ./gt-cp-tree.h:790
0x5b2d4a gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:500
0x5b2c76 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:475
0x5b3755 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:510
0x5b2d5b gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:501
0x5b2f06 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:384
0x5b30e5 gt_ggc_mx_lang_tree_node(void*)
    ./gt-cp-tree.h:551
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [PharmerQuery.o] Error 1

Reply via email to