public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-pre' Date: Mon, 23 Oct 2023 10:38:44 +0000 [thread overview] Message-ID: <bug-111873-4-nzcrGJ1RQc@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-111873-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111873 --- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- The bug is in the (early) SRA pass though; void h (const struct a i) { const short int i$b; int _1; short int _2; int _3; short int _4; int _5; <bb 2> : i$b_10 = i.b; i.b = i$b_10; _1 = g (i); d = _1; _2 = i$b_10; _3 = (int) _2; f (_3); _4 = i$b_10; _5 = (int) _4; e (_5); return; } which creates a store to the read-only parameter i: (gdb) p debug_gimple_stmt(stmt) # .MEM = VDEF <.MEM> i.b = i$b; $2 = void (gdb) p debug_tree(gimple_get_lhs (stmt)) <component_ref 0x7ffff71dee10 type <integer_type 0x7ffff71b6930 short int readonly sizes-gimplified HI size <integer_cst 0x7ffff702c0f0 constant 16> unit-size <integer_cst 0x7ffff702c108 constant 2> align:16 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff71b6930 precision:16 min <integer_cst 0x7ffff702c090 -32768> max <integer_cst 0x7ffff702c0c0 32767>> readonly arg:0 <parm_decl 0x7ffff7fc8300 i type <record_type 0x7ffff71b6540 a readonly sizes-gimplified type_0 HI size <integer_cst 0x7ffff702c0f0 16> unit-size <integer_cst 0x7ffff702c108 2> align:16 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff71b6540 fields <field_decl 0x7ffff7039688 b>> readonly used read HI pr111873.c:18:24 size <integer_cst 0x7ffff702c0f0 16> unit-size <integer_cst 0x7ffff702c108 2> align:16 warn_if_not_align:0 context <function_decl 0x7ffff71e2300 h> arg-type <record_type 0x7ffff71b6540 a>> arg:1 <field_decl 0x7ffff7039688 b type <integer_type 0x7ffff702a498 short int sizes-gimplified HI size <integer_cst 0x7ffff702c0f0 16> unit-size <integer_cst 0x7ffff702c108 2> align:16 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff702a498 precision:16 min <integer_cst 0x7ffff702c090 -32768> max <integer_cst 0x7ffff702c0c0 32767>> HI pr111873.c:5:9 size <integer_cst 0x7ffff702c0f0 16> unit-size <integer_cst 0x7ffff702c108 2> align:16 warn_if_not_align:0 offset_align 128 decl_not_flexarray: 1 offset <integer_cst 0x7ffff700bf60 constant 0> bit-offset <integer_cst 0x7ffff700bfa8 constant 0> context <record_type 0x7ffff71b6f18 a>> pr111873.c:21:7 start: pr111873.c:21:6 finish: pr111873.c:21:8> /* In a VAR_DECL, PARM_DECL or FIELD_DECL, or any kind of ..._REF node, nonzero means it may not be the lhs of an assignment. Nonzero in a FUNCTION_DECL means this function should be treated as "const" function (can only read its arguments). */ #define TREE_READONLY(NODE) (NON_TYPE_CHECK (NODE)->base.readonly_flag)
next prev parent reply other threads:[~2023-10-23 10:38 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-19 7:26 [Bug c/111873] New: runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-loop-optimize -fno-tree-pre' 19373742 at buaa dot edu.cn 2023-10-19 7:26 ` [Bug c/111873] " 19373742 at buaa dot edu.cn 2023-10-19 8:06 ` [Bug middle-end/111873] " 19373742 at buaa dot edu.cn 2023-10-19 18:40 ` [Bug ipa/111873] [12/13/14 Regression] " pinskia at gcc dot gnu.org 2023-10-23 9:20 ` [Bug ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-loop-optimize -fno-tree-pre' since r12-434-g93f8cb4965cebe sjames at gcc dot gnu.org 2023-10-23 9:50 ` ebotcazou at gcc dot gnu.org 2023-10-23 9:57 ` ebotcazou at gcc dot gnu.org 2023-10-23 10:19 ` [Bug ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-pre' ebotcazou at gcc dot gnu.org 2023-10-23 10:38 ` ebotcazou at gcc dot gnu.org [this message] 2023-10-23 10:44 ` [Bug tree-optimization/111873] " ebotcazou at gcc dot gnu.org 2024-03-07 21:04 ` law at gcc dot gnu.org 2024-03-12 13:23 ` jakub at gcc dot gnu.org 2024-06-12 22:44 ` [Bug tree-optimization/111873] [12/13/14/15 " pinskia at gcc dot gnu.org 2024-06-20 9:14 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-111873-4-nzcrGJ1RQc@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).