https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65000
Bug ID: 65000 Summary: ICE in in expand_builtin_eh_common, at except.c:2072 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: larsbj at gullik dot net CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org With this test program I get an ICE: ------- #include <boost/format.hpp> void setGateLog() { boost::format fmt("%%"); fmt % 1; } ------- g++ --version g++ (GCC) 5.0.0 20150210 (experimental) (as of revision 220578) g++ -O1 -fsanitize=undefined -fno-sanitize-recover -c test.cpp In file included from /usr/include/boost/format.hpp:49:0, from test.cpp:1: /usr/include/boost/format/feed_args.hpp: In function ‘void boost::io::detail::put(T, const boost::io::detail::format_item<Ch, Tr, Alloc>&, typename boost::basic_format<Ch, Tr, Alloc>::string_type&, typename boost::basic_format<Ch, Tr, Alloc>::internal_streambuf_t&, boost::io::detail::locale_t*) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; T = const int&; typename boost::basic_format<Ch, Tr, Alloc>::string_type = std::__cxx11::basic_string<char>; typename boost::basic_format<Ch, Tr, Alloc>::internal_streambuf_t = boost::io::basic_altstringbuf<char, std::char_traits<char>, std::allocator<char> >; boost::io::detail::locale_t = std::locale]’: /usr/include/boost/format/feed_args.hpp:122:10: internal compiler error: in expand_builtin_eh_common, at except.c:2072 void put( T x, ^ 0x8266d1 expand_builtin_eh_common ../../gcc/gcc/except.c:2072 0x8282df expand_builtin_eh_copy_values(tree_node*) ../../gcc/gcc/except.c:2108 0x76978a expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc/gcc/builtins.c:6521 0x84177b expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/gcc/expr.c:10488 0x77f91c expand_expr ../../gcc/gcc/expr.h:254 0x77f91c expand_call_stmt ../../gcc/gcc/cfgexpand.c:2383 0x77f91c expand_gimple_stmt_1 ../../gcc/gcc/cfgexpand.c:3327 0x77f91c expand_gimple_stmt ../../gcc/gcc/cfgexpand.c:3481 0x78374a expand_gimple_basic_block ../../gcc/gcc/cfgexpand.c:5470 0x7854c6 execute ../../gcc/gcc/cfgexpand.c:6088 Removing -fno-sanitize-recover or compiling without optimization removes the ICE. I can provide pre-processed source if wanted.