public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 @ 2020-06-08 15:23 marxin at gcc dot gnu.org 2020-06-08 15:23 ` [Bug tree-optimization/95580] " marxin at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: marxin at gcc dot gnu.org @ 2020-06-08 15:23 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 Bug ID: 95580 Summary: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 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 following ICE: $ cat ov.i int main(int p1, char **p2) { long a = sizeof(void); if (__builtin_strcmp(p2[1], "")) { void *p = __builtin_malloc(4); ((char *)p)[a] ^= 1; } if (__builtin_strcmp(p2[1], "quarantine")) for (int i;; i++) ; } $ gcc ov.i -O1 -Wextra -fno-tree-dse -c ‘*( during GIMPLE pass: uninit In function ‘main’: Segmentation fault 1 | int main(int p1, char **p2) { | ^~~~ 0xdb19cf crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:328 0x7ffff78b852f ??? /usr/src/debug/glibc-2.31-5.9.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x105c38a location_wrapper_p(tree_node const*) /home/marxin/Programming/gcc/gcc/tree.h:3999 0x105c38a tree_strip_any_location_wrapper(tree_node*) /home/marxin/Programming/gcc/gcc/tree.h:4011 0x105c38a integer_onep(tree_node const*) /home/marxin/Programming/gcc/gcc/tree.c:2573 0x8b5f22 c_pretty_printer::unary_expression(tree_node*) /home/marxin/Programming/gcc/gcc/c-family/c-pretty-print.c:1792 0x821f7d c_tree_printer /home/marxin/Programming/gcc/gcc/c/c-objc-common.c:317 0x821f7d c_tree_printer /home/marxin/Programming/gcc/gcc/c/c-objc-common.c:254 0x18221ac pp_format(pretty_printer*, text_info*) /home/marxin/Programming/gcc/gcc/pretty-print.c:1475 0x18073be diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /home/marxin/Programming/gcc/gcc/diagnostic.c:1159 0x1809928 diagnostic_impl /home/marxin/Programming/gcc/gcc/diagnostic.c:1309 0x1809928 warning_at(unsigned int, int, char const*, ...) /home/marxin/Programming/gcc/gcc/diagnostic.c:1446 0xfb998c maybe_warn_operand /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:431 0xfbb666 warn_uninitialized_vars /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:640 0xfbfb72 execute /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:2936 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org @ 2020-06-08 15:23 ` marxin at gcc dot gnu.org 2020-06-08 17:25 ` [Bug c/95580] " jakub at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: marxin at gcc dot gnu.org @ 2020-06-08 15:23 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |11.0 Known to work| |10.1.0 Ever confirmed|0 |1 Target Milestone|--- |11.0 Last reconfirmed| |2020-06-08 Status|UNCONFIRMED |NEW ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org 2020-06-08 15:23 ` [Bug tree-optimization/95580] " marxin at gcc dot gnu.org @ 2020-06-08 17:25 ` jakub at gcc dot gnu.org 2020-06-08 17:31 ` jakub at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2020-06-08 17:25 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Component|tree-optimization |c --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: /* PR void bar (void); void foo (int x) { if (x == 0) { void *p = __builtin_malloc (16); ((char *)p)[1] ^= 1; } bar (); } ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org 2020-06-08 15:23 ` [Bug tree-optimization/95580] " marxin at gcc dot gnu.org 2020-06-08 17:25 ` [Bug c/95580] " jakub at gcc dot gnu.org @ 2020-06-08 17:31 ` jakub at gcc dot gnu.org 2020-06-09 6:40 ` cvs-commit at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2020-06-08 17:31 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 48707 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48707&action=edit gcc11-pr95580.patch Untested fix. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org ` (2 preceding siblings ...) 2020-06-08 17:31 ` jakub at gcc dot gnu.org @ 2020-06-09 6:40 ` cvs-commit at gcc dot gnu.org 2020-06-09 6:40 ` jakub at gcc dot gnu.org 2020-06-14 10:07 ` cvs-commit at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2020-06-09 6:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:d6dbb71e468d0db561cc9eca99eeaca1efb81c11 commit r11-1081-gd6dbb71e468d0db561cc9eca99eeaca1efb81c11 Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jun 9 08:39:36 2020 +0200 c-family: Fix up MEM_REF printing [PR95580] The C FE in the MEM_REF printing ICEs if the type of the first argument (which due to useless pointer conversions can be an arbitrary type) is a pointer to an incomplete type. The code just wants to avoid printing a cast if it is a pointer to single byte elements. 2020-06-09 Jakub Jelinek <jakub@redhat.com> PR c/95580 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the case when MEM_REF's first argument has type pointer to incomplete type. * gcc.dg/pr95580.c: New test. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org ` (3 preceding siblings ...) 2020-06-09 6:40 ` cvs-commit at gcc dot gnu.org @ 2020-06-09 6:40 ` jakub at gcc dot gnu.org 2020-06-14 10:07 ` cvs-commit at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2020-06-09 6:40 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/95580] [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org ` (4 preceding siblings ...) 2020-06-09 6:40 ` jakub at gcc dot gnu.org @ 2020-06-14 10:07 ` cvs-commit at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2020-06-14 10:07 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95580 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:b2229175b53e3b1c58b4aa963e3d0bb06ca063bf commit r10-8297-gb2229175b53e3b1c58b4aa963e3d0bb06ca063bf Author: Jakub Jelinek <jakub@redhat.com> Date: Tue Jun 9 08:39:36 2020 +0200 c-family: Fix up MEM_REF printing [PR95580] The C FE in the MEM_REF printing ICEs if the type of the first argument (which due to useless pointer conversions can be an arbitrary type) is a pointer to an incomplete type. The code just wants to avoid printing a cast if it is a pointer to single byte elements. 2020-06-09 Jakub Jelinek <jakub@redhat.com> PR c/95580 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the case when MEM_REF's first argument has type pointer to incomplete type. * gcc.dg/pr95580.c: New test. (cherry picked from commit d6dbb71e468d0db561cc9eca99eeaca1efb81c11) ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-06-14 10:07 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-08 15:23 [Bug tree-optimization/95580] New: [11 Regression] ICE in tree_strip_any_location_wrapper at gcc/tree.h:4011 since r11-959-gb825a22890740f34 marxin at gcc dot gnu.org 2020-06-08 15:23 ` [Bug tree-optimization/95580] " marxin at gcc dot gnu.org 2020-06-08 17:25 ` [Bug c/95580] " jakub at gcc dot gnu.org 2020-06-08 17:31 ` jakub at gcc dot gnu.org 2020-06-09 6:40 ` cvs-commit at gcc dot gnu.org 2020-06-09 6:40 ` jakub at gcc dot gnu.org 2020-06-14 10:07 ` cvs-commit 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).