https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92478
Bug ID: 92478 Summary: [8 Regression] ICE: Segmentation fault Product: gcc Version: 8.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: anbu1024.me at gmail dot com Target Milestone: --- $ cat test.c void bar ( char * a , unsigned int b ) { static char const array[] = "STRING" ; __builtin_strcpy (a , &array[b == 0] ); } $ gcc-snapshot7 --version gcc (GCC) 7.4.1 20191107 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-snapshot7 test.c /usr/lib/x86_64-linux-gnu/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status $ gcc-snapshot8 --version gcc (GCC) 8.3.1 20191108 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc-snapshot8 test.c during RTL pass: expand test.c: In function ‘bar’: test.c:6:5: internal compiler error: Segmentation fault __builtin_strcpy (a , &array[b == 0] ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0xa6514f crash_signal ../../gcc-8-20191108/gcc/toplev.c:325 0xcf9403 selt ../../gcc-8-20191108/gcc/wide-int.cc:404 0xcf9403 wi::lts_p_large(long const*, unsigned int, unsigned int, long const*, unsigned int) ../../gcc-8-20191108/gcc/wide-int.cc:480 0x6b4773 bool wi::lts_p<generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, generic_wide_int<wi::extended_tree<192> > const&) ../../gcc-8-20191108/gcc/wide-int.h:1873 0x6b4773 wi::binary_traits<generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> >, wi::int_traits<generic_wide_int<wi::extended_tree<192> > >::precision_type, wi::int_traits<generic_wide_int<wi::extended_tree<192> > >::precision_type>::signed_predicate_result operator< <generic_wide_int<wi::extended_tree<192> >, generic_wide_int<wi::extended_tree<192> > >(generic_wide_int<wi::extended_tree<192> > const&, generic_wide_int<wi::extended_tree<192> > const&) ../../gcc-8-20191108/gcc/wide-int.h:3170 0x6b4773 tree_int_cst_lt(tree_node const*, tree_node const*) ../../gcc-8-20191108/gcc/tree.h:5740 0x6b4773 check_access ../../gcc-8-20191108/gcc/builtins.c:3125 0x6bf482 expand_builtin_strcpy ../../gcc-8-20191108/gcc/builtins.c:3780 0x6bf482 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int) ../../gcc-8-20191108/gcc/builtins.c:6978 0x7c9591 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc-8-20191108/gcc/expr.c:11062 0x6d935a expand_expr ../../gcc-8-20191108/gcc/expr.h:280 0x6d935a expand_call_stmt ../../gcc-8-20191108/gcc/cfgexpand.c:2704 0x6d935a expand_gimple_stmt_1 ../../gcc-8-20191108/gcc/cfgexpand.c:3638 0x6d935a expand_gimple_stmt ../../gcc-8-20191108/gcc/cfgexpand.c:3804 0x6daf1f expand_gimple_basic_block ../../gcc-8-20191108/gcc/cfgexpand.c:5837 0x6e0446 execute ../../gcc-8-20191108/gcc/cfgexpand.c:6443 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.