From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D14E3858015; Fri, 23 Oct 2020 07:20:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D14E3858015 From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97538] New: ICE in during GIMPLE pass: wrestrict Date: Fri, 23 Oct 2020 07:20:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone cf_gcchost cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2020 07:20:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97538 Bug ID: 97538 Summary: ICE in during GIMPLE pass: wrestrict 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: --- Host: x86_64-linux Target: aarch64-linux-gnu The following fails with a cross compiler: $ cat restrict.C void *b, *c; struct H { virtual bool accept(const char *, unsigned long, int *, bool); }; char accept_bt[1], accept_cd[1]; int accept_cb; bool accept_cb_0; class t : H { bool accept(const char *, unsigned long bd, int *bg, bool) { long bu =3D sizeof(int) + bd; char *bw =3D bu > sizeof(accept_bt) ? new char : accept_bt, *cf =3D bd ? new char : accept_cd; __builtin___memcpy_chk(b, c, bd, 0); if (bw !=3D accept_bt) delete bw; bool ci =3D cj((int *)cf, bg), atran =3D bp && accept_cb_0; atran &&ci &&cm(&accept_cb); } bool cj(int *, int *); bool cm(int *); bool bp; }; void bj() { new t; } $ ~/BIG/bin/aarch64/dev/shm/buildbot/install/gcc/bin/aarch64-linux-gnu-gcc restrict.C -fno-guess-branch-probability -fno-tree-pta -O1 -c restrict.C: In member function =E2=80=98virtual bool t::accept(const char*,= long unsigned int, int*, bool)=E2=80=99: restrict.C:18:3: warning: no return statement in function returning non-void [-Wreturn-type] 18 | } | ^ during GIMPLE pass: wrestrict restrict.C:9:8: internal compiler error: Segmentation fault 9 | bool accept(const char *, unsigned long bd, int *bg, bool) { | ^~~~~~ 0xcc48bf crash_signal =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /toplev.c:330 0x7ffff76ae6bf ??? =20=20=20=20=20=20=20 /usr/src/debug/glibc-2.32-1.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_= 64/sigaction.c:0 0xf85dc7 wi::force_to_size(long*, long const*, unsigned int, unsigned int, unsigned int, signop) =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /wide-int.cc:369 0xf3094e wide_int_storage::from(generic_wide_int > const&, unsigned int, signop) =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /wide-int.h:1172 0xf3094e wide_int_to_tree_1 =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /tree.c:1538 0x8d402d get_size_range(range_query*, tree_node*, gimple*, tree_node**, int) =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /calls.c:1383 0xa68ce0 builtin_memref =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /gimple-ssa-warn-restrict.c:259 0xa6c5e7 check_bounds_or_overlap(range_query*, gimple*, tree_node*, tree_no= de*, tree_node*, tree_node*, bool, bool) =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /gimple-ssa-warn-restrict.c:2011 0xa6f70b check_call =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /gimple-ssa-warn-restrict.c:1977 0xa6f70b wrestrict_walk =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /gimple-ssa-warn-restrict.c:93 0xa6f70b execute =20=20=20=20=20=20=20 /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-aarch64/build/gcc= /gimple-ssa-warn-restrict.c:103 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=