public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/96058] New: ICE in c_getstr at gcc/fold-const.c:15475
@ 2020-07-04  9:16 marxin at gcc dot gnu.org
  2020-07-04  9:19 ` [Bug tree-optimization/96058] " marxin at gcc dot gnu.org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-04  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96058
           Summary: ICE in c_getstr at gcc/fold-const.c:15475
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---

I see the ICE in a LTRANS when using LTO on chrome. So it's unlikely I can
create a reduced-test case:

I'm using GCC 10.1 release:

gcc --version
gcc (SUSE Linux) 10.1.1 20200625 [revision
c91e43e9363bd119a695d64505f96539fa451bf2]
Copyright (C) 2020 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.

$ /usr/lib64/gcc/x86_64-suse-linux/10/lto1 -fltrans chrome.ltrans81.o -quiet
during GIMPLE pass: strlen
../../chrome/browser/ui/views/sharing/sharing_icon_view.cc: In member function
‘GetVectorIconBadge’:
../../chrome/browser/ui/views/sharing/sharing_icon_view.cc:146: internal
compiler error: in tree_to_uhwi, at tree.h:4519
0x666aa8 tree_to_uhwi(tree_node const*)
        ../../gcc/tree.h:4519
0x666aa8 c_getstr(tree_node*, unsigned long*)
        ../../gcc/fold-const.c:15475
0xf54bf2 get_stridx
        ../../gcc/tree-ssa-strlen.c:537
0xde690d strlen_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/tree-ssa-strlen.c:5832
0xde5e63 dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:309
0x1134468 printf_strlen_execute
        ../../gcc/tree-ssa-strlen.c:5922
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.opensuse.org/> for instructions.

(gdb) bt
#0  c_getstr (src=0x7fffeffb0e28, strlen=0x0) at ../../gcc/fold-const.c:15475
#1  0x0000000000f54bf3 in get_stridx (exp=0x7fffeffa6480, offrng=0x0,
rvals=0x0) at ../../gcc/tree-ssa-strlen.c:537
#2  0x0000000000de690e in strlen_dom_walker::before_dom_children
(this=0x7fffffffdfa0, bb=0x7fffeffb70d0) at ../../gcc/gimple.h:4539
#3  0x0000000000de5e64 in dom_walker::walk (this=0x7fffffffdfa0,
bb=0x7fffeffb70d0) at ../../gcc/domwalk.c:309
#4  0x0000000001134469 in (anonymous namespace)::printf_strlen_execute
(fun=0x7ffff0988bb0, warn_only=<optimized out>) at
../../gcc/tree-ssa-strlen.c:5922
#5  0x0000000000d49063 in execute_one_pass (pass=0x1d00a50) at
../../gcc/passes.c:2502
#6  0x0000000000d7e825 in execute_pass_list_1 (pass=0x1d00a50) at
../../gcc/passes.c:2590
#7  execute_pass_list_1 (pass=0x1cfe680) at ../../gcc/passes.c:2591
#8  execute_pass_list (fn=0x7ffff0988bb0, pass=<optimized out>) at
../../gcc/passes.c:2601
#9  0x000000000111bc42 in cgraph_node::expand (this=0x7ffff6fbee10) at
../../gcc/cgraphunit.c:2300
#10 0x000000000110f6a6 in expand_all_functions () at
../../gcc/cgraphunit.c:2471
#11 symbol_table::compile (this=0x7ffff7754100) at ../../gcc/cgraphunit.c:2822
#12 0x00000000010fdeab in lto_main () at ../../gcc/lto/lto.c:653
#13 0x00000000010fa1be in compile_file () at ../../gcc/toplev.c:458
#14 0x00000000010c7ffa in do_compile () at ../../gcc/toplev.c:2278
#15 toplev::main (this=this@entry=0x7fffffffe23e, argc=<optimized out>,
argv=<optimized out>) at ../../gcc/toplev.c:2417
#16 0x00000000010c73cc in main (argc=<optimized out>, argv=<optimized out>) at
../../gcc/main.c:39
(gdb) p debug_tree(exp)
No symbol "exp" in current context.
(gdb) p debug_tree(src)
 <string_cst 0x7fffeffb0e28
    type <array_type 0x7fffeff55888
        type <record_type 0x7ffff7701e70 VectorIcon readonly cxx-odr-p VOID
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff4460000 context <namespace_decl 0x7ffff7581390 gfx>
            pointer_to_this <pointer_type 0x7ffff7701f18> reference_to_this
<reference_type 0x7ffff5ddfb28>>
        BLK
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
        domain <integer_type 0x7fffeff55738 type <integer_type 0x7ffff7766000
sizetype>
            DI
            size <integer_cst 0x7ffff7751bb8 constant 64>
            unit-size <integer_cst 0x7ffff7751bd0 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffeff55738 precision:64 min <integer_cst 0x7ffff7751be8 0> max <integer_cst
0x7ffff76ba498 23>>>
    readonly constant static "\000">
$1 = void

(gdb) p debug_tree(elttype)
No symbol "elttype" in current context.
(gdb) p debug_tree(eltype)
 <record_type 0x7ffff7701e70 VectorIcon readonly cxx-odr-p VOID
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff4460000 context <namespace_decl 0x7ffff7581390 gfx>
    pointer_to_this <pointer_type 0x7ffff7701f18> reference_to_this
<reference_type 0x7ffff5ddfb28>>
$2 = void

(gdb) p debug_generic_expr (exp)
&kNoneIcon
(gdb) p debug_function(current_function_decl, 0)
GetVectorIconBadge (const struct SharingIconView * const this)
{
  bool _1;
  const struct VectorIcon * _2;

  <bb 2> [local count: 1073741824]:
  _1 = this_4(D)->should_show_error_;
  if (_1 != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 4>; [50.00%]

  <bb 3> [local count: 536870912]:

  <bb 4> [local count: 1073741824]:
  # _2 = PHI <&kNoneIcon(2), &kBlockedBadgeIcon(3)>
  return _2;

}

Will you be Martin able to fix it with the provided info?

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-08-18  7:21 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04  9:16 [Bug tree-optimization/96058] New: ICE in c_getstr at gcc/fold-const.c:15475 marxin at gcc dot gnu.org
2020-07-04  9:19 ` [Bug tree-optimization/96058] " marxin at gcc dot gnu.org
2020-07-04 14:09 ` pinskia at gcc dot gnu.org
2020-07-04 16:33 ` marxin at gcc dot gnu.org
2020-07-06  7:19 ` rguenth at gcc dot gnu.org
2020-07-07 11:51 ` marxin at gcc dot gnu.org
2020-07-07 17:59 ` msebor at gcc dot gnu.org
2020-07-07 19:02 ` jakub at gcc dot gnu.org
2020-07-08  7:04 ` marxin at gcc dot gnu.org
2020-07-15  6:54 ` [Bug tree-optimization/96058] [10/11 Regression] " rguenth at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2020-07-23 13:41 ` marxin at gcc dot gnu.org
2020-07-27 10:30 ` marxin at gcc dot gnu.org
2020-07-27 14:18 ` cvs-commit at gcc dot gnu.org
2020-07-27 14:22 ` [Bug tree-optimization/96058] [11 " marxin at gcc dot gnu.org
2020-07-28 10:37 ` cvs-commit at gcc dot gnu.org
2020-07-28 10:39 ` [Bug tree-optimization/96058] " marxin at gcc dot gnu.org
2020-08-18  6:47 ` asolokha at gmx dot com
2020-08-18  7:21 ` marxin at gcc dot gnu.org
2020-08-18  7:21 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).