This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/86128] New: ice in get_string_length, at tree-ssa-strlen.c:653


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

            Bug ID: 86128
           Summary: ice in get_string_length, at tree-ssa-strlen.c:653
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the following reduced C code:

a;
*stpcpy(char *, char());
b() {
  char c;
  __builtin___strcpy_chk(c, a, 0);
  strcat(c, b);
}

Somewhere between revision 261303 and 261388, it breaks with -O2.

[dcb@dhcppc0 dcbTest]$ ~/gcc/results.261303/bin/gcc -c -w -O2 bug444.c
[dcb@dhcppc0 dcbTest]$ ~/gcc/results.261388.ubsan/bin/gcc -c -w -O2 bug444.c
during GIMPLE pass: strlen
bug444.c: In function ‘b’:
bug444.c:3:1: internal compiler error: in get_string_length, at
tree-ssa-strlen.c:653
 b() {
 ^
0x32e8707 get_string_length
        ../../trunk/gcc/tree-ssa-strlen.c:653
0x33044a2 handle_builtin_strcat
        ../../trunk/gcc/tree-ssa-strlen.c:2314
0x3309fe0 strlen_check_and_optimize_stmt
        ../../trunk/gcc/tree-ssa-strlen.c:3362
0x3309fe0 strlen_dom_walker::before_dom_children(basic_block_def*)
        ../../trunk/gcc/tree-ssa-strlen.c:3683

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]